diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index dc7036f6a..0335bd09a 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -150,7 +150,7 @@ class AccountController < ApplicationController #added by bai unless @user.id.nil? - UserExtensions.create(:identity => params[:identity].to_i, :user_id => @user.id) + UserExtensions.create(:identity => params[:identity].to_i,:gender => params[:gender].to_i,:location => params[:province]+params[:city], :user_id => @user.id) end #end diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index d5a4834a4..e83a160c5 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -77,15 +77,19 @@ class MyController < ApplicationController # ue.save # end - # added by bai - if @user.UserExtensions.nil? + # added by bai 往数据库里写职业、性别和地区 + if @user.user_extensions.nil? se = UserExtensions.new se.user_id = @user.id - se.occupation = params[:occupation] + se.occupation = params[:occupation] + se.gender = params[:gender] + se.location = params[:province]+params[:city] se.save else se = @user.user_extensions se.occupation = params[:occupation] + se.gender = params[:gender] + se.location = params[:province]+params[:city] se.save end # end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index c23be398c..1fbcec3ec 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -510,8 +510,9 @@ class ProjectsController < ApplicationController # @course_tag = params[:course] # if @course_tag == '1' if @project.project_type == 1 + @course = Course.find_by_extra(@project.identifier) render :layout => 'base_courses' - else + else render :layout => 'base_projects' end #Ended by young @@ -553,6 +554,9 @@ class ProjectsController < ApplicationController def update @project.safe_attributes = params[:project] if validate_parent_id && @project.save + @course = Course.find_by_extra(@project.identifier) + @course.state = params[:project][:course][:state] + @course.save @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') respond_to do |format| format.html { diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 20246bc45..0596f9693 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -17,7 +17,7 @@ class UsersController < ApplicationController layout 'base_users' #Added by young - menu_item :activity + menu_item :activity menu_item :user_information, :only => :info menu_item :user_project, :only => :user_projects menu_item :requirement_focus, :only => :watch_bids @@ -32,7 +32,7 @@ class UsersController < ApplicationController accept_api_auth :index, :show, :create, :update, :destroy,:tag_save #william - before_filter :require_login,:only => :tag_save + before_filter :require_login, :only => :tag_save helper :sort diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 9a31927ce..171b2f0c0 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -123,6 +123,13 @@ class WordsController < ApplicationController # redirect_to signin_path end + def add_brief_introdution + user = User.current + message = params[:new_form][:user_introduction] + UserExtensions.introduction(user, message) + redirect_to user_path(user.id) + end + private def find_user diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 74d495f08..b23d1174c 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 3e4700cff..c1388f6eb 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) diff --git a/app/models/project.rb b/app/models/project.rb index 22ab9c299..3a95ff603 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -63,6 +63,7 @@ class Project < ActiveRecord::Base #ADDED BY NIE has_many :project_infos, :dependent => :destroy has_one :project_status, :class_name => "ProjectStatus", :dependent => :destroy + has_one :project_status, :class_name => "ProjectStatus", :dependent => :destroy #end has_one :wiki, :dependent => :destroy diff --git a/app/models/user.rb b/app/models/user.rb index 7185041ae..93f4cb83c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -87,6 +87,7 @@ class User < Principal has_many :students_for_courses, :dependent => :destroy has_many :courses, :through => :students_for_courses, :source => :project has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy + has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy ##### ######added by nie diff --git a/app/models/user_extension.rb b/app/models/user_extension.rb deleted file mode 100644 index cdfad28c6..000000000 --- a/app/models/user_extension.rb +++ /dev/null @@ -1,11 +0,0 @@ -class UserExtension < ActiveRecord::Base - attr_accessible :birthday, :brief_introduction, :fans_num, :finish_project_num, :follow_num, :gender, :good_num, :location, :occupation, :publish_requirement_num, :user_id, :work_experience, :zip_code - - belongs_to :user - validate :validate_user - - def validate_user - errors.add :user_id, :invalid if user.nil? || !user.active? || User.current != user_id - end - -end diff --git a/app/models/user_extensions.rb b/app/models/user_extensions.rb index 11df8958d..e1b5d049c 100644 --- a/app/models/user_extensions.rb +++ b/app/models/user_extensions.rb @@ -17,4 +17,17 @@ class UserExtensions < ActiveRecord::Base def get_brief_introduction return self.brief_introduction end + + def self.introduction(user, message) + unless user.user_extensions.nil? + info = user.user_extensions + info.brief_introduction = message + info.save + else + info = UserExtensions.new + info.user_id = user.id + info.brief_introduction = message + info.save + end + end end diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb index 292cf9a74..1f09ba6ab 100644 --- a/app/views/account/register.html.erb +++ b/app/views/account/register.html.erb @@ -1,4 +1,195 @@ -

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

