raven/views/license/view.erb

66 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2022-12-08 17:26:44 -05:00
<div id="license-header" class="row">
<div class="twelve columns">
<h1 class="license-name"><%= license.name %></h1>
<h4 class="license-created">License added at: <%= date_format(license.created_at) %></h4>
<% if license.updated_at %>
<h4 class="license-updated">Last updated at: <%= date_format(license.updated_at) %></h4>
<% end %>
</div>
</div>
<div class="row">
<div class="twelve columns">
<p class="inventory-actions">
<a href="/license/<%= license.id %>/edit"><i class="fa-solid fa-pen-to-square"></i></a>
<a href="/license/<%= license.id %>/delete"><i class="fa-solid fa-trash"></i></a>
</p>
2022-12-08 17:26:44 -05:00
<table class="u-full-width">
<thead>
<tr>
<th>License key:</th>
<th>Manufacturer:</th>
<th>Seats used:</th>
<th>Seats total:</th>
<th>Vendor:</th>
<th>Purchase Date:</th>
</tr>
</thead>
<tbody>
<tr>
<td><%= license.key %></td>
<td><%= nullable(license.manufacturer) %></td>
<td><%= nullable(license.seats_used) %></td>
<td><%= nullable(license.seats_total) %></td>
<td><%= nullable(license.purchased_from) %></td>
<td><%= nullable(date_format(license.purchased_at)) %></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="twelve columns">
<% if license.license_comments.length > 0 %>
<ul class="u-full-width">
<% license.license_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="/license/<%= license.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>