diff --git a/app/assets/javascripts/admin/controllers/change-site-customization-details.js.es6 b/app/assets/javascripts/admin/controllers/change-site-customization-details.js.es6
index 13e6086f7..1ef3e217d 100644
--- a/app/assets/javascripts/admin/controllers/change-site-customization-details.js.es6
+++ b/app/assets/javascripts/admin/controllers/change-site-customization-details.js.es6
@@ -1,5 +1,4 @@
import ModalFunctionality from 'discourse/mixins/modal-functionality';
-
import ObjectController from 'discourse/controllers/object';
export default ObjectController.extend(ModalFunctionality, {
@@ -7,14 +6,16 @@ export default ObjectController.extend(ModalFunctionality, {
newSelected: Ember.computed.equal('selectedTab', 'new'),
onShow: function() {
- this.selectNew();
+ this.send("selectNew");
},
- selectNew: function() {
- this.set('selectedTab', 'new');
- },
+ actions: {
+ selectNew: function() {
+ this.set('selectedTab', 'new');
+ },
- selectPrevious: function() {
- this.set('selectedTab', 'previous');
+ selectPrevious: function() {
+ this.set('selectedTab', 'previous');
+ }
}
});
diff --git a/app/assets/javascripts/admin/templates/logs/_site_customization_change_details.hbs b/app/assets/javascripts/admin/templates/logs/_site_customization_change_details.hbs
index 1c353f62a..2c6443e56 100644
--- a/app/assets/javascripts/admin/templates/logs/_site_customization_change_details.hbs
+++ b/app/assets/javascripts/admin/templates/logs/_site_customization_change_details.hbs
@@ -1,19 +1,73 @@
-
- {{i18n 'admin.customize.css'}}:
- {{#if stylesheet}}
- ({{i18n 'character_count' count=stylesheet.length}})
- {{/if}}
-
- {{textarea value=stylesheet class="plain"}}
-
-
- {{i18n 'admin.customize.header'}}:
- {{#if header}}
- ({{i18n 'character_count' count=header.length}})
- {{/if}}
-
- {{textarea value=header class="plain"}}
-
{{i18n 'admin.customize.enabled'}}: {{enabled}}
+{{#if stylesheet}}
+
+ {{i18n 'admin.customize.css'}}: ({{i18n 'character_count' count=stylesheet.length}})
+
+ {{textarea value=stylesheet class="plain"}}
+
+{{/if}}
+{{#if mobile_stylesheet}}
+
+ {{fa-icon "mobile"}} {{i18n 'admin.customize.css'}}: ({{i18n 'character_count' count=mobile_stylesheet.length}})
+
+ {{textarea value=mobile_stylesheet class="plain"}}
+
+{{/if}}
+{{#if header}}
+
+ {{i18n 'admin.customize.header'}}: ({{i18n 'character_count' count=header.length}})
+
+ {{textarea value=header class="plain"}}
+
+{{/if}}
+{{#if mobile_header}}
+
+ {{fa-icon "mobile"}} {{i18n 'admin.customize.header'}}: ({{i18n 'character_count' count=mobile_header.length}})
+
+ {{textarea value=mobile_header class="plain"}}
+
+{{/if}}
+{{#if top}}
+
+ {{i18n 'admin.customize.top'}}: ({{i18n 'character_count' count=top.length}})
+
+ {{textarea value=top class="plain"}}
+
+{{/if}}
+{{#if mobile_top}}
+
+ {{fa-icon "mobile"}} {{i18n 'admin.customize.top'}}: ({{i18n 'character_count' count=mobile_top.length}})
+
+ {{textarea value=mobile_top class="plain"}}
+
+{{/if}}
+{{#if footer}}
+
+ {{i18n 'admin.customize.footer'}}: ({{i18n 'character_count' count=footer.length}})
+
+ {{textarea value=footer class="plain"}}
+
+{{/if}}
+{{#if mobile_footer}}
+
+ {{fa-icon "mobile"}} {{i18n 'admin.customize.footer'}}: ({{i18n 'character_count' count=mobile_footer.length}})
+
+ {{textarea value=mobile_footer class="plain"}}
+
+{{/if}}
+{{#if head_tag}}
+
+ {{fa-icon "file-text-o"}} {{i18n 'admin.customize.head_tag.text'}}: ({{i18n 'character_count' count=head_tag.length}})
+
+ {{textarea value=head_tag class="plain"}}
+
+{{/if}}
+{{#if body_tag}}
+
+ {{fa-icon "file-text-o"}} {{i18n 'admin.customize.body_tag.text'}}: ({{i18n 'character_count' count=body_tag.length}})
+
+ {{textarea value=body_tag class="plain"}}
+
+{{/if}}
diff --git a/app/services/staff_action_logger.rb b/app/services/staff_action_logger.rb
index 10b13092a..0e420e5f4 100644
--- a/app/services/staff_action_logger.rb
+++ b/app/services/staff_action_logger.rb
@@ -100,7 +100,17 @@ class StaffActionLogger
}))
end
- SITE_CUSTOMIZATION_LOGGED_ATTRS = ['stylesheet', 'header', 'position', 'enabled', 'key']
+ SITE_CUSTOMIZATION_LOGGED_ATTRS = [
+ 'stylesheet', 'mobile_stylesheet',
+ 'header', 'mobile_header',
+ 'top', 'mobile_top',
+ 'footer', 'mobile_footer',
+ 'head_tag',
+ 'body_tag',
+ 'position',
+ 'enabled',
+ 'key'
+ ]
def log_site_customization_change(old_record, site_customization_params, opts={})
raise Discourse::InvalidParameters.new(:site_customization_params) unless site_customization_params