mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 08:43:23 -05:00
BS3: top menu.
This commit is contained in:
parent
1774a6ad34
commit
e8506f6fbc
@ -8,6 +8,16 @@ module ApplicationHelper
|
|||||||
link_to(name, '#', id: "add_#{association.to_s.singularize}" , class: "add_fields", data: {id: id, fields: fields.gsub("\n", "")})
|
link_to(name, '#', id: "add_#{association.to_s.singularize}" , class: "add_fields", data: {id: id, fields: fields.gsub("\n", "")})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def top_menu(left, right = nil)
|
||||||
|
content_tag :div do
|
||||||
|
[
|
||||||
|
content_tag(:div, left, class: 'pull-left'),
|
||||||
|
content_tag(:div, right, class: 'pull-right'),
|
||||||
|
content_tag(:div, nil, class: 'clearfix'),
|
||||||
|
].join.html_safe
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def link_to_dashboard
|
def link_to_dashboard
|
||||||
content_tag :p do
|
content_tag :p do
|
||||||
content_tag :a, href: root_path, class: 'btn btn-default', title: 'Back to dashboard' do
|
content_tag :a, href: root_path, class: 'btn btn-default', title: 'Back to dashboard' do
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
= link_to_dashboard
|
= top_menu link_to_dashboard
|
||||||
|
|
||||||
%h2 Add Bike
|
%h2 Add Bike
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
- if @show_add_bike
|
- btn = if @show_add_bike
|
||||||
%p
|
- capture do
|
||||||
%a{class: "btn btn-lg btn-block btn-info", href: new_bike_path} Add Another Bike?
|
= link_to 'Add Another Bike?', new_bike_path, class: 'btn btn-default'
|
||||||
|
|
||||||
= link_to_dashboard
|
= top_menu link_to_dashboard, btn
|
||||||
|
|
||||||
%h2 #{@bike.shop_id}: #{@bike.bike_brand}
|
%h2 #{@bike.shop_id}: #{@bike.bike_brand}
|
||||||
%h2 #{@bike.model}
|
%h2 #{@bike.model}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
= link_to_dashboard
|
= top_menu link_to_dashboard
|
||||||
|
|
||||||
%h1 Task List
|
%h1 Task List
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
= link_to_dashboard
|
= top_menu link_to_dashboard
|
||||||
|
|
||||||
%h1 Your Timesheet
|
%h1 Your Timesheet
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
= link_to_dashboard
|
= top_menu link_to_dashboard
|
||||||
|
|
||||||
%h1 Add Time Entry
|
%h1 Add Time Entry
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user