mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Show staff action log details in a modal
This commit is contained in:
@@ -17,7 +17,7 @@ Discourse.StaffActionLog = Discourse.Model.extend({
|
||||
var formatted = "";
|
||||
formatted += this.format('email', 'email');
|
||||
formatted += this.format('admin.logs.staff_actions.ip_address', 'ip_address');
|
||||
if (!this.get('useModalForDetails')) {
|
||||
if (!this.get('useCustomModalForDetails')) {
|
||||
formatted += this.format('admin.logs.staff_actions.new_value', 'new_value');
|
||||
formatted += this.format('admin.logs.staff_actions.previous_value', 'previous_value');
|
||||
}
|
||||
@@ -33,6 +33,10 @@ Discourse.StaffActionLog = Discourse.Model.extend({
|
||||
},
|
||||
|
||||
useModalForDetails: function() {
|
||||
return (this.get('details') && this.get('details').length > 0);
|
||||
}.property('action_name'),
|
||||
|
||||
useCustomModalForDetails: function() {
|
||||
return _.contains(['change_site_customization', 'delete_site_customization'], this.get('action_name'));
|
||||
}.property('action_name')
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user