mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 16:41:38 -04:00
add bootstrap, fix bike form
This commit is contained in:
Binary file not shown.
@@ -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>
|
||||
@@ -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 %>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<h1>Bicycle Data Tracker</h1>
|
||||
<%= link_to "Track Bicycles", bikes_path %>
|
||||
Reference in New Issue
Block a user