{{i18n admin.badges.title}}

{{#if selectedItem}} {{#with selectedItem controller='adminBadge'}}
{{input type="text" name="name" value=name}}
{{#if showDisplayName}}
{{i18n admin.badges.display_name}} {{displayName}}
{{/if}}
{{input type="text" name="name" value=icon}}
{{view Ember.Select name="badge_type_id" value=badge_type_id content=controller.badgeTypes optionValuePath="content.id" optionLabelPath="content.name" disabled=readOnly}}
{{view Ember.Select name="badge_grouping_id" value=badge_grouping_id content=controller.badgeGroupings optionValuePath="content.id" optionLabelPath="content.name"}}  
{{#if controller.canEditDescription}} {{textarea name="description" value=description}} {{else}} {{textarea name="description" value=displayDescription disabled=true}} {{/if}}
{{textarea name="query" value=query disabled=readOnly}}
{{#if hasQuery}} {{i18n admin.badges.preview.link_text}} | {{i18n admin.badges.preview.plan_text}} {{#if preview_loading}} {{i18n loading}}... {{/if}}
{{input type="checkbox" checked=auto_revoke disabled=readOnly}} {{i18n admin.badges.auto_revoke}}
{{input type="checkbox" checked=target_posts disabled=readOnly}} {{i18n admin.badges.target_posts}}
{{view Ember.Select name="trigger" value=trigger content=controller.badgeTriggers optionValuePath="content.id" optionLabelPath="content.name" disabled=readOnly}}
{{/if}}
{{input type="checkbox" checked=allow_title}} {{i18n admin.badges.allow_title}}
{{input type="checkbox" checked=multiple_grant disabled=readOnly}} {{i18n admin.badges.multiple_grant}}
{{input type="checkbox" checked=listable disabled=readOnly}} {{i18n admin.badges.listable}}
{{input type="checkbox" checked=show_posts disabled=readOnly}} {{i18n admin.badges.show_posts}}
{{input type="checkbox" checked=enabled}} {{i18n admin.badges.enabled}}
{{savingStatus}} {{#unless readOnly}} {{i18n admin.badges.delete}} {{/unless}}
{{#if grant_count}}
{{#link-to 'badges.show' this}}{{i18n badges.granted count=grant_count}}{{/link-to}}
{{/if}} {{/with}} {{/if}}