implement site reporting

This commit is contained in:
Kyle Drake 2014-06-14 16:15:47 -07:00
parent 5edeba9495
commit e546b22797
5 changed files with 84 additions and 3 deletions

View file

@ -102,9 +102,40 @@
<%== erb :'_tags', layout: false, locals: {site: site, is_current_site: site == current_site} %>
<div class="report">
<a href="">Report</a> | <a href="">Block</a>
</div>
<% if site != current_site %>
<div class="report">
<a href="#report" data-toggle="modal">Report</a> | <a href="">Block</a>
</div>
<% end %>
</div>
</div></div>
</div>
<div class="modal hide fade" id="report" tabindex="-1" role="dialog" aria-labelledby="reportLabel" aria-hidden="true">
<form method="POST" action="/site/<%= site.username %>/report">
<input type="hidden" value="<%= csrf_token %>" name="csrf_token">
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="removeTagLabel">Report Site</h3>
</div>
<div class="modal-body">
<p>
What is the reason you are reporting this site?
<select name="type" class="input-Area">
<option value="spam">Site is spamming</option>
<option value="phishing">Site is being used for a phishing attack</option>
<option value="abusive">Site is abusive or threatening</option>
<option value="harassment">Site is harassing other sites</option>
<option value="content">Site contains inappropriate/illegal content</option>
<option value="other">Other</option>
</select>
</p>
<p>Comments:</p>
<textarea name="comments" type="text" style="width: 400px"></textarea>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
<button type="submit" class="btn btn-Action">Report</button>
</div>
</form>
</div>