mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 15:26:03 +01:00
Adds name filter on group list.
git-svn-id: http://svn.redmine.org/redmine/trunk@15757 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -3,6 +3,17 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= title l(:label_group_plural) %>
|
<%= title l(:label_group_plural) %>
|
||||||
|
|
||||||
|
<%= form_tag(groups_path, :method => :get) do %>
|
||||||
|
<fieldset><legend><%= l(:label_filter_plural) %></legend>
|
||||||
|
<label for='name'><%= l(:label_group) %>:</label>
|
||||||
|
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||||
|
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||||
|
<%= link_to l(:button_clear), groups_path, :class => 'icon icon-reload' %>
|
||||||
|
</fieldset>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<% if @groups.any? %>
|
<% if @groups.any? %>
|
||||||
<div class="autoscroll">
|
<div class="autoscroll">
|
||||||
<table class="list groups">
|
<table class="list groups">
|
||||||
|
|||||||
@@ -36,6 +36,15 @@ class GroupsControllerTest < Redmine::ControllerTest
|
|||||||
assert_select 'tr#group-11 td.user_count', :text => '1'
|
assert_select 'tr#group-11 td.user_count', :text => '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_index_with_name_filter
|
||||||
|
Group.generate!(:name => "Clients")
|
||||||
|
|
||||||
|
get :index, :name => "cli"
|
||||||
|
assert_response :success
|
||||||
|
assert_select 'table.groups tbody tr', 1
|
||||||
|
assert_select 'table.groups tbody td.name', :text => 'Clients'
|
||||||
|
end
|
||||||
|
|
||||||
def test_show
|
def test_show
|
||||||
get :show, :id => 10
|
get :show, :id => 10
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|||||||
Reference in New Issue
Block a user