forked from bofh/fetsite
AutoCommit Mon Aug 10 13:03:04 CEST 2015
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<%= div_tag_for(choice) do %>
|
||||
|
||||
<%
|
||||
if current_user.nil?
|
||||
unless can?(:answer,choice.question)
|
||||
t=choice.text
|
||||
else
|
||||
value=(current_user.id.nil?)? false : choice.answers.where(user_id: current_user.id).count>0
|
||||
@@ -13,7 +13,7 @@ end
|
||||
%>
|
||||
|
||||
|
||||
<%= t %> <%= link_to fa_icon("pencil"), edit_survey_choice_path(choice) , class: "btn btn-link navbar-btn" , remote: true
|
||||
<%= t %> <%= link_to fa_icon("pencil"), edit_survey_choice_path(choice) , class: "btn btn-link navbar-btn" , remote: true if can? :edit, choice
|
||||
%>
|
||||
<%= link_to fa_icon("trash"), survey_choice_path(choice) , class: "btn btn-link navbar-btn" , remote: true , method: :delete, data: { confirm: 'Are you sure?' } %>
|
||||
<%= link_to fa_icon("trash"), survey_choice_path(choice) , class: "btn btn-link navbar-btn" , remote: true , method: :delete, data: { confirm: 'Are you sure?' } if can? :delete,choice %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user