diff --git a/app/assets/javascripts/discourse/controllers/topic_controller.js b/app/assets/javascripts/discourse/controllers/topic_controller.js index 949c6d38b68..c358654ab59 100644 --- a/app/assets/javascripts/discourse/controllers/topic_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic_controller.js @@ -294,12 +294,16 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected }.property('postStream.loaded', 'currentPost', 'postStream.filteredPostsCount'), hugeNumberOfPosts: function() { - return (this.get('postStream.filteredPostsCount') >= 1000); - }.property('postStream.filteredPostsCount'), + return (this.get('postStream.filteredPostsCount') >= Discourse.SiteSettings.short_progress_text_threshold); + }.property('highest_post_number'), - progressPositionTitle: function() { - return I18n.t("topic.progress.position", {current: this.get('progressPosition'), total: this.get('highest_post_number')}); - }.property('progressPosition', 'highest_post_number'), + jumpToBottomTitle: function() { + if (this.get('hugeNumberOfPosts')) { + return I18n.t('topic.progress.jump_bottom_with_number', {post_number: this.get('highest_post_number')}); + } else { + return I18n.t('topic.progress.jump_bottom'); + } + }.property('hugeNumberOfPosts', 'highest_post_number'), deselectPost: function(post) { this.get('selectedPosts').removeObject(post); diff --git a/app/assets/javascripts/discourse/templates/topic.js.handlebars b/app/assets/javascripts/discourse/templates/topic.js.handlebars index bd3b4a7bd4c..010109181e4 100644 --- a/app/assets/javascripts/discourse/templates/topic.js.handlebars +++ b/app/assets/javascripts/discourse/templates/topic.js.handlebars @@ -52,9 +52,9 @@ diff --git a/app/assets/stylesheets/desktop/topic.scss b/app/assets/stylesheets/desktop/topic.scss index 04dda3634d9..438ab3798f2 100644 --- a/app/assets/stylesheets/desktop/topic.scss +++ b/app/assets/stylesheets/desktop/topic.scss @@ -132,8 +132,8 @@ a:hover.reply-new { border: 0; background: none; color: #666; + width: 50%; text-align: left; - width: 30px; height: 30px; margin: 0; i { diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 9561afaf987..e41f6df1174 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -672,6 +672,7 @@ en: title: topic progress jump_top: jump to first post jump_bottom: jump to last post + jump_bottom_with_number: "jump to post %{post_number}" total: total posts current: current post position: "post %{current} of %{total}" diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 2fa9124ea9d..29cc0e8d7bd 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -734,6 +734,7 @@ en: enable_names: "Allow users to show their full names" display_name_on_posts: "Also show a user's full name on their posts" invites_shown: "Maximum invites shown on a user page" + short_progress_text_threshold: "After the number of posts in a topic goes above this number, the progress bar will only show the current post number. If you change the progress bar's width, you may need to change this value." notification_types: mentioned: "%{display_username} mentioned you in %{link}" diff --git a/config/site_settings.yml b/config/site_settings.yml index 4d19112c827..fa4fdb68307 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -134,7 +134,7 @@ posting: default: 10 max_post_length: client: true - default: + default: test: 4000 default: 32000 min_topic_title_length: @@ -197,6 +197,9 @@ posting: display_name_on_posts: client: true default: false + short_progress_text_threshold: + client: true + default: 1000 email: email_time_window_mins: 10