diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cc587d43b..4009000ed 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1067,6 +1067,24 @@ module ApplicationHelper s.html_safe end + def assigned_options_for_select(collection, selected=nil) + s = '' + s << content_tag('option', "#{l(:label_assiged_tip)}", :value => 0) + if collection.include?(User.current) + s << content_tag('option', "<< #{l(:label_me)} >>", :value => User.current.id) + end + groups = '' + collection.sort.each do |element| + selected_attribute = ' selected="selected"' if option_value_selected?(element, selected) + (element.is_a?(Group) ? groups : s) << %() + end + unless groups.empty? + s << %() + end + s.html_safe + end + + # Options for the new membership projects combo-box def options_for_membership_project_select(principal, projects) options = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---") diff --git a/app/views/boards/_project_message_edit.html.erb b/app/views/boards/_project_message_edit.html.erb index 88297bd79..533327e70 100644 --- a/app/views/boards/_project_message_edit.html.erb +++ b/app/views/boards/_project_message_edit.html.erb @@ -1,16 +1,16 @@ - -
- <%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %> -
-- <%= label_tag('month', l(:label_month)) %> - <%= select_month(@month, :prefix => "month", :discard_type => true) %> - <%= label_tag('year', l(:label_year)) %> - <%= select_year(@year, :prefix => "year", :discard_type => true) %> + <%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project}, + :method => :get, :id => 'query_form') do %> + <%= hidden_field_tag 'set_filter', '1' %> +
+ <%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %> +
++ <%= label_tag('month', l(:label_month)) %> + <%= select_month(@month, :prefix => "month", :discard_type => true) %> + <%= label_tag('year', l(:label_year)) %> + <%= select_year(@year, :prefix => "year", :discard_type => true) %> - <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %> - <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %> -
-<% end %> + <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %> + <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %> + + <% end %> -<%= error_messages_for 'query' %> -<% if @query.valid? %> - <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %> -- <%= l(:text_tip_issue_begin_day) %> - <%= l(:text_tip_issue_end_day) %> - <%= l(:text_tip_issue_begin_end_day) %> -
-<% end %> + <%= error_messages_for 'query' %> + <% if @query.valid? %> + <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %> ++ <%= l(:text_tip_issue_begin_day) %> + <%= l(:text_tip_issue_end_day) %> + <%= l(:text_tip_issue_begin_end_day) %> +
+ <% end %> -<% content_for :sidebar do %> - <%= render :partial => 'issues/sidebar' %> -<% end %> + <% content_for :sidebar do %> + <%= render :partial => 'issues/sidebar' %> + <% end %> -<% html_title(l(:label_calendar)) -%> - - + <% html_title(l(:label_calendar)) -%> +您尚未登录,登录 @@ -75,8 +75,8 @@
+ |
+
+ |
+
-<%= text_field_tag 'months', @gantt.months, :size => 2 %> -<%= l(:label_months_from) %> -<%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %> -<%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %> -<%= hidden_field_tag 'zoom', @gantt.zoom %> +
+ <%= text_field_tag 'months', @gantt.months, :size => 2 %> + <%= l(:label_months_from) %> + <%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %> + <%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %> + <%= hidden_field_tag 'zoom', @gantt.zoom %> -<%= link_to_function l(:button_apply), '$("#query_form").submit()', - :class => 'icon icon-checked' %> -<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, - :class => 'icon icon-reload' %> -
-<% end %> + <%= link_to_function l(:button_apply), '$("#query_form").submit()', + :class => 'icon icon-checked' %> + <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, + :class => 'icon icon-reload' %> + + <% end %> -<%= error_messages_for 'query' %> -<% if @query.valid? %> -<% - zoom = 1 - @gantt.zoom.times { zoom = zoom * 2 } + <%= error_messages_for 'query' %> + <% if @query.valid? %> + <% + zoom = 1 + @gantt.zoom.times { zoom = zoom * 2 } - subject_width = 330 - header_height = 18 + subject_width = 330 + header_height = 18 - headers_height = header_height - show_weeks = false - show_days = false + headers_height = header_height + show_weeks = false + show_days = false - if @gantt.zoom > 1 - show_weeks = true - headers_height = 2 * header_height - if @gantt.zoom > 2 - show_days = true - headers_height = 3 * header_height - end - end + if @gantt.zoom > 1 + show_weeks = true + headers_height = 2 * header_height + if @gantt.zoom > 2 + show_days = true + headers_height = 3 * header_height + end + end - # Width of the entire chart - g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i - @gantt.render(:top => headers_height + 8, - :zoom => zoom, - :g_width => g_width, - :subject_width => subject_width) - g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max - t_height = g_height + headers_height -%> + # Width of the entire chart + g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i + @gantt.render(:top => headers_height + 8, + :zoom => zoom, + :g_width => g_width, + :subject_width => subject_width) + g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max + t_height = g_height + headers_height + %> -<%# if @gantt.truncated %> - -<%# end %> + <%# if @gantt.truncated %> + + <%# end %> -
- <%
- style = ""
- style += "position:relative;"
- style += "height: #{t_height + 24}px;"
- style += "width: #{subject_width + 1}px;"
- %>
- <%= content_tag(:div, :style => style) do %>
+
|
-
- <%= link_to_content_update("\xc2\xab " + l(:label_previous), - params.merge(@gantt.params_previous)) %> - | -- <%= link_to_content_update(l(:label_next) + " \xc2\xbb", - params.merge(@gantt.params_next)) %> - | -
- - <%= check_box_tag 'copy_subtasks', '1', @copy_subtasks %> -
- <% end %> -