2014-03-05 07:52:20 -05:00
|
|
|
<div class="badges">
|
|
|
|
|
|
|
|
<div class='content-list span6'>
|
|
|
|
<h3>{{i18n admin.badges.title}}</h3>
|
|
|
|
<ul>
|
|
|
|
{{#each}}
|
|
|
|
<li>
|
|
|
|
<a {{action selectBadge this}} {{bind-attr class="selected:active"}}>
|
|
|
|
{{displayName}}
|
|
|
|
{{#if newBadge}}
|
2014-03-19 01:13:38 -04:00
|
|
|
({{i18n filters.new.lower_title}})
|
2014-03-05 07:52:20 -05:00
|
|
|
{{/if}}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
2014-05-17 04:27:12 -04:00
|
|
|
<button {{action newBadge}} class='btn'><i class="fa fa-plus"></i>{{i18n admin.badges.new}}</button>
|
2014-03-05 07:52:20 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if selectedItem}}
|
2014-05-19 00:29:12 -04:00
|
|
|
{{#with selectedItem controller='adminBadge'}}
|
2014-03-19 01:13:38 -04:00
|
|
|
<div class='current-badge span13'>
|
2014-03-05 07:52:20 -05:00
|
|
|
<form class="form-horizontal">
|
|
|
|
<div>
|
|
|
|
<label for="name">{{i18n admin.badges.name}}</label>
|
2014-05-19 00:29:12 -04:00
|
|
|
{{input type="text" name="name" value=name disabled=readOnly}}
|
2014-03-05 07:52:20 -05:00
|
|
|
</div>
|
|
|
|
|
2014-05-19 00:29:12 -04:00
|
|
|
{{#if showDisplayName}}
|
|
|
|
<div>
|
|
|
|
<strong>{{i18n admin.badges.display_name}}</strong>
|
|
|
|
{{displayName}}
|
|
|
|
</div>
|
2014-03-05 07:52:20 -05:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label for="badge_type_id">{{i18n admin.badges.badge_type}}</label>
|
|
|
|
{{view Ember.Select name="badge_type_id" value=badge_type_id
|
|
|
|
content=controller.badgeTypes
|
|
|
|
optionValuePath="content.id"
|
2014-05-19 00:29:12 -04:00
|
|
|
optionLabelPath="content.name"
|
|
|
|
disabled=readOnly}}
|
2014-03-05 07:52:20 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<label for="description">{{i18n admin.badges.description}}</label>
|
|
|
|
{{#if controller.canEditDescription}}
|
|
|
|
{{textarea name="description" value=description}}
|
|
|
|
{{else}}
|
|
|
|
{{textarea name="description" value=translatedDescription disabled=true}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
|
2014-05-19 00:29:12 -04:00
|
|
|
{{#unless readOnly}}
|
|
|
|
<div>
|
|
|
|
<span>
|
|
|
|
{{input type="checkbox" checked=allow_title}}
|
|
|
|
{{i18n admin.badges.allow_title}}
|
|
|
|
</span>
|
|
|
|
</div>
|
2014-04-25 14:25:29 -04:00
|
|
|
|
2014-05-19 00:29:12 -04:00
|
|
|
<div class='buttons'>
|
|
|
|
<button {{action save}} {{bind-attr disabled=controller.disableSave}} class='btn btn-primary'>{{i18n admin.badges.save}}</button>
|
|
|
|
<span class='saving'>{{savingStatus}}</span>
|
|
|
|
<a {{action destroy}} class='delete-link'>{{i18n admin.badges.delete}}</a>
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
2014-03-05 07:52:20 -05:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{{/with}}
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
</div>
|