##// END OF EJS Templates
Adds links to reset filters on users and projects list....
Jean-Philippe Lang -
r5031:a08c64e11fa7
parent child
Show More
@@ -1,44 +1,45
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add' %>
2 <%= link_to l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add' %>
3 </div>
3 </div>
4
4
5 <h2><%=l(:label_project_plural)%></h2>
5 <h2><%=l(:label_project_plural)%></h2>
6
6
7 <% form_tag({}, :method => :get) do %>
7 <% form_tag({}, :method => :get) do %>
8 <fieldset><legend><%= l(:label_filter_plural) %></legend>
8 <fieldset><legend><%= l(:label_filter_plural) %></legend>
9 <label><%= l(:field_status) %> :</label>
9 <label><%= l(:field_status) %> :</label>
10 <%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
10 <%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
11 <label><%= l(:label_project) %>:</label>
11 <label><%= l(:label_project) %>:</label>
12 <%= text_field_tag 'name', params[:name], :size => 30 %>
12 <%= text_field_tag 'name', params[:name], :size => 30 %>
13 <%= submit_tag l(:button_apply), :class => "small", :name => nil %>
13 <%= submit_tag l(:button_apply), :class => "small", :name => nil %>
14 <%= link_to l(:button_clear), {:controller => 'admin', :action => 'projects'}, :class => 'icon icon-reload' %>
14 </fieldset>
15 </fieldset>
15 <% end %>
16 <% end %>
16 &nbsp;
17 &nbsp;
17
18
18 <div class="autoscroll">
19 <div class="autoscroll">
19 <table class="list">
20 <table class="list">
20 <thead><tr>
21 <thead><tr>
21 <th><%=l(:label_project)%></th>
22 <th><%=l(:label_project)%></th>
22 <th><%=l(:field_is_public)%></th>
23 <th><%=l(:field_is_public)%></th>
23 <th><%=l(:field_created_on)%></th>
24 <th><%=l(:field_created_on)%></th>
24 <th></th>
25 <th></th>
25 </tr></thead>
26 </tr></thead>
26 <tbody>
27 <tbody>
27 <% project_tree(@projects) do |project, level| %>
28 <% project_tree(@projects) do |project, level| %>
28 <tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
29 <tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
29 <td class="name"><span><%= link_to_project(project, {:action => 'settings'}, :title => project.short_description) %></span></td>
30 <td class="name"><span><%= link_to_project(project, {:action => 'settings'}, :title => project.short_description) %></span></td>
30 <td align="center"><%= checked_image project.is_public? %></td>
31 <td align="center"><%= checked_image project.is_public? %></td>
31 <td align="center"><%= format_date(project.created_on) %></td>
32 <td align="center"><%= format_date(project.created_on) %></td>
32 <td class="buttons">
33 <td class="buttons">
33 <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') if project.active? %>
34 <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') if project.active? %>
34 <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if !project.active? && (project.parent.nil? || project.parent.active?) %>
35 <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if !project.active? && (project.parent.nil? || project.parent.active?) %>
35 <%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
36 <%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
36 <%= link_to(l(:button_delete), project_destroy_confirm_path(project), :class => 'icon icon-del') %>
37 <%= link_to(l(:button_delete), project_destroy_confirm_path(project), :class => 'icon icon-del') %>
37 </td>
38 </td>
38 </tr>
39 </tr>
39 <% end %>
40 <% end %>
40 </tbody>
41 </tbody>
41 </table>
42 </table>
42 </div>
43 </div>
43
44
44 <% html_title(l(:label_project_plural)) -%>
45 <% html_title(l(:label_project_plural)) -%>
@@ -1,57 +1,58
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_user_new), {:action => 'new'}, :class => 'icon icon-add' %>
2 <%= link_to l(:label_user_new), {:action => 'new'}, :class => 'icon icon-add' %>
3 </div>
3 </div>
4
4
5 <h2><%=l(:label_user_plural)%></h2>
5 <h2><%=l(:label_user_plural)%></h2>
6
6
7 <% form_tag({}, :method => :get) do %>
7 <% form_tag({}, :method => :get) do %>
8 <fieldset><legend><%= l(:label_filter_plural) %></legend>
8 <fieldset><legend><%= l(:label_filter_plural) %></legend>
9 <label><%= l(:field_status) %>:</label>
9 <label><%= l(:field_status) %>:</label>
10 <%= select_tag 'status', users_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
10 <%= select_tag 'status', users_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
11
11
12 <% if @groups.present? %>
12 <% if @groups.present? %>
13 <label><%= l(:label_group) %>:</label>
13 <label><%= l(:label_group) %>:</label>
14 <%= select_tag 'group_id', '<option></option>' + options_from_collection_for_select(@groups, :id, :name, params[:group_id].to_i), :onchange => "this.form.submit(); return false;" %>
14 <%= select_tag 'group_id', '<option></option>' + options_from_collection_for_select(@groups, :id, :name, params[:group_id].to_i), :onchange => "this.form.submit(); return false;" %>
15 <% end %>
15 <% end %>
16
16
17 <label><%= l(:label_user) %>:</label>
17 <label><%= l(:label_user) %>:</label>
18 <%= text_field_tag 'name', params[:name], :size => 30 %>
18 <%= text_field_tag 'name', params[:name], :size => 30 %>
19 <%= submit_tag l(:button_apply), :class => "small", :name => nil %>
19 <%= submit_tag l(:button_apply), :class => "small", :name => nil %>
20 <%= link_to l(:button_clear), users_path, :class => 'icon icon-reload' %>
20 </fieldset>
21 </fieldset>
21 <% end %>
22 <% end %>
22 &nbsp;
23 &nbsp;
23
24
24 <div class="autoscroll">
25 <div class="autoscroll">
25 <table class="list">
26 <table class="list">
26 <thead><tr>
27 <thead><tr>
27 <%= sort_header_tag('login', :caption => l(:field_login)) %>
28 <%= sort_header_tag('login', :caption => l(:field_login)) %>
28 <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
29 <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
29 <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %>
30 <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %>
30 <%= sort_header_tag('mail', :caption => l(:field_mail)) %>
31 <%= sort_header_tag('mail', :caption => l(:field_mail)) %>
31 <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
32 <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
32 <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
33 <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
33 <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
34 <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
34 <th></th>
35 <th></th>
35 </tr></thead>
36 </tr></thead>
36 <tbody>
37 <tbody>
37 <% for user in @users -%>
38 <% for user in @users -%>
38 <tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>">
39 <tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>">
39 <td class="username"><%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td>
40 <td class="username"><%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td>
40 <td class="firstname"><%= h(user.firstname) %></td>
41 <td class="firstname"><%= h(user.firstname) %></td>
41 <td class="lastname"><%= h(user.lastname) %></td>
42 <td class="lastname"><%= h(user.lastname) %></td>
42 <td class="email"><%= mail_to(h(user.mail)) %></td>
43 <td class="email"><%= mail_to(h(user.mail)) %></td>
43 <td align="center"><%= checked_image user.admin? %></td>
44 <td align="center"><%= checked_image user.admin? %></td>
44 <td class="created_on" align="center"><%= format_time(user.created_on) %></td>
45 <td class="created_on" align="center"><%= format_time(user.created_on) %></td>
45 <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
46 <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
46 <td class="buttons">
47 <td class="buttons">
47 <%= change_status_link(user) %>
48 <%= change_status_link(user) %>
48 <%= link_to(l(:button_delete), user, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') unless User.current == user %>
49 <%= link_to(l(:button_delete), user, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') unless User.current == user %>
49 </td>
50 </td>
50 </tr>
51 </tr>
51 <% end -%>
52 <% end -%>
52 </tbody>
53 </tbody>
53 </table>
54 </table>
54 </div>
55 </div>
55 <p class="pagination"><%= pagination_links_full @user_pages, @user_count %></p>
56 <p class="pagination"><%= pagination_links_full @user_pages, @user_count %></p>
56
57
57 <% html_title(l(:label_user_plural)) -%>
58 <% html_title(l(:label_user_plural)) -%>
General Comments 0
You need to be logged in to leave comments. Login now