-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated tag management UI with the post counts
closes #4683 - added post count to 'delete tag' modal - fixed lint errors - preventing extra data to be sent to server - adjustments suggested by @jaswilli
- Loading branch information
1 parent
8ceb896
commit f1da5f8
Showing
6 changed files
with
34 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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; |
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,6 +1,10 @@ | ||
{{#gh-modal-dialog action="closeModal" showClose=true type="action" style="wide,centered" animation="fade" | ||
title="Are you sure you want to delete this tag?" confirm=confirm}} | ||
|
||
<p>You're about to delete "<strong>{{model.name}}</strong>".<br />This is permanent! No backups, no restores, no magic undo button. <br /> We warned you, ok?</p> | ||
<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}} | ||
This is permanent! No backups, no restores, no magic undo button. <br /> We warned you, ok?</p> | ||
|
||
{{/gh-modal-dialog}} |
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