+ + + + + +

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

<%= labelled_form_for @user, :url => register_path do |f| %> <%= error_messages_for 'user' %> @@ -20,9 +211,49 @@ <%="#{l(:label_mail_attention)} "%>

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

- +

<%= l(:label_identity) %><%= select_tag 'identity', "".html_safe %>

+

<%= l(:label_gender) %><%= select_tag 'gender', "".html_safe %>

+

<%= l(:label_location) %> +

<% if Setting.openid? %> diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb new file mode 100644 index 000000000..72a88cb32 --- /dev/null +++ b/app/views/bids/_bid_homework_show.html.erb @@ -0,0 +1,54 @@ + + <% bids.each do |bid|%> + + + + + + +
<%= link_to(image_tag(url_to_avatar(bid.author), :class => 'avatar'), user_path(bid.author), :class => "avatar") %> + + + + + + + + + + + +
<%= link_to(bid.author.lastname+bid.author.firstname, user_path(bid.author), :class => 'bid_user') %>:  <%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %>
+ + + + + +
+ <% if bid.reward_type.nil? or bid.reward_type == 1 %> + <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%> + <% elsif bid.reward_type == 2 %> + <%= l(:label_bids_reward_method) %><%= bid.budget%> + <% else %> + + <% end %> + + +
+ <%= 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) %>) +
<%= format_time bid.created_on %>
+
+ + + + +
<%= bid.description%>
+
+<% end %> + + diff --git a/app/views/bids/_bid_show.html.erb b/app/views/bids/_bid_show.html.erb index 3bbf427e5..0473fecf4 100644 --- a/app/views/bids/_bid_show.html.erb +++ b/app/views/bids/_bid_show.html.erb @@ -1,5 +1,4 @@ - <% bids.each do |bid|%> diff --git a/app/views/bids/_history.html.erb b/app/views/bids/_history.html.erb index aac579d7b..922c6445c 100644 --- a/app/views/bids/_history.html.erb +++ b/app/views/bids/_history.html.erb @@ -1,7 +1,14 @@ -
- - +
<%=l(:label_user_response)%>
+ + <% else %> + + <% end %> + +
+ + <% if @bid.reward_type ==3 %> + <%=l(:label_student_response)%><%=l(:label_user_response)%>
@@ -18,8 +25,13 @@ <%= link_to image_tag(url_to_avatar(journal.user), :class => "avatar"), user_path(journal.user), :class => "avatar" %> - + <% if @bid.reward_type == 3 %> + + <% else %> + + <% end %> + diff --git a/app/views/bids/_new.html.erb b/app/views/bids/_new.html.erb index ad48a979f..d57a26d72 100644 --- a/app/views/bids/_new.html.erb +++ b/app/views/bids/_new.html.erb @@ -65,14 +65,18 @@ <% if User.current.logged? %>
<%=link_to journal.user, user_path(journal.user)%> <%= l(:label_respond_requirement) %> <%=link_to journal.user, user_path(journal.user)%> <%= l(:label_question_requirement) %> <%=link_to journal.user, user_path(journal.user)%> <%= l(:label_respond_requirement) %>

