Initial Commit
This commit is contained in:
14
app/views/softwares/_software.html.erb
Executable file
14
app/views/softwares/_software.html.erb
Executable file
@@ -0,0 +1,14 @@
|
||||
<tr>
|
||||
<td><%= h(software.company) %></td>
|
||||
<td><%= h(software.version) %></td>
|
||||
<td><%= h(software.key) %></td>
|
||||
<td><%= h(software.platform) %></td>
|
||||
<td><%= h(software.media_location) %></td>
|
||||
<td><%= h(software.installed) %></td>
|
||||
<td><%= h(software.installed_by) %></td>
|
||||
<td><%= h(software.modified_by) %></td>
|
||||
<td><%= h(software.note) %></td>
|
||||
|
||||
<td><%= link_to 'Show', software %></td>
|
||||
<td><%= link_to 'Edit', edit_software_path(@software) %></td>
|
||||
</tr>
|
||||
48
app/views/softwares/edit.html.erb
Executable file
48
app/views/softwares/edit.html.erb
Executable file
@@ -0,0 +1,48 @@
|
||||
<h1>Editing software</h1>
|
||||
|
||||
<% form_for(@software) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :company %><br />
|
||||
<%= f.text_field :company %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :version %><br />
|
||||
<%= f.text_field :version %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :key %><br />
|
||||
<%= f.text_field :key %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :platform %><br />
|
||||
<%= f.text_field :platform %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :asset_id %><br />
|
||||
<%= select(:software, :asset_id, options_from_collection_for_select(Asset.find (:all, :order => "tag").sort {|x,y| x.tag.to_i <=> y.tag.to_i }, :id, :tag_with_name ) ) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :media_location %><br />
|
||||
<%= f.text_field :media_location %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :installed %><br />
|
||||
<%= f.date_select :installed %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :installed_by %><br />
|
||||
<%= f.text_field :installed_by %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :note %><br />
|
||||
<%= f.text_field :note %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit 'Update' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Show', @software %> |
|
||||
<%= link_to 'Back', softwares_path %>
|
||||
49
app/views/softwares/index.html.erb
Executable file
49
app/views/softwares/index.html.erb
Executable file
@@ -0,0 +1,49 @@
|
||||
<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 software', new_software_path %>
|
||||
|
||||
<h1>Listing softwares</h1>
|
||||
|
||||
<table class="assettable">
|
||||
<tr>
|
||||
<%= @sortable.header_link('company', 'Company') %>
|
||||
<%= @sortable.header_link('version', 'Version') %>
|
||||
<%= @sortable.header_link('key', 'Product Key') %>
|
||||
<%= @sortable.header_link('platform', 'Platform') %>
|
||||
<%= @sortable.header_link('media_location', 'Media Locaion') %>
|
||||
<%= @sortable.header_link('asset_id', 'Asset') %>
|
||||
<%= @sortable.header_link('installed', 'Installed') %>
|
||||
<%= @sortable.header_link('installed_by', 'Installed By') %>
|
||||
<%= @sortable.header_link('modified_by', 'Modified by') %>
|
||||
<%= @sortable.header_link('note', 'Note') %>
|
||||
</tr>
|
||||
|
||||
<% for software in @softwares %>
|
||||
<tr class="<%= cycle('oddrow', 'evenrow') %>">
|
||||
<td class="smallcolumntag"><%= software.company %></td>
|
||||
<td class="smallcolumn"><%= software.version %></td>
|
||||
<td class="importantcolumn"><%= software.key %></td>
|
||||
<td class="smallercolumn"><%= software.platform %></td>
|
||||
<td class="smallcolumn"><%= software.media_location %></td>
|
||||
<td class="smallcolumn"><%= software.asset.tag_with_name if !software.asset.blank?%></td>
|
||||
<td class="smallercolumn"><%= software.installed %></td>
|
||||
<td class="smallcolumn"><%= software.installed_by %></td>
|
||||
<td class="smallcolumn"><%= software.modified_by %></td>
|
||||
<td class="mediumcolumn"><%= software.note %></td>
|
||||
|
||||
<td class="sed"><%= link_to 'Show', software %></td>
|
||||
<td class="sed"><%= link_to 'Edit', edit_software_path(software) %></td>
|
||||
<td class="sed"><%= link_to 'Destroy', software, :confirm => 'Are you sure?', :method => :delete %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
47
app/views/softwares/new.html.erb
Executable file
47
app/views/softwares/new.html.erb
Executable file
@@ -0,0 +1,47 @@
|
||||
<h1>New software</h1>
|
||||
|
||||
<% form_for(@software) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :company %><br />
|
||||
<%= f.text_field :company %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :version %><br />
|
||||
<%= f.text_field :version %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :key %><br />
|
||||
<%= f.text_field :key %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :platform %><br />
|
||||
<%= f.text_field :platform %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :asset_id %><br />
|
||||
<%= select(:software, :asset_id, options_from_collection_for_select(Asset.find (:all, :order => "tag").sort {|x,y| x.tag.to_i <=> y.tag.to_i }, :id, :tag_with_name ) ) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :media_location %><br />
|
||||
<%= f.text_field :media_location %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :installed %><br />
|
||||
<%= f.date_select :installed %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :installed_by %><br />
|
||||
<%= f.text_field :installed_by %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :note %><br />
|
||||
<%= f.text_field :note %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit 'Create' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Back', softwares_path %>
|
||||
55
app/views/softwares/show.html.erb
Executable file
55
app/views/softwares/show.html.erb
Executable file
@@ -0,0 +1,55 @@
|
||||
<p>
|
||||
<b>Company:</b>
|
||||
<%= @software.company %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Version:</b>
|
||||
<%= @software.version %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Product Key:</b>
|
||||
<%= @software.key %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Platform:</b>
|
||||
<%= @software.platform %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Asset:</b>
|
||||
<%= @software.asset.tag_with_name if !@software.asset.blank? %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Media Location:</b>
|
||||
<%= @software.media_location %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Installed:</b>
|
||||
<%= @software.installed %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Installed by:</b>
|
||||
<%= @software.installed_by %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
<p>
|
||||
<b>Modified by:</b>
|
||||
<%= @software.modified_by %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Note:</b>
|
||||
<%= @software.note %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_software_path(@software) %> |
|
||||
<%= link_to 'Back', softwares_path %>
|
||||
Reference in New Issue
Block a user