Class: PageController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- PageController
- Defined in:
- app/controllers/page_controller.rb
Instance Method Summary collapse
-
#about ⇒ Object
「このシステムについて」を表示します。.
-
#add_on ⇒ Object
「アドオン」を表示します。.
-
#advanced_search ⇒ Object
詳細検索画面を表示します。.
-
#configuration ⇒ Object
システム設定画面を表示します。.
-
#export ⇒ Object
エクスポート画面を表示します。.
-
#import ⇒ Object
インポート画面を表示します。.
-
#index ⇒ Object
トップページを表示します。.
-
#msie_accelerator ⇒ Object
Internet Explorer用のアクセラレータを表示します。.
-
#opensearch ⇒ Object
OpenSearch Descriptionファイルを表示します。.
-
#routing_error ⇒ Object
ルーティングエラー画面を表示します。.
-
#statistics ⇒ Object
統計画面を表示します。.
-
#system_information ⇒ Object
システム情報画面を表示します。.
Instance Method Details
#about ⇒ Object
「このシステムについて」を表示します。
93 94 95 |
# File 'app/controllers/page_controller.rb', line 93 def about @title = t('page.about_this_system') end |
#add_on ⇒ Object
「アドオン」を表示します。
98 99 100 |
# File 'app/controllers/page_controller.rb', line 98 def add_on @title = t('page.add_on') end |
#advanced_search ⇒ Object
詳細検索画面を表示します。
62 63 64 65 |
# File 'app/controllers/page_controller.rb', line 62 def advanced_search get_libraries @title = t('page.advanced_search') end |
#configuration ⇒ Object
システム設定画面を表示します。
73 74 75 |
# File 'app/controllers/page_controller.rb', line 73 def configuration @title = t('page.configuration') end |
#export ⇒ Object
エクスポート画面を表示します。
88 89 90 |
# File 'app/controllers/page_controller.rb', line 88 def export @title = t('page.export') end |
#import ⇒ Object
インポート画面を表示します。
83 84 85 |
# File 'app/controllers/page_controller.rb', line 83 def import @title = t('page.import') end |
#index ⇒ Object
トップページを表示します。
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'app/controllers/page_controller.rb', line 9 def index if user_signed_in? session[:user_return_to] = nil #unless current_user.agent # redirect_to new_user_agent_url(current_user); return #end if defined?(EnjuBookmark) @tags = current_user.bookmarks.tag_counts.sort{|a, b| a.count <=> b.count }.reverse end if current_user.profile @manifestation = Manifestation.pickup( current_user.profile.keyword_list.to_s.split.sort_by{rand}.first, current_user ) else @manifestation = nil end else if defined?(EnjuBookmark) # TODO: タグ下限の設定 #@tags = Tag.all(limit: 50, order: 'taggings_count DESC') @tags = Bookmark.tag_counts.sort{|a, b| a.count <=> b.count }.reverse[0..49] end @manifestation = Manifestation.pickup rescue nil end get_top_page_content @numdocs = Manifestation.search.total respond_to do |format| format.html format.html.phone end end |
#msie_accelerator ⇒ Object
Internet Explorer用のアクセラレータを表示します。
48 49 50 51 52 |
# File 'app/controllers/page_controller.rb', line 48 def msie_accelerator respond_to do |format| format.xml { render layout: false } end end |
#opensearch ⇒ Object
OpenSearch Descriptionファイルを表示します。
55 56 57 58 59 |
# File 'app/controllers/page_controller.rb', line 55 def opensearch respond_to do |format| format.xml { render layout: false } end end |
#routing_error ⇒ Object
ルーティングエラー画面を表示します。
103 104 105 |
# File 'app/controllers/page_controller.rb', line 103 def routing_error render_404 end |
#statistics ⇒ Object
統計画面を表示します。
68 69 70 |
# File 'app/controllers/page_controller.rb', line 68 def statistics @title = t('page.statistics') end |
#system_information ⇒ Object
システム情報画面を表示します。
78 79 80 |
# File 'app/controllers/page_controller.rb', line 78 def system_information @specs = Bundler.load.specs.sort! end |