FEATURE: add short_site_description setting to be included in title tag on homepage

This commit is contained in:
Maja Komel
2018-12-12 11:46:58 +01:00
parent 793f1274d1
commit dbbadb5c35
7 changed files with 40 additions and 2 deletions
+5 -1
View File
@@ -33,7 +33,11 @@ class CategoriesController < ApplicationController
)
@category_list.draft = Draft.get(current_user, Draft::NEW_TOPIC, @category_list.draft_sequence) if current_user
@title = "#{I18n.t('js.filters.categories.title')} - #{SiteSetting.title}" unless category_options[:is_homepage]
if category_options[:is_homepage] && SiteSetting.short_site_description.present?
@title = "#{SiteSetting.title} - #{SiteSetting.short_site_description}"
elsif !category_options[:is_homepage]
@title = "#{I18n.t('js.filters.categories.title')} - #{SiteSetting.title}"
end
respond_to do |format|
format.html do
+2
View File
@@ -107,6 +107,8 @@ class ListController < ApplicationController
@title = I18n.t('js.filters.with_topics', filter: filter_title)
end
@title << " - #{SiteSetting.title}"
elsif (filter.to_s == current_homepage) && SiteSetting.short_site_description.present?
@title = "#{SiteSetting.title} - #{SiteSetting.short_site_description}"
end
end