2014-10-17 14:27:40 -04:00
|
|
|
<div class='current-badge span13'>
|
|
|
|
<form class="form-horizontal">
|
|
|
|
<div>
|
2014-12-08 16:35:49 -05:00
|
|
|
<label for="name">{{i18n 'admin.badges.name'}}</label>
|
2015-12-26 17:58:54 -05:00
|
|
|
{{#if readOnly}}
|
2016-04-08 03:52:50 -04:00
|
|
|
{{input type="text" name="name" value=buffered.name disabled=true}}
|
2015-12-26 17:58:54 -05:00
|
|
|
{{else}}
|
|
|
|
{{input type="text" name="name" value=buffered.name}}
|
|
|
|
{{/if}}
|
2014-10-17 14:27:40 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2015-12-26 17:58:54 -05:00
|
|
|
<label for="icon">{{i18n 'admin.badges.icon'}}</label>
|
|
|
|
{{input type="text" name="icon" value=buffered.icon}}
|
2014-12-08 16:35:49 -05:00
|
|
|
<p class='help'>{{i18n 'admin.badges.icon_help'}}</p>
|
2014-10-17 14:27:40 -04:00
|
|
|
</div>
|
|
|
|
|
2014-10-20 13:15:58 -04:00
|
|
|
<div>
|
2015-12-26 17:58:54 -05:00
|
|
|
<label for="image">{{i18n 'admin.badges.image'}}</label>
|
|
|
|
{{input type="text" name="image" value=buffered.image}}
|
2014-12-08 16:35:49 -05:00
|
|
|
<p class='help'>{{i18n 'admin.badges.icon_help'}}</p>
|
2014-10-20 13:15:58 -04:00
|
|
|
</div>
|
|
|
|
|
2014-10-17 14:27:40 -04:00
|
|
|
<div>
|
2014-12-08 16:35:49 -05:00
|
|
|
<label for="badge_type_id">{{i18n 'admin.badges.badge_type'}}</label>
|
2016-05-05 15:42:54 -04:00
|
|
|
{{combo-box name="badge_type_id"
|
|
|
|
value=buffered.badge_type_id
|
|
|
|
content=badgeTypes
|
|
|
|
optionValuePath="content.id"
|
|
|
|
optionLabelPath="content.name"
|
|
|
|
disabled=readOnly}}
|
2014-10-17 14:27:40 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2014-12-08 16:35:49 -05:00
|
|
|
<label for="badge_grouping_id">{{i18n 'admin.badges.badge_grouping'}}</label>
|
2016-05-05 15:42:54 -04:00
|
|
|
{{combo-box name="badge_grouping_id"
|
|
|
|
value=buffered.badge_grouping_id
|
|
|
|
content=badgeGroupings
|
|
|
|
optionValuePath="content.id"
|
|
|
|
optionLabelPath="content.displayName"}}
|
2014-10-17 14:27:40 -04:00
|
|
|
<button {{action "editGroupings"}} class='btn'>{{fa-icon 'pencil'}}</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
2014-12-08 16:35:49 -05:00
|
|
|
<label for="description">{{i18n 'admin.badges.description'}}</label>
|
2016-03-28 03:38:38 -04:00
|
|
|
{{#if buffered.system}}
|
2016-04-08 03:52:50 -04:00
|
|
|
{{textarea name="description" value=buffered.description disabled=true}}
|
2016-03-28 03:38:38 -04:00
|
|
|
{{else}}
|
2014-10-17 14:27:40 -04:00
|
|
|
{{textarea name="description" value=buffered.description}}
|
2016-03-28 03:38:38 -04:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label for="long_description">{{i18n 'admin.badges.long_description'}}</label>
|
|
|
|
{{#if buffered.system}}
|
|
|
|
{{textarea name="long_description" value=buffered.long_description disabled=true}}
|
2014-10-17 14:27:40 -04:00
|
|
|
{{else}}
|
2016-03-28 03:38:38 -04:00
|
|
|
{{textarea name="long_description" value=buffered.long_description}}
|
2014-10-17 14:27:40 -04:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
|
2016-07-27 19:03:00 -04:00
|
|
|
{{#if siteSettings.enable_badge_sql}}
|
2014-10-17 14:27:40 -04:00
|
|
|
<div>
|
2016-07-27 19:03:00 -04:00
|
|
|
<label for="query">{{i18n 'admin.badges.query'}}</label>
|
|
|
|
{{textarea name="query" value=buffered.query disabled=readOnly}}
|
2014-10-17 14:27:40 -04:00
|
|
|
</div>
|
|
|
|
|
2016-07-27 19:03:00 -04:00
|
|
|
{{#if hasQuery}}
|
|
|
|
<a href {{action "preview" buffered "false"}}>{{i18n 'admin.badges.preview.link_text'}}</a>
|
|
|
|
|
|
|
|
|
<a href {{action "preview" buffered "true"}}>{{i18n 'admin.badges.preview.plan_text'}}</a>
|
|
|
|
{{#if preview_loading}}
|
|
|
|
{{i18n 'loading'}}...
|
|
|
|
{{/if}}
|
2014-10-17 14:27:40 -04:00
|
|
|
|
2016-07-27 19:03:00 -04:00
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=buffered.auto_revoke disabled=readOnly}}
|
|
|
|
{{i18n 'admin.badges.auto_revoke'}}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=buffered.target_posts disabled=readOnly}}
|
|
|
|
{{i18n 'admin.badges.target_posts'}}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label for="trigger">{{i18n 'admin.badges.trigger'}}</label>
|
|
|
|
{{combo-box name="trigger"
|
|
|
|
value=buffered.trigger
|
|
|
|
content=badgeTriggers
|
|
|
|
optionValuePath="content.id"
|
|
|
|
optionLabelPath="content.name"
|
|
|
|
disabled=readOnly}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2014-10-17 14:27:40 -04:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=buffered.allow_title}}
|
2014-12-08 16:35:49 -05:00
|
|
|
{{i18n 'admin.badges.allow_title'}}
|
2014-10-17 14:27:40 -04:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=buffered.multiple_grant disabled=readOnly}}
|
2014-12-08 16:35:49 -05:00
|
|
|
{{i18n 'admin.badges.multiple_grant'}}
|
2014-10-17 14:27:40 -04:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=buffered.listable disabled=readOnly}}
|
2014-12-08 16:35:49 -05:00
|
|
|
{{i18n 'admin.badges.listable'}}
|
2014-10-17 14:27:40 -04:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=buffered.show_posts disabled=readOnly}}
|
2014-12-08 16:35:49 -05:00
|
|
|
{{i18n 'admin.badges.show_posts'}}
|
2014-10-17 14:27:40 -04:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
{{input type="checkbox" checked=buffered.enabled}}
|
2014-12-08 16:35:49 -05:00
|
|
|
{{i18n 'admin.badges.enabled'}}
|
2014-10-17 14:27:40 -04:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class='buttons'>
|
2016-05-06 16:04:38 -04:00
|
|
|
<button {{action "save"}} disabled={{saving}} class='btn btn-primary'>{{i18n 'admin.badges.save'}}</button>
|
2014-10-17 14:27:40 -04:00
|
|
|
<span class='saving'>{{savingStatus}}</span>
|
|
|
|
{{#unless readOnly}}
|
2014-12-08 16:35:49 -05:00
|
|
|
<a {{action "destroy"}} class='delete-link'>{{i18n 'admin.badges.delete'}}</a>
|
2014-10-17 14:27:40 -04:00
|
|
|
{{/unless}}
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if grant_count}}
|
|
|
|
<div class="span13 current-badge-actions">
|
|
|
|
<div>
|
2014-12-08 16:35:49 -05:00
|
|
|
{{#link-to 'badges.show' this}}{{i18n 'badges.granted' count=grant_count}}{{/link-to}}
|
2014-10-17 14:27:40 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|