Ghost/core/client/app/templates/components/gh-navitem.hbs
2015-05-22 19:02:05 +01:00

25 lines
935 B
Handlebars

{{#unless navItem.last}}
<span class="navigation-item-drag-handle icon-grab">
<span class="sr-only">Reorder</span>
</span>
{{/unless}}
<div class="navigation-inputs">
<span class="navigation-item-label">
{{gh-trim-focus-input class="gh-input" focus=navItem.last placeholder="Label" value=navItem.label}}
</span>
<span class="navigation-item-url">
{{gh-navitem-url-input class="gh-input" baseUrl=baseUrl url=navItem.url last=navItem.last change="updateUrl"}}
</span>
</div>
<span class="navigation-item-action">
{{#if navItem.last}}
<button type="button" class="add-navigation-link icon-add" {{action "addItem"}}>
<span class="sr-only">Add</span>
</button>
{{else}}
<button type="button" class="navigation-delete icon-trash" {{action "deleteItem" navItem}}>
<span class="sr-only">Delete</span>
</button>
{{/if}}
</span>