diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3507f4a..fbd88f6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -40,12 +40,16 @@ module ApplicationHelper %Q!#{inner} !.html_safe end - def page_title(title) - content_for(:page_title) { title } - page_head(title) unless content_for?(:page_head) + def page_title(title, &block) + content_for(:page_title) do + title + block.try(:call).to_s + end + page_head(title, &block) unless content_for?(:page_head) end - def page_head(head) - content_for(:page_head) { head } + def page_head(head, &block) + content_for(:page_head) do + head.html_safe + block.try(:call).to_s + end end end diff --git a/app/views/fluentd/errors.html.haml b/app/views/fluentd/errors.html.haml index 91ff3e7..0eee409 100644 --- a/app/views/fluentd/errors.html.haml +++ b/app/views/fluentd/errors.html.haml @@ -1,6 +1,7 @@ -- page_title t('fluentd.common.recent_errors', days: @error_duration_days) - -%p= link_to t('fluentd.common.raw_log_link'), raw_log_fluentd_path(@fluentd), class: "btn btn-primary" +- page_title t('fluentd.common.recent_errors', days: @error_duration_days) do + - link_to raw_log_fluentd_path(@fluentd), class: "btn btn-primary pull-right" do + = icon('fa-download') + = t('fluentd.common.raw_log_link') %div.row %div.col-lg-12 diff --git a/app/views/fluentd/log.html.haml b/app/views/fluentd/log.html.haml index 30f8bff..0e29e17 100644 --- a/app/views/fluentd/log.html.haml +++ b/app/views/fluentd/log.html.haml @@ -1,6 +1,7 @@ -- page_title t('.page_title', label: @fluentd.label) - -%p= link_to t('fluentd.common.raw_log_link'), raw_log_fluentd_path(@fluentd), class: "btn btn-primary" +- page_title t('.page_title', label: @fluentd.label) do + - link_to raw_log_fluentd_path(@fluentd), class: "btn btn-primary pull-right" do + = icon('fa-download') + = t('fluentd.common.raw_log_link') .row .col-lg-12 diff --git a/app/views/fluentd/settings/show.html.haml b/app/views/fluentd/settings/show.html.haml index cf0f2d7..e15e9f7 100644 --- a/app/views/fluentd/settings/show.html.haml +++ b/app/views/fluentd/settings/show.html.haml @@ -1,9 +1,10 @@ -- page_title t('.page_title') +- page_title t('.page_title') do + - link_to edit_fluentd_setting_path(@fluentd), class: "btn btn-primary pull-right" do + = icon('fa-pencil') + = t("terms.edit") .row .col-lg-12 - %p - = link_to t("terms.edit"), edit_fluentd_setting_path(@fluentd), class: "btn btn-primary" %pre = preserve do = @config diff --git a/app/views/misc/information.html.haml b/app/views/misc/information.html.haml index 7d4ca41..0246292 100644 --- a/app/views/misc/information.html.haml +++ b/app/views/misc/information.html.haml @@ -1,4 +1,7 @@ -- page_title t('.page_title') +- page_title t('.page_title') do + - link_to misc_download_info_path, class: "btn btn-primary pull-right" do + = icon('fa-download') + = t('.download_system_information') - if FluentdUI.update_available? .row @@ -8,12 +11,6 @@ = t('.update_fluentd_ui', version: FluentdUI.latest_version) = t('.update_fluentd_ui_caution') -.row - .col-lg-12 - %p - =link_to misc_download_info_path, class: "btn btn-primary" do - = t('.download_system_information') - .row %div.col-lg-6 %div.panel.panel-default