mirror of
				https://github.com/fspc/bike-database.git
				synced 2025-10-31 08:45:34 -04:00 
			
		
		
		
	erb -> haml
This commit is contained in:
		
							parent
							
								
									8b17200b97
								
							
						
					
					
						commit
						8bf01921a3
					
				
							
								
								
									
										1
									
								
								Gemfile
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								Gemfile
									
									
									
									
									
								
							| @ -7,6 +7,7 @@ gem 'bcrypt-ruby', '3.1.2' | |||||||
| #SCSS & Bootstrap | #SCSS & Bootstrap | ||||||
| gem 'bootstrap-sass', '2.3.2.0' | gem 'bootstrap-sass', '2.3.2.0' | ||||||
| gem 'sass-rails', '~> 4.0.0' | gem 'sass-rails', '~> 4.0.0' | ||||||
|  | gem 'haml' | ||||||
| 
 | 
 | ||||||
| group :test, :development do | group :test, :development do | ||||||
|   gem 'rspec' |   gem 'rspec' | ||||||
|  | |||||||
| @ -61,6 +61,8 @@ GEM | |||||||
|       railties (>= 3.0.0) |       railties (>= 3.0.0) | ||||||
|     ffi (1.9.3) |     ffi (1.9.3) | ||||||
|     growl (1.0.3) |     growl (1.0.3) | ||||||
|  |     haml (4.0.5) | ||||||
|  |       tilt | ||||||
|     hike (1.2.3) |     hike (1.2.3) | ||||||
|     i18n (0.6.9) |     i18n (0.6.9) | ||||||
|     jbuilder (1.0.2) |     jbuilder (1.0.2) | ||||||
| @ -183,6 +185,7 @@ DEPENDENCIES | |||||||
|   factory_girl |   factory_girl | ||||||
|   factory_girl_rails (~> 4.0) |   factory_girl_rails (~> 4.0) | ||||||
|   growl (= 1.0.3) |   growl (= 1.0.3) | ||||||
|  |   haml | ||||||
|   jbuilder (= 1.0.2) |   jbuilder (= 1.0.2) | ||||||
|   jquery-rails (= 3.0.4) |   jquery-rails (= 3.0.4) | ||||||
|   jquery-turbolinks |   jquery-turbolinks | ||||||
|  | |||||||
| @ -1,108 +0,0 @@ | |||||||
| <% disabled ||= false %> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Log Number", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :log_number, class: "form-control", disabled: disabled  %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Bike Entry Date:", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :entry_date, class: "form-control", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Brand:", class: "col-sm-2 control-label"   %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :brand, class: "form-control", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Color:", class: "col-sm-2 control-label"   %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :color, class: "form-control", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Top Tube Size:", class: "col-sm-2 control-label"   %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :top_tube_size, class: "form-control", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Seat Tube Size:", class: "col-sm-2 control-label"   %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :seat_tube_size, class: "form-control", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Model:", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :model, class: "form-control", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Type:", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :bike_type, class: "form-control", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Purpose:", class: "col-sm-2 control-label"   %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], class: "selectpicker", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Serial Number", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :serial_number, class: "form-control", disabled: disabled  %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Notes", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_area :notes, class: "form-control", disabled: disabled  %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Tag Info", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_area :tag_info, class: "form-control", disabled: disabled  %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Mechanic:", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :mechanic, class: "form-control", disabled: disabled  %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Completion Date:", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :completion_date, class: "form-control datepicker", disabled: disabled  %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Price", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :price, class: "form-control", disabled: disabled  %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										76
									
								
								app/views/bikes/_fields.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								app/views/bikes/_fields.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,76 @@ | |||||||
