Primary action button move to top-right

This commit is contained in:
uu59 2014-07-24 14:08:03 +09:00
parent 504954b68f
commit b92b1dbfb9
5 changed files with 25 additions and 21 deletions

View File

@ -40,12 +40,16 @@ module ApplicationHelper
%Q!<i class="fa #{classes}">#{inner}</i> !.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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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