mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-25 07:54:11 -05:00
FIX: staff action logs not logging all changes
This commit is contained in:
parent
3de5b1799e
commit
8c5d8715cd
3 changed files with 89 additions and 24 deletions
|
@ -1,5 +1,4 @@
|
||||||
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
||||||
|
|
||||||
import ObjectController from 'discourse/controllers/object';
|
import ObjectController from 'discourse/controllers/object';
|
||||||
|
|
||||||
export default ObjectController.extend(ModalFunctionality, {
|
export default ObjectController.extend(ModalFunctionality, {
|
||||||
|
@ -7,14 +6,16 @@ export default ObjectController.extend(ModalFunctionality, {
|
||||||
newSelected: Ember.computed.equal('selectedTab', 'new'),
|
newSelected: Ember.computed.equal('selectedTab', 'new'),
|
||||||
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
this.selectNew();
|
this.send("selectNew");
|
||||||
},
|
},
|
||||||
|
|
||||||
selectNew: function() {
|
actions: {
|
||||||
this.set('selectedTab', 'new');
|
selectNew: function() {
|
||||||
},
|
this.set('selectedTab', 'new');
|
||||||
|
},
|
||||||
|
|
||||||
selectPrevious: function() {
|
selectPrevious: function() {
|
||||||
this.set('selectedTab', 'previous');
|
this.set('selectedTab', 'previous');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,19 +1,73 @@
|
||||||
<section class="field">
|
|
||||||
<b>{{i18n 'admin.customize.css'}}</b>:
|
|
||||||
{{#if stylesheet}}
|
|
||||||
({{i18n 'character_count' count=stylesheet.length}})
|
|
||||||
{{/if}}
|
|
||||||
<br/>
|
|
||||||
{{textarea value=stylesheet class="plain"}}
|
|
||||||
</section>
|
|
||||||
<section class="field">
|
|
||||||
<b>{{i18n 'admin.customize.header'}}</b>:
|
|
||||||
{{#if header}}
|
|
||||||
({{i18n 'character_count' count=header.length}})
|
|
||||||
{{/if}}
|
|
||||||
<br/>
|
|
||||||
{{textarea value=header class="plain"}}
|
|
||||||
</section>
|
|
||||||
<section class="field">
|
<section class="field">
|
||||||
<b>{{i18n 'admin.customize.enabled'}}</b>: {{enabled}}
|
<b>{{i18n 'admin.customize.enabled'}}</b>: {{enabled}}
|
||||||
</section>
|
</section>
|
||||||
|
{{#if stylesheet}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{i18n 'admin.customize.css'}}</b>: ({{i18n 'character_count' count=stylesheet.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=stylesheet class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#if mobile_stylesheet}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{fa-icon "mobile"}} {{i18n 'admin.customize.css'}}</b>: ({{i18n 'character_count' count=mobile_stylesheet.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=mobile_stylesheet class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#if header}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{i18n 'admin.customize.header'}}</b>: ({{i18n 'character_count' count=header.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=header class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#if mobile_header}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{fa-icon "mobile"}} {{i18n 'admin.customize.header'}}</b>: ({{i18n 'character_count' count=mobile_header.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=mobile_header class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#if top}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{i18n 'admin.customize.top'}}</b>: ({{i18n 'character_count' count=top.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=top class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#if mobile_top}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{fa-icon "mobile"}} {{i18n 'admin.customize.top'}}</b>: ({{i18n 'character_count' count=mobile_top.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=mobile_top class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#if footer}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{i18n 'admin.customize.footer'}}</b>: ({{i18n 'character_count' count=footer.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=footer class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#if mobile_footer}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{fa-icon "mobile"}} {{i18n 'admin.customize.footer'}}</b>: ({{i18n 'character_count' count=mobile_footer.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=mobile_footer class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#if head_tag}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{fa-icon "file-text-o"}} {{i18n 'admin.customize.head_tag.text'}}</b>: ({{i18n 'character_count' count=head_tag.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=head_tag class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{#if body_tag}}
|
||||||
|
<section class="field">
|
||||||
|
<b>{{fa-icon "file-text-o"}} {{i18n 'admin.customize.body_tag.text'}}</b>: ({{i18n 'character_count' count=body_tag.length}})
|
||||||
|
<br/>
|
||||||
|
{{textarea value=body_tag class="plain"}}
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
|
|
@ -100,7 +100,17 @@ class StaffActionLogger
|
||||||
}))
|
}))
|
||||||
end
|
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={})
|
def log_site_customization_change(old_record, site_customization_params, opts={})
|
||||||
raise Discourse::InvalidParameters.new(:site_customization_params) unless site_customization_params
|
raise Discourse::InvalidParameters.new(:site_customization_params) unless site_customization_params
|
||||||
|
|
Loading…
Reference in a new issue