|  | - disabled ||= false  | ||||||
|  | .form-horizontal | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Log Number", class: "col-sm-2 control-label"  | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :log_number, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Bike Entry Date:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :entry_date, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Brand:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :brand, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Color:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :color, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Top Tube Size:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :top_tube_size, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Seat Tube Size:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :seat_tube_size, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Model:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :model, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Type:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :bike_type, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Purpose:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.select :purpose, [["Freecyclery", "Freecyclery"], ["Sale", "Sale"]], class: "selectpicker", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Serial Number", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :serial_number, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Notes", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_area :notes, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Tag Info", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_area :tag_info, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Mechanic:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :mechanic, class: "form-control", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Completion Date:", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :completion_date, class: "form-control datepicker", disabled: disabled | ||||||
|  |    | ||||||
|  |   .form-group | ||||||
|  |     = f.label "Price", class: "col-sm-2 control-label" | ||||||
|  |     .col-sm-10 | ||||||
|  |       = f.text_field :price, class: "form-control", disabled: disabled | ||||||
| @ -1,23 +0,0 @@ | |||||||
| <div class="container"> |  | ||||||
|   <%= form_for @bike, html: {class: 'form-horizontal'} do |f| %> |  | ||||||
|     <% if @bike.errors.any? %> |  | ||||||
|       <div id="error_explanation"> |  | ||||||
|         <h2><%= pluralize(@bike.errors.count, "error") %> prohibited this bike from being saved:</h2> |  | ||||||
|    |  | ||||||
|         <ul> |  | ||||||
|         <% @bike.errors.full_messages.each do |msg| %> |  | ||||||
|           <li><%= msg %></li> |  | ||||||
|         <% end %> |  | ||||||
|         </ul> |  | ||||||
|       </div> |  | ||||||
|     <% end %> |  | ||||||
|    |  | ||||||
|     <%= render 'fields', f: f %> |  | ||||||
|    |  | ||||||
|     <div class="row"> |  | ||||||
|       <div class="actions col-sm-offset-2"> |  | ||||||
|         <%= f.submit class: "btn btn-default" %> |  | ||||||
|       </div> |  | ||||||
|     </div> |  | ||||||
|   <% end %> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										12
									
								
								app/views/bikes/_form.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								app/views/bikes/_form.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | |||||||
|  | .container | ||||||
|  |   = form_for @bike, html: {class: 'form-horizontal'} do |f| | ||||||
|  |     - if @bike.errors.any?  | ||||||
|  |       #error_explanation | ||||||
|  |         %h2= pluralize(@bike.errors.count, "error") + " prohibited this bike from being saved:" | ||||||
|  |         %ul | ||||||
|  |           - @bike.errors.full_messages.each do |msg| | ||||||
|  |             %li= msg  | ||||||
|  |     = render 'fields', f: f  | ||||||
|  |     .row | ||||||
|  |       .actions.col-sm-offset-2 | ||||||
|  |         = f.submit class: "btn btn-default" | ||||||
| @ -1,8 +0,0 @@ | |||||||
| <div class="container"> |  | ||||||
|   <h1>Editing bike</h1> |  | ||||||
|    |  | ||||||
|   <%= render 'form' %> |  | ||||||
|    |  | ||||||
|   <%= link_to 'Show', @bike %> | |  | ||||||
|   <%= link_to 'Back', bikes_path %> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										6
									
								
								app/views/bikes/edit.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/views/bikes/edit.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | .container | ||||||
|  |   %h1 Editing bike | ||||||
|  |   = render 'form'  | ||||||
|  |   = link_to 'Show', @bike | ||||||
|  |   | | ||||||
|  |   = link_to 'Back', bikes_path | ||||||
| @ -1,30 +0,0 @@ | |||||||
| <div class="container"> |  | ||||||
| 
 |  | ||||||
|   <h1>Bikes</h1> |  | ||||||
| 
 |  | ||||||
|   <table class="table table-striped table-bordered table-hover"> |  | ||||||
|     <thead> |  | ||||||
|       <tr> |  | ||||||
|         <th> Brand </th> |  | ||||||
|         <th> Model </th> |  | ||||||
|         <th></th> |  | ||||||
|         <th></th> |  | ||||||
|         <th></th> |  | ||||||
|       </tr> |  | ||||||
|     </thead> |  | ||||||
|     <tbody> |  | ||||||
|       <% @bikes.each do |bike| %> |  | ||||||
|         <tr> |  | ||||||
|           <td><%= bike.brand %></td> |  | ||||||
|           <td><%= bike.model %></td> |  | ||||||
|           <td><%= link_to 'Show', bike %></td> |  | ||||||
|           <td><%= link_to 'Edit', edit_bike_path(bike) %></td> |  | ||||||
|           <td><%= link_to 'Destroy', bike, method: :delete, data: { confirm: 'Are you sure?' } %></td> |  | ||||||
|         </tr> |  | ||||||
|       <% end %> |  | ||||||
|     </tbody> |  | ||||||
|   </table> |  | ||||||
|    |  | ||||||
|   <br> |  | ||||||
|   <%= link_to ' + Log Bike', new_bike_path, class: "btn btn-default" %> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										22
									
								
								app/views/bikes/index.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								app/views/bikes/index.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | .container | ||||||
