diff --git a/app/assets/javascripts/admin/templates/dashboard.js.handlebars b/app/assets/javascripts/admin/templates/dashboard.js.handlebars index 5e309522b..4c73c9e3d 100644 --- a/app/assets/javascripts/admin/templates/dashboard.js.handlebars +++ b/app/assets/javascripts/admin/templates/dashboard.js.handlebars @@ -163,7 +163,7 @@ {{ render 'admin_report_counts' likes }} {{ render 'admin_report_counts' flags }} {{ render 'admin_report_counts' bookmarks }} - {{ render 'admin_report_counts' favorites }} + {{ render 'admin_report_counts' starred }} {{ render 'admin_report_counts' emails }} {{/unless}} diff --git a/app/assets/javascripts/discourse/components/keyboard_shortcuts_component.js b/app/assets/javascripts/discourse/components/keyboard_shortcuts_component.js index 6860f8509..f900082d3 100644 --- a/app/assets/javascripts/discourse/components/keyboard_shortcuts_component.js +++ b/app/assets/javascripts/discourse/components/keyboard_shortcuts_component.js @@ -11,7 +11,7 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ 'g l': '/latest', 'g n': '/new', 'g u': '/unread', - 'g f': '/favorited', + 'g f': '/starred', 'g c': '/categories', 'g t': '/top' }, @@ -22,8 +22,8 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ 'd': 'article.selected button.delete', // delete selected post 'e': 'article.selected button.edit', // edit selected post - // favorite topic - 'f': '#topic-footer-buttons button.favorite, #topic-list tr.topic-list-item.selected a.star', + // star topic + 'f': '#topic-footer-buttons button.star, #topic-list tr.topic-list-item.selected a.star', 'l': 'article.selected button.like', // like selected post 'm m': 'div.notification-options li[data-id="0"] a', // mark topic as muted diff --git a/app/assets/javascripts/discourse/controllers/header_controller.js b/app/assets/javascripts/discourse/controllers/header_controller.js index 54a845de2..cacc847e5 100644 --- a/app/assets/javascripts/discourse/controllers/header_controller.js +++ b/app/assets/javascripts/discourse/controllers/header_controller.js @@ -11,7 +11,7 @@ Discourse.HeaderController = Discourse.Controller.extend({ showExtraInfo: null, notifications: null, - showFavoriteButton: function() { + showStarButton: function() { return Discourse.User.current() && !this.get('topic.isPrivateMessage'); }.property('topic.isPrivateMessage'), diff --git a/app/assets/javascripts/discourse/controllers/topic_controller.js b/app/assets/javascripts/discourse/controllers/topic_controller.js index 6b3724a4b..bf2902c7f 100644 --- a/app/assets/javascripts/discourse/controllers/topic_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic_controller.js @@ -325,7 +325,7 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected return false; }, - showFavoriteButton: function() { + showStarButton: function() { return Discourse.User.current() && !this.get('isPrivateMessage'); }.property('isPrivateMessage'), diff --git a/app/assets/javascripts/discourse/models/nav_item.js.erb b/app/assets/javascripts/discourse/models/nav_item.js.erb index 60e3f20f0..6e61c8d77 100644 --- a/app/assets/javascripts/discourse/models/nav_item.js.erb +++ b/app/assets/javascripts/discourse/models/nav_item.js.erb @@ -83,7 +83,7 @@ Discourse.NavItem.reopenClass({ opts = { name: name, - hasIcon: name === "unread" || name === "favorited", + hasIcon: name === "unread" || name === "starred", filters: split.splice(1), category: opts.category }; diff --git a/app/assets/javascripts/discourse/models/topic.js b/app/assets/javascripts/discourse/models/topic.js index 75994b925..be8c0202f 100644 --- a/app/assets/javascripts/discourse/models/topic.js +++ b/app/assets/javascripts/discourse/models/topic.js @@ -155,13 +155,13 @@ Discourse.Topic = Discourse.Model.extend({ }); }, - favoriteTooltipKey: function() { - return this.get('starred') ? 'favorite.help.unstar' : 'favorite.help.star'; + starTooltipKey: function() { + return this.get('starred') ? 'starred.help.unstar' : 'starred.help.star'; }.property('starred'), - favoriteTooltip: function() { - return I18n.t(this.get('favoriteTooltipKey')); - }.property('favoriteTooltipKey'), + starTooltip: function() { + return I18n.t(this.get('starTooltipKey')); + }.property('starTooltipKey'), estimatedReadingTime: function() { var wordCount = this.get('word_count'); diff --git a/app/assets/javascripts/discourse/models/user_action.js b/app/assets/javascripts/discourse/models/user_action.js index 7b24300f6..2bdb3acb0 100644 --- a/app/assets/javascripts/discourse/models/user_action.js +++ b/app/assets/javascripts/discourse/models/user_action.js @@ -16,7 +16,7 @@ var UserActionTypes = { replies: 6, mentions: 7, quotes: 9, - favorites: 10, + starred: 10, edits: 11, messages_sent: 12, messages_received: 13 @@ -144,7 +144,7 @@ Discourse.UserAction = Discourse.Model.extend({ case UserActionTypes.likes_given: case UserActionTypes.likes_received: return "likes"; - case UserActionTypes.favorites: + case UserActionTypes.starred: return "stars"; case UserActionTypes.edits: return "edits"; @@ -218,14 +218,14 @@ Discourse.UserAction.reopenClass({ TO_COLLAPSE: [UserActionTypes.likes_given, UserActionTypes.likes_received, - UserActionTypes.favorites, + UserActionTypes.starred, UserActionTypes.edits, UserActionTypes.bookmarks], TO_SHOW: [ UserActionTypes.likes_given, UserActionTypes.likes_received, - UserActionTypes.favorites, + UserActionTypes.starred, UserActionTypes.edits, UserActionTypes.bookmarks, UserActionTypes.messages_sent, diff --git a/app/assets/javascripts/discourse/routes/user_topic_list_routes.js b/app/assets/javascripts/discourse/routes/user_topic_list_routes.js index c89e1a444..5e55e370c 100644 --- a/app/assets/javascripts/discourse/routes/user_topic_list_routes.js +++ b/app/assets/javascripts/discourse/routes/user_topic_list_routes.js @@ -41,10 +41,10 @@ Discourse.UserActivityTopicsRoute = Discourse.UserTopicListRoute.extend({ } }); -Discourse.UserActivityFavoritesRoute = Discourse.UserTopicListRoute.extend({ - userActionType: Discourse.UserAction.TYPES.favorites, +Discourse.UserActivityStarredRoute = Discourse.UserTopicListRoute.extend({ + userActionType: Discourse.UserAction.TYPES.starred, model: function() { - return Discourse.TopicList.find('favorited', {user_id: this.modelFor('user').get('id') }); + return Discourse.TopicList.find('starred', {user_id: this.modelFor('user').get('id') }); } }); \ No newline at end of file diff --git a/app/assets/javascripts/discourse/templates/header.js.handlebars b/app/assets/javascripts/discourse/templates/header.js.handlebars index 971678472..2f1e5cdcb 100644 --- a/app/assets/javascripts/discourse/templates/header.js.handlebars +++ b/app/assets/javascripts/discourse/templates/header.js.handlebars @@ -6,8 +6,8 @@ {{#if showExtraInfo}}