修改了上次会议提出的几点

This commit is contained in:
huangjingquan 2013-09-16 08:49:39 +08:00
parent 671b81035c
commit 466922d13b
37 changed files with 911 additions and 83 deletions

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -138,9 +138,9 @@ module ProjectsHelper
type = []
option1 = []
option2 = []
option1 << '提交附件'
option1 << '作业最终以附件形式提交'
option1 << 1
option2 << '提交项目'
option2 << '作业最终以项目形式提交'
option2 << 2
type << option1
type << option2

View File

@ -64,9 +64,9 @@ module UsersHelper
# added by fq
# <div class="pagination" >
# <ul>
# <li><%= link_to("所有动态", {:controller => 'users', :action => 'show'}) %></li>
# <li><%= link_to("只看自己", {:controller => 'users', :action => 'show', :type => 1}) %></li>
# <li><%= link_to("所有反馈", {:controller => 'users', :action => 'show', :type => 2}) %></li>
# <li><%= link_to("<EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>̬", {:controller => 'users', :action => 'show'}) %></li>
# <li><%= link_to("ֻ<EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>", {:controller => 'users', :action => 'show', :type => 1}) %></li>
# <li><%= link_to("<EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD>", {:controller => 'users', :action => 'show', :type => 2}) %></li>
# </ul></div>
def show_activity(state)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,195 @@
<h3><%=l(:label_register)%> <%=link_to l(:label_loginkk), signin_url if Setting.openid? %></h3>
<!-- added by bai -->
<script type="text/javascript" language="javascript">
function showcity(province, cityField) {
switch (province) {
case "北京" :
var cityOptions = new Array(
"东城","西城","朝阳","丰台","石景山","海淀","门头沟",
"房山","通州","顺义","昌平","大兴","平谷","怀柔","密云","延庆");
break;
case "上海" :
var cityOptions = new Array(
"崇明","黄浦","卢湾","徐汇","长宁","静安","普陀","闸北","虹口","杨浦","闵行",
"宝山","嘉定","浦东","金山","松江","青浦","南汇","奉贤");
break;
case "广东" :
var cityOptions = new Array(
"广州","深圳","珠海","东莞","中山","佛山","惠州","河源","潮州","江门","揭阳","茂名",
"梅州","清远","汕头","汕尾","韶关","顺德","阳江","云浮","湛江","肇庆");
break;
case "江苏" :
var cityOptions = new Array(
"南京","常熟","常州","海门","淮安","江都","江阴","昆山","连云港","南通",
"启东","沭阳","宿迁","苏州","太仓","泰州","同里","无锡","徐州","盐城",
"扬州","宜兴","仪征","张家港","镇江","周庄");
break;
case "重庆" :
var cityOptions = new Array(
"万州","涪陵","渝中","大渡口","江北","沙坪坝","九龙坡","南岸","北碚","万盛",
"双挢","渝北","巴南","黔江","长寿","綦江","潼南","铜梁","大足","荣昌","壁山",
"梁平","城口","丰都","垫江","武隆","忠县","开县","云阳","奉节","巫山","巫溪",
"石柱","秀山","酉阳","彭水","江津","合川","永川","南川");
break;
case "安徽" :
var cityOptions = new Array(
"合肥","安庆","蚌埠","亳州","巢湖","滁州","阜阳","贵池","淮北","淮化","淮南",
"黄山","九华山","六安","马鞍山","宿州","铜陵","屯溪","芜湖","宣城");
break;
case "福建" :
var cityOptions = new Array(
"福州","厦门","泉州","漳州","龙岩","南平","宁德","莆田","三明");
break;
case "甘肃" :
var cityOptions = new Array(
"兰州","白银","定西","敦煌","甘南","金昌","酒泉","临夏","平凉","天水",
"武都","武威","西峰","张掖");
break;
case "广西" :
var cityOptions = new Array(
"南宁","百色","北海","桂林","防城港","贵港","河池","贺州","柳州","钦州","梧州","玉林");
break;
case "贵州" :
var cityOptions = new Array(
"贵阳","安顺","毕节","都匀","凯里","六盘水","铜仁","兴义","玉屏","遵义");
break;
case "海南" :
var cityOptions = new Array(
"海口","儋县","陵水","琼海","三亚","通什","万宁");
break;
case "河北" :
var cityOptions = new Array(
"石家庄","保定","北戴河","沧州","承德","丰润","邯郸","衡水","廊坊","南戴河","秦皇岛",
"唐山","新城","邢台","张家口");
break;
case "黑龙江" :
var cityOptions = new Array(
"哈尔滨","北安","大庆","大兴安岭","鹤岗","黑河","佳木斯","鸡西","牡丹江","齐齐哈尔",
"七台河","双鸭山","绥化","伊春");
break;
case "河南" :
var cityOptions = new Array(
"郑州","安阳","鹤壁","潢川","焦作","济源","开封","漯河","洛阳","南阳","平顶山",
"濮阳","三门峡","商丘","新乡","信阳","许昌","周口","驻马店");
break;
case "香港" :
var cityOptions = new Array(
"香港","九龙","新界");
break;
case "湖北" :
var cityOptions = new Array(
"武汉","恩施","鄂州","黄冈","黄石","荆门","荆州","潜江","十堰","随州","武穴",
"仙桃","咸宁","襄阳","襄樊","孝感","宜昌");
break;
case "湖南" :
var cityOptions = new Array(
"长沙","常德","郴州","衡阳","怀化","吉首","娄底","邵阳","湘潭","益阳","岳阳",
"永州","张家界","株洲");
break;
case "江西" :
var cityOptions = new Array(
"南昌","抚州","赣州","吉安","景德镇","井冈山","九江","庐山","萍乡",
"上饶","新余","宜春","鹰潭");
break;
case "吉林" :
var cityOptions = new Array(
"长春","吉林","白城","白山","珲春","辽源","梅河","四平","松原","通化","延吉");
break;
case "辽宁" :
var cityOptions = new Array(
"沈阳","鞍山","本溪","朝阳","大连","丹东","抚顺","阜新","葫芦岛","锦州",
"辽阳","盘锦","铁岭","营口");
break;
case "澳门" :
var cityOptions = new Array("澳门");
break;
case "内蒙古" :
var cityOptions = new Array(
"呼和浩特","阿拉善盟","包头","赤峰","东胜","海拉尔","集宁","临河","通辽","乌海",
"乌兰浩特","锡林浩特");
break;
case "宁夏" :
var cityOptions = new Array(
"银川","固源","石嘴山","吴忠");
break;
case "青海" :
var cityOptions = new Array(
"西宁","德令哈","格尔木","共和","海东","海晏","玛沁","同仁","玉树");
break;
case "山东" :
var cityOptions = new Array(
"济南","滨州","兖州","德州","东营","菏泽","济宁","莱芜","聊城","临沂",
"蓬莱","青岛","曲阜","日照","泰安","潍坊","威海","烟台","枣庄","淄博");
break;
case "山西" :
var cityOptions = new Array(
"太原","长治","大同","候马","晋城","离石","临汾","宁武","朔州","忻州",
"阳泉","榆次","运城");
break;
case "陕西" :
var cityOptions = new Array(
"西安","安康","宝鸡","汉中","渭南","商州","绥德","铜川","咸阳","延安","榆林");
break;
case "四川" :
var cityOptions = new Array(
"成都","巴中","达川","德阳","都江堰","峨眉山","涪陵","广安","广元","九寨沟",
"康定","乐山","泸州","马尔康","绵阳","眉山","南充","内江","攀枝花","遂宁",
"汶川","西昌","雅安","宜宾","自贡","资阳");
break;
case "台湾" :
var cityOptions = new Array(
"台北","基隆","台南","台中","高雄","屏东","南投","云林","新竹","彰化","苗栗",
"嘉义","花莲","桃园","宜兰","台东","金门","马祖","澎湖");
break;
case "天津" :
var cityOptions = new Array(
"天津","和平","东丽","河东","西青","河西","津南","南开","北辰","河北","武清","红挢",
"塘沽","汉沽","大港","宁河","静海","宝坻","蓟县");
break;
case "新疆" :
var cityOptions = new Array(
"乌鲁木齐","阿克苏","阿勒泰","阿图什","博乐","昌吉","东山","哈密","和田","喀什",
"克拉玛依","库车","库尔勒","奎屯","石河子","塔城","吐鲁番","伊宁");
break;
case "西藏" :
var cityOptions = new Array(
"拉萨","阿里","昌都","林芝","那曲","日喀则","山南");
break;
case "云南" :
var cityOptions = new Array(
"昆明","大理","保山","楚雄","大理","东川","个旧","景洪","开远","临沧","丽江",
"六库","潞西","曲靖","思茅","文山","西双版纳","玉溪","中甸","昭通");
break;
case "浙江" :
var cityOptions = new Array(
"杭州","安吉","慈溪","定海","奉化","海盐","黄岩","湖州","嘉兴","金华","临安",
"临海","丽水","宁波","瓯海","平湖","千岛湖","衢州","江山","瑞安","绍兴","嵊州",
"台州","温岭","温州","余姚","舟山");
break;
case "海外" :
var cityOptions = new Array(
"美国","日本","英国","法国","德国","其他");
break;
default:
var cityOptions = new Array("");
break;
}
cityField.options.length = 0;
for(var i = 0; i < cityOptions.length; i++) {
cityField.options[i]=new Option(cityOptions[i],cityOptions[i]);
/*
if (cityField.options[i].value==city)
{
//alert("here put City ok!");
document.oblogform["city"].selectedIndex = i;
}*/
}
}
</script>
<!-- end -->
<h3><%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></h3>
<%= labelled_form_for @user, :url => register_path do |f| %>
<%= error_messages_for 'user' %>
@ -20,9 +211,49 @@
<em class="info"><%="#{l(:label_mail_attention)} "%></em></p>
<p><%= f.select :language, lang_options_for_select %></p>
<!-- added by bai -->
<!-- added by bai 增加了身份、性别和地区-->
<p><em class="info"><%= l(:label_identity) %><%= select_tag 'identity', "<option value = '0'>#{l(:label_teacher)}</option><option value = '1'>#{l(:label_student)}</option><option value = '2'>#{l(:label_other)}</option>".html_safe %></em></p>
<p><em class="info"><%= l(:label_gender) %><%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe %></em></p>
<p><%= l(:label_location) %><select onchange="showcity(this.value, document.getElementById(&#39;userCity&#39;));" name="province" id="userProvince">
<option value="">--请选择省份--</option>
<option value="北京">北京</option>
<option value="上海">上海</option>
<option value="广东">广东</option>
<option value="江苏">江苏</option>
<option value="浙江">浙江</option>
<option value="重庆">重庆</option>
<option value="安徽">安徽</option>
<option value="福建">福建</option>
<option value="甘肃">甘肃</option>
<option value="广西">广西</option>
<option value="贵州">贵州</option>
<option value="海南">海南</option>
<option value="河北">河北</option>
<option value="黑龙江">黑龙江</option>
<option value="河南">河南</option>
<option value="湖北">湖北</option>
<option value="湖南">湖南</option>
<option value="江西">江西</option>
<option value="吉林">吉林</option>
<option value="辽宁">辽宁</option>
<option value="内蒙古">内蒙古</option>
<option value="宁夏">宁夏</option>
<option value="青海">青海</option>
<option value="山东">山东</option>
<option value="山西">山西</option>
<option value="陕西">陕西</option>
<option value="四川">四川</option>
<option value="天津">天津</option>
<option value="新疆">新疆</option>
<option value="西藏">西藏</option>
<option value="云南">云南</option>
<option value="香港">香港特别行政区</option>
<option value="澳门">澳门特别行政区</option>
<option value="台湾">台湾</option>
<option value="海外">海外</option>
</select>
<select name="city" id="userCity"></select></p>
<!-- end -->
<% if Setting.openid? %>

