mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:23:13 +08:00
168 lines
6.0 KiB
Handlebars
168 lines
6.0 KiB
Handlebars
<form class="form-horizontal">
|
|
|
|
<div>
|
|
{{#if model.automatic}}
|
|
<h3>{{model.name}}</h3>
|
|
{{else}}
|
|
<label for="name">{{i18n 'admin.groups.name'}}</label>
|
|
{{text-field name="name" value=model.name placeholderKey="admin.groups.name_placeholder"}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
{{#if model.id}}
|
|
{{#unless model.automatic}}
|
|
{{#if model.hasOwners}}
|
|
<div>
|
|
<label for='owner-list'>{{i18n 'admin.groups.group_owners'}}</label>
|
|
<div class="ac-wrap clearfix" id='owner-list'>
|
|
{{#each model.owners as |member|}}
|
|
{{group-member member=member removeAction="removeOwner"}}
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
<div>
|
|
<label for="owner-selector">{{i18n 'admin.groups.add_owners'}}</label>
|
|
{{user-selector usernames=model.ownerUsernames placeholderKey="admin.groups.selector_placeholder" id="owner-selector"}}
|
|
{{d-button action="addOwners" class="add" icon="plus" label="admin.groups.add"}}
|
|
</div>
|
|
{{/unless}}
|
|
<div>
|
|
<label>{{i18n 'admin.groups.group_members'}} ({{model.user_count}})</label>
|
|
<div>
|
|
<a class="previous {{if showingFirst 'disabled'}}" {{action "previous"}}>{{fa-icon "fast-backward"}}</a>
|
|
{{currentPage}}/{{totalPages}}
|
|
<a class="next {{if showingLast 'disabled'}}" {{action "next"}}>{{fa-icon "fast-forward"}}</a>
|
|
</div>
|
|
<div class="ac-wrap clearfix">
|
|
{{#each model.members as |member|}}
|
|
{{group-member member=member automatic=model.automatic removeAction="removeMember"}}
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
|
|
{{#unless model.automatic}}
|
|
<div>
|
|
<label for="user-selector">{{i18n 'admin.groups.add_members'}}</label>
|
|
{{user-selector usernames=model.usernames placeholderKey="admin.groups.selector_placeholder" id="user-selector"}}
|
|
{{d-button action="addMembers" class="add" icon="plus" label="admin.groups.add"}}
|
|
</div>
|
|
{{/unless}}
|
|
{{/if}}
|
|
|
|
<div>
|
|
<label>
|
|
{{input type="checkbox" checked=model.visible}}
|
|
{{i18n 'groups.visible'}}
|
|
</label>
|
|
</div>
|
|
|
|
{{#unless model.automatic}}
|
|
<div>
|
|
<label for="primary_group">
|
|
{{input type="checkbox" checked=model.primary_group}}
|
|
{{i18n 'admin.groups.primary_group'}}
|
|
</label>
|
|
</div>
|
|
{{/unless}}
|
|
|
|
<div>
|
|
<label for="alias">{{i18n 'groups.alias_levels.title'}}</label>
|
|
{{combo-box name="alias" valueAttribute="value" value=model.alias_level content=aliasLevelOptions}}
|
|
</div>
|
|
|
|
{{#unless model.automatic}}
|
|
<div>
|
|
<label for="automatic_membership">{{i18n 'admin.groups.automatic_membership_email_domains'}}</label>
|
|
{{list-setting name="automatic_membership" settingValue=model.emailDomains}}
|
|
<label>
|
|
{{input type="checkbox" checked=model.automatic_membership_retroactive}}
|
|
{{i18n 'admin.groups.automatic_membership_retroactive'}}
|
|
</label>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="title">
|
|
{{i18n 'admin.groups.default_title'}}
|
|
</label>
|
|
{{input value=model.title}}
|
|
</div>
|
|
|
|
<div>
|
|
<label for="grant_trust_level">{{i18n 'groups.trust_levels.title'}}</label>
|
|
{{combo-box name="grant_trust_level" valueAttribute="value" value=model.grant_trust_level content=trustLevelOptions}}
|
|
</div>
|
|
|
|
{{#if siteSettings.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"}}
|
|
{{plugin-outlet "group-email-in"}}
|
|
{{/if}}
|
|
{{/unless}}
|
|
|
|
{{#unless model.automatic}}
|
|
<div class="flair_inputs">
|
|
<div class="flair_left">
|
|
<div>
|
|
<label for="flair_url">{{i18n 'admin.groups.flair_url'}}</label>
|
|
{{text-field name="flair_url" value=model.flair_url placeholderKey="admin.groups.flair_url_placeholder"}}
|
|
</div>
|
|
|
|
<div>
|
|
<label for="flair_bg_color">{{i18n 'admin.groups.flair_bg_color'}}</label>
|
|
{{text-field name="flair_bg_color" class="flair_bg_color" value=model.flair_bg_color placeholderKey="admin.groups.flair_bg_color_placeholder"}}
|
|
</div>
|
|
|
|
{{#if flairPreviewIcon}}
|
|
<div>
|
|
<label for="flair_color">{{i18n 'admin.groups.flair_color'}}</label>
|
|
{{text-field name="flair_color" class="flair_color" value=model.flair_color placeholderKey="admin.groups.flair_color_placeholder"}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
|
|
{{#if flairPreviewIcon}}
|
|
<div class="flair_right">
|
|
<div>
|
|
<label>{{i18n 'admin.groups.flair_preview'}} Icon</label>
|
|
<div class="avatar-flair-preview">
|
|
<div class="avatar-wrapper">
|
|
<img alt width="45" height="45" src="{{demoAvatarUrl}}" class="avatar actor">
|
|
</div>
|
|
<div class="avatar-flair demo {{flairPreviewClasses}}" style={{flairPreviewStyle}}>
|
|
<i class="fa {{model.flair_url}}"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if flairPreviewImage}}
|
|
<div class="flair_right">
|
|
<div>
|
|
<label>{{i18n 'admin.groups.flair_preview'}} Image</label>
|
|
<div class="avatar-flair-preview">
|
|
<div class="avatar-wrapper">
|
|
<img alt width="45" height="45" src="{{demoAvatarUrl}}" class="avatar actor">
|
|
</div>
|
|
<div class="avatar-flair demo {{flairPreviewClasses}}" style={{flairPreviewStyle}}></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
{{/unless}}
|
|
|
|
<div class='buttons'>
|
|
<button {{action "save"}} disabled={{disableSave}} class='btn btn-primary'>{{i18n 'admin.customize.save'}}</button>
|
|
{{#unless model.automatic}}
|
|
<button {{action "destroy"}} class='btn btn-danger'>{{fa-icon "trash-o"}}{{i18n 'admin.customize.delete'}}</button>
|
|
{{/unless}}
|
|
|
|
<span class="saving {{unless savingStatus 'hidden'}}">{{savingStatus}}</span>
|
|
</div>
|
|
|
|
</form>
|