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">
|
2022-12-08 20:04:20 +03:00
|
|
|
<span class="gh-blognav-label" {{validation-status errors=this.navItem.errors property="label" hasValidated=this.navItem.hasValidated}}>
|
2020-01-16 18:14:03 +03:00
|
|
|
<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" />
|
2022-12-08 20:04:20 +03:00
|
|
|
</span>
|
|
|
|
<span class="gh-blognav-url" {{validation-status errors=this.navItem.errors property="url" hasValidated=this.navItem.hasValidated}}>
|
2022-10-06 18:53:51 +03:00
|
|
|
<Settings::Navigation::NavItemUrlInput
|
2020-01-16 18:14:03 +03:00
|
|
|
@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" />
|
2022-12-08 20:04:20 +03:00
|
|
|
</span>
|
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}}>
|
2022-09-02 18:56:02 +03:00
|
|
|
{{svg-jar "plus"}}<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}}
|