View File

@ -0,0 +1,54 @@
<!-- huang -->
<% bids.each do |bid|%>
<table width="95%" border="0" style="padding-left: 10px; padding-top: 10px;">
<tr>
<td colspan="2" valign="top" width="50" ><%= link_to(image_tag(url_to_avatar(bid.author), :class => 'avatar'), user_path(bid.author), :class => "avatar") %></td>
<td>
<table width="100%" border="0">
<tr>
<td colspan="2" valign="top"><strong><%= link_to(bid.author.lastname+bid.author.firstname, user_path(bid.author), :class => 'bid_user') %>: &nbsp;<%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %></strong></td>
</tr>
<tr>
<td width="500">
<table border="0">
<tr><td>
<% if bid.reward_type.nil? or bid.reward_type == 1 %>
<strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: 微软雅黑"><%= l(:label_call_bonus) %>&nbsp;<%= l(:label_RMB_sign) %><%= bid.budget%></span></strong>
<% elsif bid.reward_type == 2 %>
<strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= bid.budget%></span></strong>
<% else %>
<!-- <strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: 微软雅黑"><%= l(:label_bids_credit) %>&nbsp;<%= bid.budget%>&nbsp;<%= l(:label_bids_credit_number) %></span></strong> -->
<% end %>
<!-- <td style="color: rgb(255, 0, 0);"><strong><%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%></strong></td> -->
</td>
</tr>
<tr><td>
<span class="font_lighter"><%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<strong><%=link_to bid.biding_projects.count, project_for_bid_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_x_responses, :count => bid.commit) %>(<strong><%=link_to bid.commit, respond_path(bid) %></strong>)</span>
</td>
</tr>
</table></td>
<td width="200" align="right" class="a"><span class="font_lighter"> <%= format_time bid.created_on %></span></td>
</tr>
<tr>
<td>
<div class="bid-description" style="border-left: 1px solid rgb(225, 225, 225); border-bottom: 1px solid rgb(225, 225, 225); padding-left: 20px; padding-bottom: 10px; margin-bottom: 20px;">
<table width="100%">
<tr>
<td> <%= bid.description%> </td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
</table>
<% end %>
<div class="pagination">
<ul>
<%= pagination_links_full bid_pages %>
<ul>
</div>
<!--end-->

