_abuse_complaint_accept_details.rhtml
1.04 KB
<br />
<% task.abuse_reports.each do |abuse_report| %>
<div>
<strong style="word-wrap: break-word; display: block; padding-right: 40px">"<%= abuse_report.reason %>"</strong> <br />
<i><%= _('Reported by %{reporter} %{time}.') % {:reporter => abuse_report.reporter.name, :time => time_ago_as_sentence(abuse_report.created_at) + ' ' + _('ago')}%></i> <br />
<% if !abuse_report.content.blank? %>
<button class="display-abuse-report-details" data-report="<%=abuse_report.id%>"><%=_('View details')%></button>
<div style='display: none' id=<%= 'abuse-report-details-'+abuse_report.id.to_s %> class="abuse-report-details">
<%= abuse_report.content %>
</div>
<% end %>
<br />
--
<br />
</div>
<% end %>
<script>
(function($){
$("#task-<%= task.id %> .display-abuse-report-details").button({
icons: { primary: "ui-icon-info" },
text: false
}).click(function(){
$('#abuse-report-details-'+$(this).attr('data-report')).slideToggle();
return false;
});
})(jQuery);
</script>