diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 69a3a8398..20175dc57 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -49,16 +49,6 @@ module ApplicationHelper end end - def get_project_type_css(value) - if value == 1 - "pr_kafa" - elsif value == 2 - "pr_keyan" - else - "pr_friend" - end - end - # Time 2015-03-24 16:38:05 # Author lizanle # Description after save后需要进行资源记录的更新 @@ -1830,8 +1820,15 @@ module ApplicationHelper candown end - def project_type_link text - link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type" + def project_type_link(text, value) + if value == 1 + link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type" + elsif value == 2 + link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type" + else + link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type" + end + end private diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 31748014f..7c6594006 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -33,14 +33,9 @@ <% if !User.current.logged? %> -
- <% if @project.project_type == 1 %> - <%= l(:label_user_login_course_board) %> - <% else %> - <%= l(:label_user_login_project_board) %> - <% end %> - <%= link_to l(:label_user_login_new), signin_path %> -
+
+ <%= l(:label_user_login_project_board) %> + <%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %>
<% end %> diff --git a/app/views/layouts/_join_exit_project.html.erb b/app/views/layouts/_join_exit_project.html.erb index d52ecbb76..67744e4b8 100644 --- a/app/views/layouts/_join_exit_project.html.erb +++ b/app/views/layouts/_join_exit_project.html.erb @@ -10,6 +10,6 @@ <% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %> <%= link_to "#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %> - <%= link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%> + <%= link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%> <% end %>
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index ed7a5a4dc..8890e88a4 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -42,19 +42,19 @@ function (data) { if(data == 1) { - $("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_development_team)))%>"); + $("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_development_team), 1))%>"); $("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_development_group')) %>'); $("#close_light").attr("onClick","close_window('development_group');"); } else if(data == 2) { - $("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_research_group)))%>"); + $("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_research_group), 2))%>"); $("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_research_team')) %>'); $("#close_light").attr("onClick","close_window('research_group');"); } else if(data == 3) { - $("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_friend_organization)))%>"); + $("#setting_project_type").replaceWith("<%= escape_javascript(project_type_link(l(:label_friend_organization), 3))%>"); $("#project_memu_list").html('<%= escape_javascript(render(:partial => 'layouts/base_friend_group')) %>'); $("#close_light").attr("onClick","close_window('friend_organization');"); } @@ -116,7 +116,8 @@
<% text = @project.project_new_type == 1 ? l(:label_development_team) : (@project.project_new_type == 2 ? l(:label_research_group) : l(:label_friend_organization))%> - <%= render 'layouts/join_exit_project',{:text => text} %> + <% typeclass = @project.project_new_type == 1 ? "pr_kafa" : (@project.project_new_type == 2 ? "pr_keyan" : "pr_friend")%> + <%= render 'layouts/join_exit_project',{:text => text, :typeclass => typeclass} %>
@@ -160,7 +161,9 @@ <% end %> diff --git a/app/views/projects/_project_member_list.html.erb b/app/views/projects/_project_member_list.html.erb index 72dd4ded2..fbaa837ac 100644 --- a/app/views/projects/_project_member_list.html.erb +++ b/app/views/projects/_project_member_list.html.erb @@ -8,8 +8,12 @@ <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 32, :height => 32)) %> + <%= l(:label_user_for_project_grade) %>:<%= format("%.2f" ,read_user_project_scores(member.user,@project)).to_i %> + <%= l(:label_username)%> - <%= link_to(member.user.name, user_path(member.user),:class => "ml10 c_blue02") %> + <%= link_to(member.user.name, user_path(member.user),:class => "ml10 c_blue02") %>(<%= rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ') %>)
+ + <%= format_date(member.created_on)%>
diff --git a/config/configuration.yml b/config/configuration.yml index a62cb590b..415d4b072 100644 --- a/config/configuration.yml +++ b/config/configuration.yml @@ -83,12 +83,12 @@ default: email_delivery: delivery_method: :smtp smtp_settings: - address: smtp.126.com + address: smtp.163.com port: 25 - domain: smtp.126.com + domain: smtp.163.com authentication: :plain - user_name: "alanlong9278@126.com" - password: 'alanlong8788786' + user_name: "huang.jingquan@163.com" + password: 'xinhu1ji2qu366' # Absolute path to the directory where attachments are stored. # The default is the 'files' directory in your Redmine instance.