Show staff action log details in a modal

This commit is contained in:
Neil Lalonde
2013-08-21 12:33:05 -04:00
parent 47add6da70
commit e5464a4bed
7 changed files with 41 additions and 12 deletions

View File

@@ -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')
});