mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Fixed slug-based navigation in collections UI
refs https://github.com/TryGhost/Team/issues/3169 - When navigating through collections slugs did not display correctly returning "undefined" in the navigation. It was easier to fix the bug than working around it.
This commit is contained in:
parent
2173fd9ef9
commit
7d4b278a83
@ -14,6 +14,16 @@
|
||||
</span>
|
||||
</GhFormGroup>
|
||||
|
||||
<GhFormGroup @errors={{@collection.errors}} @hasValidated={{@collection.hasValidated}} @property="slug" class="mr2 flex-auto">
|
||||
<label for="collection-slug">Slug</label>
|
||||
<input type="text" class="gh-input" id="collection-slug" name="slug" value={{@collection.slug}} {{on "input" (pick "target.value"
|
||||
(fn this.setCollectionProperty "slug" ))}} {{on "blur" (fn this.validateCollectionProperty "slug" )}}
|
||||
data-test-input="collection-slug" />
|
||||
<span class="error">
|
||||
<GhErrorMessage @errors={{@collection.errors}} @property="slug" />
|
||||
</span>
|
||||
</GhFormGroup>
|
||||
|
||||
<GhFormGroup class="no-margin" @errors={{@collection.errors}} @hasValidated={{@collection.hasValidated}}
|
||||
@property="description">
|
||||
<label for="collection-description">Description</label>
|
||||
|
@ -51,8 +51,8 @@ Router.map(function () {
|
||||
this.route('tag', {path: '/tags/:tag_slug'});
|
||||
|
||||
this.route('collections');
|
||||
this.route('collection.new', {path: '/collection/new'});
|
||||
this.route('collection', {path: '/collection/:collection_slug'});
|
||||
this.route('collection.new', {path: '/collections/new'});
|
||||
this.route('collection', {path: '/collections/:collection_slug'});
|
||||
|
||||
this.route('settings-x');
|
||||
this.route('settings');
|
||||
|
@ -27,7 +27,7 @@ export default class CollectionRoute extends AuthenticatedRoute {
|
||||
}
|
||||
|
||||
serialize(collection) {
|
||||
return {collection_slug: collection.get('collection')};
|
||||
return {collection_slug: collection.get('slug')};
|
||||
}
|
||||
|
||||
@action
|
||||
|
Loading…
Reference in New Issue
Block a user