|  |   %h1 Bikes | ||||||
|  | 
 | ||||||
|  |   %table.table.table-striped.table-bordered.table-hover | ||||||
|  |     %thead | ||||||
|  |       %tr | ||||||
|  |         %th Brand | ||||||
|  |         %th Model | ||||||
|  |         %th | ||||||
|  |         %th | ||||||
|  |         %th | ||||||
|  |     %tbody | ||||||
|  |       - @bikes.each do |bike| | ||||||
|  |         %tr | ||||||
|  |           %td= bike.brand  | ||||||
|  |           %td= bike.model | ||||||
|  |           %td= link_to 'Show', bike | ||||||
|  |           %td= link_to 'Edit', edit_bike_path(bike) | ||||||
|  |           %td= link_to 'Destroy', bike, method: :delete, data: { confirm: 'Are you sure?' } | ||||||
|  |    | ||||||
|  |   %br | ||||||
|  |   = link_to ' + Log Bike', new_bike_path, class: "btn btn-default" | ||||||
| @ -1,5 +0,0 @@ | |||||||
| <h1>New bike</h1> |  | ||||||
| 
 |  | ||||||
| <%= render 'form' %> |  | ||||||
| 
 |  | ||||||
| <%= link_to 'Back', bikes_path %> |  | ||||||
							
								
								
									
										3
									
								
								app/views/bikes/new.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								app/views/bikes/new.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | %h1 New bike | ||||||
|  | = render 'form' | ||||||
|  | = link_to 'Back', bikes_path | ||||||
| @ -1,9 +0,0 @@ | |||||||
| <div class="container"> |  | ||||||
|   <p id="notice"><%= notice %></p> |  | ||||||
|   <%= form_for(@bike) do |f| %> |  | ||||||
|     <%= render 'fields', f: f, disabled: true %> |  | ||||||
|   <% end %> |  | ||||||
|    |  | ||||||
|   <%= link_to 'Edit', edit_bike_path(@bike) %> | |  | ||||||
|   <%= link_to 'Back', bikes_path %> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										7
									
								
								app/views/bikes/show.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								app/views/bikes/show.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | |||||||
|  | .container | ||||||
|  |   %p#notice= notice | ||||||
|  |   = form_for(@bike) do |f| | ||||||
|  |     = render 'fields', f: f, disabled: true | ||||||
|  |   = link_to 'Edit', edit_bike_path(@bike) | ||||||
|  |   | | ||||||
|  |   = link_to 'Back', bikes_path | ||||||
| @ -1,6 +0,0 @@ | |||||||
| <div class="container"> |  | ||||||
|   <h1>Bicycle Data Tracker</h1> |  | ||||||
|   <%= link_to "Bikes", bikes_path %> |  | ||||||
|   <br> |  | ||||||
|   <%= link_to "Volunteers", volunteers_path %> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										5
									
								
								app/views/static_pages/home.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app/views/static_pages/home.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | .container | ||||||
|  |   %h1 Bicycle Data Tracker | ||||||
|  |   = link_to "Bikes", bikes_path | ||||||
|  |   %br | ||||||
|  |   = link_to "Volunteers", volunteers_path | ||||||
| @ -1,23 +0,0 @@ | |||||||
| <% disabled ||= false %> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Name", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :name, class: "form-control", disabled: disabled  %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Email address:", class: "col-sm-2 control-label" %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :email, class: "form-control", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="form-group"> |  | ||||||
|   <%= f.label "Phone Number:", class: "col-sm-2 control-label"   %> |  | ||||||
|   <div class="col-sm-10"> |  | ||||||
|     <%= f.text_field :phone, class: "form-control", disabled: disabled %> |  | ||||||
|   </div> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
							
								
								
									
										17
									
								
								app/views/volunteers/_fields.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								app/views/volunteers/_fields.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | - disabled ||= false | ||||||
