mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
0e2f4ea33e
no issue - moves the `NavItem` object from the navigation controller to an explicit `NavigationItem` model file - adds a custom transform `navigation-settings` that transforms the navigation settings JSON string to/from an array of `NavigationItem` objects - simplifies the `settings/navigation` controller as it no longer has to export it's own internal model and handle serialization and deserialization This pattern should also help simplify the apps/slack integration code if implemented there.
20 lines
941 B
Handlebars
20 lines
941 B
Handlebars
<section class="gh-view">
|
|
<header class="view-header">
|
|
{{#gh-view-title openMobileMenu="openMobileMenu"}}<span>Navigation</span>{{/gh-view-title}}
|
|
<section class="view-actions">
|
|
{{#gh-spin-button class="btn btn-blue" action="save" submitting=submitting}}Save{{/gh-spin-button}}
|
|
</section>
|
|
</header>
|
|
|
|
<section class="view-container">
|
|
<form id="settings-navigation" class="gh-blognav" novalidate="novalidate">
|
|
{{#sortable-group onChange=(action 'reorderItems') as |group|}}
|
|
{{#each model.navigation as |navItem|}}
|
|
{{gh-navitem navItem=navItem baseUrl=blogUrl addItem="addItem" deleteItem="deleteItem" updateUrl="updateUrl" group=group}}
|
|
{{/each}}
|
|
{{/sortable-group}}
|
|
{{gh-navitem navItem=newNavItem baseUrl=blogUrl addItem="addItem" updateUrl="updateUrl"}}
|
|
</form>
|
|
</section>
|
|
</section>
|