mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 16:24:55 +00:00
Remove the last of the admin view classes
This commit is contained in:
parent
a69f45d0da
commit
6431b03d66
@ -1,7 +1,7 @@
|
||||
import ChangeSiteCustomizationDetailsController from "admin/controllers/modals/change-site-customization-details";
|
||||
|
||||
export default ChangeSiteCustomizationDetailsController.extend({
|
||||
onShow: function() {
|
||||
onShow() {
|
||||
this.send("selectPrevious");
|
||||
}
|
||||
});
|
||||
|
@ -6,7 +6,7 @@ export default AdminEmailIncomings.extend({
|
||||
|
||||
actions: {
|
||||
showIncomingEmail(id) {
|
||||
showModal('modals/admin-incoming-email');
|
||||
showModal('admin-incoming-email', { admin: true });
|
||||
this.controllerFor("modals/admin-incoming-email").load(id);
|
||||
}
|
||||
}
|
||||
|
@ -13,13 +13,18 @@ export default Discourse.Route.extend({
|
||||
|
||||
actions: {
|
||||
showDetailsModal(model) {
|
||||
showModal('modals/admin-staff-action-log-details', { model });
|
||||
showModal('admin-staff-action-log-details', { model, admin: true });
|
||||
this.controllerFor('modal').set('modalClass', 'log-details-modal');
|
||||
},
|
||||
|
||||
showCustomDetailsModal(model) {
|
||||
const modalName = "modals/" + (model.action_name + '_details').replace("_", "-");
|
||||
showModal(modalName, { model });
|
||||
const modalName = (model.action_name + '_details').replace(/\_/g, "-");
|
||||
|
||||
showModal(modalName, {
|
||||
model,
|
||||
admin: true,
|
||||
templateName: 'site-customization-change'
|
||||
});
|
||||
this.controllerFor('modal').set('modalClass', 'tabbed-modal log-details-modal');
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
<section class="field">
|
||||
<b>{{i18n 'admin.customize.enabled'}}</b>: {{change.enabled}}
|
||||
</section>
|
||||
|
||||
{{site-customization-change-field field=change.stylesheet name="admin.customize.css"}}
|
||||
{{site-customization-change-field icon="mobile" field=change.mobile_stylesheet name="admin.customize.css"}}
|
||||
|
||||
{{site-customization-change-field field=change.header name="admin.customize.header"}}
|
||||
{{site-customization-change-field icon="mobile" field=change.mobile_header name="admin.customize.header"}}
|
||||
|
||||
{{site-customization-change-field field=change.top name="admin.customize.top"}}
|
||||
{{site-customization-change-field icon="mobile" field=change.mobile_top name="admin.customize.top"}}
|
||||
|
||||
{{site-customization-change-field field=change.footer name="admin.customize.footer"}}
|
||||
{{site-customization-change-field icon="mobile" field=change.mobile_footer name="admin.customize.footer"}}
|
||||
|
||||
{{site-customization-change-field icon="file-text-o" field=change.head_tag name="admin.customize.head_tag.text"}}
|
||||
{{site-customization-change-field icon="file-text-o" field=change.body_tag name="admin.customize.body_tag.text"}}
|
@ -0,0 +1,7 @@
|
||||
{{#if field}}
|
||||
<section class="field">
|
||||
<b>{{i18n name}}</b>: ({{i18n 'character_count' count=field.length}})
|
||||
<br/>
|
||||
{{textarea value=field class="plain"}}
|
||||
</section>
|
||||
{{/if}}
|
@ -1,73 +0,0 @@
|
||||
<section class="field">
|
||||
<b>{{i18n 'admin.customize.enabled'}}</b>: {{enabled}}
|
||||
</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}}
|
@ -1,45 +1,45 @@
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.error"}}</label>
|
||||
<div class="controls">
|
||||
<p>{{model.error}}</p>
|
||||
{{#if model.error_description}}
|
||||
<p class="error-description">{{model.error_description}}</p>
|
||||
{{/if}}
|
||||
{{#d-modal-body class="incoming-emails" title="admin.email.incoming_emails.modal.title"}}
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.error"}}</label>
|
||||
<div class="controls">
|
||||
<p>{{model.error}}</p>
|
||||
{{#if model.error_description}}
|
||||
<p class="error-description">{{model.error_description}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.headers"}}</label>
|
||||
<div class="controls">
|
||||
{{textarea value=model.headers wrap="off"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.subject"}}</label>
|
||||
<div class="controls">
|
||||
{{model.subject}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.body"}}</label>
|
||||
<div class="controls">
|
||||
{{textarea value=model.body}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if model.rejection_message}}
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.rejection_message"}}</label>
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.headers"}}</label>
|
||||
<div class="controls">
|
||||
{{textarea value=model.rejection_message}}
|
||||
{{textarea value=model.headers wrap="off"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.subject"}}</label>
|
||||
<div class="controls">
|
||||
{{model.subject}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.body"}}</label>
|
||||
<div class="controls">
|
||||
{{textarea value=model.body}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if model.rejection_message}}
|
||||
<hr>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.email.incoming_emails.modal.rejection_message"}}</label>
|
||||
<div class="controls">
|
||||
{{textarea value=model.rejection_message}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/d-modal-body}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="modal-body">
|
||||
{{#d-modal-body title="admin.logs.staff_actions.modal_title"}}
|
||||
<pre>{{model.details}}</pre>
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
<div class="modal-footer">
|
||||
<button class='btn btn-primary' {{action "closeModal"}}>{{i18n 'close'}}</button>
|
||||
</div>
|
@ -7,26 +7,22 @@
|
||||
<a href {{action "selectPrevious"}}>{{i18n 'admin.logs.staff_actions.previous_value'}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="modal-body">
|
||||
{{#d-modal-body title="admin.logs.staff_actions.modal_title"}}
|
||||
<div class="modal-tab new-tab {{unless newSelected 'invisible'}}">
|
||||
{{#if model.new_value}}
|
||||
{{#with model.new_value}}
|
||||
{{partial "admin/templates/logs/site-customization-change-details"}}
|
||||
{{/with}}
|
||||
{{site-customization-change-details change=model.new_value}}
|
||||
{{else}}
|
||||
{{i18n 'admin.logs.staff_actions.deleted'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="modal-tab previous-tab {{unless previousSelected 'invisible'}}">
|
||||
{{#if model.previous_value}}
|
||||
{{#with model.previous_value}}
|
||||
{{partial "admin/templates/logs/site-customization-change-details"}}
|
||||
{{/with}}
|
||||
{{site-customization-change-details change=model.previous_value}}
|
||||
{{else}}
|
||||
{{i18n 'admin.logs.staff_actions.no_previous'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
<div class="modal-footer">
|
||||
<button class='btn btn-primary' {{action "closeModal"}}>{{i18n 'close'}}</button>
|
||||
</div>
|
@ -1,7 +0,0 @@
|
||||
import ModalBodyView from "discourse/views/modal-body";
|
||||
|
||||
export default ModalBodyView.extend({
|
||||
templateName: 'admin/templates/modal/admin_incoming_email',
|
||||
classNames: ['incoming-emails'],
|
||||
title: I18n.t('admin.email.incoming_emails.modal.title')
|
||||
});
|
@ -1,6 +0,0 @@
|
||||
import ModalBodyView from "discourse/views/modal-body";
|
||||
|
||||
export default ModalBodyView.extend({
|
||||
templateName: 'admin/templates/logs/details_modal',
|
||||
title: I18n.t('admin.logs.staff_actions.modal_title')
|
||||
});
|
@ -1,6 +0,0 @@
|
||||
import ModalBodyView from "discourse/views/modal-body";
|
||||
|
||||
export default ModalBodyView.extend({
|
||||
templateName: 'admin/templates/logs/site_customization_change_modal',
|
||||
title: I18n.t('admin.logs.staff_actions.modal_title')
|
||||
});
|
@ -1,6 +0,0 @@
|
||||
import ModalBodyView from "discourse/views/modal-body";
|
||||
|
||||
export default ModalBodyView.extend({
|
||||
templateName: 'admin/templates/logs/site_customization_change_modal',
|
||||
title: I18n.t('admin.logs.staff_actions.modal_title')
|
||||
});
|
@ -16,7 +16,7 @@ export default function(name, opts) {
|
||||
if (viewClass) {
|
||||
route.render(name, { into: 'modal', outlet: 'modalBody' });
|
||||
} else {
|
||||
const templateName = Ember.String.dasherize(name);
|
||||
const templateName = opts.templateName || Ember.String.dasherize(name);
|
||||
|
||||
const renderArgs = { into: 'modal', outlet: 'modalBody', view: 'modal-body'};
|
||||
if (controller) { renderArgs.controller = controllerName; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user