Initial Commit

This commit is contained in:
Jason Katz
2011-06-14 18:08:28 -07:00
commit 5a34ac406c
172 changed files with 18457 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<h1>Asset</h1>
<table>
<tr>
<th class="tableshow">Tag</th>
<th class="tableshow">Network Name</th>
<th class="tableshow">Make</th>
<th class="tableshow">Model</th>
<th class="tableshow">Serial</th>
<th class="tableshow">Category</th>
<th class="tableshow">Warranty Expires</th>
<th class="tableshow">Location</th>
<th class="tableshow">Assigned To</th>
<th class="tableshow">Status</th>
<th class="tableshow">Updated</th>
</tr>
<tr>
<td class="tableshow"><%=h asset.tag %></td>
<td class="tableshow"><%=h asset.name %></td>
<td class="tableshow"><%=h asset.make %></td>
<td class="tableshow"><%=h asset.model %></td>
<td class="tableshow"><%=h asset.serial %></td>
<td class="tableshow"><%=h asset.category %></td>
<td class="tableshow"><%=h asset.warranty %></td>
<td class="tableshow"><%=h asset.location %></td>
<td class="tableshow"><%=h asset.assigned %></td>
<td class="tableshow"><%=h asset.status %></td>
<td class="tableshow"><%=h asset.updated %></td>
</tr>
</table>

57
app/views/assets/edit.html.erb Executable file
View File

@@ -0,0 +1,57 @@
<h1>Editing asset</h1>
<% form_for(@asset) do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :tag %><br />
<%= f.text_field :tag %>
</p>
<p>
<%= f.label :name, "Network Name" %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :make %><br />
<%= f.text_field :make %>
</p>
<p>
<%= f.label :model %><br />
<%= f.text_field :model %>
</p>
<p>
<%= f.label :serial %><br />
<%= f.text_field :serial %>
</p>
<p>
<%= f.label :category %><br />
<%= f.text_field :category %>
</p>
<p>
<%= f.label :warranty, "Warranty Expires" %><br />
<%= f.date_select :warranty %>
</p>
<p>
<%= f.label :location %><br />
<%= f.text_field :location %>
</p>
<p>
<%= f.label :assigned, "Assigned To" %><br />
<%= f.text_field :assigned %>
</p>
<p>
<%= f.label :status %><br />
<%= f.text_field :status %>
</p>
<p>
<%= f.label :updated %><br />
<%= f.date_select :updated %>
</p>
<p>
<%= f.submit 'Update' %>
</p>
<% end %>
<%= link_to 'Show', @asset %> |
<%= link_to 'Back', assets_path %>

51
app/views/assets/index.html.erb Executable file
View File

@@ -0,0 +1,51 @@
<ul>
<li>
<a href="/assets/">Assets</a>
</li>
<li>
<a href="/softwares/">Softwares</a>
</li>
<li>
<a href="/users/logout/">Logout</a>
</li>
</ul>
<br />
<%= link_to 'New asset', new_asset_path %>
<h1>Listing assets</h1>
<table class="assettable">
<tr>
<%= @sortable.header_link('tag', 'Tag') %>
<%= @sortable.header_link('name', 'Network Name') %>
<%= @sortable.header_link('make', 'Make') %>
<%= @sortable.header_link('make', 'Model') %>
<%= @sortable.header_link('serial', 'Serial') %>
<%= @sortable.header_link('category', 'Category') %>
<%= @sortable.header_link('warranty', 'Warranty Expires') %>
<%= @sortable.header_link('location', 'Location') %>
<%= @sortable.header_link('assigned', 'Assigned') %>
<%= @sortable.header_link('status', 'Status') %>
<%= @sortable.header_link('updated', 'Updated') %>
</tr>
<% for asset in @assets %>
<tr class="<%= cycle('oddrow', 'evenrow') %>">
<td class="smallcolumntag"><%= asset.tag %></td>
<td class="smallcolumn"><%= asset.name %></td>
<td class="smallcolumn"><%= asset.make %></td>
<td class="smallcolumn"><%= asset.model %></td>
<td class="smallcolumn"><%= asset.serial %></td>
<td class="smallcolumn"><%= asset.category %></td>
<td class="smallcolumn"><%= asset.warranty %></td>
<td class="smallcolumn"><%= asset.location %></td>
<td class="smallcolumn"><%= asset.assigned %></td>
<td class="smallcolumn"><%= asset.status %></td>
<td class="smallcolumn"><%= asset.updated %></td>
<td class="sed"><%= link_to 'Show ', asset %></td>
<td class="sed"><%= link_to 'Edit ', edit_asset_path(asset) %></td>
<td class="sed"><%= link_to 'Destroy', asset, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>

55
app/views/assets/new.html.erb Executable file
View File

@@ -0,0 +1,55 @@
<h1>New asset</h1>
<% form_for(@asset) do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :tag %><br />
<%= f.text_field :tag %>
</p>
<p>
<%= f.label :name, "Network Name" %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :make %><br />
<%= f.text_field :make %>
</p>
<p>
<%= f.label :model %><br />
<%= f.text_field :model %>
</p>
<p>
<%= f.label :serial %><br />
<%= f.text_field :serial %>
</p>
<p>
<%= f.label :category %><br />
<%= f.text_field :category %>
</p>
<p>
<%= f.label :warranty, "Warranty Expires" %><br />
<%= f.date_select :warranty %>
</p>
<p>
<%= f.label :location %><br />
<%= f.text_field :location %>
</p>
<p>
<%= f.label :assigned, "Assigned To" %><br />
<%= f.text_field :assigned %>
</p>
<p>
<%= f.label :status %><br />
<%= f.text_field :status %>
</p>
<p>
<%= f.label :updated %><br />
<%= f.date_select :updated %>
</p>
<p>
<%= f.submit 'Create' %>
</p>
<% end %>
<%= link_to 'Back', assets_path %>

40
app/views/assets/show.html.erb Executable file
View File

@@ -0,0 +1,40 @@
<%= render :partial => @asset %>
<p>
<%= link_to 'Edit', edit_asset_path(@asset) %> |
<%= link_to 'Destroy', @asset, :method => :delete, :confirm => "Are you sure?" %> <br/>
<strong><%= link_to 'See All Assets', assets_path %></strong>
</p>
<h2>Softwares</h2>
<div id="softwares"></div>
<table>
<tr>
<th>Company</th>
<th>Version</th>
<th>Product Key</th>
<th>Platform</th>
<th>Media Location</th>
<th>Installed</th>
<th>Installed By</th>
<th>Modified By</th>
<th>Note</th>
</tr>
<%= render :partial => @asset.softwares %>
</table>
<%= link_to 'New Software', new_software_path %>
<h2>Comments</h2>
<div id="comments">
<%= render :partial => @asset.comments.reverse %>
<% form_for [@asset, Comment.new] do |f| %>
<p>
<%= f.label :body, "New Comment" %><br />
<%= f.text_area :body, :class => "comment_body" %>
</p>
<p><%= f.submit "Add Comment" %></p>
<% end %>
</div>