@@ -331,6 +331,15 module ApplicationHelper | |||||
331 | s.html_safe |
|
331 | s.html_safe | |
332 | end |
|
332 | end | |
333 |
|
333 | |||
|
334 | # Options for the new membership projects combo-box | |||
|
335 | def options_for_membership_project_select(principal, projects) | |||
|
336 | options = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---") | |||
|
337 | options << project_tree_options_for_select(projects) do |p| | |||
|
338 | {:disabled => principal.projects.include?(p)} | |||
|
339 | end | |||
|
340 | options | |||
|
341 | end | |||
|
342 | ||||
334 | # Truncates and returns the string as a single line |
|
343 | # Truncates and returns the string as a single line | |
335 | def truncate_single_line(string, *args) |
|
344 | def truncate_single_line(string, *args) | |
336 | truncate(string.to_s, *args).gsub(%r{[\r\n]+}m, ' ') |
|
345 | truncate(string.to_s, *args).gsub(%r{[\r\n]+}m, ' ') |
@@ -18,15 +18,6 | |||||
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
19 |
|
19 | |||
20 | module GroupsHelper |
|
20 | module GroupsHelper | |
21 | # Options for the new membership projects combo-box |
|
|||
22 | def options_for_membership_project_select(user, projects) |
|
|||
23 | options = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---") |
|
|||
24 | options << project_tree_options_for_select(projects) do |p| |
|
|||
25 | {:disabled => (user.projects.include?(p))} |
|
|||
26 | end |
|
|||
27 | options |
|
|||
28 | end |
|
|||
29 |
|
||||
30 | def group_settings_tabs |
|
21 | def group_settings_tabs | |
31 | tabs = [{:name => 'general', :partial => 'groups/general', :label => :label_general}, |
|
22 | tabs = [{:name => 'general', :partial => 'groups/general', :label => :label_general}, | |
32 | {:name => 'users', :partial => 'groups/users', :label => :label_user_plural}, |
|
23 | {:name => 'users', :partial => 'groups/users', :label => :label_user_plural}, |
@@ -26,15 +26,6 module UsersHelper | |||||
26 | ["#{l(:status_locked)} (#{user_count_by_status[3].to_i})", '3']], selected.to_s) |
|
26 | ["#{l(:status_locked)} (#{user_count_by_status[3].to_i})", '3']], selected.to_s) | |
27 | end |
|
27 | end | |
28 |
|
28 | |||
29 | # Options for the new membership projects combo-box |
|
|||
30 | def options_for_membership_project_select(user, projects) |
|
|||
31 | options = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---") |
|
|||
32 | options << project_tree_options_for_select(projects) do |p| |
|
|||
33 | {:disabled => (user.projects.include?(p))} |
|
|||
34 | end |
|
|||
35 | options |
|
|||
36 | end |
|
|||
37 |
|
||||
38 | def user_mail_notification_options(user) |
|
29 | def user_mail_notification_options(user) | |
39 | user.valid_notification_options.collect {|o| [l(o.last), o.first]} |
|
30 | user.valid_notification_options.collect {|o| [l(o.last), o.first]} | |
40 | end |
|
31 | end |
General Comments 0
You need to be logged in to leave comments.
Login now