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
「このシステムについて」を表示します。
92 93 94 |
# File 'app/controllers/page_controller.rb', line 92 def about @title = t('page.about_this_system') end |
#add_on ⇒ Object
「アドオン」を表示します。
97 98 99 |
# File 'app/controllers/page_controller.rb', line 97 def add_on @title = t('page.add_on') end |
#advanced_search ⇒ Object
詳細検索画面を表示します。
61 62 63 64 |
# File 'app/controllers/page_controller.rb', line 61 def advanced_search get_libraries @title = t('page.advanced_search') end |
#configuration ⇒ Object
システム設定画面を表示します。
72 73 74 |
# File 'app/controllers/page_controller.rb', line 72 def configuration @title = t('page.configuration') end |
#export ⇒ Object
エクスポート画面を表示します。
87 88 89 |
# File 'app/controllers/page_controller.rb', line 87 def export @title = t('page.export') end |
#import ⇒ Object
インポート画面を表示します。
82 83 84 |
# File 'app/controllers/page_controller.rb', line 82 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 |
# 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 end end |
#msie_accelerator ⇒ Object
Internet Explorer用のアクセラレータを表示します。
47 48 49 50 51 |
# File 'app/controllers/page_controller.rb', line 47 def msie_accelerator respond_to do |format| format.xml { render layout: false } end end |
#opensearch ⇒ Object
OpenSearch Descriptionファイルを表示します。
54 55 56 57 58 |
# File 'app/controllers/page_controller.rb', line 54 def opensearch respond_to do |format| format.xml { render layout: false } end end |
#routing_error ⇒ Object
ルーティングエラー画面を表示します。
102 103 104 |
# File 'app/controllers/page_controller.rb', line 102 def routing_error render_404 end |
#statistics ⇒ Object
統計画面を表示します。
67 68 69 |
# File 'app/controllers/page_controller.rb', line 67 def statistics @title = t('page.statistics') end |
#system_information ⇒ Object
システム情報画面を表示します。
77 78 79 |
# File 'app/controllers/page_controller.rb', line 77 def system_information @specs = Bundler.load.specs.sort! end |