Skip to content

Commit

Permalink
Hiding admin interface and making admin/equipmet and admin/transfers …
Browse files Browse the repository at this point in the history
…reusable for admin and non-admin... needs work still.
  • Loading branch information
lyle committed Nov 17, 2009
1 parent 9c7f0c4 commit c047091
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion app/views/admin/equipment/_item.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
<tr>
<td><%= link_to (image_tag('image_icon.png'), admin_equipment_full_image_url(:id=>item, :format=>"jpg")) if item.has_image?%></td>
<td><%=item.inventory_identifier%>
<td><%= link_to item.name, :action=>'show', :id=>item %></td>

<% if current_person.administrator? %>
<td><%= link_to item.name, :controller=>'admin/equipment',:action=>'show', :id=>item %></td>
<% else -%>
<td><%= link_to item.name, :controller=>'equipment',:action=>'show', :id=>item %></td>

<% end -%>

<td><%if item.active_transfer %><%=item.active_transfer.transfer_to.display_name%><%end%></td>
<td><!--%= link_to "transfer", {:controller=>'admin/transfers', :action=>'new', 'transfer[equipment_id]'=>item.id} %-->

Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/transfers/_transfer_to.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<%= if transfer_to.transfer_to_type == "Location" then "Now In" else "Now With" end %>:
<%= if transfer_to.transfer_to_type == "Location" then "Currently In" else "Currently With" end %>:
<span class="transfer_name">
<%= transfer_to.transfer_to.name %>
</span>
Expand Down

0 comments on commit c047091

Please sign in to comment.