View File

@ -1,5 +1,4 @@
<!-- fq -->
<% bids.each do |bid|%>
<table width="95%" border="0" style="padding-left: 10px; padding-top: 10px;">

View File

@ -1,7 +1,14 @@
<!-- added by fq -->
<table width="660px" border="0" align="center">
<tr>
<td class="font_lighter" style="font-size: 15px;"><%=l(:label_user_response)%></td>
<table width="660px" border="0" align="center" style="padding-left: 26px">
<tr><td>
<!-- modified by huang -->
<% if @bid.reward_type ==3 %>
<td class="font_lighter" style="font-size: 15px;"><%=l(:label_student_response)%></td>
<% else %>
<td class="font_lighter" style="font-size: 15px;"><%=l(:label_user_response)%></td>
<% end %>
</td>
<!-- end -->
</tr></table>
@ -18,8 +25,13 @@
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(journal.user), :class => "avatar"), user_path(journal.user), :class => "avatar" %></td>
<td><table width="580px" border="0">
<tr>
<td colspan="2" valign="top"><strong> <%=link_to journal.user, user_path(journal.user)%></strong> <span class="font_lighter"><%= l(:label_respond_requirement) %></span></td>
<% if @bid.reward_type == 3 %>
<td colspan="2" valign="top"><strong> <%=link_to journal.user, user_path(journal.user)%></strong> <span class="font_lighter"><%= l(:label_question_requirement) %></span></td>
<% else %>
<td colspan="2" valign="top"><strong> <%=link_to journal.user, user_path(journal.user)%></strong> <span class="font_lighter"><%= l(:label_respond_requirement) %></span></td>
<% end %>
</tr>
<tr>
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable journal.notes%></p></td>
</tr>

View File

@ -65,14 +65,18 @@
<% if User.current.logged? %>
<table border="0" width="525px" align="center" >
<tr>
<td><%= 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'%></td>
<% if @bid.reward_type ==3 %>
<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_question), :style => "resize: none;", :class => 'noline'%></td>
<% else %>
<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%></td>
<% end %>
</tr>
</table>
<%= f.text_field :reference_user_id, :style=>"display:none"%>
<table border="0" width="525px" align="center">
<tr>
<td align="right"> <%= 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'" %> </td>
<%= 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'" %> </td>
</tr>
</table>
<% else %>