<%= textilizable journal.notes%>

- + <% if @bid.reward_type ==3 %> + + <% else %> + + <% end %>
<%= f.text_area 'message', :rows => 3, :cols => 65, :value => "#{l(:label_my_respond)}", :onfocus => "clearInfo('bid_message_message', '#{l(:label_my_respond)}')", :onblur => "showInfo('bid_message_message', '#{l(:label_my_respond)}')", :style => "resize: none;", :class => 'noline'%><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_question), :style => "resize: none;", :class => 'noline'%><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%>
<%= f.text_field :reference_user_id, :style=>"display:none"%> + <%= submit_tag l(:button_clear_requirement), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%> - <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
<% else %> diff --git a/app/views/bids/_project_homework.html.erb b/app/views/bids/_project_homework.html.erb new file mode 100644 index 000000000..bfe86c75c --- /dev/null +++ b/app/views/bids/_project_homework.html.erb @@ -0,0 +1,51 @@ + +<%= render_flash_messages %> + + + <% if User.current.logged? %> + + <% end %> +
<%= l(:label_bidding_project) %>(<%= @bidding_project.count%>) +
+ <%= toggle_link l(:button_bidding), 'put-bid-form' %> +
+ +<% @bidding_project.each do |b_project|%> + + + + +
+ + + + + + +
+
+ <%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %> +
+ + + + + + + + + + + +
<%= link_to(b_project.project.name, project_path(b_project.project)) %><%= l(:label_join_bidding)%>
<%= b_project.project.description %>
<%= b_project.created_at%>
+
+ + + + + + + +
<%= l(:label_bidding_user) %><%= link_to(b_project.user.name, user_path(b_project.user)) %>
<%= l(:label_bidding_reason) %><%= b_project.description %>
+
+<% end %> diff --git a/app/views/bids/_project_list.html.erb b/app/views/bids/_project_list.html.erb index bfe86c75c..a852a07b5 100644 --- a/app/views/bids/_project_list.html.erb +++ b/app/views/bids/_project_list.html.erb @@ -1,5 +1,59 @@ <%= render_flash_messages %> +<% if @bid.reward_type == 3 %> + + + <% if User.current.logged? %> + + <% end %> +
<%= l(:label_homework_project) %>(<%= @bidding_project.count%>) +
+ <%= toggle_link l(:button_bidding_homework), 'put-bid-form' %> +
+ +<% @bidding_project.each do |b_project|%> + + + + +
+ + + + + + +
+
+ <%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %> +
+ + + + + + + + + + + +
<%= link_to(b_project.project.name, project_path(b_project.project)) %><%= l(:label_jion_bidding_homework)%>
<%= b_project.project.description %>
<%=format_time(b_project.created_at) %>
+
+ + + + + + + +
<%= l(:label_bidding_user_homework) %> : <%= link_to(b_project.user.name, user_path(b_project.user)) %>
<%= l(:label_bidding_reason_homewrok) %> : <%= b_project.description %>
+
+<% end %> + + + + <% else %> <% if User.current.logged? %> @@ -49,3 +103,4 @@
<%= l(:label_bidding_project) %>(<%= @bidding_project.count%>)
<% end %> +<% end %> diff --git a/app/views/bids/show.html.erb b/app/views/bids/show.html.erb index 916c0a3a0..8de10a8a2 100644 --- a/app/views/bids/show.html.erb +++ b/app/views/bids/show.html.erb @@ -4,7 +4,7 @@ <%= link_to image_tag(url_to_avatar(@bid.author), :class => "avatar"), user_path(@bid.author), :class => "avatar" %> - + + <% if @bid.reward_type == 3 %> - + + <% else %> + + + + <% end %> + diff --git a/app/views/layouts/base_bids.html.erb b/app/views/layouts/base_bids.html.erb index 03717da65..eff2cd6f7 100644 --- a/app/views/layouts/base_bids.html.erb +++ b/app/views/layouts/base_bids.html.erb @@ -62,9 +62,9 @@

