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 << %(#{groups}) + 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 @@ - -
-
-
- 编辑帖子 -
-
- <%= render :partial => 'boards/project_new_topic', - :locals => {:f => f, :edit_mode => edit_mode, :topic => topic, :project => project} %> + +
+ + <%= render :partial => 'boards/project_new_topic', + :locals => {:f => f, :edit_mode => edit_mode, :topic => topic, :project => project} %>
\ No newline at end of file diff --git a/app/views/boards/_project_new.html.erb b/app/views/boards/_project_new.html.erb index 551c7a541..a684e53e8 100644 --- a/app/views/boards/_project_new.html.erb +++ b/app/views/boards/_project_new.html.erb @@ -3,11 +3,11 @@ <% end %> <%= error_messages_for 'message' %> -
+
-
+
- +