Initial commit

This commit is contained in:
2013-10-08 22:10:03 -07:00
commit 5a94d69b3d
73 changed files with 1287 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>Arizonacollab</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>

View File

@@ -0,0 +1,49 @@
<%= form_for(@space) do |f| %>
<% if @space.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@space.errors.count, "error") %> prohibited this space from being saved:</h2>
<ul>
<% @space.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :name %><br>
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :type %><br>
<%= f.text_field :type %>
</div>
<div class="field">
<%= f.label :address %><br>
<%= f.text_field :address %>
</div>
<div class="field">
<%= f.label :hours %><br>
<%= f.text_field :hours %>
</div>
<div class="field">
<%= f.label :phone %><br>
<%= f.text_field :phone %>
</div>
<div class="field">
<%= f.label :email %><br>
<%= f.text_field :email %>
</div>
<div class="field">
<%= f.label :website %><br>
<%= f.text_field :website %>
</div>
<div class="field">
<%= f.label :description %><br>
<%= f.text_area :description %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>

View File

@@ -0,0 +1,6 @@
<h1>Editing space</h1>
<%= render 'form' %>
<%= link_to 'Show', @space %> |
<%= link_to 'Back', spaces_path %>

View File

@@ -0,0 +1,41 @@
<h1>Listing spaces</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Address</th>
<th>Hours</th>
<th>Phone</th>
<th>Email</th>
<th>Website</th>
<th>Description</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @spaces.each do |space| %>
<tr>
<td><%= space.name %></td>
<td><%= space.type %></td>
<td><%= space.address %></td>
<td><%= space.hours %></td>
<td><%= space.phone %></td>
<td><%= space.email %></td>
<td><%= space.website %></td>
<td><%= space.description %></td>
<td><%= link_to 'Show', space %></td>
<td><%= link_to 'Edit', edit_space_path(space) %></td>
<td><%= link_to 'Destroy', space, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Space', new_space_path %>

View File

@@ -0,0 +1,4 @@
json.array!(@spaces) do |space|
json.extract! space, :name, :type, :address, :hours, :phone, :email, :website, :description
json.url space_url(space, format: :json)
end

View File

@@ -0,0 +1,5 @@
<h1>New space</h1>
<%= render 'form' %>
<%= link_to 'Back', spaces_path %>

View File

@@ -0,0 +1,44 @@
<p id="notice"><%= notice %></p>
<p>
<strong>Name:</strong>
<%= @space.name %>
</p>
<p>
<strong>Type:</strong>
<%= @space.type %>
</p>
<p>
<strong>Address:</strong>
<%= @space.address %>
</p>
<p>
<strong>Hours:</strong>
<%= @space.hours %>
</p>
<p>
<strong>Phone:</strong>
<%= @space.phone %>
</p>
<p>
<strong>Email:</strong>
<%= @space.email %>
</p>
<p>
<strong>Website:</strong>
<%= @space.website %>
</p>
<p>
<strong>Description:</strong>
<%= @space.description %>
</p>
<%= link_to 'Edit', edit_space_path(@space) %> |
<%= link_to 'Back', spaces_path %>

View File

@@ -0,0 +1 @@
json.extract! @space, :name, :type, :address, :hours, :phone, :email, :website, :description, :created_at, :updated_at