<%= link_to(@bid.author.name, user_path(@bid.author))%>锛<%= @bid.name %>

<%= link_to(@bid.author.firstname+@bid.author.lastname, user_path(@bid.author))%>锛<%= @bid.name %>

@@ -49,7 +49,7 @@ diff --git a/app/views/bids/show_project.html.erb b/app/views/bids/show_project.html.erb index dc842d9ab..855ec30f4 100644 --- a/app/views/bids/show_project.html.erb +++ b/app/views/bids/show_project.html.erb @@ -71,11 +71,15 @@
<%= select_tag 'bid', options_for_select(@option), :name => 'bid', :class => 'grayline' %>
<%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, - :onfocus => "clearInfo('bid_message','#{l(:label_bid_reason)}')", :onblur => "showInfo('bid_message','#{l(:label_bid_reason)}')", - :value => "#{l(:label_bid_reason)}", :style => "resize: none;", :class => 'noline'%><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :placeholder => l(:label_bid_reason_homework), :style => "resize: none;", :class => 'noline'%>
<%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :placeholder => l(:label_bid_reason), :style => "resize: none;", :class => 'noline'%>
<%= submit_tag l(:button_add), :name => nil , :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -30px'"%> <%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 8eb713696..3485f0c08 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -18,7 +18,7 @@ <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %> <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %> - 鎻忚堪 <%= sort_header_tag('description', :caption => l(:field_description)) %>
- <%= link_to l(:label_followers)+"("+@bid.watcher_users.count.to_s+")", respond_path(@bid) %>   + <%= link_to l(:label_x_followers, :count => @bid.watcher_users.count)+"("+@bid.watcher_users.count.to_s+")", respond_path(@bid) %>   <%= link_to l(:label_bidding_project)+"("+@bid.biding_projects.count.to_s+")", project_for_bid_path(@bid) %>  - <%= link_to l(:label_responses)+"("+@bid.commit.to_s+")", respond_path(@bid)%> + <%= link_to l(:label_x_responses, :count => @bid.commit)+"("+@bid.commit.to_s+")", respond_path(@bid)%>
@@ -82,7 +82,7 @@
- <%= l(:label_followers) %> + <%= l(:label_x_followers, :count => @bid.watcher_users.count) %>
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 076eb1812..163e6fef3 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -35,9 +35,9 @@ <%= link_to image_tag(url_to_avatar(@project), :class => 'avatar2') %>
- <%= textilizable @project.name %> - <%= join_in_course(@project, User.current)%> + <%= textilizable @project.name %>
+ <%= join_in_course(@project, User.current)%> @@ -68,14 +68,17 @@
- + + + + - - - + +
涓昏鑰佸笀锛<%= @course.teacher.firstname+@course.teacher.lastname %>
涓昏鑰佸笀锛<%= @course.teacher.name %>
鏁欏笀鍗曚綅锛PDL(鏈畾)
@@ -116,8 +119,8 @@ -
-
+ +
diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index a93780a3b..0fddf1862 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -35,17 +35,18 @@ - + - + +
<%= h @bid.name %>浣滀笟
<%= watcher_link(@bid, User.current) %> <%= h @bid.name %>
- + diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 8641e3138..043baec3e 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -33,7 +33,14 @@ + + + + + + <% unless @user.user_extensions.nil? %> + + + + + + + <% else%> + + + + + + + <% end %> + +
<%= l(:label_teacher) %> : <%= link_to(@user, user_path(@user))%><%= l(:label_teacher) %> : <%= link_to(@user.firstname+@user.lastname, user_path(@user))%>
<%= l(:label_course_homework) %> : <%= link_to(@bid.courses.first.name, project_path(@bid.courses.first))%> - @@ -50,7 +57,31 @@ <%=link_to l(:label_user_watcher)+"("+User.watched_by(@user.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist"%>   <%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users(@user.id).count.to_s+")", :controller=>"users", :action=>"user_fanslist" %> + +

