mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 01:22:36 +08:00
FEATURE: add plugin-outlets from groups & categories incoming emails
This commit is contained in:
parent
fe080f5c57
commit
af53d37e47
|
@ -2,26 +2,23 @@ import Group from 'discourse/models/group';
|
|||
|
||||
export default Discourse.Route.extend({
|
||||
|
||||
model: function(params) {
|
||||
var groups = this.modelFor('adminGroupsType');
|
||||
model(params) {
|
||||
if (params.name === 'new') {
|
||||
return Group.create({
|
||||
automatic: false,
|
||||
visible: true
|
||||
});
|
||||
return Group.create({ automatic: false, visible: true });
|
||||
}
|
||||
|
||||
var group = groups.findProperty('name', params.name);
|
||||
const group = this.modelFor('adminGroupsType')
|
||||
.findProperty('name', params.name);
|
||||
|
||||
if (!group) { return this.transitionTo('adminGroups.index'); }
|
||||
|
||||
return group;
|
||||
},
|
||||
|
||||
setupController: function(controller, model) {
|
||||
setupController(controller, model) {
|
||||
controller.set("model", model);
|
||||
controller.set("model.usernames", null);
|
||||
controller.set("savingStatus", '');
|
||||
controller.set("savingStatus", "");
|
||||
model.findMembers();
|
||||
}
|
||||
|
||||
|
|
|
@ -94,10 +94,10 @@
|
|||
</div>
|
||||
|
||||
{{#if siteSettings.email_in}}
|
||||
<div>
|
||||
{{#plugin-outlet "group-email-in"}}
|
||||
<label for="incoming_email">{{i18n 'admin.groups.incoming_email'}}</label>
|
||||
{{text-field name="incoming_email" value=model.incoming_email placeholderKey="admin.groups.incoming_email_placeholder"}}
|
||||
</div>
|
||||
{{/plugin-outlet}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ajax } from 'discourse/lib/ajax';
|
||||
import computed from 'ember-addons/ember-computed-decorators';
|
||||
import computed from "ember-addons/ember-computed-decorators";
|
||||
|
||||
const Group = Discourse.Model.extend({
|
||||
limit: 50,
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
</section>
|
||||
|
||||
{{#if emailInEnabled}}
|
||||
{{#plugin-outlet "category-email-in"}}
|
||||
<section class='field'>
|
||||
<label>
|
||||
{{input type="checkbox" checked=category.email_in_allow_strangers}}
|
||||
|
@ -34,6 +35,7 @@
|
|||
{{text-field value=category.email_in}}
|
||||
</label>
|
||||
</section>
|
||||
{{/plugin-outlet}}
|
||||
{{/if}}
|
||||
|
||||
{{#if showPositionInput}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user