@params['page'] \r
@projects = Project.find :all, :order => sort_clause,\r
:limit => @project_pages.items_per_page,\r
- :offset => @project_pages.current.offset \r
+ :offset => @project_pages.current.offset\r
+\r
+ render :action => "projects", :layout => false if request.xhr?\r
end\r
\r
def mail_options\r
def index
list
- render :action => 'list'
+ render :action => 'list' unless request.xhr?
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
def list
@auth_source_pages, @auth_sources = paginate :auth_sources, :per_page => 10
+ render :action => "list", :layout => false if request.xhr?
end
def new
def index
list
- render :action => 'list'
+ render :action => 'list' unless request.xhr?
end
def list
- @custom_field_pages, @custom_fields = paginate :custom_fields, :per_page => 15
+ @custom_field_pages, @custom_fields = paginate :custom_fields, :per_page => 15\r
+ render :action => "list", :layout => false if request.xhr?
end
\r
def new\r
\r
def index
list
- render :action => 'list'
+ render :action => 'list' unless request.xhr?
end
def list
- @issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 10
+ @issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 10\r
+ render :action => "list", :layout => false if request.xhr?
end
def new
\r
def index
list
- render :action => 'list'
+ render :action => 'list' unless request.xhr?
end
\r
# Lists public projects
@projects = Project.find :all, :order => sort_clause,\r
:conditions => ["is_public=?", true],\r
:limit => @project_pages.items_per_page,\r
- :offset => @project_pages.current.offset
+ :offset => @project_pages.current.offset\r
+\r
+ render :action => "list", :layout => false if request.xhr?
end\r
\r
# Add a new project
sort_update\r
\r
search_filter_init_list_issues\r
- search_filter_update if params[:set_filter] or request.post?\r
+ search_filter_update if params[:set_filter]\r
\r
@issue_count = Issue.count(:include => [:status, :project], :conditions => search_filter_clause) \r
@issue_pages = Paginator.new self, @issue_count, 15, @params['page'] \r
:include => [ :author, :status, :tracker, :project ],\r
:conditions => search_filter_clause,\r
:limit => @issue_pages.items_per_page,\r
- :offset => @issue_pages.current.offset\r
+ :offset => @issue_pages.current.offset \r
+ \r
+ render :action => "list_issues", :layout => false if request.xhr?\r
end\r
\r
# Export filtered/sorted issues list to CSV\r
# Show news list of @project\r
def list_news\r
@news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC"\r
+ render :action => "list_news", :layout => false if request.xhr?\r
end\r
\r
def add_file \r
def index
list
- render :action => 'list'
+ render :action => 'list' unless request.xhr?
end
def list
- @role_pages, @roles = paginate :roles, :per_page => 10
+ @role_pages, @roles = paginate :roles, :per_page => 10\r
+ render :action => "list", :layout => false if request.xhr?
end
def new
def index
list
- render :action => 'list'
+ render :action => 'list' unless request.xhr?
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy ], :redirect_to => { :action => :list }
def list
- @tracker_pages, @trackers = paginate :trackers, :per_page => 10
+ @tracker_pages, @trackers = paginate :trackers, :per_page => 10\r
+ render :action => "list", :layout => false if request.xhr?
end
def new
def index
list
- render :action => 'list'
+ render :action => 'list' unless request.xhr?
end
def list\r
@params['page'] \r
@users = User.find :all,:order => sort_clause,\r
:limit => @user_pages.items_per_page,\r
- :offset => @user_pages.current.offset
+ :offset => @user_pages.current.offset\r
+\r
+ render :action => "list", :layout => false if request.xhr?
end
def add
end\r
\r
def pagination_links_full(paginator, options={}, html_options={})\r
- html =''\r
- html << link_to(('« ' + l(:label_previous) ), { :page => paginator.current.previous }) + ' ' if paginator.current.previous
- html << (pagination_links(paginator, options, html_options) || '')\r
- html << ' ' + link_to((l(:label_next) + ' »'), { :page => paginator.current.next }) if paginator.current.next\r
+ html = '' \r
+ html << link_to_remote(('« ' + l(:label_previous)), \r
+ {:update => "content", :url => { :page => paginator.current.previous }},\r
+ {:href => url_for(:action => 'list', :params => @params.merge({:page => paginator.current.previous}))}) + ' ' if paginator.current.previous\r
+ \r
+ html << (pagination_links_each(paginator, options) do |n|\r
+ link_to_remote(n.to_s, \r
+ {:url => {:action => 'list', :params => @params.merge({:page => n})}, :update => 'content'},\r
+ {:href => url_for(:action => 'list', :params => @params.merge({:page => n}))})\r
+ end || '')\r
+ \r
+ html << ' ' + link_to_remote((l(:label_next) + ' »'), \r
+ {:update => "content", :url => { :page => paginator.current.next }},\r
+ {:href => url_for(:action => 'list', :params => @params.merge({:page => paginator.current.next}))}) if paginator.current.next\r
html \r
end\r
\r
end
caption = titleize(Inflector::humanize(column)) unless caption
params = {:params => {:sort_key => column, :sort_order => order}}
- link_to(caption, params) + (icon ? nbsp(2) + image_tag(icon) : '')
+ link_to_remote(caption,
+ {:update => "content", :url => { :sort_key => column, :sort_order => order}},
+ {:href => url_for(:params => { :sort_key => column, :sort_order => order})}) +
+ (icon ? nbsp(2) + image_tag(icon) : '')
end
# Returns a table header <th> tag with a sort link for the named column
<table class="listTableContent">
<tr class="ListHead">
- <td><%=l(:field_name)%></td>
- <td><%=l(:field_type)%></td>
- <td><%=l(:field_host)%></td>
- <td></td>
- <td></td>
+ <th><%=l(:field_name)%></th>
+ <th><%=l(:field_type)%></th>
+ <th><%=l(:field_host)%></th>
+ <th></th>
+ <th></th>
</tr>
<% for source in @auth_sources %>
<td><small><%=l(:field_fixed_version)%>:</small><br /><%= search_filter_tag 'fixed_version_id', :class => 'select-small' %></td>\r
<td><small><%=l(:field_assigned_to)%>:</small><br /><%= search_filter_tag 'assigned_to_id', :class => 'select-small' %></td>\r
<td><small><%=l(:label_subproject_plural)%>:</small><br /><%= search_filter_tag 'subproject_id', :class => 'select-small' %></td>\r
-\r
<td valign="bottom">\r
+ <%= hidden_field_tag 'set_filter', 1 %>\r
<%= submit_tag l(:button_apply), :class => 'button-small' %>\r
- <%= end_form_tag %>\r
- \r
- <%= start_form_tag %>\r
- <%= submit_tag l(:button_clear), :class => 'button-small' %>\r
- <%= end_form_tag %>\r
</td>\r
- </tr>\r
+ <td valign="bottom"> \r
+ <%= link_to l(:button_clear), :action => 'list_issues', :id => @project, :set_filter => 1 %>\r
+ </td>\r
+ </tr> \r
</table>\r
+<%= end_form_tag %>\r
+\r
\r
\r
<%= start_form_tag ({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) %>\r