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
AngKo_Catolico_Ilicito_Reyes
parkinglot
Commits
8d67f434
Commit
8d67f434
authored
Jul 05, 2016
by
Norence Ilicito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
design
parent
79e21b8e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
46 additions
and
33 deletions
+46
-33
Gemfile
parkinglot/Gemfile
+1
-1
Gemfile.lock
parkinglot/Gemfile.lock
+1
-1
application.css
parkinglot/app/assets/stylesheets/application.css
+15
-15
cars_controller.rb
parkinglot/app/controllers/cars_controller.rb
+6
-6
index.html.erb
parkinglot/app/views/cars/index.html.erb
+0
-1
index.html.erb
parkinglot/app/views/pages/index.html.erb
+2
-1
routes.rb
parkinglot/config/routes.rb
+1
-1
secrets.yml
parkinglot/config/secrets.yml
+2
-2
20160705152935_create_car_logs.rb
parkinglot/db/migrate/20160705152935_create_car_logs.rb
+13
-0
schema.rb
parkinglot/db/schema.rb
+1
-1
car_logs.yml
parkinglot/test/fixtures/car_logs.yml
+4
-4
No files found.
parkinglot/Gemfile
View file @
8d67f434
source
'http://rubygems.org'
source
'http
s
://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
...
...
parkinglot/Gemfile.lock
View file @
8d67f434
GEM
remote: http://rubygems.org/
remote: http
s
://rubygems.org/
specs:
actionmailer (4.2.6)
actionpack (= 4.2.6)
...
...
parkinglot/app/assets/stylesheets/application.css
View file @
8d67f434
#body
{
font-family
:
sans-serif
;
}
#td1
{
font-family
:
fantasy
;
text-align
:
center
;
margin-left
:
50px
;
}
#td2
{
font-family
:
monospace
;
text-align
:
center
;
margin-left
:
50px
;
}
\ No newline at end of file
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree .
*= require_self
*/
parkinglot/app/controllers/cars_controller.rb
View file @
8d67f434
...
...
@@ -6,7 +6,7 @@ class CarsController < ApplicationController
end
render
"cars/index.html.erb"
end
def
create
car
=
CarLog
.
new
car
.
plate_number
=
params
[
:plate_number
]
...
...
@@ -18,12 +18,12 @@ class CarsController < ApplicationController
redirect_to
(
"/cars"
)
end
def
edit
id
=
params
[
:id
]
@cars
=
CarLog
.
find
(
id
.
to_i
)
@cars
.
destroy
redirect_to
(
"/add"
)
id
=
params
[
:id
]
@cars
=
CarLog
.
find
(
id
.
to_i
)
@cars
.
destroy
redirect_to
(
"/add"
)
end
...
...
parkinglot/app/views/cars/index.html.erb
View file @
8d67f434
...
...
@@ -34,7 +34,6 @@
<%
@cars
.
each
do
|
car
|
%>
<tr>
<td
id=
"td2"
>
<%=
"
#{
car
.
plate_number
}
"
%>
</td>
<td
id=
"td2"
>
<%=
"
#{
car
.
time_in
}
"
%>
</td>
<td>
</td>
<td
id=
"td2"
>
<%=
"
#{
car
.
time_out
}
"
%>
</td>
...
...
parkinglot/app/views/pages/index.html.erb
View file @
8d67f434
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/app/assets/stylesheets/bootstrap.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/app/assets/stylesheets/bootstrap.css, http://fonts.googleapis.com/css?family=Oleo+Script"
>
<body
class=
"homecontainer"
>
<div
class=
"row"
>
<div
class=
"col-md-12 wellhome"
>
...
...
parkinglot/config/routes.rb
View file @
8d67f434
...
...
@@ -5,6 +5,6 @@ Rails.application.routes.draw do
get
(
"/cars"
,
to:
"cars#index"
)
post
(
"/cars/create"
,
to:
"cars#create"
)
get
(
"/add"
,
to:
"cars#add"
)
get
(
"/cars/edit/:id"
,
to:
"cars#edit"
)
get
(
"/cars/edit/:id"
,
to:
"cars#edit"
)
get
(
"/cars/delete/:id"
,
to:
"cars#delete"
)
end
parkinglot/config/secrets.yml
View file @
8d67f434
...
...
@@ -11,10 +11,10 @@
# if you're sharing your code publicly.
development
:
secret_key_base
:
c
15b4ad53109a0dace0bcf1dd6e3823d357957ec45777e391468a6804b47a00431bdc16d9fe0bc6c97d48ce6d400346592d8155a999ab7ef525352d7b481466b
secret_key_base
:
c
4aa8dccda9a1c3186d9ca98401e1624524fcdde87ec31abb95c62bed694af582557a3d5e94f7dd98c9cd05a385020af244fbcd2acc456286419760bd4963c0a
test
:
secret_key_base
:
18c6e573573765a46f0c1afc832bd1845d0cc7bdb62b5a9a92d0bb4e8ee93020419e3681dc0b3620d62ea269f93edfeccaa51445ab763045aeee3ff06ffc0bf7
secret_key_base
:
e4612d34345988daa30ef70f51302dcde61e99e228a11ad127f79e347b7ec73cd655458d6d204a513a0edca721b343e3ec4a6a27fde1ffe113e99904cac1cb00
# Do not keep production secrets in the repository,
# instead read values from the environment.
...
...
parkinglot/db/migrate/20160705152935_create_car_logs.rb
0 → 100644
View file @
8d67f434
class
CreateCarLogs
<
ActiveRecord
::
Migration
def
change
create_table
:car_logs
do
|
t
|
t
.
string
:plate_number
t
.
datetime
:time_in
t
.
datetime
:time_out
t
.
string
:color
t
.
string
:brand
t
.
timestamps
null:
false
end
end
end
parkinglot/db/schema.rb
View file @
8d67f434
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201607051
24032
)
do
ActiveRecord
::
Schema
.
define
(
version:
201607051
52935
)
do
create_table
"car_logs"
,
force: :cascade
do
|
t
|
t
.
string
"plate_number"
...
...
parkinglot/test/fixtures/car_logs.yml
View file @
8d67f434
...
...
@@ -2,14 +2,14 @@
one
:
plate_number
:
MyString
time_in
:
2016-07-0
4 21:20:03
time_out
:
2016-07-0
4 21:20:03
time_in
:
2016-07-0
5 23:29:35
time_out
:
2016-07-0
5 23:29:35
color
:
MyString
brand
:
MyString
two
:
plate_number
:
MyString
time_in
:
2016-07-0
4 21:20:03
time_out
:
2016-07-0
4 21:20:03
time_in
:
2016-07-0
5 23:29:35
time_out
:
2016-07-0
5 23:29:35
color
:
MyString
brand
:
MyString
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