View File

@ -0,0 +1,51 @@
<!-- fq -->
<%= render_flash_messages %>
<table width="1000px" border="0" style="padding-left: 15px">
<td class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %>(<%= @bidding_project.count%>)</td>
<% if User.current.logged? %>
<td>
<div class='icon icon-add'>
<%= toggle_link l(:button_bidding), 'put-bid-form' %>
</div></td>
<% end %>
</table>
<% @bidding_project.each do |b_project|%>
<table width="90%" border="0" align='center'>
<tr>
<td>
<table width="660px" border="0" align='center'>
<tr>
<td width="50px" valign="top" colspan="2" align="middle">
<div style="width: 50px; height: 50px;">
<%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %>
</div></td>
<td width="60%" valign="top">
<table width="100%" valign="top">
<tr>
<td colspan="2" valign="top"><strong><%= link_to(b_project.project.name, project_path(b_project.project)) %></strong><a class="font_lighter"><%= l(:label_join_bidding)%></a></td>
</tr>
<tr></tr>
<tr>
<td valign="top"><%= b_project.project.description %></td>
</tr>
<tr>
<td valign="top"><a class="font_lighter"><%= b_project.created_at%></a></td>
</tr>
</table></td>
<td width="30%">
<div class="bid-user-message" style="border-left: 1px solid rgb(225, 225, 225); margin-left: 20px; padding-left: 20px;">
<table width="100%">
<tr>
<td><%= l(:label_bidding_user) %><%= link_to(b_project.user.name, user_path(b_project.user)) %></td>
</tr>
<tr>
<td style=" word-wrap: break-word; word-break: break-all"><%= l(:label_bidding_reason) %><%= b_project.description %></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
</table>
<% end %>

View File

@ -1,5 +1,59 @@
<!-- fq -->
<%= render_flash_messages %>
<% if @bid.reward_type == 3 %>
<table width="1000px" border="0" style="padding-left: 15px">
<td class="font_lighter" style="font-size: 15px;"><%= l(:label_homework_project) %>(<%= @bidding_project.count%>)</td>
<% if User.current.logged? %>
<td>
<div class='icon icon-add'>
<%= toggle_link l(:button_bidding_homework), 'put-bid-form' %>
</div></td>
<% end %>
</table>
<% @bidding_project.each do |b_project|%>
<table width="90%" border="0" align='center'>
<tr>
<td>
<table width="660px" border="0" align='center'>
<tr>
<td width="50px" valign="top" colspan="2" align="middle">
<div style="width: 50px; height: 50px;">
<%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %>
</div></td>
<td width="60%" valign="top">
<table width="100%" valign="top">
<tr>
<td colspan="2" valign="top"><strong><%= link_to(b_project.project.name, project_path(b_project.project)) %></strong><a class="font_lighter"><%= l(:label_jion_bidding_homework)%></a></td>
</tr>
<tr></tr>
<tr>
<td valign="top"><%= b_project.project.description %></td>
</tr>
<tr>
<td valign="top"><a class="font_lighter"><%=format_time(b_project.created_at) %></a></td>
</tr>
</table></td>
<td width="30%">
<div class="bid-user-message" style="border-left: 1px solid rgb(225, 225, 225); margin-left: 20px; padding-left: 20px;">
<table width="100%">
<tr>
<td><%= l(:label_bidding_user_homework) %> : <%= link_to(b_project.user.name, user_path(b_project.user)) %></td>
</tr>
<tr>
<td style=" word-wrap: break-word; word-break: break-all"><%= l(:label_bidding_reason_homewrok) %> : <%= b_project.description %></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
</table>
<% end %>
<% else %>
<table width="1000px" border="0" style="padding-left: 15px">
<td class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %>(<%= @bidding_project.count%>)</td>
<% if User.current.logged? %>
@ -49,3 +103,4 @@
</tr>
</table>
<% end %>
<% end %>

View File

@ -4,7 +4,7 @@
<td width="50" valign="top"><%= link_to image_tag(url_to_avatar(@bid.author), :class => "avatar"), user_path(@bid.author), :class => "avatar" %></td>
<td><table width="100%" border="0">
<tr>
<td><h3><%= link_to(@bid.author.name, user_path(@bid.author))%><%= @bid.name %></h3></td>
<td><h3><%= link_to(@bid.author.firstname+@bid.author.lastname, user_path(@bid.author))%><%= @bid.name %></h3></td>
<td>
<!-- 在这里添加赞和踩-->
<span id="praise_tread" style="float: right">
@ -49,7 +49,7 @@
<div class="pagination" style="float:left;">
<ul>
<%= pagination_links_full @feedback_pages %>
<ul>
<ul>
</div>
<!-- end -->

View File

@ -71,11 +71,15 @@
<tr>
<td><%= select_tag 'bid', options_for_select(@option), :name => 'bid', :class => 'grayline' %></td>
</tr>
<% if @bid.reward_type == 3 %>
<tr>
<td><%= 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'%></td>
<td><%= 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'%></td>
</tr>
<% else %>
<tr>
<td><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :placeholder => l(:label_bid_reason), :style => "resize: none;", :class => 'noline'%></td>
</tr>
<% end %>
<tr>
<td align="right"><%= 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'",

View File

