From fd6402c152d41e8d523e7003f3a4a3fe47f36d2d Mon Sep 17 00:00:00 2001 From: uu59 Date: Wed, 4 Jun 2014 12:49:36 +0900 Subject: [PATCH] Add tutorial page basis --- app/controllers/tutorials_controller.rb | 6 ++++++ app/views/shared/_global_nav.html.erb | 5 +++++ app/views/tutorials/index.html.haml | 4 ++++ config/locales/translation_en.yml | 7 +++++++ config/locales/translation_ja.yml | 7 +++++++ config/routes.rb | 5 +++++ 6 files changed, 34 insertions(+) create mode 100644 app/controllers/tutorials_controller.rb create mode 100644 app/views/tutorials/index.html.haml diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb new file mode 100644 index 0000000..a299775 --- /dev/null +++ b/app/controllers/tutorials_controller.rb @@ -0,0 +1,6 @@ +class TutorialsController < ApplicationController + + def index + end + +end diff --git a/app/views/shared/_global_nav.html.erb b/app/views/shared/_global_nav.html.erb index 4c30147..e5a7ec2 100644 --- a/app/views/shared/_global_nav.html.erb +++ b/app/views/shared/_global_nav.html.erb @@ -4,6 +4,11 @@
  • <%= link_to_other icon("fa-puzzle-piece fa-fw") << " fluentd", fluentd_index_path %> +
  • <%= link_to_other icon("fa-cogs fa-fw") << " " << t('terms.plugins') << icon('fa pull-right fa-caret-down'), plugins_path %> diff --git a/app/views/tutorials/index.html.haml b/app/views/tutorials/index.html.haml new file mode 100644 index 0000000..95a28df --- /dev/null +++ b/app/views/tutorials/index.html.haml @@ -0,0 +1,4 @@ +- page_title t(".page_title") + +%h1 Hello, world! + diff --git a/config/locales/translation_en.yml b/config/locales/translation_en.yml index 2283a89..4793fa3 100644 --- a/config/locales/translation_en.yml +++ b/config/locales/translation_en.yml @@ -105,6 +105,13 @@ en: env_value: Value page_title: System Information + tutorials: + common: &tutorials_common + <<: *terms + index: + <<: *tutorials_common + page_title: Tutorial + messages: need_restart: need to restart fluentd-ui please_sign_in: Sign in diff --git a/config/locales/translation_ja.yml b/config/locales/translation_ja.yml index 0beae2f..f6a8e8d 100644 --- a/config/locales/translation_ja.yml +++ b/config/locales/translation_ja.yml @@ -105,6 +105,13 @@ ja: env_value: 値 page_title: システム情報 + tutorials: + common: &tutorials_common + <<: *terms + index: + <<: *tutorials_common + page_title: チュートリアル + messages: need_restart: fluentd-uiの再起動が必要です please_sign_in: ログイン diff --git a/config/routes.rb b/config/routes.rb index ed64061..95c42e4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -33,4 +33,9 @@ Rails.application.routes.draw do namespace :polling do get "alerts" end + + namespace :tutorials do + get "/" => :index + get "step1" + end end