Added ability to comment on license records; updated item list view to link to the item display pages

This commit is contained in:
2022-12-09 11:42:12 -05:00
parent 36f7fb82a6
commit db6bfe8e7a
7 changed files with 62 additions and 2 deletions

View File

@ -11,7 +11,7 @@
<% if items.length > 0 %>
<ul>
<% items.each do |item| %>
<li><%= item.name %></li>
<li><a href="/item/<%= item.id %>"><%= item.name %></a></li>
<% end %>
</ul>
<% else %>

View File

@ -34,3 +34,28 @@
</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>