|
|
@ -8,21 +8,27 @@ module ApplicationHelper |
|
|
|
link_to(name, '#', id: "add_#{association.to_s.singularize}" , class: "add_fields", data: {id: id, fields: fields.gsub("\n", "")}) |
|
|
|
end |
|
|
|
|
|
|
|
def top_menu(left, right = nil) |
|
|
|
content_tag :div do |
|
|
|
def top_menu(right = nil) |
|
|
|
content_tag :nav, class: 'navbar navbar-default' do |
|
|
|
content_tag :div, class: 'container-fluid' do |
|
|
|
content_tag :div, class: 'row' do |
|
|
|
[ |
|
|
|
content_tag(:div, left, class: 'pull-left'), |
|
|
|
content_tag(:div, right, class: 'pull-right'), |
|
|
|
content_tag(:div, nil, class: 'clearfix'), |
|
|
|
content_tag(:div, link_to_dashboard, class: 'col-xs-3'), |
|
|
|
content_tag(:div, header_logo, class: 'col-xs-6'), |
|
|
|
content_tag(:div, class: 'col-xs-3') { content_tag :div, right, class: 'pull-right' }, |
|
|
|
].join.html_safe |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
def link_to_dashboard |
|
|
|
content_tag :p do |
|
|
|
content_tag :a, href: root_path, class: 'btn btn-default', title: 'Back to dashboard' do |
|
|
|
content_tag :span, '', class: 'glyphicon glyphicon-home' |
|
|
|
link_to root_path, class: 'navbar-brand', title: 'Back to dashboard' do |
|
|
|
content_tag :i, '', class: "glyphicon glyphicon-home" |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
def header_logo |
|
|
|
content_tag :div, 'Velocipede', class: 'navbar-text text-center' |
|
|
|
end |
|
|
|
end |
|
|
|