2014-03-05 20:52:20 +08: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 13:13:38 +08:00
|
|
|
({{i18n filters.new.lower_title}})
|
2014-03-05 20:52:20 +08:00
|
|
|
{{/if}}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
<button {{action newBadge}} class='btn'>{{i18n admin.badges.new}}</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if selectedItem}}
|
|
|
|
{{#with selectedItem}}
|
2014-03-19 13:13:38 +08:00
|
|
|
<div class='current-badge span13'>
|
2014-03-05 20:52:20 +08:00
|
|
|
<form class="form-horizontal">
|
|
|
|
<div>
|
|
|
|
<label for="name">{{i18n admin.badges.name}}</label>
|
|
|
|
{{input type="text" name="name" value=name}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if controller.showDisplayName}}
|
|
|
|
<div>
|
|
|
|
<strong>{{i18n admin.badges.display_name}}</strong>
|
|
|
|
{{displayName}}
|
|
|
|
</div>
|
|
|
|
{{/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"
|
|
|
|
optionLabelPath="content.name"}}
|
|
|
|
</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>
|
|
|
|
|
|
|
|
<div class='buttons'>
|
2014-03-19 13:13:38 +08:00
|
|
|
<button {{action save}} {{bind-attr disabled=controller.disableSave}} class='btn btn-primary'>{{i18n admin.badges.save}}</button>
|
|
|
|
<span class='saving'>{{savingStatus}}</span>
|
2014-03-05 20:52:20 +08:00
|
|
|
<a {{action destroy}} class='delete-link'>{{i18n admin.badges.delete}}</a>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{{/with}}
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
</div>
|