Commit d565c5be authored by Jasmine Principe's avatar Jasmine Principe

updatedhtml

parent e55a7bba
......@@ -22,4 +22,11 @@ class CarLogsController < ApplicationController
redirect_to("/car_logs")
end
def delete
car_log_to_delete = CarLog.find(record.id)
car_log_to_delete.destroy!
end
end
\ No newline at end of file
<h1>Add New Record</h1>
<%= form_tag("/car_logs/create", method: "post") do %>
<label>Plate Number</label>
<input type="text" name="plate_number"/>
<div></div>
<label>Time In:</label>
<input type="datetime-local" name="time_in"/>
<label>Time Out:</label>
<input type="text" name="time_out"/>
<div></div>
<input type="datetime-local" name="time_out"/>
<label>Color:</label>
<select name="rate" class="u-full-width">
<select name="color" class="u-full-width">
<option value="" disabled="disabled" selected="selected">Select..</option>
<option value="red">red</option>
<option value="white">white</option>
......@@ -19,9 +20,8 @@
<option value="black">black</option>
<option value="others">others</option>
</select>
<div></div>
<label>Brand:</label>
<select name="rate" class="u-full-width">
<select name="brand" class="u-full-width">
<option value="" disabled="disabled" selected="selected">Select..</option>
<option value="Honda">Honda</option>
<option value="Toyota">Toyota</option>
......@@ -30,8 +30,6 @@
<option value="Audi">Audi</option>
<option value="Porsche">Porsche</option>
</select>
<div></div>
<input type="submit" value="Save"/>
<% end %>
......
<h1>Car Log Records</h1>
<center>
<%= form_tag("/car_logs", method: "get") do %>
<input type="text" name="q">
<input type="submit" value="Search">
......@@ -8,15 +8,14 @@
<hr>
<table>
<table cellpadding="50">
<thead>
<td>ID</td>
<td>Plate Number</td>
<td>Time In</td>
<td>Time Out</td>
<td>Color</td>
<td>Brand</td>
<td colspan="3"></td>
<th> ID </th>
<th> Plate Number </th>
<th> Time In </th>
<th> Time Out </th>
<th> Color </th>
<th> Brand </th>
</thead>
<% @records.each do |record| %>
......@@ -31,7 +30,7 @@
<% end %>
</table>
</center>
<hr>
<a href="/create_new">Add New Record</a>
<div></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment