mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
Log when a site customization is deleted
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
/**
|
||||
The modal for viewing the details of a staff action log record.
|
||||
The modal for viewing the details of a staff action log record
|
||||
for when a site customization is created or changed.
|
||||
|
||||
@class ChangeSiteCustomizationDetailsController
|
||||
@extends Discourse.Controller
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
The modal for viewing the details of a staff action log record
|
||||
for when a site customization is deleted.
|
||||
|
||||
@class DeleteSiteCustomizationDetailsController
|
||||
@extends Discourse.Controller
|
||||
@namespace Discourse
|
||||
@uses Discourse.ModalFunctionality
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.DeleteSiteCustomizationDetailsController = Discourse.ChangeSiteCustomizationDetailsController.extend({
|
||||
onShow: function() {
|
||||
this.selectPrevious();
|
||||
}
|
||||
});
|
||||
@@ -33,7 +33,7 @@ Discourse.StaffActionLog = Discourse.Model.extend({
|
||||
},
|
||||
|
||||
useModalForDetails: function() {
|
||||
return (this.get('action_name') === 'change_site_customization');
|
||||
return _.contains(['change_site_customization', 'delete_site_customization'], this.get('action_name'));
|
||||
}.property('action_name')
|
||||
});
|
||||
|
||||
|
||||
+7
-3
@@ -9,9 +9,13 @@
|
||||
</ul>
|
||||
<div class="modal-body">
|
||||
<div {{bindAttr class=":modal-tab :new-tab newSelected::invisible"}}>
|
||||
{{#with new_value}}
|
||||
{{partial "admin/templates/logs/site_customization_change_details"}}
|
||||
{{/with}}
|
||||
{{#if new_value}}
|
||||
{{#with new_value}}
|
||||
{{partial "admin/templates/logs/site_customization_change_details"}}
|
||||
{{/with}}
|
||||
{{else}}
|
||||
{{i18n admin.logs.staff_actions.deleted}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div {{bindAttr class=":modal-tab :previous-tab previousSelected::invisible"}}>
|
||||
{{#if previous_value}}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/**
|
||||
A modal view for details of a staff action log record in a modal.
|
||||
A modal view for details of a staff action log record in a modal
|
||||
for when a site customization is created or changed.
|
||||
|
||||
@class ChangeSiteCustomizationDetailsView
|
||||
@extends Discourse.ModalBodyView
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
A modal view for details of a staff action log record in a modal
|
||||
for when a site customization is deleted.
|
||||
|
||||
@class DeleteSiteCustomizationDetailsView
|
||||
@extends Discourse.ModalBodyView
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.DeleteSiteCustomizationDetailsView = Discourse.ModalBodyView.extend({
|
||||
templateName: 'admin/templates/logs/site_customization_change_modal',
|
||||
title: I18n.t('admin.logs.staff_actions.modal_title')
|
||||
});
|
||||
Reference in New Issue
Block a user