AutoCommit Fre Jul 31 21:03:04 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-07-31 21:03:04 +02:00
26 changed files with 340 additions and 23 deletions

View File

@@ -1,3 +1,4 @@
<div id="choice_<%= choice.id %>"
<%
if current_user.nil?
t=choice.text
@@ -12,3 +13,4 @@ end
<%= t %> <%= link_to fa_icon("pencil"), edit_survey_choice_path(choice) , class: "btn btn-link navbar-btn"
%>
</div>

View File

@@ -0,0 +1 @@
<div id="choice_<%= choice_form.id %>"

View File

@@ -15,3 +15,5 @@
</div>
<% end %>

View File

@@ -6,6 +6,20 @@
<%= render @survey_question %>
<%= link_to "comment" , new_comment_path( commentable_type: "Survey::Question", commentable_id: @survey_question.id), remote:true if can? :comment, @survey_question %>
<%= link_to "comments:.."+ @survey_question.comments.count().to_s, comments_path(commentable_type: "Survey::Question", commentable_id: @survey_question.id), remote:true, id: Comment.switchshowid_for( @survey_question) %>
<div id="<%= Comment.formid_for( @survey_question) %>">
</div>
<% unless @survey_question.comments.roots.empty? %>
<div class="row-fluid">
<div class="span12">
<div id="<%= Comment.wrapid_for( @survey_question)%>">
<%= render partial:"comments/comments", object: @survey_question.comments.order(:created_at).roots.reverse_order if params[:show_comments] %>
</div>
</div>
</div>
<% end %>
<%= link_to 'Edit', edit_survey_question_path(@survey_question) %> |
<%= link_to 'Back', survey_questions_path %>