@@ -8,8 +8,8 @@ class PostAppealsController < ApplicationController
|
||||
end
|
||||
|
||||
def index
|
||||
@search = PostAppeal.order("id desc").search(params[:search])
|
||||
@post_appeals = @search.paginate(params[:page], :limit => params[:limit])
|
||||
@query = PostAppeal.order("id desc").search(params[:search])
|
||||
@post_appeals = @query.paginate(params[:page], :limit => params[:limit])
|
||||
respond_with(@post_appeals) do |format|
|
||||
format.xml do
|
||||
render :xml => @post_appeals.to_xml(:root => "post-appeals")
|
||||
|
||||
@@ -8,8 +8,8 @@ class PostFlagsController < ApplicationController
|
||||
end
|
||||
|
||||
def index
|
||||
@search = PostFlag.order("id desc").search(params[:search])
|
||||
@post_flags = @search.paginate(params[:page], :limit => params[:limit])
|
||||
@query = PostFlag.order("id desc").search(params[:search])
|
||||
@post_flags = @query.paginate(params[:page], :limit => params[:limit])
|
||||
respond_with(@post_flags) do |format|
|
||||
format.xml do
|
||||
render :xml => @post_flags.to_xml(:root => "post-flags")
|
||||
|
||||
27
app/views/post_appeals/_search.html.erb
Normal file
27
app/views/post_appeals/_search.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<table class="search">
|
||||
<tbody>
|
||||
<%= form_tag(post_flags_path, :method => :get, :class => "simple_form") do %>
|
||||
<tr>
|
||||
<th><label for="search_post_id">Post ID</label></th>
|
||||
<td>
|
||||
<div class="input">
|
||||
<%= text_field "search", "post_id", :value => params[:search][:post_id] %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><label for="search_creator_name">Creator</th>
|
||||
<td>
|
||||
<div class="input">
|
||||
<%= text_field "search", "creator_name", :value => params[:search][:creator_name] %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><%= submit_tag "Search" %><td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,6 +1,7 @@
|
||||
<div id="c-post-appeals">
|
||||
<div id="a-index">
|
||||
<h1>Appeals</h1>
|
||||
<%= render "search" %>
|
||||
<table width="100%" class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
38
app/views/post_flags/_search.html.erb
Normal file
38
app/views/post_flags/_search.html.erb
Normal file
@@ -0,0 +1,38 @@
|
||||
<table class="search">
|
||||
<tbody>
|
||||
<%= form_tag(post_flags_path, :method => :get, :class => "simple_form") do %>
|
||||
<tr>
|
||||
<th><label for="search_post_id">Post ID</label></th>
|
||||
<td>
|
||||
<div class="input">
|
||||
<%= text_field "search", "post_id", :value => params[:search][:post_id] %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% if CurrentUser.user.is_janitor? %>
|
||||
<tr>
|
||||
<th><label for="search_creator_name">Creator</th>
|
||||
<td>
|
||||
<div class="input">
|
||||
<%= text_field "search", "creator_name", :value => params[:search][:creator_name] %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
<tr>
|
||||
<th><label for="search_is_resolved">Resolved</label></th>
|
||||
<td>
|
||||
<div class="input">
|
||||
<%= select "search", "is_resolved", ["true", "false"], :selected => params[:search][:is_resolved], :include_blank => true %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><%= submit_tag "Search" %><td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,6 +1,7 @@
|
||||
<div id="c-post-flags">
|
||||
<div id="a-index">
|
||||
<h1>Flags</h1>
|
||||
<%= render "search" %>
|
||||
<table width="100%" class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user