|  | 
 | ||||||
|  | .form-group | ||||||
|  |   = f.label "Name", class: "col-sm-2 control-label" | ||||||
|  |   .col-sm-10 | ||||||
|  |     = f.text_field :name, class: "form-control", disabled: disabled | ||||||
|  | 
 | ||||||
|  | .form-group | ||||||
|  |   = f.label "Email address:", class: "col-sm-2 control-label" | ||||||
|  |   .col-sm-10 | ||||||
|  |     = f.text_field :email, class: "form-control", disabled: disabled | ||||||
|  | 
 | ||||||
|  | .form-group | ||||||
|  |   = f.label "Phone Number:", class: "col-sm-2 control-label" | ||||||
|  |   .col-sm-10 | ||||||
|  |     = f.text_field :phone, class: "form-control", disabled: disabled | ||||||
|  | 
 | ||||||
| @ -1,23 +0,0 @@ | |||||||
| <div class="container"> |  | ||||||
|   <%= form_for @volunteer, html: {class: 'form-horizontal'} do |f| %> |  | ||||||
|     <% if @volunteer.errors.any? %> |  | ||||||
|       <div id="error_explanation"> |  | ||||||
|         <h2><%= pluralize(@volunteer.errors.count, "error") %> prohibited this volunteer from being saved:</h2> |  | ||||||
|    |  | ||||||
|         <ul> |  | ||||||
|         <% @volunteer.errors.full_messages.each do |msg| %> |  | ||||||
|           <li><%= msg %></li> |  | ||||||
|         <% end %> |  | ||||||
|         </ul> |  | ||||||
|       </div> |  | ||||||
|     <% end %> |  | ||||||
|    |  | ||||||
|     <%= render 'fields', f: f %> |  | ||||||
|    |  | ||||||
|     <div class="row"> |  | ||||||
|       <div class="actions col-sm-offset-2"> |  | ||||||
|         <%= f.submit class: "btn btn-default" %> |  | ||||||
|       </div> |  | ||||||
|     </div> |  | ||||||
|   <% end %> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										12
									
								
								app/views/volunteers/_form.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								app/views/volunteers/_form.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | |||||||
|  | .container | ||||||
|  |   = form_for @volunteer, html: {class: 'form-horizontal'} do |f| | ||||||
|  |     - if @volunteer.errors.any? | ||||||
|  |       #error_explanation | ||||||
|  |         %h2= pluralize(@volunteer.errors.count, "error") + "prohibited this volunteer from being saved:" | ||||||
|  |         %ul | ||||||
|  |         - @volunteer.errors.full_messages.each do |msg| | ||||||
|  |           %li= msg | ||||||
|  |     = render 'fields', f: f | ||||||
|  |     .row | ||||||
|  |       .actions.col-sm-offset-2 | ||||||
|  |         = f.submit class: "btn btn-default" | ||||||
| @ -1,8 +0,0 @@ | |||||||
| <div class="container"> |  | ||||||
|   <h1>Editing Volunteer Information</h1> |  | ||||||
|    |  | ||||||
|   <%= render 'form' %> |  | ||||||
|    |  | ||||||
|   <%= link_to 'Show', @volunteer %> | |  | ||||||
|   <%= link_to 'Back', volunteers_path %> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										6
									
								
								app/views/volunteers/edit.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/views/volunteers/edit.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | .container | ||||||
