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
...
@@ -22,4 +22,11 @@ class CarLogsController < ApplicationController
redirect_to
(
"/car_logs"
)
redirect_to
(
"/car_logs"
)
end
end
def
delete
car_log_to_delete
=
CarLog
.
find
(
record
.
id
)
car_log_to_delete
.
destroy!
end
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>
<h1>
Add New Record
</h1>
<%=
form_tag
(
"/car_logs/create"
,
method:
"post"
)
do
%>
<%=
form_tag
(
"/car_logs/create"
,
method:
"post"
)
do
%>
<label>
Plate Number
</label>
<label>
Plate Number
</label>
<input
type=
"text"
name=
"plate_number"
/>
<input
type=
"text"
name=
"plate_number"
/>
<div></div>
<label>
Time In:
</label>
<input
type=
"datetime-local"
name=
"time_in"
/>
<label>
Time Out:
</label>
<label>
Time Out:
</label>
<input
type=
"text"
name=
"time_out"
/>
<input
type=
"datetime-local"
name=
"time_out"
/>
<div></div>
<label>
Color:
</label>
<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=
""
disabled=
"disabled"
selected=
"selected"
>
Select..
</option>
<option
value=
"red"
>
red
</option>
<option
value=
"red"
>
red
</option>
<option
value=
"white"
>
white
</option>
<option
value=
"white"
>
white
</option>
...
@@ -19,9 +20,8 @@
...
@@ -19,9 +20,8 @@
<option
value=
"black"
>
black
</option>
<option
value=
"black"
>
black
</option>
<option
value=
"others"
>
others
</option>
<option
value=
"others"
>
others
</option>
</select>
</select>
<div></div>
<label>
Brand:
</label>
<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=
""
disabled=
"disabled"
selected=
"selected"
>
Select..
</option>
<option
value=
"Honda"
>
Honda
</option>
<option
value=
"Honda"
>
Honda
</option>
<option
value=
"Toyota"
>
Toyota
</option>
<option
value=
"Toyota"
>
Toyota
</option>
...
@@ -30,8 +30,6 @@
...
@@ -30,8 +30,6 @@
<option
value=
"Audi"
>
Audi
</option>
<option
value=
"Audi"
>
Audi
</option>
<option
value=
"Porsche"
>
Porsche
</option>
<option
value=
"Porsche"
>
Porsche
</option>
</select>
</select>
<div></div>
<input
type=
"submit"
value=
"Save"
/>
<input
type=
"submit"
value=
"Save"
/>
<%
end
%>
<%
end
%>
...
...
draft3/app/views/car_logs/index.html.erb
View file @
d565c5be
<h1>
Car Log Records
</h1>
<h1>
Car Log Records
</h1>
<center>
<%=
form_tag
(
"/car_logs"
,
method:
"get"
)
do
%>
<%=
form_tag
(
"/car_logs"
,
method:
"get"
)
do
%>
<input
type=
"text"
name=
"q"
>
<input
type=
"text"
name=
"q"
>
<input
type=
"submit"
value=
"Search"
>
<input
type=
"submit"
value=
"Search"
>
...
@@ -8,15 +8,14 @@
...
@@ -8,15 +8,14 @@
<hr>
<hr>
<table>
<table
cellpadding=
"50"
>
<thead>
<thead>
<td>
ID
</td>
<th>
ID
</th>
<td>
Plate Number
</td>
<th>
Plate Number
</th>
<td>
Time In
</td>
<th>
Time In
</th>
<td>
Time Out
</td>
<th>
Time Out
</th>
<td>
Color
</td>
<th>
Color
</th>
<td>
Brand
</td>
<th>
Brand
</th>
<td
colspan=
"3"
></td>
</thead>
</thead>
<%
@records
.
each
do
|
record
|
%>
<%
@records
.
each
do
|
record
|
%>
...
@@ -31,7 +30,7 @@
...
@@ -31,7 +30,7 @@
<%
end
%>
<%
end
%>
</table>
</table>
</center>
<hr>
<hr>
<a
href=
"/create_new"
>
Add New Record
</a>
<a
href=
"/create_new"
>
Add New Record
</a>
<div></div>
<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