<%= toggle_link l(:label_brief_introduction), 'introduction', {:focus => 'new_form_project_message'} %>

+ + <% unless @user.user_extensions.nil? %> + <%= @user.user_extensions.brief_introduction %> + <% end %> +
<%= h @user.lastname<<@user.firstname %> <%=image_tag("/images/sidebar/male.png", weight:"11px", height:"11px") %> + <%= h @user.lastname<<@user.firstname %> + + <% unless @user.user_extensions.nil?%> + <% if @user.user_extensions.gender == 1 %> <%=image_tag("/images/sidebar/female.png", weight:"22px", height:"22px") %> + <% else %> <%=image_tag("/images/sidebar/male.png", weight:"25px", height:"25px") %> <% end %> + <% else %> <%=image_tag("/images/sidebar/male.png", weight:"25px", height:"25px") %> <% end %> + +
+ + + + +
<%= f.text_area 'user_introduction', :rows => 3, :cols => 65, :placeholder => "#{l(:label_my_brief_introduction)}", :style => "resize: none;", :class => 'noline'%>
+ + + + +
<%= submit_tag l(:button_submit), :name => nil , :class => "bid_btn" %>
+ <% end %> + +
@@ -66,6 +97,28 @@
<%= l(:label_user_mail) %><%= mail_to(h(@user.mail), nil, :encode => 'javascript') %>
<%= l(:field_occupation) %><%= @user.user_extensions.occupation %>
<%= l(:label_location) %><%= @user.user_extensions.location %>
<%= l(:field_occupation) %>
<%= l(:label_location) %>
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 9a89af75c..7d9f4198b 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -31,14 +31,300 @@

<%= f.text_field :lastname, :required => true %>

+ + + <% unless @user.user_extensions.nil? %> + <% if @user.user_extensions.gender == 0 %> +

+ <%= l(:label_gender) %><%= select_tag 'gender', "".html_safe ,:class =>'gender' %> +

+ + <% else %> +

+ <%= l(:label_gender) %><%= select_tag 'gender', "".html_safe %> +

+

+ <% end %> + <% else %> +

<%= l(:label_gender) %><%= select_tag 'gender', "".html_safe %>

+

+ <% end %> + + +

<%= f.text_field :mail, :required => true %>

+

+ <%else%>

<%= l(:field_occupation)%><%= text_field_tag "occupation"%> -

+

+ <%end%> + + + + + + +

<%= l(:label_location) %> +

+ + <% if Setting.openid? %>

<%= f.text_field :identity_url %> diff --git a/app/views/projects/_course_form.html.erb b/app/views/projects/_course_form.html.erb index 91700c1ef..5a346f735 100644 --- a/app/views/projects/_course_form.html.erb +++ b/app/views/projects/_course_form.html.erb @@ -10,13 +10,14 @@ <% unless @project.identifier_frozen? %> <%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %> <% end %>

-<% if @project.new_record? %> + + <%= f.fields_for @course do |m| %>

<%= m.text_field :state, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %>

<%= l(:text_command) %> -<% end %> + <% end %>

<%= f.text_field :project_type, :value => 1 %>

diff --git a/app/views/projects/_homework_form.html.erb b/app/views/projects/_homework_form.html.erb index 46be3ba9c..e4a471367 100644 --- a/app/views/projects/_homework_form.html.erb +++ b/app/views/projects/_homework_form.html.erb @@ -22,19 +22,19 @@ <%= error_messages_for 'bid' %> -

<%= l(:label_bids_form_new_description) %>

-

<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_requirement_name)}" %>

+

<%= l(:label_homeworks_form_new_description) %>

+

<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT %>

-

<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_requirement_description)}" %>

+

