@@ -1,44 +1,48 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <%= link_to l(:label_project_new), new_project_path, :class => 'icon icon-add' %> |
|
2 | <%= link_to l(:label_project_new), new_project_path, :class => 'icon icon-add' %> | |
3 | </div> |
|
3 | </div> | |
4 |
|
4 | |||
5 | <%= title l(:label_project_plural) %> |
|
5 | <%= title l(:label_project_plural) %> | |
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 for='status'><%= l(:field_status) %> :</label> |
|
9 | <label for='status'><%= 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 for='name'><%= l(:label_project) %>:</label> |
|
11 | <label for='name'><%= 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), admin_projects_path, :class => 'icon icon-reload' %> |
|
14 | <%= link_to l(:button_clear), admin_projects_path, :class => 'icon icon-reload' %> | |
15 | </fieldset> |
|
15 | </fieldset> | |
16 | <% end %> |
|
16 | <% end %> | |
17 | |
|
17 | | |
18 |
|
18 | |||
|
19 | <% if @projects.any? %> | |||
19 | <div class="autoscroll"> |
|
20 | <div class="autoscroll"> | |
20 | <table class="list"> |
|
21 | <table class="list"> | |
21 | <thead><tr> |
|
22 | <thead><tr> | |
22 | <th><%=l(:label_project)%></th> |
|
23 | <th><%=l(:label_project)%></th> | |
23 | <th><%=l(:field_is_public)%></th> |
|
24 | <th><%=l(:field_is_public)%></th> | |
24 | <th><%=l(:field_created_on)%></th> |
|
25 | <th><%=l(:field_created_on)%></th> | |
25 | <th></th> |
|
26 | <th></th> | |
26 | </tr></thead> |
|
27 | </tr></thead> | |
27 | <tbody> |
|
28 | <tbody> | |
28 | <% project_tree(@projects, :init_level => true) do |project, level| %> |
|
29 | <% project_tree(@projects, :init_level => true) do |project, level| %> | |
29 | <tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> |
|
30 | <tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> | |
30 | <td class="name"><span><%= link_to_project_settings(project, {}, :title => project.short_description) %></span></td> |
|
31 | <td class="name"><span><%= link_to_project_settings(project, {}, :title => project.short_description) %></span></td> | |
31 | <td><%= checked_image project.is_public? %></td> |
|
32 | <td><%= checked_image project.is_public? %></td> | |
32 | <td><%= format_date(project.created_on) %></td> |
|
33 | <td><%= format_date(project.created_on) %></td> | |
33 | <td class="buttons"> |
|
34 | <td class="buttons"> | |
34 | <%= link_to(l(:button_archive), archive_project_path(project, :status => params[:status]), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %> |
|
35 | <%= link_to(l(:button_archive), archive_project_path(project, :status => params[:status]), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %> | |
35 | <%= link_to(l(:button_unarchive), unarchive_project_path(project, :status => params[:status]), :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %> |
|
36 | <%= link_to(l(:button_unarchive), unarchive_project_path(project, :status => params[:status]), :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %> | |
36 | <%= link_to(l(:button_copy), copy_project_path(project), :class => 'icon icon-copy') %> |
|
37 | <%= link_to(l(:button_copy), copy_project_path(project), :class => 'icon icon-copy') %> | |
37 | <%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %> |
|
38 | <%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %> | |
38 | </td> |
|
39 | </td> | |
39 | </tr> |
|
40 | </tr> | |
40 | <% end %> |
|
41 | <% end %> | |
41 | </tbody> |
|
42 | </tbody> | |
42 | </table> |
|
43 | </table> | |
43 | </div> |
|
44 | </div> | |
44 | <span class="pagination"><%= pagination_links_full @project_pages, @project_count %></span> No newline at end of file |
|
45 | <span class="pagination"><%= pagination_links_full @project_pages, @project_count %></span> | |
|
46 | <% else %> | |||
|
47 | <p class="nodata"><%= l(:label_no_data) %></p> | |||
|
48 | <% end %> |
@@ -1,58 +1,62 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <%= link_to l(:label_user_new), new_user_path, :class => 'icon icon-add' %> |
|
2 | <%= link_to l(:label_user_new), new_user_path, :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(users_path, :method => :get) do %> |
|
7 | <%= form_tag(users_path, :method => :get) do %> | |
8 | <fieldset><legend><%= l(:label_filter_plural) %></legend> |
|
8 | <fieldset><legend><%= l(:label_filter_plural) %></legend> | |
9 | <label for='status'><%= l(:field_status) %>:</label> |
|
9 | <label for='status'><%= 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 for='group_id'><%= l(:label_group) %>:</label> |
|
13 | <label for='group_id'><%= l(:label_group) %>:</label> | |
14 | <%= select_tag 'group_id', content_tag('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', content_tag('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 for='name'><%= l(:label_user) %>:</label> |
|
17 | <label for='name'><%= 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 | <%= link_to l(:button_clear), users_path, :class => 'icon icon-reload' %> | |
21 | </fieldset> |
|
21 | </fieldset> | |
22 | <% end %> |
|
22 | <% end %> | |
23 | |
|
23 | | |
24 |
|
24 | |||
|
25 | <% if @users.any? %> | |||
25 | <div class="autoscroll"> |
|
26 | <div class="autoscroll"> | |
26 | <table class="list users"> |
|
27 | <table class="list users"> | |
27 | <thead><tr> |
|
28 | <thead><tr> | |
28 | <%= sort_header_tag('login', :caption => l(:field_login)) %> |
|
29 | <%= sort_header_tag('login', :caption => l(:field_login)) %> | |
29 | <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %> |
|
30 | <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %> | |
30 | <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %> |
|
31 | <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %> | |
31 | <th><%= l(:field_mail) %></th> |
|
32 | <th><%= l(:field_mail) %></th> | |
32 | <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %> |
|
33 | <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %> | |
33 | <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %> |
|
34 | <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %> | |
34 | <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %> |
|
35 | <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %> | |
35 | <th></th> |
|
36 | <th></th> | |
36 | </tr></thead> |
|
37 | </tr></thead> | |
37 | <tbody> |
|
38 | <tbody> | |
38 | <% for user in @users -%> |
|
39 | <% for user in @users -%> | |
39 | <tr class="<%= user.css_classes %> <%= cycle("odd", "even") %>"> |
|
40 | <tr class="<%= user.css_classes %> <%= cycle("odd", "even") %>"> | |
40 | <td class="username"><%= avatar(user, :size => "14") %><%= link_to user.login, edit_user_path(user) %></td> |
|
41 | <td class="username"><%= avatar(user, :size => "14") %><%= link_to user.login, edit_user_path(user) %></td> | |
41 | <td class="firstname"><%= user.firstname %></td> |
|
42 | <td class="firstname"><%= user.firstname %></td> | |
42 | <td class="lastname"><%= user.lastname %></td> |
|
43 | <td class="lastname"><%= user.lastname %></td> | |
43 | <td class="email"><%= mail_to(user.mail) %></td> |
|
44 | <td class="email"><%= mail_to(user.mail) %></td> | |
44 | <td class="tick"><%= checked_image user.admin? %></td> |
|
45 | <td class="tick"><%= checked_image user.admin? %></td> | |
45 | <td class="created_on"><%= format_time(user.created_on) %></td> |
|
46 | <td class="created_on"><%= format_time(user.created_on) %></td> | |
46 | <td class="last_login_on"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td> |
|
47 | <td class="last_login_on"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td> | |
47 | <td class="buttons"> |
|
48 | <td class="buttons"> | |
48 | <%= change_status_link(user) %> |
|
49 | <%= change_status_link(user) %> | |
49 | <%= delete_link user_path(user, :back_url => request.original_fullpath) unless User.current == user %> |
|
50 | <%= delete_link user_path(user, :back_url => request.original_fullpath) unless User.current == user %> | |
50 | </td> |
|
51 | </td> | |
51 | </tr> |
|
52 | </tr> | |
52 | <% end -%> |
|
53 | <% end -%> | |
53 | </tbody> |
|
54 | </tbody> | |
54 | </table> |
|
55 | </table> | |
55 | </div> |
|
56 | </div> | |
56 | <span class="pagination"><%= pagination_links_full @user_pages, @user_count %></span> |
|
57 | <span class="pagination"><%= pagination_links_full @user_pages, @user_count %></span> | |
|
58 | <% else %> | |||
|
59 | <p class="nodata"><%= l(:label_no_data) %></p> | |||
|
60 | <% end %> | |||
57 |
|
61 | |||
58 | <% html_title(l(:label_user_plural)) -%> |
|
62 | <% html_title(l(:label_user_plural)) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now