Adding quick-add buttons to user profiles

This commit is contained in:
2013-08-26 23:01:43 -07:00
parent 810ff6b034
commit 18bc427eb3
6 changed files with 43 additions and 6 deletions
+2 -2
View File
@@ -74,7 +74,7 @@
</p>
<% end %>
<p>
<b>Card:</b>
<b>Card:</b><%= link_to "+ Add", (new_card_path+"?user="+@user.id.to_s), :class => 'btn' if can? :create, Card %>
<% if current_user.admin? then %>
<% @user.cards.each do |c| %>
<%= link_to c.card_number, c %><%= "," unless c == @user.cards.last %>
@@ -84,7 +84,7 @@
<% end %>
</p>
<b>Certifications:</b>
<b>Certifications:</b><%= link_to "+ Add", (new_user_certification_path+"?user="+@user.id.to_s), :class => 'btn' if can? :create, UserCertification %>
<ul>
<% @user.certifications.each do |certification| %>
<li><%= link_to certification.name, certification %></li>