@ -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('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %> -->
<th>描述</th>
<th> <%= sort_header_tag('description', :caption => l(:field_description)) %></th>
<th></th>
</tr></thead>
<tbody>

View File

@ -62,9 +62,9 @@
</tr>
</table>
<div>
<%= link_to l(:label_followers)+"("+@bid.watcher_users.count.to_s+")", respond_path(@bid) %> &nbsp;
<%= link_to l(:label_x_followers, :count => @bid.watcher_users.count)+"("+@bid.watcher_users.count.to_s+")", respond_path(@bid) %> &nbsp;
<%= link_to l(:label_bidding_project)+"("+@bid.biding_projects.count.to_s+")", project_for_bid_path(@bid) %>&nbsp;
<%= 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)%>
</div>
</div>
<div class="user_fans">
@ -82,7 +82,7 @@
</div>
<div class="user_fans">
<div class="font_title_left">
<strong><%= l(:label_followers) %></strong>
<strong><%= l(:label_x_followers, :count => @bid.watcher_users.count) %></strong>
</div>
<div class="user_underline"></div>
<div class="left_wf">

View File

@ -35,9 +35,9 @@
<td><%= link_to image_tag(url_to_avatar(@project), :class => 'avatar2') %></td>
<td align="center">
<div class="info_font" style=" word-wrap: break-word; word-break: break-all">
<%= textilizable @project.name %>
<%= join_in_course(@project, User.current)%>
<%= textilizable @project.name %>
</div>
<%= join_in_course(@project, User.current)%>
</td>
</tr>
</table>
@ -68,14 +68,17 @@
<div class="inf_user_context">
<table style="font-family:微软雅黑" width="220">
<tr>
<!-- <tr>
<td valign="top" style="padding-left: 8px;">课程口令:</td><td class="font_lighter_sidebar"><%= @course.state%></td>
</tr> -->
<tr>
<td valign="top" style="padding-left: 8px;">主讲老师:</td><td class="font_lighter_sidebar"><%= @course.teacher.firstname+@course.teacher.lastname %></td>
</tr>
<tr>
<td valign="top" style="padding-left: 8px;">主讲老师:</td><td class="font_lighter_sidebar"><%= @course.teacher.name %></td>
</tr>
<td valign="top" style="padding-left: 8px;">教师单位:</td><td class="font_lighter_sidebar">PDL(未定)</td>
</tr>
</table>
@ -116,8 +119,8 @@
<!--tool-->
<div class="user_underline"></div>
<div class="tool">
<!-- <div class="user_underline"></div> -->
<!-- <div class="tool">
<div class="font_title_left">
<%= l(:label_project_tool)%>
</div>
@ -133,7 +136,7 @@
</td>
</tr>
</table>
</div>
</div> -->
<div class="user_underline"></div>
</div>
</div>

View File

@ -35,17 +35,18 @@
<td>
<table>
<tr>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @bid.name %></td>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all">作业</td>
</tr>
<tr>
<td align="center"> <%= watcher_link(@bid, User.current) %> </td>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @bid.name %></td>
</tr>
</table></td>
</tr>
</table>
<table>
<tr>
<td><%= l(:label_teacher) %> : <%= link_to(@user, user_path(@user))%></td>
<td><%= l(:label_teacher) %> : <%= link_to(@user.firstname+@user.lastname, user_path(@user))%></td>
</tr>
<tr>
<td><%= l(:label_course_homework) %> : <%= link_to(@bid.courses.first.name, project_path(@bid.courses.first))%></td>

View File

