diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-07-01 21:43:13 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-07-01 21:48:28 +0200 |
| commit | 95e5fe8b8fb1e16c71ffbed6681ab8b2203249d4 (patch) | |
| tree | 0f6dc99d031a499befbbcbb301b7fd1a62af125b /app/controllers | |
| parent | 28399cd9a549cc4edf8c557883c940532821c28d (diff) | |
| download | operum-95e5fe8b8fb1e16c71ffbed6681ab8b2203249d4.tar.gz operum-95e5fe8b8fb1e16c71ffbed6681ab8b2203249d4.zip | |
Add subtitles to pages
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/exports_controller.rb | 1 | ||||
| -rw-r--r-- | app/controllers/searches_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/shared_searches_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/tags_controller.rb | 3 | ||||
| -rw-r--r-- | app/controllers/things_controller.rb | 2 |
5 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb index 812cf39..4b809c9 100644 --- a/app/controllers/exports_controller.rb +++ b/app/controllers/exports_controller.rb @@ -36,6 +36,7 @@ class ExportsController < ApplicationController else Search.find(params[:search_id]) end + @subtitle = @search.name end def set_results diff --git a/app/controllers/searches_controller.rb b/app/controllers/searches_controller.rb index 376455c..a01fd59 100644 --- a/app/controllers/searches_controller.rb +++ b/app/controllers/searches_controller.rb @@ -14,6 +14,7 @@ class SearchesController < ApplicationController def new @search = Search.new + @subtitle = I18n.t('searches.title') end def edit; end @@ -52,6 +53,7 @@ class SearchesController < ApplicationController def set_search @search = Search.find(params[:id]) + @subtitle = @search.name end def search_params diff --git a/app/controllers/shared_searches_controller.rb b/app/controllers/shared_searches_controller.rb index ca65539..ffdd56e 100644 --- a/app/controllers/shared_searches_controller.rb +++ b/app/controllers/shared_searches_controller.rb @@ -6,10 +6,12 @@ class SharedSearchesController < ApplicationController def index @searches = Search.order(:name) @saved_searches = @searches.where(shared: true) + @subtitle = I18n.t('searches.shared.title') end def show @search = Search.where(shared: true).find(params[:search_id]) + @subtitle = @search.name @results = @search.results.values.flatten end end diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index c5ca6a8..c56b9f9 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -5,10 +5,12 @@ class TagsController < ApplicationController def index @tags = Tag.order(:name) + @subtitle = I18n.t('tags.title') end def new @tag = Tag.new + @subtitle = I18n.t('tags.title') end def edit; end @@ -59,6 +61,7 @@ class TagsController < ApplicationController def search @search = Search.new(name: 'temporary', body: "tag:\"#{@tag.name}\"") + @subtitle = "#{I18n.t('tags.searching-by')} '#{@tag.name}'" render 'searches/show' end diff --git a/app/controllers/things_controller.rb b/app/controllers/things_controller.rb index e994a3d..f9e7674 100644 --- a/app/controllers/things_controller.rb +++ b/app/controllers/things_controller.rb @@ -9,6 +9,7 @@ class ThingsController < ApplicationController def new @thing = Thing.new + @subtitle = I18n.t('activerecord.models.thing') end def edit; end @@ -59,6 +60,7 @@ class ThingsController < ApplicationController def set_thing @thing = Thing.find(params[:id]) + @subtitle = @thing.title end def thing_params |
