add bootstrap, fix bike form

This commit is contained in:
loos
2014-03-02 11:49:33 -06:00
parent 4ea02cf5b2
commit ba0e665f6c
78 changed files with 9750 additions and 52 deletions
+1
View File
@@ -14,3 +14,4 @@
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require bootstrap
+1
View File
@@ -9,5 +9,6 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require bootstrap
*= require_tree .
*/
-1
View File
@@ -17,7 +17,6 @@ class BikesController < ApplicationController
def create
@bike = Bike.new(bike_params)
respond_to do |format|
if @bike.save
format.html { redirect_to @bike, notice: 'Bike was successfully created.' }
@@ -0,0 +1,3 @@
class StaticPagesController < ApplicationController
def home; end
end
Binary file not shown.
+38
View File
@@ -0,0 +1,38 @@
<% disabled ||= false %>
<%= f.label "Bike Entry Date:" %>
<%= f.text_field :entry_date, disabled: disabled %>
<br>
<%= f.label "Brand:" %>
<%= f.text_field :brand, disabled: disabled %>
<br>
<%= f.label "Model:" %>
<%= f.text_field :model, disabled: disabled %>
<br>
<%= f.label "Type:" %>
<%= f.text_field :bike_type, disabled: disabled %>
<br>
<%= f.label "Freecyclery?" %>
<%= f.check_box :freecyclery, disabled: disabled %>
<br>
<%= f.label "Sale?" %>
<%= f.check_box :sale, disabled: disabled %>
<br>
<%= f.label "Serial Number" %>
<%= f.text_field :serial_number, disabled: disabled %>
<br>
<%= f.label "Notes" %>
<%= f.text_area :notes, disabled: disabled %>
<br>
<%= f.label "Tag Info" %>
<%= f.text_area :tag_info, disabled: disabled %>
<br>
<%= f.label "Repaired by:" %>
<%= f.text_field :repaired_by, disabled: disabled %>
<br>
<%= f.label "Completion Date:" %>
<%= f.text_field :completion_date, disabled: disabled %>
<br>
<%= f.label "Price" %>
<%= f.text_field :price, disabled: disabled %>
<br>
+1 -33
View File
@@ -11,39 +11,7 @@
</div>
<% end %>
<%= f.label "Bike Entry Date:" %>
<%= f.text_field :entry_date %>
<br>
<%= f.label "Brand:" %>
<%= f.text_field :brand %>
<br>
<%= f.label "Type:" %>
<%= f.text_field :bike_type %>
<br>
<%= f.label "Freecyclery?" %>
<%= f.check_box :freecyclery %>
<br>
<%= f.label "Sale?" %>
<%= f.check_box :sale %>
<br>
<%= f.label "Serial Number" %>
<%= f.text_field :serial_number %>
<br>
<%= f.label "Notes" %>
<%= f.text_area :notes %>
<br>
<%= f.label "Tag Info" %>
<%= f.text_area :tag_info %>
<br>
<%= f.label "Repaired by:" %>
<%= f.text_field :repaired_by %>
<br>
<%= f.label "Completion Date:" %>
<%= f.text_field :completion_date %>
<br>
<%= f.label "Price" %>
<%= f.text_field :price %>
<br>
<%= render 'fields', f: f %>
<div class="actions">
<%= f.submit %>
+4
View File
@@ -3,6 +3,8 @@
<table>
<thead>
<tr>
<th> Brand </th>
<th> Model </th>
<th></th>
<th></th>
<th></th>
@@ -12,6 +14,8 @@
<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>
+3
View File
@@ -1,4 +1,7 @@
<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 %>
+10
View File
@@ -0,0 +1,10 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= content_for?(:title) ? yield(:title) : "Bicycle Project Tracker" %></title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag "application", :media => "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= favicon_link_tag '/favicon.ico' %>
</head>
+17
View File
@@ -0,0 +1,17 @@
<nav class="navbar navbar-default">
<div class='navbar-header'>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to "Bicycle Project Tracker", root_path, :class=>"navbar-brand" %>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse" id='collapse-1'>
<ul class="nav navbar-nav navbar-right">
<li><%= link_to "Bike Tracker", bikes_path %></li>
</ul>
</div>
</nav>
+6 -12
View File
@@ -1,14 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<title>Bikedb</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
<html lang="en">
<%= render "layouts/head" %>
<%= render "layouts/navbar" %>
<body>
<%= yield %>
</body>
</html>
+2
View File
@@ -0,0 +1,2 @@
<h1>Bicycle Data Tracker</h1>
<%= link_to "Track Bicycles", bikes_path %>