<% if result.blank? and @result.present? then result = @result end %> <% if order.blank? and @order.present? then order = @order end %> <% comments = result.comments.order(created_at: order) %> <% timestamp = Time.current + 1.year %>
" data-type="result_comments" data-id="<%= result.id %>" data-name="<%=t "projects.reports.elements.result_comments.sidebar_name" %>" data-icon-class="glyphicon-comment">
<%=t "projects.reports.elements.result_comments.name", result: result.name %>
<%= render partial: "reports/elements/module_element_controls.html.erb", locals: { show_sort: true, show_move_up: false, show_move_down: false } %>
<% if comments.count == 0 %> <%=t "projects.reports.elements.result_comments.no_comments" %> <% else %>
    <% comments.each do |comment| %> <% comment_ts = comment.created_at %>
  • <%=t "projects.reports.elements.result_comments.comment_prefix", user: comment.user.full_name, date: l(comment_ts, format: :full_date), time: l(comment_ts, format: :time) %>   <%= comment.message %>
  • <% end %>
<% end %>
<%= children if (defined? children and children.present?) %>