Skip to content

Commit

Permalink
added index page for papers, solved #23
Browse files Browse the repository at this point in the history
  • Loading branch information
akuchinke committed Nov 9, 2017
1 parent b8a6583 commit ad1d8b5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions app/views/papers/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<p><strong>Papers</strong></p>

<%= link_to 'Add author', new_author_path %>

<table>
<tr>
<th>Title</th>
<th>Venue</th>
<th>Year</th>
</tr>

<% @papers.each do |paper| %>
<tr>
<td><%= paper.title %></td>
<td><%= paper.venue %></td>
<td><%= paper.year %></td>
<td><%= link_to 'Show', paper_path(paper) %></td>
<td><%= link_to 'Edit', edit_paper_path(paper) %></td>
<td><%= link_to 'Destroy', paper_path(paper), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>

0 comments on commit ad1d8b5

Please sign in to comment.