@ -33,7 +33,14 @@
<td>
<table>
<tr>
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><%= h @user.lastname<<@user.firstname %> <%=image_tag("/images/sidebar/male.png", weight:"11px", height:"11px") %>
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><%= h @user.lastname<<@user.firstname %>
<!-- added by bai -->
<% 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 %>
<!-- end -->
</td>
</tr>
<tr>
@ -50,7 +57,31 @@
<strong class="font_small_watch"><%=link_to l(:label_user_watcher)+"("+User.watched_by(@user.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist"%></strong> &nbsp;
<strong class="font_small_watch"><%=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" %></strong>
<p><%= toggle_link l(:label_brief_introduction), 'introduction', {:focus => 'new_form_project_message'} %></p>
<% unless @user.user_extensions.nil? %>
<%= @user.user_extensions.brief_introduction %>
<% end %>
<div id="introduction" style="display: none">
<%= form_for('new_form', :method => :post,
:url => {:controller => 'words', :action => 'add_brief_introdution'}) do |f|%>
<table border="0" width="100%" align="center" >
<tr>
<td><%= f.text_area 'user_introduction', :rows => 3, :cols => 65, :placeholder => "#{l(:label_my_brief_introduction)}", :style => "resize: none;", :class => 'noline'%></td>
</tr>
</table>
<table border="0" width="200px" align="center">
<tr>
<td align="right"> <%= submit_tag l(:button_submit), :name => nil , :class => "bid_btn" %></td>
</tr>
</table>
<% end %>
</div>
</div>
</div>
<div class="user_underline"></div>
@ -66,6 +97,28 @@
<tr>
<td valign="top" style="padding-left: 8px;"><%= l(:label_user_mail) %></td><td class="font_lighter_sidebar" style="padding-left: 0px; word-wrap: break-word; word-break: break-all"><%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></td>
</tr>
<!-- added by bai 在个人主页里显示“工作单位”“地区”-->
<% unless @user.user_extensions.nil? %>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.occupation %></td>
</tr>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.location %></td>
</tr>
<% else%>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %></td>
</tr>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %></td>
</tr>
<% end %>
</tr>
<!-- end -->
</table>
</div>

View File

@ -31,14 +31,300 @@
<p style="width:400px;padding-left: 26px;">
<%= f.text_field :lastname, :required => true %>
</p>
<!-- added by bai 增加账户里的性别-->
<% unless @user.user_extensions.nil? %>
<% if @user.user_extensions.gender == 0 %>
<p>
<%= l(:label_gender) %><%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe ,:class =>'gender' %>
</p>
<% else %>
<p>
<%= l(:label_gender) %><%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1' selected='selected'>#{l(:label_gender_female)}</option>".html_safe %>
</p>
</p>
<% end %>
<% else %>
<p><%= l(:label_gender) %><%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe %></p>
</p>
<% end %>
<!-- end -->
<p style="width:357px;padding-left: 26px;">
<%= f.text_field :mail, :required => true %>
</p>
<p style="width:426px;padding-left:26px;>
<%= f.select :language, :Chinese简体中文 => :zh, :English => :en%>
</p>
<!-- added by bai 单位-->
<% unless @user.user_extensions.nil?%>
<p><%= l(:field_occupation)%><%= text_field_tag "occupation", @user.user_extensions.occupation%>
</p>
<%else%>
<p><%= l(:field_occupation)%><%= text_field_tag "occupation"%>
</p>
</p>
<%end%>
<!-- added by bai 增加了地区 -->
<script type="text/javascript" language="javascript">
function showcity(province, cityField) {
switch (province) {
case "北京" :
var cityOptions = new Array(
"东城","西城","朝阳","丰台","石景山","海淀","门头沟",
"房山","通州","顺义","昌平","大兴","平谷","怀柔","密云","延庆");
break;
case "上海" :
var cityOptions = new Array(
"崇明","黄浦","卢湾","徐汇","长宁","静安","普陀","闸北","虹口","杨浦","闵行",
"宝山","嘉定","浦东","金山","松江","青浦","南汇","奉贤");
break;
case "广东" :
var cityOptions = new Array(
"广州","深圳","珠海","东莞","中山","佛山","惠州","河源","潮州","江门","揭阳","茂名",
"梅州","清远","汕头","汕尾","韶关","顺德","阳江","云浮","湛江","肇庆");
break;
case "江苏" :
var cityOptions = new Array(
"南京","常熟","常州","海门","淮安","江都","江阴","昆山","连云港","南通",
"启东","沭阳","宿迁","苏州","太仓","泰州","同里","无锡","徐州","盐城",
"扬州","宜兴","仪征","张家港","镇江","周庄");
break;
case "重庆" :
var cityOptions = new Array(
"万州","涪陵","渝中","大渡口","江北","沙坪坝","九龙坡","南岸","北碚","万盛",
"双挢","渝北","巴南","黔江","长寿","綦江","潼南","铜梁","大足","荣昌","壁山",
"梁平","城口","丰都","垫江","武隆","忠县","开县","云阳","奉节","巫山","巫溪",
"石柱","秀山","酉阳","彭水","江津","合川","永川","南川");
break;
case "安徽" :
var cityOptions = new Array(
"合肥","安庆","蚌埠","亳州","巢湖","滁州","阜阳","贵池","淮北","淮化","淮南",
"黄山","九华山","六安","马鞍山","宿州","铜陵","屯溪","芜湖","宣城");
break;
case "福建" :
var cityOptions = new Array(
"福州","厦门","泉州","漳州","龙岩","南平","宁德","莆田","三明");
break;
case "甘肃" :
var cityOptions = new Array(
"兰州","白银","定西","敦煌","甘南","金昌","酒泉","临夏","平凉","天水",
"武都","武威","西峰","张掖");
break;
case "广西" :
var cityOptions = new Array(
"南宁","百色","北海","桂林","防城港","贵港","河池","贺州","柳州","钦州","梧州","玉林");
break;
case "贵州" :
var cityOptions = new Array(
"贵阳","安顺","毕节","都匀","凯里","六盘水","铜仁","兴义","玉屏","遵义");
break;
case "海南" :
var cityOptions = new Array(
"海口","儋县","陵水","琼海","三亚","通什","万宁");
break;
case "河北" :
var cityOptions = new Array(
"石家庄","保定","北戴河","沧州","承德","丰润","邯郸","衡水","廊坊","南戴河","秦皇岛",
"唐山","新城","邢台","张家口");
break;
case "黑龙江" :
var cityOptions = new Array(
"哈尔滨","北安","大庆","大兴安岭","鹤岗","黑河","佳木斯","鸡西","牡丹江","齐齐哈尔",
"七台河","双鸭山","绥化","伊春");
break;
case "河南" :
var cityOptions = new Array(
"郑州","安阳","鹤壁","潢川","焦作","济源","开封","漯河","洛阳","南阳","平顶山",
"濮阳","三门峡","商丘","新乡","信阳","许昌","周口","驻马店");
break;
case "香港" :
var cityOptions = new Array(
"香港","九龙","新界");
break;
case "湖北" :
var cityOptions = new Array(
"武汉","恩施","鄂州","黄冈","黄石","荆门","荆州","潜江","十堰","随州","武穴",
"仙桃","咸宁","襄阳","襄樊","孝感","宜昌");
break;
case "湖南" :
var cityOptions = new Array(
"长沙","常德","郴州","衡阳","怀化","吉首","娄底","邵阳","湘潭","益阳","岳阳",
"永州","张家界","株洲");
break;
case "江西" :
var cityOptions = new Array(
"南昌","抚州","赣州","吉安","景德镇","井冈山","九江","庐山","萍乡",
"上饶","新余","宜春","鹰潭");
break;
case "吉林" :
var cityOptions = new Array(
"长春","吉林","白城","白山","珲春","辽源","梅河","四平","松原","通化","延吉");
break;
case "辽宁" :
var cityOptions = new Array(
"沈阳","鞍山","本溪","朝阳","大连","丹东","抚顺","阜新","葫芦岛","锦州",
"辽阳","盘锦","铁岭","营口");
break;
case "澳门" :
var cityOptions = new Array("澳门");
break;
case "内蒙古" :
var cityOptions = new Array(
"呼和浩特","阿拉善盟","包头","赤峰","东胜","海拉尔","集宁","临河","通辽","乌海",
"乌兰浩特","锡林浩特");
break;
case "宁夏" :
var cityOptions = new Array(
"银川","固源","石嘴山","吴忠");
break;
case "青海" :
var cityOptions = new Array(
"西宁","德令哈","格尔木","共和","海东","海晏","玛沁","同仁","玉树");
break;
case "山东" :
var cityOptions = new Array(
"济南","滨州","兖州","德州","东营","菏泽","济宁","莱芜","聊城","临沂",
"蓬莱","青岛","曲阜","日照","泰安","潍坊","威海","烟台","枣庄","淄博");
break;
case "山西" :
var cityOptions = new Array(
"太原","长治","大同","候马","晋城","离石","临汾","宁武","朔州","忻州",
"阳泉","榆次","运城");
break;
case "陕西" :
var cityOptions = new Array(
"西安","安康","宝鸡","汉中","渭南","商州","绥德","铜川","咸阳","延安","榆林");
break;
case "四川" :
var cityOptions = new Array(
"成都","巴中","达川","德阳","都江堰","峨眉山","涪陵","广安","广元","九寨沟",
"康定","乐山","泸州","马尔康","绵阳","眉山","南充","内江","攀枝花","遂宁",
"汶川","西昌","雅安","宜宾","自贡","资阳");
break;
case "台湾" :
var cityOptions = new Array(
"台北","基隆","台南","台中","高雄","屏东","南投","云林","新竹","彰化","苗栗",
"嘉义","花莲","桃园","宜兰","台东","金门","马祖","澎湖");
break;
case "天津" :
var cityOptions = new Array(
"天津","和平","东丽","河东","西青","河西","津南","南开","北辰","河北","武清","红挢",
"塘沽","汉沽","大港","宁河","静海","宝坻","蓟县");
break;
case "新疆" :
var cityOptions = new Array(
"乌鲁木齐","阿克苏","阿勒泰","阿图什","博乐","昌吉","东山","哈密","和田","喀什",
"克拉玛依","库车","库尔勒","奎屯","石河子","塔城","吐鲁番","伊宁");
break;
case "西藏" :
var cityOptions = new Array(
"拉萨","阿里","昌都","林芝","那曲","日喀则","山南");
break;
case "云南" :
var cityOptions = new Array(
"昆明","大理","保山","楚雄","大理","东川","个旧","景洪","开远","临沧","丽江",
"六库","潞西","曲靖","思茅","文山","西双版纳","玉溪","中甸","昭通");
break;
case "浙江" :
var cityOptions = new Array(
"杭州","安吉","慈溪","定海","奉化","海盐","黄岩","湖州","嘉兴","金华","临安",
"临海","丽水","宁波","瓯海","平湖","千岛湖","衢州","江山","瑞安","绍兴","嵊州",
"台州","温岭","温州","余姚","舟山");
break;
case "海外" :
var cityOptions = new Array(
"美国","日本","英国","法国","德国","其他");
break;
default:
var cityOptions = new Array("");
break;
}
cityField.options.length = 0;
for(var i = 0; i < cityOptions.length; i++) {
cityField.options[i]=new Option(cityOptions[i],cityOptions[i]);
/*
if (cityField.options[i].value==city)
{
//alert("here put City ok!");
document.oblogform["city"].selectedIndex = i;
}*/
}
}
function init_province_and_city(pField, province, cField, city) {
for(var i = 0; i < pField.options.length; i++) {
if (pField.options[i].value==province)
{
pField.selectedIndex = i;
}
}
showcity(province, cField);
for(var i = 0; i < cField.options.length; i++) {
if (cField.options[i].value==city)
{
cField.selectedIndex = i;
}
}
}
</script>
<!-- <script type="text/javascript">
$().ready(funtion(){
init_province_and_ city(document.getElementById('userProvince'),'湖南', document.getElementById('userCity'),'长沙');
$("input[type='checkbox']").click( function (){
if($(this).is(':checked'))
$(this).next("label").addClass("SELECTED");
else
$(this).next("label").removeClass("SELECTED");
});
});
</script> -->
<p><%= l(:label_location) %><select onchange="showcity(this.value, document.getElementById(&#39;userCity&#39;));" name="province" id="userProvince">
<option value="">--请选择省份--</option>
<option value="北京">北京</option>
<option value="上海">上海</option>
<option value="广东">广东</option>
<option value="江苏">江苏</option>
<option value="浙江">浙江</option>
<option value="重庆">重庆</option>
<option value="安徽">安徽</option>
<option value="福建">福建</option>
<option value="甘肃">甘肃</option>
<option value="广西">广西</option>
<option value="贵州">贵州</option>
<option value="海南">海南</option>
<option value="河北">河北</option>
<option value="黑龙江">黑龙江</option>
<option value="河南">河南</option>
<option value="湖北">湖北</option>
<option value="湖南">湖南</option>
<option value="江西">江西</option>
<option value="吉林">吉林</option>
<option value="辽宁">辽宁</option>
<option value="内蒙古">内蒙古</option>
<option value="宁夏">宁夏</option>
<option value="青海">青海</option>
<option value="山东">山东</option>
<option value="山西">山西</option>
<option value="陕西">陕西</option>
<option value="四川">四川</option>
<option value="天津">天津</option>
<option value="新疆">新疆</option>
<option value="西藏">西藏</option>
<option value="云南">云南</option>
<option value="香港">香港特别行政区</option>
<option value="澳门">澳门特别行政区</option>
<option value="台湾">台湾</option>
<option value="海外">海外</option>
</select>
<select name="city" id="userCity"></select></p>
<!-- end -->
<% if Setting.openid? %>
<p>
<%= f.text_field :identity_url %>

View File

@ -10,13 +10,14 @@
<% unless @project.identifier_frozen? %>
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
<% end %></p>
<% if @project.new_record? %>
<%= f.fields_for @course do |m| %>
<!-- added by huang -->
<p style="margin-left:-10px;"><%= m.text_field :state, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em>
<% end %>
<% end %>
<!-- <p style="margin-left:-10px;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></p> -->
<p style="display:none;"><%= f.text_field :project_type, :value => 1 %></p>

View File

@ -22,19 +22,19 @@
<%= error_messages_for 'bid' %>
<!--[form:project]-->
<p><%= l(:label_bids_form_new_description) %></p>
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_requirement_name)}" %></p>
<p><%= l(:label_homeworks_form_new_description) %></p>
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT %></p>
<p style="margin-left:-10px;padding-right: 20px;"><%= 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)}" %></p>
<p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %></p>
<!-- <p><%= select_tag 'bid_reward_type', "<option value = '0'>#{l(:label_choose_reward)}</option><option value = '1'>#{l(:label_money)}</option><option value = '3'>#{l(:label_bids_credit)}</option><option value = '2'>#{l(:label_reward_1)}</option>".html_safe,
:onChange => "show('bid_reward_type', 'bid_budget', '"+l(:label_bids_reward_what)+"','"+l(:label_bids_new_money)+"','"+l(:label_bids_new_credit)+"','"+l(:label_bids_new_content)+"')" %>
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
</p> -->
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%>
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
</p>
<p><%= f.select :homework_type, homework_type_option%>
<p><%= f.select :homework_type, homework_type_option %>
</p>
<p><%= hidden_field_tag 'course_id', @project.id%>
<p><%= hidden_field_tag 'course_id', @project.id %>
</p>
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
<p><%= render :partial => 'attachments/form', :locals => {:container => @homework} %></p>

