Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implement a basic site layout.

This is a placeholder layout to work within until the UI design is complete.
The new design can be integrated at that time.
  • Loading branch information...
commit c3fc6cee6374bab1f3cb6fdb0b3ff64c1bb7bbcd 1 parent b7a43b5
@mmueller mmueller authored
View
0  app/assets/stylesheets/application.css → app/assets/stylesheets/application.css.scss
File renamed without changes
View
56 app/assets/stylesheets/dashboard.css.scss
@@ -0,0 +1,56 @@
+@import 'utilities';
+
+#dashboard {
+ display: table;
+ margin-top: 1em;
+ @include clearfix;
+}
+.dashboard-column {
+ display: table-cell;
+ padding: 10px;
+}
+#dashboard-column-1 {
+ background-color: #c0c0c0;
+ width: 240px;
+}
+#dashboard-column-2 {
+ background-color: #e0e0e0;
+ width: 210px;
+}
+#dashboard-column-3 {
+ width: 430px;
+}
+#dashboard h2, h3 {
+ margin-top: 0;
+}
+#dashboard h4 {
+ margin-bottom: 0.3em;
+}
+
+#filters {
+ margin-top: 20px;
+}
+#filter-nav {
+ @include clearfix;
+}
+#filters h3 {
+ float: left;
+}
+#filters a {
+ float: right;
+}
+#filters select {
+ width: 150px;
+}
+
+#activity {
+ margin-top: 20px;
+}
+
+#trip-ticket-map {
+ border: 1px dashed #000000;
+ background-color: #e0e0e0;
+ float: right;
+ width: 220px;
+ height: 160px;
+}
View
37 app/assets/stylesheets/navigation.css.scss
@@ -0,0 +1,37 @@
+@import 'utilities';
+
+#main-nav {
+ @include clearfix;
+}
+
+#main-nav ul {
+ list-style: none;
+ padding: 0;
+}
+
+#main-nav li {
+ float: left;
+ margin: 0 2em 1em 0;
+}
+
+#main-nav a {
+ display: block;
+ background-color: #e0e0e0;
+ padding: 5px;
+ color: #000050;
+ font-size: 1.1em;
+ text-decoration: none;
+}
+
+#main-nav a:visited {
+ color: #000050;
+}
+
+#main-nav a:hover {
+ background-color: #e0e0ff;
+ color: #303080;
+}
+
+#search-form {
+ float: right;
+}
View
28 app/assets/stylesheets/scaffolds.css.scss
@@ -1,9 +1,11 @@
body {
- background-color: #fff;
+ background-color: #f0f0f0;
color: #333;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
+ margin: 0;
+ padding: 0;
}
p, ol, ul, td {
@@ -35,6 +37,30 @@ div {
}
}
+#wrapper {
+ background-color: #ffffff;
+ margin: 0 auto;
+ padding: 0 10px;
+ width: 960px;
+}
+
+#header {
+}
+
+p.notice {
+ background-color: #70ff70;
+ border: 1px solid #20e020;
+ color: #000;
+ padding: 1em;
+}
+
+#footer {
+ color: #c0c0c0;
+ padding: 1em 0;
+ text-align: center;
+ width: 100%;
+}
+
#notice {
color: green;
}
View
18 app/assets/stylesheets/utilities.css.scss
@@ -0,0 +1,18 @@
+/* General purpose utilities for use in other stylesheets */
+@mixin clearfix {
+ // For modern browsers
+ &:before,
+ &:after {
+ content:" ";
+ display:table;
+ }
+
+ &:after {
+ clear:both;
+ }
+
+ // For IE 6/7 (trigger hasLayout)
+ & {
+ *zoom:1;
+ }
+}
View
6 app/controllers/home_controller.rb
@@ -0,0 +1,6 @@
+class HomeController < ApplicationController
+
+ def dashboard
+ end
+
+end
View
12 app/controllers/open_capacities_controller.rb
@@ -0,0 +1,12 @@
+class OpenCapacitiesController < ApplicationController
+
+ def index
+ end
+
+ def show
+ end
+
+ def edit
+ end
+
+end
View
6 app/controllers/reports_controller.rb
@@ -0,0 +1,6 @@
+class ReportsController < ApplicationController
+
+ def index
+ end
+
+end
View
15 app/controllers/trip_tickets_controller.rb
@@ -0,0 +1,15 @@
+class TripTicketsController < ApplicationController
+
+ def index
+ end
+
+ def search
+ end
+
+ def show
+ end
+
+ def edit
+ end
+
+end
View
9 app/controllers/users_controller.rb
@@ -10,6 +10,15 @@ def index
end
end
+ def logout
+ flash[:notice] = 'Logout is not implemented yet.'
+ redirect_to :controller => :home, :action => :dashboard
+ end
+
+ # My Account (placeholder)
+ def account
+ end
+
# GET /users/1
# GET /users/1.json
def show
View
41 app/views/home/dashboard.html.erb
@@ -0,0 +1,41 @@
+<div id="dashboard">
+ <div id="dashboard-column-1" class="dashboard-column">
+ <div id="summary">
+ <h2>My Provider Name</h2>
+ This is a summary section.
+ </div>
+ <div id="filters">
+ <div id="filter-nav">
+ <h3>Filter...</h3>
+ <%= link_to 'add new filter...' %>
+ </div>
+ <%= select_tag 'Filter',
+ '<option>Filter 1</option><option>Filter 2</option>'.html_safe %>
+ </div>
+ <div id="activity">
+ <h3>Recent Activity</h3>
+ This is a recent activity list.
+ </div>
+ </div>
+ <div id="dashboard-column-2" class="dashboard-column">
+ <%= link_to 'Ticket 1' %><br/><br/>
+ <%= link_to 'Ticket 2' %><br/><br/>
+ <%= link_to 'Ticket 3' %><br/><br/>
+ <%= link_to 'Ticket 4' %><br/><br/>
+ </div>
+ <div id="dashboard-column-3" class="dashboard-column">
+ <h3>Detailed item view</h3>
+ <div id="trip-ticket-map">Map view</div>
+
+ <h4>Requestor</h4>
+ Time and Date<br/>
+ Start address<br/>
+ Destination address<br/>
+ Estimated trip time<br/>
+
+ <h4>Customer Requirements</h4>
+ Seats Required<br/>
+ Assistive devices<br/>
+ Service animals<br/>
+ </div>
+</div>
View
31 app/views/layouts/application.html.erb
@@ -7,8 +7,33 @@
<%= csrf_meta_tags %>
</head>
<body>
-
-<%= yield %>
-
+<div id="wrapper">
+ <div id="header">
+ <div id="main-nav">
+ <ul>
+ <li><%= link_to 'Dashboard', root_path %></li>
+ <li><%= link_to 'Trip Tickets', trip_tickets_path %></li>
+ <li><%= link_to 'Open Capacity', open_capacities_path %></li>
+ <li><%= link_to 'Reports', reports_path %></li>
+ <li><%= link_to 'My Account', account_users_path %></li><%# TODO %>
+ <li><%= link_to 'Logout', logout_users_path, {:method=>:post} %></li>
+ </ul>
+ <%= form_tag search_trip_tickets_path, :id=>'search-form' do %>
+ <%= search_field_tag :q, nil, :placeholder=>'Search' %>
+ <% end %>
+ </div>
+ </div>
+ <% if notice %>
+ <p class="notice"><%= notice %></p>
+ <% end %>
+ <% if alert %>
+ <p class="alert"><%= alert %></p>
+ <% end %>
+ <%= yield %>
+ <div id="footer">
+ Copyright &copy;<%= Time.now.year %>
+ <%= link_to 'Ride Connection', 'http://www.rideconnection.org/' %>
+ </div>
+</div>
</body>
</html>
View
3  app/views/open_capacities/index.html.erb
@@ -0,0 +1,3 @@
+<div id="open-capacity">
+ <h2>Open Capacity</h2>
+</div>
View
3  app/views/reports/index.html.erb
@@ -0,0 +1,3 @@
+<div id="reports">
+ <h2>Reports</h2>
+</div>
View
3  app/views/trip_tickets/index.html.erb
@@ -0,0 +1,3 @@
+<div id="trip-tickets">
+ <h2>Trip Tickets</h2>
+</div>
View
8 app/views/trip_tickets/search.html.erb
@@ -0,0 +1,8 @@
+<div id="trip-ticket-search">
+ <h2>Search Results</h2>
+ <ul>
+ <li>Item 1</li>
+ <li>Item 2</li>
+ <li>Item 3</li>
+ </ul>
+</div>
View
3  app/views/users/account.html.erb
@@ -0,0 +1,3 @@
+<div id="account">
+ <h2>My Account</h2>
+</div>
View
71 config/routes.rb
@@ -1,60 +1,15 @@
Clearinghouse::Application.routes.draw do
- resources :users
-
- # The priority is based upon order of creation:
- # first created -> highest priority.
-
- # Sample of regular route:
- # match 'products/:id' => 'catalog#view'
- # Keep in mind you can assign values other than :controller and :action
-
- # Sample of named route:
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
- # This route can be invoked with purchase_url(:id => product.id)
-
- # Sample resource route (maps HTTP verbs to controller actions automatically):
- # resources :products
-
- # Sample resource route with options:
- # resources :products do
- # member do
- # get 'short'
- # post 'toggle'
- # end
- #
- # collection do
- # get 'sold'
- # end
- # end
-
- # Sample resource route with sub-resources:
- # resources :products do
- # resources :comments, :sales
- # resource :seller
- # end
-
- # Sample resource route with more complex sub-resources
- # resources :products do
- # resources :comments
- # resources :sales do
- # get 'recent', :on => :collection
- # end
- # end
-
- # Sample resource route within a namespace:
- # namespace :admin do
- # # Directs /admin/products/* to Admin::ProductsController
- # # (app/controllers/admin/products_controller.rb)
- # resources :products
- # end
-
- # You can have the root of your site routed with "root"
- # just remember to delete public/index.html.
- # root :to => 'welcome#index'
-
- # See how all your routes lay out with "rake routes"
-
- # This is a legacy wild controller route that's not recommended for RESTful applications.
- # Note: This route will make all actions in every controller accessible via GET requests.
- # match ':controller(/:action(/:id))(.:format)'
+ resources :open_capacities
+ resources :providers
+ resources :trip_tickets do
+ post 'search', :on=>:collection
+ end
+ resources :users do
+ get 'account', :on=>:collection # TODO: This will be on a single user
+ post 'logout', :on=>:collection # TODO: Hook up to Devise
+ end
+
+ match 'reports', :controller=>:reports, :action=>:index
+
+ root :to => 'home#dashboard'
end
View
241 public/index.html
@@ -1,241 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Ruby on Rails: Welcome aboard</title>
- <style type="text/css" media="screen">
- body {
- margin: 0;
- margin-bottom: 25px;
- padding: 0;
- background-color: #f0f0f0;
- font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
- font-size: 13px;
- color: #333;
- }
-
- h1 {
- font-size: 28px;
- color: #000;
- }
-
- a {color: #03c}
- a:hover {
- background-color: #03c;
- color: white;
- text-decoration: none;
- }
-
-
- #page {
- background-color: #f0f0f0;
- width: 750px;
- margin: 0;
- margin-left: auto;
- margin-right: auto;
- }
-
- #content {
- float: left;
- background-color: white;
- border: 3px solid #aaa;
- border-top: none;
- padding: 25px;
- width: 500px;
- }
-
- #sidebar {
- float: right;
- width: 175px;
- }
-
- #footer {
- clear: both;
- }
-
- #header, #about, #getting-started {
- padding-left: 75px;
- padding-right: 30px;
- }
-
-
- #header {
- background-image: url("assets/rails.png");
- background-repeat: no-repeat;
- background-position: top left;
- height: 64px;
- }
- #header h1, #header h2 {margin: 0}
- #header h2 {
- color: #888;
- font-weight: normal;
- font-size: 16px;
- }
-
-
- #about h3 {
- margin: 0;
- margin-bottom: 10px;
- font-size: 14px;
- }
-
- #about-content {
- background-color: #ffd;
- border: 1px solid #fc0;
- margin-left: -55px;
- margin-right: -10px;
- }
- #about-content table {
- margin-top: 10px;
- margin-bottom: 10px;
- font-size: 11px;
- border-collapse: collapse;
- }
- #about-content td {
- padding: 10px;
- padding-top: 3px;
- padding-bottom: 3px;
- }
- #about-content td.name {color: #555}
- #about-content td.value {color: #000}
-
- #about-content ul {
- padding: 0;
- list-style-type: none;
- }
-
- #about-content.failure {
- background-color: #fcc;
- border: 1px solid #f00;
- }
- #about-content.failure p {
- margin: 0;
- padding: 10px;
- }
-
-
- #getting-started {
- border-top: 1px solid #ccc;
- margin-top: 25px;
- padding-top: 15px;
- }
- #getting-started h1 {
- margin: 0;
- font-size: 20px;
- }
- #getting-started h2 {
- margin: 0;
- font-size: 14px;
- font-weight: normal;
- color: #333;
- margin-bottom: 25px;
- }
- #getting-started ol {
- margin-left: 0;
- padding-left: 0;
- }
- #getting-started li {
- font-size: 18px;
- color: #888;
- margin-bottom: 25px;
- }
- #getting-started li h2 {
- margin: 0;
- font-weight: normal;
- font-size: 18px;
- color: #333;
- }
- #getting-started li p {
- color: #555;
- font-size: 13px;
- }
-
-
- #sidebar ul {
- margin-left: 0;
- padding-left: 0;
- }
- #sidebar ul h3 {
- margin-top: 25px;
- font-size: 16px;
- padding-bottom: 10px;
- border-bottom: 1px solid #ccc;
- }
- #sidebar li {
- list-style-type: none;
- }
- #sidebar ul.links li {
- margin-bottom: 5px;
- }
-
- .filename {
- font-style: italic;
- }
- </style>
- <script type="text/javascript">
- function about() {
- info = document.getElementById('about-content');
- if (window.XMLHttpRequest)
- { xhr = new XMLHttpRequest(); }
- else
- { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
- xhr.open("GET","rails/info/properties",false);
- xhr.send("");
- info.innerHTML = xhr.responseText;
- info.style.display = 'block'
- }
- </script>
- </head>
- <body>
- <div id="page">
- <div id="sidebar">
- <ul id="sidebar-items">
- <li>
- <h3>Browse the documentation</h3>
- <ul class="links">
- <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
- <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
- <li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
- <li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
- </ul>
- </li>
- </ul>
- </div>
-
- <div id="content">
- <div id="header">
- <h1>Welcome aboard</h1>
- <h2>You&rsquo;re riding Ruby on Rails!</h2>
- </div>
-
- <div id="about">
- <h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
- <div id="about-content" style="display: none"></div>
- </div>
-
- <div id="getting-started">
- <h1>Getting started</h1>
- <h2>Here&rsquo;s how to get rolling:</h2>
-
- <ol>
- <li>
- <h2>Use <code>rails generate</code> to create your models and controllers</h2>
- <p>To see all available options, run it without parameters.</p>
- </li>
-
- <li>
- <h2>Set up a default route and remove <span class="filename">public/index.html</span></h2>
- <p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
- </li>
-
- <li>
- <h2>Create your database</h2>
- <p>Run <code>rake db:create</code> to create your database. If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
- </li>
- </ol>
- </div>
- </div>
-
- <div id="footer">&nbsp;</div>
- </div>
- </body>
-</html>
Please sign in to comment.
Something went wrong with that request. Please try again.