<!-- if there are notes then list of notes and view last note
  else display display add note form -->

  <% if answer.present? && answer.has_key?("notes") %>
    <% notes = answer["notes"] %>
    <% answerid = answer["id"] %>
    <%= hidden_field_tag :answer_id, answer["id"] %>

    <!-- add note -->
    <div id="add_comment_button_top_div_<%= answerid %>" class="move_2_right" >
      <%= link_to t("helpers.comments.add_comment_label"),'#', :class => "btn btn-primary add_comment_button" %>
    </div>

    <div class="div_clear"></div>

    <!-- list of notes, view and edit a note -->
    <%= render :partial => "list_notes", locals: {question: question, notes: notes, plan:plan} %>

    <div class="div_clear"></div>

    <!-- add a note button -->
    <div id="add_comment_button_bottom_div_<%= answerid %>" class="move_2_right">
      <%= link_to t("helpers.comments.add_comment_label"),'#', :class => "btn btn-primary add_comment_button" %>
    </div>

    <div class="div_clear"></div>

    <!-- add a note block -->
    <div id="add_comment_block_div_<%= answerid %>" style="display: none">
      <%= render :partial => "add_note", locals: {answer: answer, answer_obj: answer_obj, question: question, plan_data: plan_data}%>
    </div>

  <% else%>
    <%= t("helpers.comments.add_comment_text")%>
    <%= render :partial => "add_note", locals: {answer: answer, answer_obj: answer_obj, question: question, plan_data: plan_data}%>
  <% end%>