View File

@ -23,6 +23,6 @@
<div id="bid-show">
<%= 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} %>
</div>

View File

@ -35,6 +35,21 @@
</div> -->
<!-- <div class="pagination_list">
<ul>
<li>
<%= link_to l(:label_sort_by_time), projects_path(:project_sort_type => '0'),:class=>"test_new" %>
</li>
<li>
<%= link_to l(:label_sort_by_active), projects_path(:project_sort_type => '1'),:class=>"test_new" %>
</li>
<li>
<%= link_to l(:label_sort_by_influence), projects_path(:project_sort_type => '2'),:class=>"test_new" %>
</li>
</ul>
</div> -->
<div id="projects-index">
<%= render_project_hierarchy(@projects)%>
</div>

View File

@ -18,20 +18,20 @@
<table border="0">
<tr><td>
<% if bid.reward_type.nil? or bid.reward_type == 1%>
<strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: 微软雅黑"><%= l(:label_call_bonus) %>&nbsp;<%= l(:label_RMB_sign) %><%= bid.budget%></span></strong>
<strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: ΢ÈíÑźÚ"><%= l(:label_call_bonus) %>&nbsp;<%= l(:label_RMB_sign) %><%= bid.budget%></span></strong>
<% elsif bid.reward_type == 2%>
<strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= bid.budget%></span></strong>
<strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: ΢ÈíÑźÚ"><%= bid.budget%></span></strong>
<% else %>
<strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: 微软雅黑"><%= l(:label_bids_credit) %>&nbsp;<%= bid.budget%>&nbsp;<%= l(:label_bids_credit_number) %></span></strong>
<strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: ΢ÈíÑźÚ"><%= l(:label_bids_credit) %>&nbsp;<%= bid.budget%>&nbsp;<%= l(:label_bids_credit_number) %></span></strong>
<% end %>
<!-- <td style="color: rgb(255, 0, 0);"><strong><%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%></strong></td> -->
</td>
</tr>
<tr><td>
<span class="font_lighter"><%= l(:label_biding_project) %>(<strong><%=link_to bid.biding_projects.count, project_for_bid_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_responses) %>(<strong><%=link_to bid.commit, respond_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_followers) %>(<strong><%=link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<strong><%=link_to bid.biding_projects.count, project_for_bid_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_x_responses, :count => bid.commit) %>(<strong><%=link_to bid.commit, respond_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><%=link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span>
</td>
</tr>
</table></td>

View File

@ -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

View File

@ -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: 解锁
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: 应标宣言:
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: 资料

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -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%; }

View File

@ -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;