|  |   %h1 Editing Volunteer Information | ||||||
|  |   = render 'form' | ||||||
|  |   = link_to 'Show', @volunteer | ||||||
|  |   | | ||||||
|  |   = link_to 'Back', volunteers_path | ||||||
| @ -1,30 +0,0 @@ | |||||||
| <div class="container"> |  | ||||||
|   <h1>Volunteers</h1> |  | ||||||
|   <table class="table table-striped table-bordered table-hover"> |  | ||||||
|     <thead> |  | ||||||
|       <tr> |  | ||||||
|         <th> Name </th> |  | ||||||
|         <th> Phone </th> |  | ||||||
|         <th> Email </th> |  | ||||||
|         <th></th> |  | ||||||
|         <th></th> |  | ||||||
|         <th></th> |  | ||||||
|       </tr> |  | ||||||
|     </thead> |  | ||||||
|     <tbody> |  | ||||||
|       <% @volunteers.each do |volunteer| %> |  | ||||||
|         <tr> |  | ||||||
|           <td><%= volunteer.name %></td> |  | ||||||
|           <td><%= volunteer.phone %></td> |  | ||||||
|           <td><%= volunteer.email %></td> |  | ||||||
|           <td><%= link_to 'Show', volunteer %></td> |  | ||||||
|           <td><%= link_to 'Edit', edit_volunteer_path(volunteer) %></td> |  | ||||||
|           <td><%= link_to 'Destroy', volunteer, method: :delete, data: { confirm: 'Are you sure?' } %></td> |  | ||||||
|         </tr> |  | ||||||
|       <% end %> |  | ||||||
|     </tbody> |  | ||||||
|   </table> |  | ||||||
| 
 |  | ||||||
|   <%= link_to '+ Add Volunteer', new_volunteer_path, class: "btn btn-default" %> |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
							
								
								
									
										23
									
								
								app/views/volunteers/index.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								app/views/volunteers/index.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | |||||||
|  | .container | ||||||
|  |   %h1 Volunteers | ||||||
|  |   %table.table.table-striped.table-bordered.table-hover | ||||||
|  |     %thead | ||||||
|  |       %tr | ||||||
|  |         %th Name | ||||||
|  |         %th Phone | ||||||
|  |         %th Email | ||||||
|  |         %th | ||||||
|  |         %th | ||||||
|  |         %th | ||||||
|  |     %tbody | ||||||
|  |       - @volunteers.each do |volunteer| | ||||||
|  |         %tr | ||||||
|  |           %td= volunteer.name | ||||||
|  |           %td= volunteer.phone | ||||||
|  |           %td= volunteer.email | ||||||
|  |           %td= link_to 'Show', volunteer | ||||||
|  |           %td= link_to 'Edit', edit_volunteer_path(volunteer) | ||||||
|  |           %td= link_to 'Destroy', volunteer, method: :delete, data: { confirm: 'Are you sure?' } | ||||||
|  | 
 | ||||||
|  |   = link_to '+ Add Volunteer', new_volunteer_path, class: "btn btn-default" | ||||||
|  | 
 | ||||||
| @ -1,5 +0,0 @@ | |||||||
| <h1>New Volunteer</h1> |  | ||||||
| 
 |  | ||||||
| <%= render 'form' %> |  | ||||||
| 
 |  | ||||||
| <%= link_to 'Back', volunteers_path %> |  | ||||||
							
								
								
									
										3
									
								
								app/views/volunteers/new.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								app/views/volunteers/new.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | %h1 New Volunteer | ||||||
|  | = render 'form' | ||||||
|  | = link_to 'Back', volunteers_path | ||||||
| @ -1,9 +0,0 @@ | |||||||
| <div class="container"> |  | ||||||
|   <p id="notice"><%= notice %></p> |  | ||||||
|   <%= form_for(@volunteer) do |f| %> |  | ||||||
|     <%= render 'fields', f: f, disabled: true %> |  | ||||||
|   <% end %> |  | ||||||
|    |  | ||||||
|   <%= link_to 'Edit', edit_volunteer_path(@volunteer) %> | |  | ||||||
|   <%= link_to 'Back', volunteers_path %> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										7
									
								
								app/views/volunteers/show.html.haml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								app/views/volunteers/show.html.haml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | |||||||
|  | .container | ||||||
|  |   %p#notice= notice | ||||||
|  |   = form_for(@volunteer) do |f| | ||||||
|  |     = render 'fields', f: f, disabled: true | ||||||
|  |   = link_to 'Edit', edit_volunteer_path(@volunteer) | ||||||
|  |   | | ||||||
|  |   = link_to 'Back', volunteers_path | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user