Skip to content

Commit

Permalink
fix setting holding items
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Nov 22, 2015
1 parent 563f024 commit af771e6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/views/manifestations/_show_detail_librarian.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
</tr>
</table>
<% end %>
<%- if manifestation.items.on_shelf.exists? -%>
<%= render 'manifestations/show_holding', manifestation: manifestation -%>
<%- if manifestation.items.exists? -%>
<%= render 'manifestations/show_holding', manifestation: manifestation, items: manifestation.items %>
<%- end -%>
</div>
<%= render 'manifestations/tab_list', manifestation: manifestation %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/manifestations/_show_detail_user.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
</table>
<% end %>
<%- if manifestation.items.for_checkout.on_shelf.exists? -%>
<%= render 'manifestations/show_holding', manifestation: manifestation -%>
<%= render 'manifestations/show_holding', manifestation: manifestation, items: manifestation.items.for_checkout.on_shelf %>
<%- end -%>
</div>
<%= render 'manifestations/tab_list', manifestation: manifestation %>
Expand Down
5 changes: 0 additions & 5 deletions app/views/manifestations/_show_holding.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
<th><%= t('activerecord.models.circulation_status') -%></th>
<% end %>
</tr>
<% if current_user.try(:has_role?, 'Librarian') %>
<% items = manifestation.items %>
<% else %>
<% items = manifestation.items.for_checkout.on_shelf %>
<% end %>
<%- items.each do |item| -%>
<tr>
<td>
Expand Down

0 comments on commit af771e6

Please sign in to comment.