2019-12-13 17:20:29 +03:00
|
|
|
{{#unless this.navItem.isNew}}
|
2017-04-14 19:22:14 +03:00
|
|
|
<span class="gh-blognav-grab">
|
2018-03-19 12:57:31 +03:00
|
|
|
{{svg-jar "grab"}}
|
2015-06-13 17:34:09 +03:00
|
|
|
<span class="sr-only">Reorder</span>
|
|
|
|
</span>
|
2015-02-03 19:29:01 +03:00
|
|
|
{{/unless}}
|
2015-05-25 16:17:14 +03:00
|
|
|
|
|
|
|
<div class="gh-blognav-line">
|
2020-01-16 18:14:03 +03:00
|
|
|
<GhValidationStatusContainer
|
|
|
|
@tagName="span"
|
|
|
|
@class="gh-blognav-label"
|
|
|
|
@errors={{this.navItem.errors}}
|
|
|
|
@property="label"
|
|
|
|
@hasValidated={{this.navItem.hasValidated}}
|
|
|
|
>
|
|
|
|
<GhTrimFocusInput
|
|
|
|
@shouldFocus={{this.navItem.last}}
|
|
|
|
@placeholder="Label"
|
|
|
|
@value={{readonly this.navItem.label}}
|
|
|
|
@input={{action (mut this.navItem.label) value="target.value"}}
|
|
|
|
@keyPress={{action "clearLabelErrors"}}
|
|
|
|
@focus-out={{action "updateLabel" this.navItem.label}} data-test-input="label" />
|
|
|
|
<GhErrorMessage
|
|
|
|
@errors={{this.navItem.errors}}
|
|
|
|
@property="label" data-test-error="label" />
|
|
|
|
</GhValidationStatusContainer>
|
|
|
|
<GhValidationStatusContainer
|
|
|
|
@tagName="span"
|
|
|
|
@class="gh-blognav-url"
|
|
|
|
@errors={{this.navItem.errors}}
|
|
|
|
@property="url"
|
|
|
|
@hasValidated={{this.navItem.hasValidated}}
|
|
|
|
>
|
|
|
|
<GhNavitemUrlInput
|
|
|
|
@baseUrl={{this.baseUrl}}
|
|
|
|
@isNew={{this.navItem.isNew}}
|
|
|
|
@url={{readonly this.navItem.url}}
|
|
|
|
@update={{action "updateUrl"}}
|
|
|
|
@clearErrors={{action "clearUrlErrors"}} data-test-input="url" />
|
|
|
|
<GhErrorMessage
|
|
|
|
@errors={{this.navItem.errors}}
|
|
|
|
@property="url" data-test-error="url" />
|
|
|
|
</GhValidationStatusContainer>
|
2015-01-18 03:16:54 +03:00
|
|
|
</div>
|
2015-05-25 16:17:14 +03:00
|
|
|
|
2019-12-13 17:20:29 +03:00
|
|
|
{{#if this.navItem.isNew}}
|
|
|
|
<button type="button" class="gh-blognav-add" {{action "addItem" this.navItem}}>
|
2018-03-19 12:57:31 +03:00
|
|
|
{{svg-jar "add"}}<span class="sr-only">Add</span>
|
2015-05-25 16:17:14 +03:00
|
|
|
</button>
|
|
|
|
{{else}}
|
2019-12-13 17:20:29 +03:00
|
|
|
<button type="button" class="gh-blognav-delete" {{action "deleteItem" this.navItem}}>
|
2018-03-19 12:57:31 +03:00
|
|
|
{{svg-jar "trash"}}<span class="sr-only">Delete</span>
|
2015-05-25 16:17:14 +03:00
|
|
|
</button>
|
|
|
|
{{/if}}
|