Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Datababes
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
George Nicole Balmaceda
Datababes
Commits
31ea132c
Commit
31ea132c
authored
Jul 23, 2016
by
Kristoff Sison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added show all page and back button
parent
4506e773
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
4 deletions
+46
-4
Gemfile.lock
parkinglot/Gemfile.lock
+1
-1
car_logs_controller.rb
parkinglot/app/controllers/car_logs_controller.rb
+4
-0
index.html.erb
parkinglot/app/views/carlogs/index.html.erb
+4
-3
show.html.erb
parkinglot/app/views/carlogs/show.html.erb
+35
-0
routes.rb
parkinglot/config/routes.rb
+2
-0
No files found.
parkinglot/Gemfile.lock
View file @
31ea132c
...
@@ -166,4 +166,4 @@ DEPENDENCIES
...
@@ -166,4 +166,4 @@ DEPENDENCIES
web-console (~> 2.0)
web-console (~> 2.0)
BUNDLED WITH
BUNDLED WITH
1.1
0.6
1.1
2.5
parkinglot/app/controllers/car_logs_controller.rb
View file @
31ea132c
...
@@ -23,4 +23,8 @@ class CarLogsController < ApplicationController
...
@@ -23,4 +23,8 @@ class CarLogsController < ApplicationController
@car
.
destroy
@car
.
destroy
redirect_to
"/carlogs"
redirect_to
"/carlogs"
end
end
def
show
@cars
=
CarLog
.
all
render
"carlogs/show.html.erb"
end
end
end
\ No newline at end of file
parkinglot/app/views/carlogs/index.html.erb
View file @
31ea132c
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
<a
id=
"plus"
href=
"/carlogs/new"
class=
"card"
>
<a
id=
"plus"
href=
"/carlogs/new"
class=
"card"
>
Add More
Add More
</a>
</a>
<a
id=
"plus"
href=
"/carlogs/show"
class=
"card"
>
Show All
</a>
</div>
</div>
\ No newline at end of file
parkinglot/app/views/carlogs/show.html.erb
0 → 100644
View file @
31ea132c
<nav>
<a
href=
"/"
class=
"logo"
>
<div
style=
"font-size:50px; font-weight: bold; color:white; text-align: center;"
>
Park
<div
style=
"display:inline; color:black; background:#fe9900; border-radius:5px; font-size:50px; padding:1px 5px;"
>
hub
</div>
</a>
</nav>
<div
class=
"card-container"
>
<%
@cars
.
each
do
|
car
|
%>
<div
class=
"card"
>
<div
class=
"column orange"
>
<label>
Brand
</label>
<%=
car
.
brand
=
%>
<label>
Plate Number
</label>
<%=
car
.
plate_number
=
%>
<label>
Color
</label>
<%=
car
.
color
=
%>
</div>
<div
class=
"column"
>
<label>
Created
</label>
<%=
car
.
created_at
=
%>
<br>
<label>
Time In
</label>
<%=
car
.
time_in
=
%>
<label>
Time Out
</label>
<%=
car
.
time_out
=
%>
</div>
</div>
<%
end
%>
<a
id=
"plus"
href=
"/carlogs/index"
class=
"card"
>
Back
</a>
</div>
\ No newline at end of file
parkinglot/config/routes.rb
View file @
31ea132c
...
@@ -3,7 +3,9 @@ Rails.application.routes.draw do
...
@@ -3,7 +3,9 @@ Rails.application.routes.draw do
get
"/carlogs"
,
to:
"car_logs#index"
get
"/carlogs"
,
to:
"car_logs#index"
get
"/group"
,
to:
"pages#group"
get
"/group"
,
to:
"pages#group"
get
"/carlogs/new"
,
to:
"car_logs#form"
get
"/carlogs/new"
,
to:
"car_logs#form"
get
"/carlogs/show"
,
to:
"car_logs#show"
post
"/carlogs/create"
,
to:
"car_logs#create"
post
"/carlogs/create"
,
to:
"car_logs#create"
get
"/carlogs/index"
,
to:
"car_logs#index"
get
"carlogs/delete/:id"
,
to:
"car_logs#delete"
get
"carlogs/delete/:id"
,
to:
"car_logs#delete"
end
end
...
...
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