mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 08:43:23 -05:00
BS3: new time entry.
This commit is contained in:
parent
2dd48c5b65
commit
e775c97fd1
@ -7,4 +7,12 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
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 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'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
%a{ class: "btn btn-default btn-lg", href: root_path}
|
= link_to_dashboard
|
||||||
%span{ class:"icon-home"}
|
|
||||||
%h2 Add Bike
|
%h2 Add Bike
|
||||||
|
|
||||||
%p
|
%p
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
%p
|
%p
|
||||||
%a{class: "btn btn-lg btn-block btn-info", href: new_bike_path} Add Another Bike?
|
%a{class: "btn btn-lg btn-block btn-info", href: new_bike_path} Add Another Bike?
|
||||||
|
|
||||||
%a{ class: "btn btn-default btn-lg", href: root_path}
|
= link_to_dashboard
|
||||||
%span{ class:"icon-home"}
|
|
||||||
%h2 #{@bike.shop_id}: #{@bike.bike_brand}
|
%h2 #{@bike.shop_id}: #{@bike.bike_brand}
|
||||||
%h2 #{@bike.model}
|
%h2 #{@bike.model}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
%a{ class: "btn btn-default btn-lg", href: root_path}
|
= link_to_dashboard
|
||||||
%span{ class:"icon-home"}
|
|
||||||
%h2 Task List
|
%h2 Task List
|
||||||
%h3
|
%h3
|
||||||
%a{ href: bike_path(@task_list.item)}#{@task_list.item.shop_id} #{@task_list.item.bike_brand}
|
%a{ href: bike_path(@task_list.item)}#{@task_list.item.shop_id} #{@task_list.item.bike_brand}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
%a{ class: "btn btn-default btn-lg", href: root_path}
|
= link_to_dashboard
|
||||||
%span{ class:"icon-home"}
|
|
||||||
%h2 Your Timesheet
|
%h2 Your Timesheet
|
||||||
|
|
||||||
%dl.dl-horizontal
|
%dl.dl-horizontal
|
||||||
|
@ -1,42 +1,50 @@
|
|||||||
%a{ class: "btn btn-default btn-lg", href: root_path}
|
= link_to_dashboard
|
||||||
%span{ class:"icon-home"}
|
|
||||||
%h2 Add Time Entry
|
|
||||||
|
|
||||||
%p
|
%h1 Add Time Entry
|
||||||
.control-group
|
|
||||||
.controls
|
.row
|
||||||
%input{id: "date_id", placeholder: "Date", type: "text", class: "datepicker input-small" }
|
.col-xs-12.col-sm-6.col-lg-4
|
||||||
.help-block
|
%fieldset
|
||||||
.control-group
|
.form-group.form-inline
|
||||||
.controls{ class: "bootstrap-timepicker"}
|
= text_field_tag '', '', id: 'date_id', placeholder: 'Date', class: 'form-control datepicker', size: 12
|
||||||
%label Start
|
.help-block
|
||||||
%input{id: "start_time_id", placeholder: "Time ID", type: "text", class: "input-small" }
|
|
||||||
.hidden{ id: "start_date" }
|
.form-group.bootstrap-timepicker.form-inline
|
||||||
.help-block
|
.form-group
|
||||||
.control-group
|
%label.visible-xs Start time
|
||||||
.controls
|
= text_field_tag '', '', id: 'start_time_id', placeholder: 'Start time', class: 'form-control', size: 8
|
||||||
%label End
|
.hidden#start_date
|
||||||
%input{id: "end_time_id", placeholder: "Time ID", type: "text", class: "input-small" }
|
.help-block
|
||||||
.hidden{ id: "end_date" }
|
|
||||||
.help-block
|
.form-group.hidden-xs
|
||||||
.control-group
|
—
|
||||||
.controls
|
|
||||||
.btn-group{ "data-toggle" => "buttons-radio"}
|
.form-group
|
||||||
%label{ class: "btn btn-default"}
|
%label.visible-xs End time
|
||||||
%input{ type: "radio", name: "action_id", value: 1} Volunteer
|
= text_field_tag '', '', id: 'end_time_id', placeholder: 'End time', class: 'form-control', size: 8
|
||||||
%label{ class: "btn btn-default"}
|
.hidden#end_date
|
||||||
%input{ type: "radio", name: "action_id", value: 2} Personal
|
.help-block
|
||||||
%label{ class: "btn btn-default"}
|
|
||||||
%input{ type: "radio", name: "action_id", value: 3} Staff
|
.form-group
|
||||||
.hidden{ id: "log_action_id" }
|
.btn-group{"data-toggle": 'buttons'}
|
||||||
.help-block
|
%label{class: 'btn btn-default'}
|
||||||
.control-group
|
= radio_button_tag 'action_id', 1, false, autocomplete: 'off'
|
||||||
.controls
|
Volunteer
|
||||||
%label
|
%label{class: 'btn btn-default'}
|
||||||
= select_tag(:bike_id, options_for_select(@bikes))
|
= radio_button_tag 'action_id', 2, false, autocomplete: 'off'
|
||||||
.control-group
|
Personal
|
||||||
.controls
|
%label{class: 'btn btn-default'}
|
||||||
%textarea{id: "description_id", placeholder: "Work description", class: "input-lg" }
|
= radio_button_tag 'action_id', 3, false, autocomplete: 'off'
|
||||||
.control-group
|
Staff
|
||||||
.controls
|
.hidden#log_action_id
|
||||||
%input{id: "add_time_entry_submit", value: "Add Time Entry", type: "button", class: "btn btn-lg btn-block btn-primary", "data-url" => "#{api_create_time_entry_path}", "data-forward" => "#{"."}"}
|
.help-block
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= select_tag :bike_id, options_for_select(@bikes), class: 'form-control'
|
||||||
|
|
||||||
|
.form-group
|
||||||
|
= text_area_tag '', '', id: 'description_id', placeholder: 'Work description', class: 'form-control', rows: 5
|
||||||
|
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= button_tag 'Add Time Entry', id: 'add_time_entry_submit', class: 'btn btn-primary', data: {url: "#{api_create_time_entry_path}", forward: "#{"."}"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user