-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish tag post count UI. Misc tag related fixes
Issue #4683 - Finish setting up pagination in tag management page. - Add post count warning to delete tag modal. Fix styling. - Make sure tag input menu is loading all tags. - Only include saved tags in tag input suggestion list. - Unload tag records from store when entering tag route so that we get accurate post count. - Add a resetPagination action to pagination-controller-mixin for cases where we want to start fresh. - Include tag.id when sending tag payload to API.
- Loading branch information
Showing
8 changed files
with
66 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
import ApplicationSerializer from 'ghost/serializers/application'; | ||
|
||
var TagSerializer = ApplicationSerializer.extend(DS.EmbeddedRecordsMixin, { | ||
|
||
serializeIntoHash: function (hash, type, record, options) { | ||
options = options || {}; | ||
|
||
// We have a plural root in the API | ||
var root = Ember.String.pluralize(type.typeKey), | ||
data = this.serialize(record, options); | ||
|
||
// Properties that exist on the model but we don't want sent in the payload | ||
|
||
delete data.post_count; | ||
delete data.uuid; | ||
|
||
hash[root] = [data]; | ||
} | ||
}); | ||
|
||
export default TagSerializer; | ||
import ApplicationSerializer from 'ghost/serializers/application'; | ||
|
||
var TagSerializer = ApplicationSerializer.extend({ | ||
serializeIntoHash: function (hash, type, record, options) { | ||
options = options || {}; | ||
options.includeId = true; | ||
|
||
var root = Ember.String.pluralize(type.typeKey), | ||
data = this.serialize(record, options); | ||
|
||
// Properties that exist on the model but we don't want sent in the payload | ||
|
||
delete data.uuid; | ||
delete data.post_count; | ||
|
||
hash[root] = [data]; | ||
} | ||
}); | ||
|
||
export default TagSerializer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
{{#gh-modal-dialog action="closeModal" showClose=true type="action" style="wide,centered" animation="fade" | ||
{{#gh-modal-dialog action="closeModal" showClose=true type="action" style="wide" | ||
title="Are you sure you want to delete this tag?" confirm=confirm}} | ||
|
||
<p>You're about to delete "<strong>{{model.name}}</strong>".<br /> | ||
{{#if model.post_count}} | ||
<span class="red">This tag will be removed from {{model.post_count}} {{inflection}}.</span> | ||
{{#if post_count}} | ||
<strong>WARNING:</strong> <span class="red">This tag is attached to {{post_count}} {{postInflection}}.</span> You're about to delete "<strong>{{name}}</strong>". This is permanent! No backups, no restores, no magic undo button. We warned you, ok? | ||
{{else}} | ||
<strong>WARNING:</strong> You're about to delete "<strong>{{name}}</strong>". This is permanent! No backups, no restores, no magic undo button. We warned you, ok?</p> | ||
{{/if}} | ||
This is permanent! No backups, no restores, no magic undo button. <br /> We warned you, ok?</p> | ||
|
||
{{/gh-modal-dialog}} | ||
{{/gh-modal-dialog}} |