Initial Commit
This commit is contained in:
32
app/views/assets/_asset.html.erb
Executable file
32
app/views/assets/_asset.html.erb
Executable 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
57
app/views/assets/edit.html.erb
Executable 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
51
app/views/assets/index.html.erb
Executable 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
55
app/views/assets/new.html.erb
Executable 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
40
app/views/assets/show.html.erb
Executable 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>
|
||||
8
app/views/comments/_comment.html.erb
Executable file
8
app/views/comments/_comment.html.erb
Executable file
@@ -0,0 +1,8 @@
|
||||
<% div_for comment do %>
|
||||
<h3>Posted <%= comment.created_at.to_s(:long) %> by <%= comment.commenter %></h3>
|
||||
<p>
|
||||
<%= h(comment.body) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
||||
24
app/views/comments/edit.html.erb
Executable file
24
app/views/comments/edit.html.erb
Executable file
@@ -0,0 +1,24 @@
|
||||
<h1>Editing comment</h1>
|
||||
|
||||
<% form_for(@comment) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :post_id %><br />
|
||||
<%= f.text_field :post_id %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :commenter %><br />
|
||||
<%= f.text_field :commenter %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :body %><br />
|
||||
<%= f.text_area :body %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit 'Update' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Show', @comment %> |
|
||||
<%= link_to 'Back', comments_path %>
|
||||
24
app/views/comments/index.html.erb
Executable file
24
app/views/comments/index.html.erb
Executable file
@@ -0,0 +1,24 @@
|
||||
<h1>Listing comments</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Post</th>
|
||||
<th>Commenter</th>
|
||||
<th>Body</th>
|
||||
</tr>
|
||||
|
||||
<% @comments.each do |comment| %>
|
||||
<tr>
|
||||
<td><%=h comment.post_id %></td>
|
||||
<td><%=h comment.commenter %></td>
|
||||
<td><%=h comment.body %></td>
|
||||
<td><%= link_to 'Show', comment %></td>
|
||||
<td><%= link_to 'Edit', edit_comment_path(comment) %></td>
|
||||
<td><%= link_to 'Destroy', comment, :confirm => 'Are you sure?', :method => :delete %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New comment', new_comment_path %>
|
||||
19
app/views/comments/new.html.erb
Executable file
19
app/views/comments/new.html.erb
Executable file
@@ -0,0 +1,19 @@
|
||||
<h1>New comment</h1>
|
||||
|
||||
<% form_for(@comment) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :post_id %><br />
|
||||
<%= f.text_field :post_id %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :body %><br />
|
||||
<%= f.text_area :body %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit 'Create' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Back', comments_path %>
|
||||
18
app/views/comments/show.html.erb
Executable file
18
app/views/comments/show.html.erb
Executable file
@@ -0,0 +1,18 @@
|
||||
<p>
|
||||
<b>Post:</b>
|
||||
<%=h @comment.post_id %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Commenter:</b>
|
||||
<%=h @comment.commenter %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Body:</b>
|
||||
<%=h @comment.body %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_comment_path(@comment) %> |
|
||||
<%= link_to 'Back', comments_path %>
|
||||
12
app/views/confirmations/new.html.erb
Executable file
12
app/views/confirmations/new.html.erb
Executable file
@@ -0,0 +1,12 @@
|
||||
<h2>Resend confirmation instructions</h2>
|
||||
|
||||
<% form_for resource_name, resource, :url => confirmation_path(resource_name) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p><%= f.label :email %></p>
|
||||
<p><%= f.text_field :email %></p>
|
||||
|
||||
<p><%= f.submit "Resend confirmation instructions" %></p>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "shared/devise_links" %>
|
||||
5
app/views/devise_mailer/confirmation_instructions.html.erb
Executable file
5
app/views/devise_mailer/confirmation_instructions.html.erb
Executable file
@@ -0,0 +1,5 @@
|
||||
<p>Welcome <%= @resource.email %>!</p>
|
||||
|
||||
<p>You can confirm your account through the link below:</p>
|
||||
|
||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
|
||||
8
app/views/devise_mailer/reset_password_instructions.html.erb
Executable file
8
app/views/devise_mailer/reset_password_instructions.html.erb
Executable file
@@ -0,0 +1,8 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
|
||||
|
||||
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
|
||||
|
||||
<p>If you didn't request this, please ignore this email.</p>
|
||||
<p>Your password won't change until you access the link above and create a new one.</p>
|
||||
7
app/views/devise_mailer/unlock_instructions.html.erb
Executable file
7
app/views/devise_mailer/unlock_instructions.html.erb
Executable file
@@ -0,0 +1,7 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
|
||||
|
||||
<p>Click the link below to unlock your account:</p>
|
||||
|
||||
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
|
||||
18
app/views/layouts/assets.html.erb
Executable file
18
app/views/layouts/assets.html.erb
Executable file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
||||
<title>Assets: <%= controller.action_name %></title>
|
||||
<%= stylesheet_link_tag 'scaffold' %>
|
||||
<%= stylesheet_link_tag 'assets' %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p style="color: green"><%= notice %></p>
|
||||
|
||||
<%= yield %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
app/views/layouts/comments.html.erb
Executable file
17
app/views/layouts/comments.html.erb
Executable file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
||||
<title>Comments: <%= controller.action_name %></title>
|
||||
<%= stylesheet_link_tag 'scaffold' %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p style="color: green"><%= notice %></p>
|
||||
|
||||
<%= yield %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
18
app/views/layouts/softwares.html.erb
Executable file
18
app/views/layouts/softwares.html.erb
Executable file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
||||
<title>Softwares: <%= controller.action_name %></title>
|
||||
<%= stylesheet_link_tag 'scaffold' %>
|
||||
<%= stylesheet_link_tag 'assets' %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p style="color: green"><%= notice %></p>
|
||||
|
||||
<%= yield %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
16
app/views/passwords/edit.html.erb
Executable file
16
app/views/passwords/edit.html.erb
Executable file
@@ -0,0 +1,16 @@
|
||||
<h2>Change your password</h2>
|
||||
|
||||
<% form_for resource_name, resource, :url => password_path(resource_name), :html => { :method => :put } do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<%= f.hidden_field :reset_password_token %>
|
||||
|
||||
<p><%= f.label :password %></p>
|
||||
<p><%= f.password_field :password %></p>
|
||||
|
||||
<p><%= f.label :password_confirmation %></p>
|
||||
<p><%= f.password_field :password_confirmation %></p>
|
||||
|
||||
<p><%= f.submit "Change my password" %></p>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "shared/devise_links" %>
|
||||
12
app/views/passwords/new.html.erb
Executable file
12
app/views/passwords/new.html.erb
Executable file
@@ -0,0 +1,12 @@
|
||||
<h2>Forgot your password?</h2>
|
||||
|
||||
<% form_for resource_name, resource, :url => password_path(resource_name) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p><%= f.label :email %></p>
|
||||
<p><%= f.text_field :email %></p>
|
||||
|
||||
<p><%= f.submit "Send me reset password instructions" %></p>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "shared/devise_links" %>
|
||||
25
app/views/registrations/edit.html.erb
Executable file
25
app/views/registrations/edit.html.erb
Executable file
@@ -0,0 +1,25 @@
|
||||
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
||||
|
||||
<% form_for resource_name, resource, :url => registration_path(resource_name), :html => { :method => :put } do |f| -%>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p><%= f.label :email %></p>
|
||||
<p><%= f.text_field :email %></p>
|
||||
|
||||
<p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i></p>
|
||||
<p><%= f.password_field :password %></p>
|
||||
|
||||
<p><%= f.label :password_confirmation %></p>
|
||||
<p><%= f.password_field :password_confirmation %></p>
|
||||
|
||||
<p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i></p>
|
||||
<p><%= f.password_field :current_password %></p>
|
||||
|
||||
<p><%= f.submit "Update" %></p>
|
||||
<% end -%>
|
||||
|
||||
<h3>Cancel my account</h3>
|
||||
|
||||
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
|
||||
|
||||
<%= render :partial => "shared/devise_links" %>
|
||||
17
app/views/registrations/new.html.erb
Executable file
17
app/views/registrations/new.html.erb
Executable file
@@ -0,0 +1,17 @@
|
||||
<h2>Sign up</h2>
|
||||
|
||||
<% form_for resource_name, resource, :url => registration_path(resource_name) do |f| -%>
|
||||
<%= f.error_messages %>
|
||||
<p><%= f.label :email %></p>
|
||||
<p><%= f.text_field :email %></p>
|
||||
|
||||
<p><%= f.label :password %></p>
|
||||
<p><%= f.password_field :password %></p>
|
||||
|
||||
<p><%= f.label :password_confirmation %></p>
|
||||
<p><%= f.password_field :password_confirmation %></p>
|
||||
|
||||
<p><%= f.submit "Sign up" %></p>
|
||||
<% end -%>
|
||||
|
||||
<%= render :partial => "shared/devise_links" %>
|
||||
17
app/views/sessions/new.html.erb
Executable file
17
app/views/sessions/new.html.erb
Executable file
@@ -0,0 +1,17 @@
|
||||
<h2>Sign in</h2>
|
||||
|
||||
<% form_for resource_name, resource, :url => session_path(resource_name) do |f| -%>
|
||||
<p><%= f.label :email %></p>
|
||||
<p><%= f.text_field :email %></p>
|
||||
|
||||
<p><%= f.label :password %></p>
|
||||
<p><%= f.password_field :password %></p>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<p><%= f.check_box :remember_me %> <%= f.label :remember_me %></p>
|
||||
<% end -%>
|
||||
|
||||
<p><%= f.submit "Sign in" %></p>
|
||||
<% end -%>
|
||||
|
||||
<%= render :partial => "shared/devise_links" %>
|
||||
19
app/views/shared/_devise_links.erb
Executable file
19
app/views/shared/_devise_links.erb
Executable file
@@ -0,0 +1,19 @@
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to t('devise.sessions.link'), new_session_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to t('devise.registrations.link'), new_registration_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
||||
<%= link_to t('devise.passwords.link'), new_password_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to t('devise.confirmations.link'), new_confirmation_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.lockable? && controller_name != 'unlocks' %>
|
||||
<%= link_to t('devise.unlocks.link'), new_unlock_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
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 %>
|
||||
12
app/views/unlocks/new.html.erb
Executable file
12
app/views/unlocks/new.html.erb
Executable file
@@ -0,0 +1,12 @@
|
||||
<h2>Resend unlock instructions</h2>
|
||||
|
||||
<% form_for resource_name, resource, :url => unlock_path(resource_name) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p><%= f.label :email %></p>
|
||||
<p><%= f.text_field :email %></p>
|
||||
|
||||
<p><%= f.submit "Resend unlock instructions" %></p>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "shared/devise_links" %>
|
||||
Reference in New Issue
Block a user