mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-25 00:29:30 -05:00
a25087b62a
* Query param to allow linking. * Better handling of deleting unsaved badges. * New badge list item style improvement.
73 lines
2.2 KiB
Handlebars
73 lines
2.2 KiB
Handlebars
<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}}
|
|
<span class="list-badge">{{i18n filters.new.lower_title}}</span>
|
|
{{/if}}
|
|
</a>
|
|
</li>
|
|
{{/each}}
|
|
</ul>
|
|
<button {{action newBadge}} class='btn'><i class="fa fa-plus"></i>{{i18n admin.badges.new}}</button>
|
|
</div>
|
|
|
|
{{#if selectedItem}}
|
|
{{#with selectedItem controller='adminBadge'}}
|
|
<div class='current-badge span13'>
|
|
<form class="form-horizontal">
|
|
<div>
|
|
<label for="name">{{i18n admin.badges.name}}</label>
|
|
{{input type="text" name="name" value=name disabled=readOnly}}
|
|
</div>
|
|
|
|
{{#if 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"
|
|
disabled=readOnly}}
|
|
</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>
|
|
<span>
|
|
{{input type="checkbox" checked=allow_title disabled=readOnly}}
|
|
{{i18n admin.badges.allow_title}}
|
|
</span>
|
|
</div>
|
|
|
|
{{#unless readOnly}}
|
|
<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}}
|
|
</form>
|
|
</div>
|
|
{{/with}}
|
|
{{/if}}
|
|
|
|
</div>
|