Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Index view and list reports on other types
- Loading branch information
1 parent
73635ec
commit 45a4cbc
Showing
9 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
} | ||
} | ||
|
||
h1 .report-status { | ||
h1 .report-status, h3 .report-status { | ||
font-size: 60% !important; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,11 @@ | |
.report-title { | ||
margin-bottom: 0.6em; | ||
} | ||
|
||
.abuse-report { | ||
margin: 1em; | ||
|
||
h3 { | ||
margin-top: 5px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
<h1>Report Status <%= render 'status', status: @status, nl: true %></h1> | ||
<h1>Reports with status <%= render 'status', status: @status, nl: true %></h1> | ||
|
||
<% @reports.in_groups_of(3).map(&:compact).each do |g| %> | ||
<div class="row"> | ||
<% g.each do |r| %> | ||
<%= render 'abuse_reports/report', report: r %> | ||
<% end %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="col-md-4"> | ||
<div class="panel panel-default abuse-report"> | ||
<div class="panel-body"> | ||
<h3> | ||
<%= render 'abuse_report_statuses/status', status: report.status, nl: true %> | ||
<%= link_to abuse_report_path(report) do %> | ||
#<%= report.id %> | ||
<% end %> | ||
</h3> | ||
<p> | ||
Reported to | ||
<strong><%= link_to report.contact.name, abuse_contact_path(report.contact) %></strong> | ||
by | ||
<strong><%= report.user.username %></strong> | ||
<%= time_ago_in_words report.created_at %> ago | ||
</p> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<h1>Abuse Reports</h1> | ||
<p>One giant list of all the abuse reports, ever.</p> | ||
|
||
<ul class="nav nav-tabs"> | ||
<li class="<%= 'active' if params[:filter] == 'open' || params[:filter].nil? %>"><%= link_to 'Open', abuse_reports_path(filter: 'open') %></li> | ||
<li class="<%= 'active' if params[:filter] == 'stale' %>"><%= link_to 'Stale', abuse_reports_path(filter: 'stale') %></li> | ||
<li class="<%= 'active' if params[:filter] == 'closed' %>"><%= link_to 'Closed', abuse_reports_path(filter: 'closed') %></li> | ||
</ul> | ||
|
||
<% @reports.in_groups_of(3).map(&:compact).each do |g| %> | ||
<div class="row"> | ||
<% g.each do |r| %> | ||
<%= render 'report', report: r %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
<%= will_paginate @reports, renderer: BootstrapPagination::Rails %> |