diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 91f04b4d2..21a474e89 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -77,7 +77,7 @@ class MyController < ApplicationController # ue.save # end - # added by bai 往数据库里写职业、性别和地区 + # added by bai if @user.user_extensions.nil? se = UserExtensions.new se.user_id = @user.id diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 9ad847dde..67c0edb23 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -366,7 +366,7 @@ class ProjectsController < ApplicationController r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first m = Member.new(:user => User.current, :roles => [r]) project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id) - if params[:project][:is_public] == 1 + if params[:project][:is_public] == '1' || @course_tag=="1" project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0) end @project.members << m diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b8a3fd791..54ab7b76b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -977,7 +977,7 @@ module ApplicationHelper end def lang_options_for_select(blank=true) - (blank ? [["(auto)", ""]] : []) + languages_options + { 'Chinese绠浣撲腑鏂 '=> 'zh', :English => :en} end def label_tag_for(name, option_tags = nil, options = {}) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 7dac3bf47..1b8340721 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -138,9 +138,9 @@ module ProjectsHelper type = [] option1 = [] option2 = [] - option1 << '作业最终以附件形式提交' + option1 << '浣滀笟鏈缁堜互闄勪欢褰㈠紡鎻愪氦' option1 << 1 - option2 << '作业最终以项目形式提交' + option2 << '浣滀笟鏈缁堜互椤圭洰褰㈠紡鎻愪氦' option2 << 2 type << option1 type << option2 diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 32b546078..c813714d3 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -64,9 +64,9 @@ module UsersHelper # added by fq # def show_activity(state) @@ -95,16 +95,16 @@ module UsersHelper content = ''.html_safe case state when 0 - s = content_tag('span', '我的课程', :class => "current-page") + s = content_tag('span', '鎴戠殑璇剧▼', :class => "current-page") content << content_tag('li', s) - content << content_tag('li', link_to('我的作业', {:controller => 'users', :action => 'user_courses', :type => 1})) + content << content_tag('li', link_to('鎴戠殑浣滀笟', {:controller => 'users', :action => 'user_courses', :type => 1})) when 1 - s = content_tag('span', '我的作业', :class => "current-page") - content << content_tag('li', link_to('我的课程', {:controller => 'users', :action => 'user_courses'})) + s = content_tag('span', '鎴戠殑浣滀笟', :class => "current-page") + content << content_tag('li', link_to('鎴戠殑璇剧▼', {:controller => 'users', :action => 'user_courses'})) content << content_tag('li', s, :class => "current-page") when 2 - s = content_tag('span', '课程通知', :class => "current-page") - content << content_tag('li', link_to('课程通知', {:controller => 'users', :action => 'user_courses'})) + s = content_tag('span', '璇剧▼閫氱煡', :class => "current-page") + content << content_tag('li', link_to('璇剧▼閫氱煡', {:controller => 'users', :action => 'user_courses'})) content << content_tag('li', s, :class => "current-page") end content_tag('div', content, :class => "pagination") diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb index 26ce15af6..ce666940e 100644 --- a/app/views/account/register.html.erb +++ b/app/views/account/register.html.erb @@ -1,173 +1,173 @@ - + - -

<%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %>

@@ -253,29 +211,14 @@ <%="#{l(:label_mail_attention)} "%>

<%= f.select :language, lang_options_for_select %>

- +

-
<%= l(:label_identity) %> * - - - - - -

- - + <%= select_tag 'identity', " + + ".html_safe %>

@@ -283,56 +226,54 @@ <%= select_tag 'gender', "".html_safe %>
<%= l(:label_gender) %>

-

+

<%= l(:label_location) %>
<%= l(:label_location) %> *

-

<%= submit_tag l(:button_submit) %>

<% end %> - <% if Setting.openid? %>

<%= f.text_field :identity_url %>

<% end %> diff --git a/app/views/bids/_bid_show.html.erb b/app/views/bids/_bid_show.html.erb index 21e4e30bb..d3f1cbb74 100644 --- a/app/views/bids/_bid_show.html.erb +++ b/app/views/bids/_bid_show.html.erb @@ -17,15 +17,11 @@ <% unless bid.reward_type == 3 %> - <%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>) - <%= l(:label_x_bids_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) - <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + <%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>)<%= l(:label_x_bids_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) <% else %> - <%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>) - <%= l(:label_x_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) - <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + <%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>) <%= l(:label_x_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) <% end %> @@ -51,61 +47,3 @@