<% if result.blank? and @result.present? then result = @result end %> <% if order.blank? and @order.present? then order = @order end %> <% comments = result.result_comments.order(created_at: order) %> <% timestamp = Time.current + 1.year %> <% for_export_all = defined?(export_all) && export_all %>
" data-type="result_comments" data-id='{ "result_id": <%= result.id %> }' data-scroll-id="<%= result.id %>" data-name="<%=t "projects.reports.elements.result_comments.sidebar_name" %>" data-icon-class="fas fa-comment">
<%=t "projects.reports.elements.result_comments.name", result: result.name %>
<%= render partial: "reports/elements/element_controls.html.erb", locals: { show_sort: true, show_move_up: false, show_move_down: false } %>
<% if comments.any? %>
    <% comments.each do |comment| %> <%= render partial: 'shared/comments/item.html.erb', locals: { comment: comment, readonly: true, report: true, export_all: for_export_all } %> <% end %>
<% else %> <%=t "projects.reports.elements.result_comments.no_comments" %> <% end %>
<%= children if (defined? children and children.present?) %>