Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
parkinglot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
evilla_gomez_guian_principe
parkinglot
Commits
d565c5be
Commit
d565c5be
authored
Jul 04, 2016
by
Jasmine Principe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updatedhtml
parent
e55a7bba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
18 deletions
+22
-18
car_logs_controller.rb
draft3/app/controllers/car_logs_controller.rb
+7
-0
create_page.html.erb
draft3/app/views/car_logs/create_page.html.erb
+6
-8
index.html.erb
draft3/app/views/car_logs/index.html.erb
+9
-10
No files found.
draft3/app/controllers/car_logs_controller.rb
View file @
d565c5be
...
...
@@ -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
draft3/app/views/car_logs/create_page.html.erb
View file @
d565c5be
<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
%>
...
...
draft3/app/views/car_logs/index.html.erb
View file @
d565c5be
<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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment