Project

General

Profile

« Previous | Next » 

Revision 46da92f0

Added by Daniel Lobato Garcia about 10 years ago

Fixes #4370 - Filters list show permissions

View differences:

app/models/filter.rb
scoped_search :in => :role, :on => :id, :rename => :role_id
scoped_search :in => :role, :on => :name, :rename => :role
scoped_search :in => :permissions, :on => :resource_type, :rename => :resource
scoped_search :in => :permissions, :on => :name, :rename => :permission
before_validation :build_taxonomy_search, :nilify_empty_searches
app/views/filters/index.html.erb
<th><%= sort :role, :as => _("Role") %></th>
<% end %>
<th><%= sort :resource, :as => s_("Filter|Resource") %></th>
<th><%= s_("Filter|Permissions") %></th>
<th><%= sort :search, :as => s_("Filter|Unlimited") %></th>
<th><%= sort :search, :as => s_("Filter|Search") %></th>
<th></th>
......
</td>
<% end %>
<td><%= _(filter.resource_class.try(:humanize_class_name) || filter.resource_type || '(Miscellaneous)') %></td>
<td><%= filter.permissions.map(&:name).join(', ') %></td>
<td><%= checked_icon filter.unlimited? %></td>
<td>
<%= content_tag('span', link_to_if_authorized(filter.search || _('none'),

Also available in: Unified diff