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"
|
2020-06-18 15:06:17 +03:00
|
|
|
@value={{readonly this.label}}
|
2020-07-07 10:54:00 +03:00
|
|
|
@input={{action "updateLabel" value="target.value"}}
|
2020-01-16 18:14:03 +03:00
|
|
|
@keyPress={{action "clearLabelErrors"}}
|
2020-06-18 15:06:17 +03:00
|
|
|
@focus-out={{action "updateLabel" this.label}} data-test-input="label" />
|
2020-01-16 18:14:03 +03:00
|
|
|
<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}}
|
2020-06-18 15:06:17 +03:00
|
|
|
@url={{readonly this.url}}
|
2020-01-16 18:14:03 +03:00
|
|
|
@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}}
|