Commit 502e3121 authored by Czar Emmanuel Mejia's avatar Czar Emmanuel Mejia

This was made by Mejia 142649 and Bana 140483

parent cecb3fbb
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAA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A,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA"}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
body {
padding-top: 50px;
}
.starter-template {
padding: 40px 15px;
text-align: center;
}
...@@ -4,17 +4,36 @@ class CarLogsController < ApplicationController ...@@ -4,17 +4,36 @@ class CarLogsController < ApplicationController
@carlogs = CarLog.all @carlogs = CarLog.all
end end
def new def new_carlog
@carlog = CarLog.new
end end
def create def new_carlog_post
@carlog = CarLog.new(carlog_params) plate_number = params[:plate_number]
brand = params[:brand]
slot_number = params[:slot_number]
if @carlog.save if !plate_number.empty? && !brand.empty? && !slot_number.empty?
redirect_to @carlog, notice: "Carlog was added!" newcarlog = CarLog.new
else newcarlog.plate_number = plate_number
newcarlog.brand = brand
newcarlog.slot_number = slot_number
newcarlog.save
redirect_to '/car_logs'
else
@error = 'yes'
render 'car_logs/new_carlog'
end end
end end
def deletecarlog
id = params[:id]
@carlog = CarLog.find(id.to_i)
@carlog.destroy
redirect_to '/car_logs'
end
#private
# def user_params
# params.require[:user].permit!
# end
end end
\ No newline at end of file
class PagesController < ApplicationController class PagesController < ApplicationController
def index
end
end end
<!-- Display All Carlogs --> <!-- Display All Carlogs -->
<h1>List of CarLogs</h1> <!--HEADER-->
<table> <nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<%= pages_path %>">Parking Lot</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="<%= pages_path %>">Home</a></li>
<li class="active"><a href="#">Car Logs</a></li>
<li><a href="<%= new_carlog_path %>">New Car Log</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<!--BODY-->
<div class="container">
<div class="starter-template">
<h1>List of CarLogs</h1>
<table class="table table-striped">
<thead> <thead>
<th align="center">ID</th>
<th>Plate Number</th> <th>Plate Number</th>
<th>Brand</th> <th>Brand</th>
<th>Slot Number</th> <th>Slot Number</th>
<th>Is Taken</th> <th>Is Taken</th>
<th>Created at</th> <th>Created at</th>
<th>Action</th>
</thead> </thead>
<tbody> <tbody>
<% @carlogs.each do |carlog| %> <% @carlogs.each do |carlog| %>
<tr> <tr>
<td><%= carlog.id %></td>
<td><%= carlog.plate_number %></td> <td><%= carlog.plate_number %></td>
<td><%= carlog.brand %></td> <td><%= carlog.brand %></td>
<td><%= carlog.slot_number %></td> <td><%= carlog.slot_number %></td>
<td><%= carlog.is_taken %></td> <td><%= carlog.is_taken %></td>
<td><%= carlog.created_at %></td> <td><%= carlog.created_at %></td>
<td><%= link_to('Delete', 'deletecarlog/' + carlog.id.to_s) %></td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>
</table> </table>
<a href="<%= new_carlog_path %>"><button type="button" class="btn btn-primary">Add New Car Log</button></a>
</div>
</div><!-- /.container -->
<!-- CREATE NEW CARLOG -->
<h1>New Carlog</h1>
<%= form_for(@carlog) do |u|%>
<p>
<%= u.label :plate_number %>
<%= u.text_field :plate_number %>
</p>
<p>
<%= u.label :brand %>
<%= u.text_field :brand %>
</p>
<p>
<%= u.label :slot_number %>
<%= u.text_field :slot_number %>
</p>
<p>
<%= u.label :is_taken %>
<%= u.text_field :is_taken %>
</p>
<p>
<%= u.label :created_at %>
<%= u.text_field :created_at %>
</p>
<%= u.submit %>
<% end %>
<!--CREATE NEW USER-->
<!--HEADER-->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<%= pages_path %>">Parking Lot</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="<%= pages_path %>">Home</a></li>
<li><a href="<%= allcarlogs_path %>">Car Logs</a></li>
<li class="active"><a href="#">New Car Log</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<!--BODY-->
<div class="container">
<div class="page-header">
<h1>Add Car Log</h1>
</div>
<% if !@error.nil? %>
<div class="row">
<div class="col-md-6">
<div class="alert alert-danger" role="alert">
<strong>Please enter required data</strong>
</div>
</div>
</div>
<% end %>
<div class="row">
<div class="col-md-4">
<%= form_tag("/new_carlog", method: "post", class: 'form-signin') do %>
<h2 class="form-signin-heading">Please enter data</h2>
<!--PLATE NUMBER-->
<label for="plate_number" class="sr-only">Plate Number</label>
<input type="text" name="plate_number" id="plate_number" class="form-control" placeholder="Plate Number">
<!--BRAND-->
<label for="brand" class="sr-only">Brand</label>
<select name="brand" id="brand" class="form-control" placeholder="Brand">
<option value="">Brand</option>
<option value="Honda">Honda</option>
<option value="Toyota">Toyota</option>
<option value="Ford">Ford</option>
<option value="Nissan">Nissan</option>
</select>
<!--SLOT NUMBER-->
<label for="slot_number" class="sr-only">Slot Number</label>
<input type="text" name="slot_number" id="slot_number" class="form-control" placeholder="Slot Number">
<!--SUBMIT-->
<input class="btn btn-lg btn-info btn-block" type="submit" value="Add"></input>
<% end %>
</div>
</div>
<h1>Welcome to the Parking Lot Application</h1> <!--HEADER-->
<h2>Options:</h2> <nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Parking Lot</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="<%= allcarlogs_path %>">Car Logs</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<!--BODY-->
<div class="container">
<div class="starter-template">
<h1>Welcome to the Parking Lot Application</h1>
<p class="lead">This project was made by Czar Emmanuel R. Mejia and Rupert Ed D. Baña with the help of Bootstraps</p>
<a href="<%= allcarlogs_path %>"><button type="button" class="btn btn-success">Start Application!</button></a>
</div>
</div><!-- /.container -->
Rails.application.routes.draw do Rails.application.routes.draw do
get '/pages', to: 'pages#index', as: :index get '/pages', to: 'pages#index', as: :pages
get '/car_logs/new_carlog', to: 'car_logs#new_carlog', as: :new_carlog
get '/car_logs', to: 'car_logs#allcarlogs', as: :allcarlogs get '/car_logs', to: 'car_logs#allcarlogs', as: :allcarlogs
get '/car_logs/new', to: 'car_logs#new', as: :new_carlog
get 'new_carlog' => 'car_logs#new_carlog'
post 'new_carlog' => 'car_logs#new_carlog_post'
get 'deletecarlog/:id' => 'car_logs#deletecarlog'
end end
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