app/views/requests/comments/index.html.erb
<% add :about, I18n.t("requests.about") -%>
<%- add :back_menu, "Back to request" => request_path(@request) -%>
<% @request.associated_studies.each do |study| %>
<% add :back_menu, I18n.t("navigation.menu.back_to_study") => study_path(study) -%>
<% end %>
<% if can? :administer, Study %>
<% add :menu, "Administer studies" => admin_studies_path -%>
<% end %>
<%= page_title("Request #{@request.id}",'Comments') %>
<div class='subtitle'>
Request <%= @request.id %> · Created on <%= @request.created_at.to_formatted_s(:long) %> · <%= @request.state.capitalize %>
</div>
<div class='info'>
<%= render partial: "list", locals: {study: @request } %>
<% if can? :create, Comment.new(commentable: @request) %>
<div>
<%= form_tag(request_comments_path(@request), data: { update: "#request_annotations_#{@request.id}", remote: true }, class:'remote-form') do %>
<label for='comment'>Type your comment</label>
<div class="input-group">
<%= text_field_tag "comment", '', class:'form-control' %><span class="input-group-btn"><%= submit_tag 'Add comment', class: 'btn btn-success' %></span>
</div>
<% end %>
</div>
<% end %>
</div>