62 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
<div id="item-header" class="row">
 | 
						|
  <div class="twelve columns">
 | 
						|
    <h1 class="item-name"><%= item.name %></h1>
 | 
						|
    <h4 class="item-created">Item added at: <%= date_format(item.created_at) %></h4>
 | 
						|
    <% if item.updated_at %>
 | 
						|
    <h4 class="item-updated">Last updated at: <%= date_format(item.updated_at) %></h4>
 | 
						|
    <% end %>
 | 
						|
  </div>  
 | 
						|
</div>
 | 
						|
 | 
						|
<div class="row">
 | 
						|
  <div class="twelve columns">
 | 
						|
    <table class="u-full-width">
 | 
						|
      <thead>
 | 
						|
        <tr>
 | 
						|
          <th>Item type:</th>
 | 
						|
          <th>Manufacturer:</th>
 | 
						|
          <th>Serial number:</th>
 | 
						|
          <th>SKU number:</th>
 | 
						|
          <th>Vendor:</th>
 | 
						|
          <th>Purchase Date:</th>
 | 
						|
        </tr>
 | 
						|
      </thead>
 | 
						|
      <tbody>
 | 
						|
        <tr>
 | 
						|
          <td><%= item.type %></td>
 | 
						|
          <td><%= nullable(item.manufacturer) %></td>
 | 
						|
          <td><%= nullable(item.serial_number) %></td>
 | 
						|
          <td><%= nullable(item.sku_number) %></td>
 | 
						|
          <td><%= nullable(item.purchased_from) %></td>
 | 
						|
          <td><%= nullable(date_format(item.purchased_at)) %></td>
 | 
						|
        </tr>
 | 
						|
      </tbody>
 | 
						|
    </table>
 | 
						|
  </div>
 | 
						|
</div>
 | 
						|
 | 
						|
<div class="row">
 | 
						|
  <div class="twelve columns">
 | 
						|
    <% if item.item_comments.length > 0 %>
 | 
						|
      <ul class="u-full-width">
 | 
						|
        <% item.item_comments.each do |comment| %>
 | 
						|
          <li><%= comment.body %></li>
 | 
						|
        <% end %>
 | 
						|
      </ul>
 | 
						|
    <% else %>
 | 
						|
      <p>There are no comments to display at this time.</p>
 | 
						|
    <% end %>
 | 
						|
  </div>
 | 
						|
</div>
 | 
						|
 | 
						|
<div class="row">
 | 
						|
  <div class="twelve columns">
 | 
						|
    <form action="/item/<%= item.id %>/comment" method="POST" class="u-full-width">
 | 
						|
      <label for="comment_body">Add a comment:</label>
 | 
						|
      <textarea name="comment_body" id="comment_body" class="u-full-width" cols="30" rows="10"></textarea>
 | 
						|
 | 
						|
      <input class="button button-primary" type="submit" value="Submit">
 | 
						|
    </form>
 | 
						|
  </div>
 | 
						|
</div>
 |