<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>

-

<%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%> +

<%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>

-

<%= f.select :homework_type, homework_type_option%> +

<%= f.select :homework_type, homework_type_option %>

-

<%= hidden_field_tag 'course_id', @project.id%> +

<%= hidden_field_tag 'course_id', @project.id %>

<%= l(:label_attachment_plural) %>

<%= render :partial => 'attachments/form', :locals => {:container => @homework} %>

diff --git a/app/views/projects/homework.html.erb b/app/views/projects/homework.html.erb index c16aa465a..8db482544 100644 --- a/app/views/projects/homework.html.erb +++ b/app/views/projects/homework.html.erb @@ -23,6 +23,6 @@
- <%= render :partial => 'bids/bid_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %> + <%= render :partial => 'bids/bid_homework_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 804e12537..d354aa12a 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -35,6 +35,21 @@
--> + + +
<%= render_project_hierarchy(@projects)%>
diff --git a/app/views/users/watch_bids.html.erb b/app/views/users/watch_bids.html.erb index 4cb39a9cd..17b8dd0ab 100644 --- a/app/views/users/watch_bids.html.erb +++ b/app/views/users/watch_bids.html.erb @@ -18,20 +18,20 @@
<% if bid.reward_type.nil? or bid.reward_type == 1%> - <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%> + <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%> <% elsif bid.reward_type == 2%> - <%= l(:label_bids_reward_method) %><%= bid.budget%> + <%= l(:label_bids_reward_method) %><%= bid.budget%> <% else %> - <%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= bid.budget%> <%= l(:label_bids_credit_number) %> + <%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= bid.budget%> <%= l(:label_bids_credit_number) %> <% end %>
- <%= l(:label_biding_project) %>(<%=link_to bid.biding_projects.count, project_for_bid_path(bid) %>) - <%= l(:label_responses) %>(<%=link_to bid.commit, respond_path(bid) %>) - <%= l(:label_followers) %>(<%=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_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) %>)
diff --git a/config/locales/en.yml b/config/locales/en.yml index 86cf3b772..e4f9941f2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1411,6 +1411,17 @@ en: label_in_bids: in the call锛 label_in_users: in the user锛 label_user_create_project: has created + +#added by bai + label_identity: Identity + label_teacher: Teacher + label_student: Student + label_other: Other + label_gender: Gender + label_gender_male: male + label_gender_female: female + label_location: Location +#end label_course: Course label_course_new: New course label_public_info: If you don't choose public, only the project's members can see the project. @@ -1420,3 +1431,4 @@ en: label_course_homework_list: Homework List label_course_homework_new: new homework label_course_data: Data + diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 36f7e558b..161b0c5d9 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -586,7 +586,7 @@ zh: label_news_added: 鏂伴椈宸叉坊鍔 label_settings: 閰嶇疆 label_overview: 璇剧▼鍔ㄦ - label_question_student: 闂鍜ㄨ #huang + label_question_student: 瀛︾敓鎻愰棶 #huang label_homework_commit: 鎻愪氦浣滀笟 #huang label_course_file: 璧勬枡涓嬭浇 label_course_news: 璇剧▼閫氱煡 @@ -894,6 +894,7 @@ zh: button_apply: 鏌ヨ button_clear: 鍙栨秷鏌ヨ + button_clear_requirement: 鍙栨秷 button_lock: 閿佸畾 button_unlock: 瑙i攣 button_download: 涓嬭浇 @@ -1237,6 +1238,8 @@ zh: #added by liuping button_unfollow: 鍙栨秷鍏虫敞 button_follow: 鍏虫敞 + label_followers: 鍏虫敞 + label_responses: 鐣欒█ label_delete_confirm: 纭鍒犻櫎锛 label_more_tags: 鏇村 label_tags_bid: 闇姹傚悕绉 @@ -1253,8 +1256,11 @@ zh: field_add: 娣诲姞浜 %{time} 涔嬪墠 button_more: 鏇村 label_user_response: 鐢ㄦ埛鍙嶉 + label_student_response: 瀛︾敓鍙嶉 label_bidding_project: 鍙備笌椤圭洰 + label_homework_project: 宸叉彁浜や綔涓 #huang button_bidding: 鎴戣鍙傚姞 + button_bidding_homework: 鎻愪氦浣滀笟 #huang field_homework_type: 浣滀笟绫诲瀷 label_homework_respond: 浣滀笟鎯呭喌 @@ -1273,11 +1279,21 @@ zh: one: 椤圭洰 other: 椤圭洰 #end + label_x_homework_project: #modify by huang + zero: 宸叉彁浜ょ殑浣滀笟 + one: 宸叉彁浜ょ殑浣滀笟 + other: 宸叉彁浜ょ殑uzoye + #end label_x_responses: #modify by men zero: 鐣欒█ one: 鐣欒█ other: 鐣欒█ #end + label_x_responses: #modify by huang + zero: 瀛︾敓鎻愰棶 + one: 瀛︾敓鎻愰棶 + other: 瀛︾敓鎻愰棶 + #end label_x_followers: #modify by men zero: 鍏虫敞 one: 鍏虫敞 @@ -1288,7 +1304,9 @@ zh: label_investment_budget: 鎶曡祫棰勭畻锛 label_investment_time_limit: 鎶曡祫鏃堕檺锛 label_my_respond: 鎴戣鍙嶉锛 + label_my_question: 鏈夌枒闂鍦ㄦ澶勬彁鍑猴紒 label_respond_requirement: 瀵归渶姹傝繘琛屼簡鍙嶉 + label_question_requirement: 瀵逛綔涓氭彁鍑轰簡闂锛 label_deadline: 鎶曡祫鏃堕檺yyyy-mm-dd label_requirement_name: 涓轰綘鐨勯渶姹傝捣涓悕瀛梸~ label_requirement_description: 鍐呭锛氬浣犵殑闇姹傝繘琛屾弿杩 @@ -1302,6 +1320,7 @@ zh: label_praise: 璧 label_cancel_praise: 鍙栨秷璧 label_bid_reason: 璇疯緭鍏ュ弬涓庣悊鐢 + label_bid_reason_homework: 璇疯緭鍏ヤ綔涓氭彁浜よ鏄庯紒 label_create_new_projects: 鍒涘缓椤圭洰 label_call_for_bids: 鍙戝竷闇姹 label_create_course: 鍒涘缓璇剧▼ @@ -1321,8 +1340,11 @@ zh: label_my: 鎴 label_i: 鎴 label_join_bidding: 鍙備笌浜嗗簲鏍 + label_jion_bidding_homework: 宸叉彁浜わ紒 label_bidding_user: 搴旀爣浜猴細 + label_bidding_user_homework: 浣滀笟鎻愪氦鑰 label_bidding_reason: 搴旀爣瀹h█锛 + label_bidding_reason_homewrok: 浣滀笟鎻愪氦璇存槑 label_username: 鐢ㄦ埛鍚嶏細 label_password: 瀵嗙爜锛 label_about_requirement: 瀵归渶姹傦細 @@ -1382,7 +1404,8 @@ zh: label_girl: 濂 field_gender: 鎬у埆 field_birthday: 鐢熸棩 - field_brief_introduction: 涓汉绠浠 + field_brief_introduction: 涓汉绠浠 + field_location: 鐜颁綇鍧 field_occupation: 宸ヤ綔鍗曚綅 field_work_experience: 宸ヤ綔缁忛獙(骞) field_zip_code: 閭紪 @@ -1413,6 +1436,7 @@ zh: label_bids_reward_what: 杈撳叆濂栧姳鍐呭 label_call_bonus: 濂栭噾 label_bids_form_new_description: 鍙戝竷涓涓渶姹傦紝涓娆$珵璧涙垨鑰呬竴涓绋嬬殑浣滀笟 + label_homeworks_form_new_description: 鍙戝竷涓涓綔涓氾紝浣滀笟鎻愪氦鏂瑰紡鍙互鏄檮浠舵垨鑰呴」鐩舰寮忥紝鍦ㄤ綔涓氱被鍨嬮噷闈㈣缃 label_bids_new_money: 杈撳叆濂栧姳閲戦锛屽 500,2.5绛 label_bids_new_credit: 杈撳叆璇ヤ綔涓氬搴旇绋嬬殑瀛﹀垎锛屽 3,2.5绛 label_bids_new_content: 杈撳叆濂栧姳鍐呭锛屽 濂栭」锛岀墿鍝佺瓑 @@ -1450,15 +1474,19 @@ zh: button_projects_feedback_respond: 鍥炲 label_projects_feedback_respond_content: 璇疯緭鍏ュ洖澶嶅唴瀹 label_user_create_project: 鍒涘缓浜 - #added by bai label_identity: 韬唤 - label_teacher: 鏁欏笀 + label_teacher: 鏁 甯 label_student: 瀛︾敓 label_other: 鍏朵粬 - -#end - + label_gender: 鎬у埆 + label_gender_male: 鐢 + label_gender_female: 濂 + label_location: 鍦板尯 + label_brief_introduction: 淇敼鎴戠殑鐘舵 + label_my_brief_introduction: 浠婂ぉ鐨勫績鎯呭浣曪紵鐣欎笅浣犵殑鑴氬嵃鍚 + #end + label_course: 璇剧▼ label_course_new: 鏂板缓璇剧▼ label_public_info: 鑻ヤ笉鍏紑锛屼粎椤圭洰鎴愬憳鍙璇ラ」鐩 @@ -1468,4 +1496,4 @@ zh: label_course_new_homework: 鏂板缓浣滀笟 label_course_homework_list: 浣滀笟鍒楄〃 label_course_homework_new: 鍙戝竷浣滀笟 - label_course_data: 璧勬枡 + label_course_data: 璧勬枡 \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index f29b98df0..8b3da6bc8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -465,5 +465,5 @@ RedmineApp::Application.routes.draw do match 'parise_tread/tread_plus',:to => 'parise_tread#tread_plus',:as=>"tread" match 'tags/delete',:to=>'tags#delete' - + match 'words/add_brief_introdution', :controller => 'words', :action => 'add_brief_introdution' end diff --git a/public/images/sidebar/male.png b/public/images/sidebar/male.png index f432062af..294e8d38d 100644 Binary files a/public/images/sidebar/male.png and b/public/images/sidebar/male.png differ diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 0cc4b45a4..553bc6190 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -325,7 +325,7 @@ ul.tool li{list-style-type:none; .user_tags{ padding-top: 5px; padding-bottom: 5px; - padding-left: 8px; + padding-left: 12px; } .tool{ @@ -1173,7 +1173,7 @@ ul.properties li span {font-style:italic;} .total-hours { font-size: 110%; font-weight: bold; } .total-hours span.hours-int { font-size: 120%; } - +.gender { width: 20%; } .autoscroll {overflow-x: auto; padding:1px; margin-bottom: 1.2em;} #user_login, #user_firstname, #user_lastname, #user_mail, #my_account_form select, #user_form select, #user_identity_url { width: 60%; } diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 3c9e21a6b..8fa8fdd3f 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1103,7 +1103,7 @@ div.wiki-description { margin-left: 607px; float: left; height: auto; - width: 246px; + width: 300px; font-family: '寰蒋闆呴粦',helvetica,arial,sans-serif; /*modify by men*/ color: rgb(0, 0, 0); font-size: 13px; @@ -1196,7 +1196,7 @@ a.img-tag3{ } .stats span.info { - width: 100px; + width: 145px; text-align: right; display: inline-block; font-weight: bold;