Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
f2f81e1d02
|
@ -111,8 +111,7 @@ class AccountController < ApplicationController
|
|||
user_params = params[:user] || {}
|
||||
@user = User.new
|
||||
@user.safe_attributes = user_params
|
||||
#这里判断
|
||||
if params[:identity] == "2"
|
||||
if params[:identity] == "2" # 2 企业
|
||||
@user.firstname = params[:enterprise_name]
|
||||
@user.lastname = l(:field_enterprise)
|
||||
end
|
||||
|
@ -132,16 +131,6 @@ class AccountController < ApplicationController
|
|||
@user.login = params[:user][:login]
|
||||
unless user_params[:identity_url].present? && user_params[:password].blank? && user_params[:password_confirmation].blank?
|
||||
@user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation]
|
||||
# system "htpasswd -mb "+@root_path+"user.passwd "+params[:user][:login]+" "+user_params[:password]
|
||||
# system "echo -e '\n"+params[:user][:login]+"-write:"+
|
||||
# " "+params[:user][:login]+"' >> "+@root_path+"group.passwd"
|
||||
# system "mkdir "+@root_path+"htdocs/"+params[:user][:login]
|
||||
#
|
||||
# system "echo -e 'Allow from all \n Order Deny,Allow \n "+
|
||||
# "<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
|
||||
# "Require group "+params[:user][:login]+"-write \n "+
|
||||
# "</Limit> \n ' >>"+
|
||||
# @root_path+"htdocs/"+params[:user][:login]+"/.htaccess"
|
||||
end
|
||||
|
||||
case Setting.self_registration
|
||||
|
@ -183,6 +172,33 @@ class AccountController < ApplicationController
|
|||
redirect_to signin_path
|
||||
end
|
||||
|
||||
def valid_ajax
|
||||
req = Hash.new(false)
|
||||
req[:message] = ''
|
||||
|
||||
valid_attr = params[:valid]
|
||||
valid_value = params[:value]
|
||||
|
||||
faker = User.new
|
||||
|
||||
if valid_attr.eql?('login')
|
||||
faker.login = valid_value
|
||||
faker.valid?
|
||||
req[:valid] = faker.errors[:login].blank?
|
||||
req[:message] = faker.errors[:login]
|
||||
end
|
||||
|
||||
if valid_attr.eql?('mail')
|
||||
faker.mail = valid_value
|
||||
faker.valid?
|
||||
req[:valid] = faker.errors[:mail].blank?
|
||||
req[:message] = faker.errors[:mail]
|
||||
end
|
||||
|
||||
req[:message] = l(:modal_valid_passing) if req[:message].blank?
|
||||
render :json => req
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def authenticate_user
|
||||
|
|
|
@ -7,7 +7,7 @@ class BidsController < ApplicationController
|
|||
menu_item :homework_respond, :only => :homework_respond
|
||||
menu_item :homework_statistics, :only => :homework_statistics
|
||||
#Ended by young
|
||||
before_filter :find_bid, :only => [:show, :show_project, :create,:destroy,:more,:back,:add,:new,:show_results,:set_reward, :add_homework, :fork, :create_fork,
|
||||
before_filter :find_bid, :only => [:show, :show_project, :create,:destroy,:more,:back,:add,:delete,:new,:show_results,:set_reward, :add_homework, :fork, :create_fork,
|
||||
:show_course, :show_bid_project, :show_bid_user, :join_in_contest, :unjoin_in_contest, :new_join,:show_participator, :settings]
|
||||
# added by fq
|
||||
before_filter :require_login, :only => [:join_in_contest, :unjoin_in_contest]
|
||||
|
@ -500,6 +500,15 @@ class BidsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#删除已提交的项目作业(不删项目)
|
||||
def delete
|
||||
binding_project = params[:binding_project]
|
||||
if BidingProject.delete(binding_project)
|
||||
redirect_to project_for_bid_path
|
||||
else
|
||||
redirect_to 403;
|
||||
end
|
||||
end
|
||||
## 新建留言
|
||||
def create
|
||||
|
||||
|
@ -693,7 +702,10 @@ class BidsController < ApplicationController
|
|||
redirect_to respond_path(@bid)
|
||||
else
|
||||
@bid.safe_attributes = params[:bid]
|
||||
render :action => 'new_bid'
|
||||
@homework = @bid
|
||||
@project = Project.find_by_id(params[:course_id])
|
||||
@project_id = @project.id
|
||||
render file: 'projects/new_homework', layout: 'base_courses'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@ class ContestsController < ApplicationController
|
|||
menu_item :respond
|
||||
menu_item :project, :only => :show_project
|
||||
menu_item :application, :only => :show_softapplication
|
||||
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward,
|
||||
menu_item :attendingcontest, :only => :show_attendingcontest
|
||||
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward,
|
||||
:show_contest_project, :show_contest_user, :join_in_contest, :unjoin_in_contest, :new_join,:show_participator, :settings]
|
||||
|
||||
# added by fq
|
||||
|
@ -252,6 +253,7 @@ class ContestsController < ApplicationController
|
|||
############
|
||||
##显示参赛的应用
|
||||
def show_softapplication
|
||||
|
||||
# @membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
# @option = []
|
||||
|
||||
|
@ -288,6 +290,66 @@ class ContestsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
###我要参赛
|
||||
def show_attendingcontest
|
||||
##取出参赛项目
|
||||
@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
@option = []
|
||||
# @contesting_project_count = @contesting_project_all.count
|
||||
# @contesting_project_pages = Paginator.new @contesting_project_count, per_page_option, params['page']
|
||||
@membership.each do |membership|
|
||||
unless(membership.project.project_type==1)
|
||||
membership.member_roles.each{|role|
|
||||
if(role.role_id == 3)
|
||||
@option << membership.project
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
@user = @contest.author
|
||||
@contesting_project = @contest.contesting_projects.all
|
||||
if params[:student_id].present?
|
||||
@temp = []
|
||||
@contesting_project.each do |pro|
|
||||
if pro.project && pro.project.project_status
|
||||
if /#{params[:student_id]}/ =~ pro.user.user_extensions.student_id
|
||||
@temp << pro
|
||||
end
|
||||
end
|
||||
@temp
|
||||
end
|
||||
@contesting_project = @temp
|
||||
else
|
||||
|
||||
@temp = []
|
||||
@contesting_project.each do |pro|
|
||||
if pro.project && pro.project.project_status
|
||||
@temp << pro
|
||||
end
|
||||
@temp
|
||||
end
|
||||
if @temp.size > 0
|
||||
@contesting_project = @temp.sort {|a,b| b.project.project_status.grade <=> a.project.project_status.grade}
|
||||
end
|
||||
end
|
||||
##取出参赛应用
|
||||
@softapplication = Softapplication.all
|
||||
@contesting_softapplication = @contest.contesting_softapplications.reverse
|
||||
@contesting_softapplication = paginateHelper @contesting_softapplication, 10
|
||||
|
||||
|
||||
##引用base_newcontest整体样式
|
||||
@contest = Contest.find_by_id(params[:id])
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render :layout => 'base_newcontest'
|
||||
}
|
||||
format.api
|
||||
end
|
||||
end
|
||||
|
||||
###end
|
||||
###添加已创建的参赛项目
|
||||
def add
|
||||
project = Project.find(params[:contest])
|
||||
|
|
|
@ -94,7 +94,7 @@ class MemosController < ApplicationController
|
|||
@reply_pages = Paginator.new @reply_count, pre_count, page
|
||||
@replies = @memo.children.
|
||||
includes(:author, :attachments).
|
||||
reorder("#{Memo.table_name}.created_at ASC").
|
||||
reorder("#{Memo.table_name}.created_at DESC").
|
||||
limit(@reply_pages.per_page).
|
||||
offset(@reply_pages.offset).
|
||||
all
|
||||
|
|
|
@ -47,7 +47,22 @@ class SchoolController < ApplicationController
|
|||
options << "<option value = '#{p.province}' >#{p.province}</option>"
|
||||
end
|
||||
|
||||
render :text => options
|
||||
# 查询已添加用户的学校
|
||||
schools_arr = UserExtensions.where("school_id IS NOT NULL").pluck(:school_id).uniq
|
||||
# 取id取学校名
|
||||
school = School.where(id: schools_arr).select("id, name")
|
||||
|
||||
options_s = ""
|
||||
school.each do |s|
|
||||
options_s << "<li style = 'width: 33%; float: left'><a id=#{s.id} onclick='test(this.id, this.text)'>#{s.name}</a></li>"
|
||||
end
|
||||
|
||||
res = Hash.new
|
||||
res[:text] = options
|
||||
res[:text_s] = options_s
|
||||
|
||||
render :json => res
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
@ -79,8 +94,11 @@ class SchoolController < ApplicationController
|
|||
end
|
||||
|
||||
def search_school
|
||||
if params[:province].nil? or params[:province] == "0"
|
||||
@school = School.where("name LIKE '%"+params[:key_word]+"%'");
|
||||
else
|
||||
@school = School.where("province = ? AND name LIKE '%"+params[:key_word]+"%'", params[:province]);
|
||||
|
||||
end
|
||||
options = ""
|
||||
@school.each do |s|
|
||||
options << "<li style = 'width: 33%; float: left'><a id=#{s.id} onclick='test(this.id)'>#{s.name}</a></li>"
|
||||
|
|
|
@ -106,11 +106,13 @@ class SoftapplicationsController < ApplicationController
|
|||
@softapplication.save_attachments(params[:attachments])
|
||||
respond_to do |format|
|
||||
if @softapplication.save
|
||||
format.js
|
||||
format.html { redirect_to @softapplication, notice: 'Softapplication was successfully created.' }
|
||||
format.json { render json: @softapplication, status: :created, location: @softapplication }
|
||||
# format.json { render json: @softapplication, status: :created, location: @softapplication }
|
||||
else
|
||||
format.js { render status: 406 }
|
||||
format.html { render action: "new" }
|
||||
format.json { render json: @softapplication.errors, status: :unprocessable_entity }
|
||||
# format.json { render json: @softapplication.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -38,6 +38,7 @@ class UsersController < ApplicationController
|
|||
:user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
|
||||
:watch_bids, :watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index,
|
||||
:activity_score_index, :influence_score_index, :score_index]
|
||||
before_filter :auth_user_extension, only: :show
|
||||
accept_api_auth :index, :show, :create, :update, :destroy,:tag_save
|
||||
|
||||
#william
|
||||
|
@ -743,4 +744,12 @@ class UsersController < ApplicationController
|
|||
def setting_layout(default_base='base_users')
|
||||
User.current.admin? ? 'base_admin' : default_base
|
||||
end
|
||||
|
||||
# 必填自己的工作单位,其实就是学校
|
||||
def auth_user_extension
|
||||
if @user == User.current && @user.user_extensions.school.nil?
|
||||
flash[:error] = l(:error_complete_occupation)
|
||||
redirect_to my_account_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
class School < ActiveRecord::Base
|
||||
attr_accessible :name, :province
|
||||
has_many :courses
|
||||
|
||||
def to_s
|
||||
self.name.to_s
|
||||
end
|
||||
end
|
||||
|
|
|
@ -278,7 +278,7 @@
|
|||
|
||||
|
||||
<% if @user.auth_source_id.nil? %>
|
||||
<p><%= f.text_field :login, :size => 25, :required => true %>
|
||||
<p><%= f.text_field :login, :size => 25, :required => true %><span id="valid_user_login"></span>
|
||||
<em class="info"><%= l(:label_max_number) %></em></p>
|
||||
<p><%= f.password_field :password, :size => 25, :required => true %>
|
||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
|
||||
|
@ -294,7 +294,7 @@
|
|||
<td class="info" style="width: 10px">
|
||||
<%= text_field_tag :enterprise_name %></td></tr></table></p>
|
||||
</span>
|
||||
<p><%= f.text_field :mail, :required => true %></p>
|
||||
<p><%= f.text_field :mail, :required => true %><span id="valid_user_mail"></span></p>
|
||||
<p>
|
||||
<em class="info"><%="#{l(:label_mail_attention)} "%></em></p>
|
||||
<p><%= f.select :language, lang_options_for_select , :required => true %></p>
|
||||
|
@ -368,3 +368,36 @@
|
|||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var $login = $('#user_login')
|
||||
var $mail = $('#user_mail')
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
$login.blur(function(event) {
|
||||
var $parent = $(this).parent();
|
||||
if ( $(this).is('#user_login')) {
|
||||
$.get('<%=account_valid_ajax_path%>?valid=login&value='+this.value, function(data) {
|
||||
if (data.valid) {
|
||||
$('#valid_user_login').html('<span class="green">'+data.message+"</span>");
|
||||
}else{
|
||||
$('#valid_user_login').html('<span class="red">'+data.message+"</span>");
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
$mail.blur(function(event) {
|
||||
var $parent = $(this).parent();
|
||||
if ( $(this).is('#user_mail')) {
|
||||
$.get('<%=account_valid_ajax_path%>?valid=mail&value='+this.value, function(data) {
|
||||
if (data.valid) {
|
||||
$('#valid_user_mail').html('<span class="green">'+data.message+"</span>");
|
||||
}else{
|
||||
$('#valid_user_mail').html('<span class="red">'+data.message+"</span>");
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
|
@ -45,7 +45,7 @@
|
|||
end
|
||||
%>
|
||||
<% if bid.homework_type == 1%>
|
||||
<%= l(:label_x_homework_project, :count => @temp.count) %>(<strong><%= link_to @temp.count, project_for_bid_path(bid.id) %></strong>)
|
||||
<%= l(:label_x_homework_project, :count => bid.homeworks.count) %>(<strong><%= link_to bid.homeworks.count, project_for_bid_path(bid.id) %></strong>)
|
||||
<% else %>
|
||||
<%= l(:label_x_homework_project, :count => @temp.count) %>(<strong><%= link_to @temp.count, project_for_bid_path(bid.id) %></strong>)
|
||||
<% end %></span>
|
||||
|
|
|
@ -153,7 +153,12 @@
|
|||
<span class="required">迟交</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td align="right"><%= link_to image_tag('delete.png') %></td>
|
||||
<td align="right">
|
||||
<% if b_project.user.id == User.current.id || User.current.id == b_project.bid.author.id
|
||||
%>
|
||||
<%= link_to image_tag('delete.png'),{ :action => "delete", :binding_project => b_project}, :confirm => "Are you sure?" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
|
|
@ -18,9 +18,14 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><span class="font_lighter"><%= l(:label_contest_project, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_projects.count, show_project_contest_path(contest), :target => "_blank") %></span></strong>)</span>
|
||||
<span class="font_lighter"><%= l(:label_contest_softapplication, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_softapplications.count, show_softapplication_contest_path(contest), :target => "_blank") %></span></strong>)</span>
|
||||
|
||||
<td class="font_lighter">
|
||||
<!-- <span class="font_lighter"><%= l(:label_contest_project, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_projects.count, show_project_contest_path(contest), :target => "_blank") %></span></strong>)</span>
|
||||
<span class="font_lighter"><%= l(:label_contest_softapplication, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_softapplications.count, show_softapplication_contest_path(contest), :target => "_blank") %></span></strong>)</span> -->
|
||||
<% if contest.id == 2 or contest.id == 3 or contest.id == 6 %>
|
||||
<%= l(:label_contest_work, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.projects.where('is_public=1').count, show_attendingcontest_contest_path(contest), :target => "_blank") %></span></strong>)
|
||||
<% else %>
|
||||
<%= l(:label_contest_work, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_softapplications.count, show_attendingcontest_contest_path(contest), :target => "_blank") %></span></strong>)
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -0,0 +1,246 @@
|
|||
<style>
|
||||
input[type="submit"].contest_btn {
|
||||
vertical-align: middle;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
color: rgb(0, 0, 0);
|
||||
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
||||
padding: 0px 0px 4px 0px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgb(148, 148, 148);
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
margin-top: -10px;
|
||||
/*margin-right: -4px;*/
|
||||
}
|
||||
input[type="button"].contest_btn {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
color: rgb(0, 0, 0);
|
||||
background: url("/images/button/bg103.jpg") no-repeat scroll left top transparent;
|
||||
padding: 0px 0px 4px 0px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid rgb(148, 148, 148);
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
margin-top: -10px;
|
||||
margin-right: -2px;
|
||||
}
|
||||
textarea:focus {
|
||||
border: #d5dee9 1px solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == content) {
|
||||
$('#' + id).val('');
|
||||
}
|
||||
}
|
||||
|
||||
function showInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == '') {
|
||||
$('#' + id).val(content);
|
||||
}
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
$("#put-bid-form").hide();
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
$("#put-project-form").hide();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!--参赛步骤-->
|
||||
<div style="padding-left: 17px; padding-bottom: 15px">
|
||||
温馨提示:如果您希望在我们平台托管参赛数据和代码,请按下面参赛步骤参赛!
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
|
||||
<div style="padding-bottom: 10px; line-height: 25px">
|
||||
<div style="padding-left: 17px; font-size: 15px">
|
||||
<strong>参赛步骤:</strong>
|
||||
</div>
|
||||
<div style="padding-left: 82px; ">
|
||||
<span style="padding-top: 50px">步骤1:</span>
|
||||
<span><%#= link_to '新建参赛作品', new_softapplication_path(:target=>'_blank'), :target=>'_blank' %></span>
|
||||
<span><%= link_to '新建参赛作品', "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
||||
<span style="font-size: 12px; color: grey">(先点击“新建参赛作品”,然后刷新页面,再继续步骤2。)</span>
|
||||
</div>
|
||||
<div style="padding-left: 82px; ">
|
||||
<span style="padding-top: 50px">步骤2:</span>
|
||||
<span><%= link_to '关联参赛作品', "javascript:void(0);", onclick: "$('#put-bid-form').toggle();" %></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--点击新建参赛作品弹出框-->
|
||||
<div id="put-project-form" style="display: none; padding-left: 83px; width: 70%">
|
||||
<%= form_for Softapplication.new, :remote=>true, :url => softapplications_path, :complete => '$("#put-bid-form").hide();' do |f| %>
|
||||
<fieldset class="contes-new-box", style="padding-left: 36px">
|
||||
|
||||
<tr style="width:700px; margin-left: -10px">
|
||||
<span><%= l(:label_softapplication_name) %></span>
|
||||
<span class="contest-star"> * </span>: <td ><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
</tr></ br>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_version_available) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr></ br>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_type) %></span>
|
||||
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr></ br>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_description) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr></ br>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_developers) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
</tr></ br>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<fieldset style="width: 500px", style="padding-top: 10px">
|
||||
<legend>
|
||||
上传应用软件包和应用截图
|
||||
</legend>
|
||||
<%= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
<p style="font-size: 10px">
|
||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed)%>
|
||||
<br>
|
||||
2、<%= l(:label_upload_softapplication_photo_condition)%>
|
||||
</p>
|
||||
<p style="font-size: 10px; color: red">
|
||||
<%= l(:label_updated_caution)%>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
</fieldset></br>
|
||||
<div class="align-center", style="padding-top: -3px; padding-bottom: 8px">
|
||||
<%= submit_tag l(:button_create), :onclick => "cancel();" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--点击关联参赛作品后弹出关联框-->
|
||||
<div id="put-bid-form" style="display: none; padding-left: 83px; width: 70%">
|
||||
<%= form_for "contest_for_save", :remote=>true, :url => {:controller => 'contests', :action => 'add_softapplication'}, :update => "contesting_softapplication_list", :complete => '$("#put-bid-form").hide();' do |f| %>
|
||||
<table id="contesting_table" border="0" width="102%" style="margin-left: -3px;">
|
||||
<!--该table为点击关联参赛作品后弹出的-->
|
||||
<tr style="padding-left: 50px">
|
||||
<%= select_tag 'contest', options_for_select(select_option_app_helper(@softapplication)), :name => 'contest', :class => 'grayline' %>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><%= f.text_area :contest_message, :id => "contest_message", :required => true, :rows => 2, :cols => 40, :placeholder => l(:label_bid_reason), :style => "resize: none;", :class => 'noline'%></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"> <%= submit_tag l(:button_add), :name => nil , :class => "enterprise",
|
||||
:onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'"%>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
|
||||
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="underline-contests_three"></div>
|
||||
|
||||
<!--参赛作品列表,通过判断,竞赛的id为2,3,6的显示参赛作品为提交的项目,否则显示参赛的应用-->
|
||||
|
||||
<% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %>
|
||||
|
||||
<% @contesting_project.sort.reverse.each do |c_project|%>
|
||||
<% if c_project.project %>
|
||||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<tr>
|
||||
<td><strong>参赛作品: </strong></td>
|
||||
<td> <%= link_to(c_project.project.name, project_path(c_project.project), :target => '_blank') %> </td>
|
||||
</tr></br>
|
||||
</div>
|
||||
<div style="padding-left: 68px">
|
||||
<tr>
|
||||
<td>简介:</td>
|
||||
<td> <%= c_project.project.description.truncate(90, omission: '...') %> </td>
|
||||
</tr></br>
|
||||
</div>
|
||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||
<tr>
|
||||
<td>发布时间:</td>
|
||||
<td> <%= format_time c_project.created_at%> </td>
|
||||
|
||||
</tr>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% @contesting_softapplication.each do |c_softapplication|%>
|
||||
<% if c_softapplication.softapplication %>
|
||||
<div style="padding-left: 18px">
|
||||
<div style="font-size: 15px">
|
||||
<tr>
|
||||
<td><strong>参赛作品: </strong></td>
|
||||
<td> <%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %> </td>
|
||||
</tr></br>
|
||||
</div>
|
||||
<div style="padding-left: 68px">
|
||||
<tr>
|
||||
<td>简介:</td>
|
||||
<td> <%= c_softapplication.softapplication.description.truncate(90, omission: '...') %> </td>
|
||||
</tr></br>
|
||||
</div>
|
||||
<div style="padding-left: 68px; padding-bottom: 8px">
|
||||
<tr>
|
||||
<td>发布时间:</td>
|
||||
<td> <%= format_time c_softapplication.created_at %> </td>
|
||||
|
||||
</tr>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="underline-contests_three"></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||
</div>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<tr>
|
||||
<td style="padding-left: 8px"><%=link_to request.host()+"/softapplications", :controller=>'softapplications', :action=>'index' %></td>
|
||||
<td ><%=link_to l(:field_homepage), home_path %> >
|
||||
<%=link_to l(:label_contest_softapplication), :controller=>'softapplications', :action=>'index' %>
|
||||
<%=link_to l(:label_contest_work), :controller=>'softapplications', :action=>'index' %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
|
||||
<% unless @course.teacher.user_extensions.nil?%>
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td><td class="font_lighter_sidebar"><%= @course.teacher.user_extensions.occupation %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td><td class="font_lighter_sidebar"><%= @course.teacher.user_extensions.school %></td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<tr>
|
||||
|
|
|
@ -99,18 +99,25 @@
|
|||
<!-- <td class="font_index">
|
||||
<%=link_to "#{@contest.join_in_competitions.count}",:controller => "contests",:action => "show_participator" %>
|
||||
</td> -->
|
||||
<!--关注人数-->
|
||||
<td class="font_index">
|
||||
<%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_project' %>
|
||||
<!-- <%=link_to "#{@contest.projects.where('is_public=1').count}", :controller => 'contests', :action => 'show_project' %> -->
|
||||
<%=link_to "#{@contest.watcher_users.count}", :controller => 'contests', :action => 'show_project' %>
|
||||
</td>
|
||||
<!--参赛作品数量-->
|
||||
<td class="font_index">
|
||||
<%=link_to "#{@contest.contesting_softapplications.count}", :controller => 'contests', :action => 'show_softapplication' %>
|
||||
<% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %>
|
||||
<%=link_to "#{@contest.projects.where('is_public=1').count}" %>
|
||||
<% else %>
|
||||
<%=link_to "#{@contest.contesting_softapplications.count}", :controller => 'contests', :action => 'show_attendingcontest' %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr class="font_aram">
|
||||
<!-- <td align="center" width="70px"> <%= l(:label_participate) %></td> -->
|
||||
<td align="center" width="70px"> <%= l(:label_contest_project) %></td>
|
||||
<td align="center" width="70px"> <%= l(:label_contest_application) %></td>
|
||||
<td align="center" width="70px"> <%= l(:label_contest_watchers) %></td>
|
||||
<td align="center" width="70px"> <%= l(:label_contest_work) %></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -178,9 +185,9 @@
|
|||
<div class="user_underline"></div>
|
||||
<div class="font_title_left">
|
||||
<strong><%= l(:label_x_followers, :count => @contest.watcher_users.count) %></strong>
|
||||
<% if show_more_fans?(@contest) %>
|
||||
<!-- <% if show_more_fans?(@contest) %>
|
||||
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'contests', :action => 'show_contest_user'%></span>
|
||||
<% end %>
|
||||
<% end %> -->
|
||||
</div>
|
||||
<div class="left_wf">
|
||||
<table>
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<% pages_count = @reply_pages.offset %>
|
||||
<% @replies.each do |reply| %>
|
||||
<div class="reply" id="<%= "reply-#{reply.id}" %>">
|
||||
<p class="font_lighter"><%= pages_count += 1 %>楼 :</p>
|
||||
<p class="font_lighter"><span style="display: none"><%= pages_count += 1 %>楼 :</span></p>
|
||||
<div class="contextual-borad">
|
||||
<!-- <%= link_to(
|
||||
image_tag('comment.png'),
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(
|
||||
function(){
|
||||
function () {
|
||||
$("#province").attr("href", "#WOpenWindow")
|
||||
$("#province").leanModal({top: 100, closeButton: ".modal_close"});
|
||||
}
|
||||
|
@ -11,133 +9,116 @@
|
|||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function get_options(value){
|
||||
<script type="text/javascript">
|
||||
function get_options(value) {
|
||||
$.ajax({
|
||||
type :"POST",
|
||||
url :'/school/get_options/'+encodeURIComponent(value),
|
||||
data :'text',
|
||||
success: function(data){
|
||||
|
||||
type: "POST",
|
||||
url: '/school/get_options/' + encodeURIComponent(value),
|
||||
data: 'text',
|
||||
success: function (data) {
|
||||
|
||||
$("#province").val(value)
|
||||
$("#schoollist").html(data);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<div class="contextual" style="padding-right: 10px;">
|
||||
<div class="contextual" style="padding-right: 10px;">
|
||||
<%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
|
||||
<%= call_hook(:view_my_account_contextual, :user => @user)%>
|
||||
<%= call_hook(:view_my_account_contextual, :user => @user) %>
|
||||
</div>
|
||||
|
||||
<h3 style="padding-left: 10px;"><%= l(:label_my_account)%></h3>
|
||||
<h3 style="padding-left: 10px;"><%= l(:label_my_account) %></h3>
|
||||
|
||||
<fieldset class="box" style="margin:10px;">
|
||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:label_my_photo)%>
|
||||
<%= l(:label_my_photo) %>
|
||||
</legend>
|
||||
<div>
|
||||
<!--upload profiles-->
|
||||
<%= render :partial=> "avatar/avatar_form", :locals=>{source:@user} %>
|
||||
<%= render :partial => "avatar/avatar_form", :locals => {source: @user} %>
|
||||
<!--upload-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<%= labelled_form_for :user, @user,
|
||||
:url => { :action => "account" },
|
||||
:html => { :id => 'my_account_form',
|
||||
:method => :post } do |f| %>
|
||||
</fieldset>
|
||||
<%= labelled_form_for :user, @user,
|
||||
:url => {:action => "account"},
|
||||
:html => {:id => 'my_account_form',
|
||||
:method => :post} do |f| %>
|
||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:label_information_plural)%>
|
||||
<%= l(:label_information_plural) %>
|
||||
</legend>
|
||||
<div>
|
||||
<span id = 'name' style = 'display:none'>
|
||||
<span id='name' style='display:none'>
|
||||
<p style="width:530px;padding-left: 26px;">
|
||||
<%= f.text_field :lastname, :required => true %>
|
||||
<span class='font_lighter'><%=l(:field_lastname_eg)%></span>
|
||||
<span class='font_lighter'><%= l(:field_lastname_eg) %></span>
|
||||
</p>
|
||||
<p style="width:530px;padding-left: 26px;">
|
||||
<%= f.text_field :firstname, :required => true %>
|
||||
<span class='font_lighter'><%=l(:field_firstname_eg)%></span>
|
||||
<span class='font_lighter'><%= l(:field_firstname_eg) %></span>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
<span id = 'enterprise' style = 'display:none'>
|
||||
<span id='enterprise' style='display:none'>
|
||||
<p style="width:400px;padding-left: 26px;">企业名<%= text_field_tag :enterprise_name, @user.firstname %>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
<!-- added by bai 增加账户里的性别-->
|
||||
<span id = 'gender' style = 'display:none'>
|
||||
<% unless @user.user_extensions.nil? %>
|
||||
<% if @user.user_extensions.gender == 0 %>
|
||||
<span id='gender' style='display:none'>
|
||||
<% if @user.user_extensions.nil? %>
|
||||
<p style="width:400px;padding-left: 26px;">
|
||||
<%= 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' %>
|
||||
<%= 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 %>
|
||||
<% if @user.user_extensions.gender == 0 %><!-- label_gender_male -->
|
||||
<p style="width:400px;padding-left: 26px;">
|
||||
<%= 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 style="width:400px;padding-left: 26px;">
|
||||
<%= 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 ,:class =>'gender' %>
|
||||
</p>
|
||||
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p style="width:400px;padding-left: 26px;"><%= 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>
|
||||
<%= 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, :class => 'gender' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<!-- added by bai 单位-->
|
||||
<!--<% unless @user.user_extensions.nil?%>
|
||||
<p style="width:400px;padding-left: 26px;"><%= l(:field_occupation)%> <span class="required">*</span><%= text_field_tag "occupation", @user.user_extensions.occupation, :class => 'occupation' %>
|
||||
</p>
|
||||
<%else%>
|
||||
<p style="width:400px;padding-left: 26px;"><%= l(:field_occupation)%><span class="required">*</span><%= text_field_tag "occupation", nil, :class => 'occupation' %>
|
||||
</p>
|
||||
<%end%>
|
||||
-->
|
||||
<% end %>
|
||||
</span>
|
||||
|
||||
<!-- added by Wen -->
|
||||
|
||||
|
||||
<p style="padding-left: 26px;">
|
||||
<% unless User.current.user_extensions.school.nil? %>
|
||||
|
||||
<% if User.current.user_extensions.school.nil? %>
|
||||
<%= l(:field_occupation) %> <span class="required">*</span>
|
||||
|
||||
<input id="province" name="province" type="text" value="<%=User.current.user_extensions.school.province%>" readonly />
|
||||
<input id="occupation" name="occupation" type="hidden" value="<%=User.current.user_extensions.school.id%>" />
|
||||
<input id="occupation_name" type="text" value="<%=User.current.user_extensions.school.name%>" readonly />
|
||||
|
||||
|
||||
<input id="province" name="province" type="text" value="请单击选择省份及学校" readonly>
|
||||
<input id="occupation" name="occupation" type="hidden"/>
|
||||
<input id="occupation_name" type="text" readonly/>
|
||||
<% else %>
|
||||
|
||||
<%= l(:field_occupation) %> <span class="required">*</span>
|
||||
<input id="province" name="province" type="text" value="请单击选择省份及学校" readonly >
|
||||
<input id="occupation" name="occupation" type="hidden" />
|
||||
<input id="occupation_name" type="text" readonly />
|
||||
|
||||
<input id="province" name="province" type="text" value="<%= User.current.user_extensions.school.province %>" readonly/>
|
||||
<input id="occupation" name="occupation" type="hidden" value="<%= User.current.user_extensions.school.id %>"/>
|
||||
<input id="occupation_name" type="text" value="<%= User.current.user_extensions.school.name %>" readonly/>
|
||||
<% end %>
|
||||
<!-- <input id="occupation" readonly />-->
|
||||
</p>
|
||||
|
||||
<div id="WOpenWindow">
|
||||
<a class="modal_close" href="#"></a>
|
||||
|
||||
<h2>学校列表</h2>
|
||||
|
||||
<div class="pcontent">
|
||||
<ul id="provincelist" class="school_list">
|
||||
<% @ss = School.find_by_sql("select distinct province from schools") %>
|
||||
<% @ss.each do |s| %>
|
||||
<li style="width: 15%; float: left;">
|
||||
<a style="cursor: pointer;" onclick = "get_options('<%= s.province %>')"><%= s.province %>
|
||||
<a style="cursor: pointer;" onclick="get_options('<%= s.province %>')"><%= s.province %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
@ -149,272 +130,51 @@
|
|||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function test(id, name){
|
||||
function test(id, name) {
|
||||
//$("#occupation").html("<option value='"+id+"'>"+name+"</option>");
|
||||
$("#occupation").val(id);
|
||||
$("#occupation_name").val(name);
|
||||
|
||||
$("#lean_overlay").hide();
|
||||
$("#WOpenWindow").hide();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- added by bai 增加了地区 -->
|
||||
|
||||
</span>
|
||||
|
||||
<!-- 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%>
|
||||
<%= f.select :language, :Chinese => :zh, :English => :en %>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<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;
|
||||
}
|
||||
}
|
||||
}
|
||||
function init_identity_and_title(pField, identity, cField, title) {
|
||||
for(var i = 0; i < pField.options.length; i++) {
|
||||
if (pField.options[i].value==identity)
|
||||
{
|
||||
pField.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
showtechnical_title(identity, cField);
|
||||
for(var i = 0; i < cField.options.length; i++) {
|
||||
if (cField.options[i].value==title)
|
||||
{
|
||||
cField.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<% province = User.current.user_extensions.location %>
|
||||
<% city = User.current.user_extensions.location_city %>
|
||||
<% identity = User.current.user_extensions.identity %>
|
||||
<% title = User.current.user_extensions.technical_title %>
|
||||
<script type="text/javascript" language="javascript">
|
||||
$().ready(function(){
|
||||
<% province = User.current.user_extensions.location %>
|
||||
<% city = User.current.user_extensions.location_city %>
|
||||
<% identity = User.current.user_extensions.identity %>
|
||||
<% title = User.current.user_extensions.technical_title %>
|
||||
<script type="text/javascript" language="javascript">
|
||||
$().ready(function () {
|
||||
var province = "<%= "#{province}" %>"
|
||||
var city = "<%= "#{city}" %>"
|
||||
init_province_and_city(document.getElementById('userProvince'),province, document.getElementById('userCity'),city);
|
||||
init_province_and_city(document.getElementById('userProvince'), province, document.getElementById('userCity'), city);
|
||||
var identity = "<%= "#{identity}" %>"
|
||||
var title = "<%= "#{title}" %>"
|
||||
init_identity_and_title(document.getElementById('userIdentity'),identity, document.getElementById('userTechnical_title'),title);
|
||||
init_identity_and_title(document.getElementById('userIdentity'), identity, document.getElementById('userTechnical_title'), title);
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<p style="width:400px;padding-left: 26px;"><%= l(:label_location) %>
|
||||
<select onchange="showcity(this.value, document.getElementById('userCity'));" name="province" id="userProvince" class="location">
|
||||
<p style="width:400px;padding-left: 26px;"><%= l(:label_location) %>
|
||||
<select onchange="showcity(this.value, document.getElementById('userCity'));" name="province" id="userProvince" class="location">
|
||||
<option value="">--请选择省份--</option>
|
||||
<option value="北京">北京</option>
|
||||
<option value="上海">上海</option>
|
||||
|
@ -451,12 +211,296 @@ $().ready(function(){
|
|||
<option value="澳门">澳门特别行政区</option>
|
||||
<option value="台湾">台湾</option>
|
||||
<option value="海外">海外</option>
|
||||
</select>
|
||||
<select name="city" id="userCity" class="location"></select></p>
|
||||
<!-- end -->
|
||||
</select>
|
||||
<select name="city" id="userCity" class="location"></select>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<% unless @user.user_extensions.identity == 2 %>
|
||||
<p style="width:400px;padding-left: 26px;">
|
||||
<%= l(:label_identity) %>
|
||||
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
||||
<option value=""><%= l(:label_account_identity_choose) %></option>
|
||||
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
||||
<option value="1"><%= l(:label_account_identity_student) %></option>
|
||||
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
||||
|
||||
</select>
|
||||
<span id='technical_title' style='display:none'>
|
||||
<select name="technical_title" id="userTechnical_title"></select>
|
||||
</span>
|
||||
<span id='no' style='display:none'>
|
||||
<!-- modified by fq -->
|
||||
<% unless User.current.user_extensions.student_id.nil? %>
|
||||
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %>
|
||||
<% else %>
|
||||
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
|
||||
<% end %>
|
||||
<!-- end -->
|
||||
</span>
|
||||
<% else %>
|
||||
<span style="display:none">
|
||||
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
||||
<option value=""><%= l(:label_account_identity_choose) %></option>
|
||||
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
||||
<option value="1"><%= l(:label_account_identity_student) %></option>
|
||||
<option value="2"><%= l(:label_account_identity_enterprise) %></option>
|
||||
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
||||
|
||||
</select>
|
||||
</span>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<% if Setting.openid? %>
|
||||
<p> <%= f.text_field :identity_url %> </p>
|
||||
<% end %>
|
||||
|
||||
<% @user.custom_field_values.select(&:editable?).each do |value| %>
|
||||
<p> <%= custom_field_tag_with_label :user, value %> </p>
|
||||
<% end %>
|
||||
<%= call_hook(:view_my_account, :user => @user, :form => f) %>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:field_mail_notification) %>
|
||||
</legend>
|
||||
<div style="padding-left: 26px;"> <!-- modified by ming -->
|
||||
<p style="width:380px;">
|
||||
<%= render :partial => 'users/mail_notifications' %>
|
||||
</p></div>
|
||||
</fieldset>
|
||||
|
||||
<!-- added by william -->
|
||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;display: none">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:label_user_extensions) %>
|
||||
</legend>
|
||||
<div>
|
||||
<%= render :partial => 'users/user_extensions' %></div>
|
||||
</fieldset>
|
||||
<!-- end -->
|
||||
<%= submit_tag l(:button_save) %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<% html_title(l(:label_my_account)) -%>
|
||||
|
||||
<!-- 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
function init_identity_and_title(pField, identity, cField, title) {
|
||||
for (var i = 0; i < pField.options.length; i++) {
|
||||
if (pField.options[i].value == identity) {
|
||||
pField.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
showtechnical_title(identity, cField);
|
||||
for (var i = 0; i < cField.options.length; i++) {
|
||||
if (cField.options[i].value == title) {
|
||||
cField.selectedIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
function showtechnical_title(identity, technical_titleField) {
|
||||
switch (identity) {
|
||||
|
||||
|
@ -467,7 +511,7 @@ $().ready(function(){
|
|||
$('#enterprise').hide()
|
||||
$('#gender').show()
|
||||
var technical_titleOptions = new Array(
|
||||
"<%= l(:label_technicl_title_professor) %>","<%= l(:label_technicl_title_associate_professor) %>","<%= l(:label_technicl_title_lecturer) %>","<%= l(:label_technicl_title_teaching_assistant) %>");
|
||||
"<%= l(:label_technicl_title_professor) %>", "<%= l(:label_technicl_title_associate_professor) %>", "<%= l(:label_technicl_title_lecturer) %>", "<%= l(:label_technicl_title_teaching_assistant) %>");
|
||||
break;
|
||||
|
||||
case '1' :
|
||||
|
@ -499,8 +543,8 @@ $().ready(function(){
|
|||
|
||||
}
|
||||
technical_titleField.options.length = 0;
|
||||
for(var i = 0; i < technical_titleOptions.length; i++) {
|
||||
technical_titleField.options[i]=new Option(technical_titleOptions[i],technical_titleOptions[i]);
|
||||
for (var i = 0; i < technical_titleOptions.length; i++) {
|
||||
technical_titleField.options[i] = new Option(technical_titleOptions[i], technical_titleOptions[i]);
|
||||
/*
|
||||
if (cityField.options[i].value==city)
|
||||
{
|
||||
|
@ -508,97 +552,5 @@ $().ready(function(){
|
|||
document.oblogform["city"].selectedIndex = i;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- end -->
|
||||
|
||||
|
||||
|
||||
<% unless @user.user_extensions.identity == 2 %>
|
||||
<p style="width:400px;padding-left: 26px;"><%= l(:label_identity) %>
|
||||
<td class="info" style="width: 10px">
|
||||
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
||||
<option value=""><%= l(:label_account_identity_choose) %></option>
|
||||
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
||||
<option value="1"><%= l(:label_account_identity_student) %></option>
|
||||
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
||||
|
||||
</select></td>
|
||||
<span id = 'technical_title' style = 'display:none'>
|
||||
<select name="technical_title" id="userTechnical_title"></select></span>
|
||||
<span id = 'no' style = 'display:none'>
|
||||
|
||||
<!-- modified by fq -->
|
||||
<% unless User.current.user_extensions.student_id.nil? %>
|
||||
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %></span>
|
||||
<!-- <input name="no" id="no" value=<%= "#{User.current.user_extensions.student_id}" %> placeholder="请输入学号"></span> -->
|
||||
<% else %>
|
||||
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
|
||||
<!-- <input name="no" id="no" placeholder="请输入学号"></span> -->
|
||||
<% end %>
|
||||
<!-- end -->
|
||||
</td></tr></table></p>
|
||||
<% else %>
|
||||
<span style="display:none">
|
||||
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
||||
<option value=""><%= l(:label_account_identity_choose) %></option>
|
||||
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
||||
<option value="1"><%= l(:label_account_identity_student) %></option>
|
||||
<option value="2"><%= l(:label_account_identity_enterprise) %></option>
|
||||
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
||||
|
||||
</select>
|
||||
</span>
|
||||
<% end %>
|
||||
<!-- end -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<% if Setting.openid? %>
|
||||
<p>
|
||||
<%= f.text_field :identity_url %>
|
||||
</p></div>
|
||||
<% end %>
|
||||
|
||||
<% @user.custom_field_values.select(&:editable?).each do |value| %>
|
||||
<p>
|
||||
<%= custom_field_tag_with_label :user, value %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= call_hook(:view_my_account, :user => @user, :form => f) %>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:field_mail_notification)%>
|
||||
</legend>
|
||||
<div style="padding-left: 26px;"> <!-- modified by ming -->
|
||||
<p style="width:380px;>
|
||||
<%= render :partial => 'users/mail_notifications' %>
|
||||
</p></div>
|
||||
</fieldset>
|
||||
|
||||
<!-- <fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:label_preferences)%>
|
||||
</legend>
|
||||
<div style="padding-left: 26px;">
|
||||
<%= render :partial => 'users/preferences' %></div>
|
||||
</fieldset> -->
|
||||
<!-- added by william -->
|
||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;display: none">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
<%= l(:label_user_extensions)%>
|
||||
</legend>
|
||||
<div>
|
||||
<%= render :partial => 'users/user_extensions' %></div>
|
||||
</fieldset>
|
||||
<!-- end -->
|
||||
<%= submit_tag l(:button_save) %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<% html_title(l(:label_my_account)) -%>
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
<% @admin = @project.project_infos%>
|
||||
<%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%>
|
||||
<!-- <%= @admin.first.user.user_extensions.occupation %> -->
|
||||
<% unless @project.course_extra.school.nil? %>
|
||||
<%= @project.course_extra.school.name %>
|
||||
<% end %>
|
||||
<%# unless @project.course_extra.school.nil? %>
|
||||
<%= @project.course_extra.teacher.user_extensions.school.try(:name) %>
|
||||
<%# end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<p >
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
<td><%=h @repository.url %></td>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if @repositories.size >1 %>
|
||||
<p style=" word-wrap: break-word; word-break: break-all">
|
||||
(<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo|
|
||||
link_to h(repo.name),
|
||||
|
@ -21,7 +20,6 @@
|
|||
:id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
|
||||
:class => 'repository' + (repo == @repository ? ' selected' : '')
|
||||
}.join(' | ').html_safe %>)</p>
|
||||
<% else %>
|
||||
<h3>项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码</h3>
|
||||
<h3>建立版本库文件夹,打开命令行执行如下:</h3>
|
||||
<div class="repos_explain">
|
||||
|
@ -29,6 +27,7 @@
|
|||
<p>git add *</p>
|
||||
<p>git commit -m "first commit"</p>
|
||||
<p>git remote add origin <%= @repos_url%></p>
|
||||
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
||||
<p>git push -u origin master:master</p>
|
||||
</div>
|
||||
<h3>已经有本地库,还没有配置远程地址,打开命令行执行如下:</h3>
|
||||
|
@ -36,6 +35,7 @@
|
|||
<p>git remote add origin <%= @repos_url%></p>
|
||||
<p>git add .</p>
|
||||
<p>git commit -m "first commit"</p>
|
||||
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
||||
<p>git push -u origin master:matser</p>
|
||||
</div>
|
||||
</h3>
|
||||
|
@ -44,10 +44,10 @@
|
|||
<p>git remote add trustie <%= @repos_url%></p>
|
||||
<p>git add .</p>
|
||||
<p>git commit -m "first commit"</p>
|
||||
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
||||
<p>git push -u trustie master:matser</p>
|
||||
<p><%= link_to "李海提供", user_path(646)%></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</h3>
|
||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||||
<%= render :partial => 'dir_list' %>
|
||||
|
|
|
@ -4,12 +4,17 @@
|
|||
$(document).ready(function() {
|
||||
$("#province").html("<option value='0' selected = true style='display: none;'></option>");
|
||||
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
type :"POST",
|
||||
url :'/school/get_province',
|
||||
data :'text',
|
||||
success: function(data){
|
||||
$("#province").append(data);
|
||||
data: "send",
|
||||
success: function(data, textStatus){
|
||||
|
||||
$("#province").append(data.text);
|
||||
$("#schoollist").html(data.text_s);
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
alert('新建参赛作品成功!');
|
|
@ -14,10 +14,10 @@
|
|||
</div>
|
||||
<div class="avatar-4"; style="float: left; margin-top: 7px "><%= image_tag('/images/app1.png')%></div>
|
||||
<div style="float: left; width: 600px; padding-top: 6px; margin-left: 8px"><%= softapplication.description.truncate(95, omission: '...') %></div>
|
||||
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; ">
|
||||
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; line-height: 0.5em ">
|
||||
<%contest = softapplication.contests.first%>
|
||||
<p>所属竞赛:<%= contest ? link_to(contest.name.truncate(10, omission: '...'), show_softapplication_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
|
||||
<p>所属类别:<%= softapplication.app_type_name.truncate(5, omission: '...') %></p>
|
||||
<p>所属竞赛:<%= contest ? link_to(contest.name.truncate(14, omission: '...'), show_attendingcontest_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
|
||||
<p>所属类别:<%= softapplication.app_type_name.truncate(10, omission: '...') %></p>
|
||||
<p>系统支持:<%= softapplication.android_min_version_available %></p>
|
||||
</div>
|
||||
<div style="padding-left: 53px">
|
||||
|
@ -36,4 +36,4 @@
|
|||
|
||||
<div class="pagination"><%= pagination_links_full @softapplication_pages, @softapplication_count, :per_page_links => false %></div>
|
||||
|
||||
<% html_title l(:label_softapplication_list)%>
|
||||
<% html_title l(:label_contest_work_list)%>
|
|
@ -27,7 +27,7 @@
|
|||
<tr>
|
||||
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all">所属类别:<%= @softapplication.app_type_name %></td>
|
||||
<% contest = @softapplication.contests.first %>
|
||||
<td style="width: 240px; word-wrap: break-word; word-break: break-all">所属竞赛:<%= contest ? link_to(contest.name, show_softapplication_contest_path(contest)) : '尚未加入竞赛'%></td>
|
||||
<td style="width: 240px; word-wrap: break-word; word-break: break-all">所属竞赛:<%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛'%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">发布人员:<%= @softapplication.user.name %></td>
|
||||
|
@ -35,7 +35,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 40px">
|
||||
<span>应用下载:</span>
|
||||
<span>作品下载:</span>
|
||||
<span>
|
||||
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current) } %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
||||
</span>
|
||||
|
@ -56,13 +56,13 @@
|
|||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong><div style="font-size: 15px;">应用简介:</div></strong>
|
||||
<strong><div style="font-size: 15px;">作品简介:</div></strong>
|
||||
<div style="padding-top: 5px"><%= @softapplication.description %></div>
|
||||
</div>
|
||||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<div style="font-size: 15px;"><strong>应用得分:</strong></div>
|
||||
<div style="font-size: 15px;"><strong>作品得分:</strong></div>
|
||||
<!-- <div>打分总人数:<%= @softapplication.raters(:quality).count%></div> -->
|
||||
<div style="overflow: hidden">
|
||||
<div style="margin-left: 15%; float: left">
|
||||
|
@ -93,7 +93,7 @@
|
|||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<strong><div style="font-size: 15px">软件截图:</div></strong>
|
||||
<strong><div style="font-size: 15px">作品截图:</div></strong>
|
||||
<div class="softapplication-img" style="padding-top: 5px">
|
||||
<% @image_results.take(4).each do |attachment| %>
|
||||
<%= link_to_attachment_img attachment, :class => "soft-application", :download => "true" %>
|
||||
|
@ -116,7 +116,7 @@
|
|||
<% end %>
|
||||
</div> -->
|
||||
<div style="height: 50px">
|
||||
<div style="font-size: 15px"><strong>软件评论:</strong></div>
|
||||
<div style="font-size: 15px"><strong>作品评论:</strong></div>
|
||||
<div style="padding-left: 210px">评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %><span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<h3>test</h3>
|
||||
|
||||
|
||||
<% users = User.all%>
|
||||
<% user = User.find(1)%>
|
||||
<table>
|
||||
<tr>
|
||||
<th>id</th><th>name</th><th>C</th><th>I</th><th>S</th><th>filecount</th><th>issuecount</th><th>level</th><th>attachconut</th>
|
||||
</tr>
|
||||
<% users.each do |user| %>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
<td><%= calculate_attachments(user) %></td>
|
||||
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
</table>
|
||||
|
||||
<hr/>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<p>
|
||||
<%= label_tag "user_mail_notification", l(:description_user_mail_notification), :class => "hidden-for-sighted" %>
|
||||
<%= label_tag "user_mail_notification", l(:description_user_mail_notification), :class => "hidden-for-sighted_bak" %>
|
||||
<%= select_tag(
|
||||
'user[mail_notification]',
|
||||
options_for_select(
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
</div>
|
||||
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul> <%= pagination_links_full @info_pages %> <ul>
|
||||
<ul> <%= pagination_links_full @info_pages %> </ul>
|
||||
</div>
|
||||
|
||||
<% else %>
|
||||
|
|
|
@ -152,7 +152,11 @@
|
|||
<div style="float: left; margin-left: 12px; margin-top: 10px; margin-bottom: -4px; width: 380px;">
|
||||
<!-- <%= link_to(contest.name, contest.event_url, :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %> -->
|
||||
<%= link_to(contest.name, show_contest_contest_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %>
|
||||
<span class="font_lighter">(<span style="font-size: 17px"><%= link_to("含#{contest.contesting_softapplications.count}个app", show_softapplication_contest_path(contest), :target => "_blank") %></span>)</span>
|
||||
<% if contest.id == 2 or contest.id == 3 or contest.id == 6 %>
|
||||
<span class="font_lighter">(<span style="font-size: 13px"><%= link_to("含#{contest.projects.where('is_public=1').count}个作品", show_attendingcontest_contest_path(contest), :target => "_blank") %></span>)</span>
|
||||
<% else %>
|
||||
<span class="font_lighter">(<span style="font-size: 13px"><%= link_to("含#{contest.contesting_softapplications.count}个app", show_attendingcontest_contest_path(contest), :target => "_blank") %></span>)</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 12px; margin-bottom: 2px; width: 380px;">
|
||||
|
@ -201,7 +205,7 @@
|
|||
</div>
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>最新参赛应用</strong></h3>
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>最新参赛作品</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'softapplications', :action => 'index', :host => Setting.contest_domain}, :target => "_blank" %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<% if Softapplication.count > 0%>
|
||||
|
|
|
@ -1610,3 +1610,5 @@ en:
|
|||
label_activity_time: publish date
|
||||
|
||||
|
||||
# ajax异步验证
|
||||
modal_valid_passing: can be used.
|
||||
|
|
|
@ -190,6 +190,8 @@ zh:
|
|||
notice_issue_done_ratios_updated: 问题完成度已更新。
|
||||
notice_gantt_chart_truncated: "这个表是截断的因为它超过了可以显示的最大数量(%{max})"
|
||||
|
||||
error_complete_occupation: "请您填写工作单位,否则本系统的部分功能将无法正常使用。"
|
||||
|
||||
error_can_t_load_default_data: "无法载入默认设置:%{value}"
|
||||
error_scm_not_found: "版本库中不存在该条目和(或)其修订版本。"
|
||||
error_scm_command_failed: "访问版本库时发生错误:%{value}"
|
||||
|
@ -1847,8 +1849,9 @@ zh:
|
|||
label_contest_project: 参赛项目
|
||||
label_contest_softapplication: 参赛应用
|
||||
label_contest_response: 用户反馈
|
||||
label_contest_watchers: 关注人员
|
||||
label_contest_watchers: 关注人数
|
||||
label_contest_application: 参赛应用
|
||||
label_contest_work: 参赛作品
|
||||
button_contesting_as_project: 我要参赛(新建项目)
|
||||
button_contesting_as_application: 我要参赛(发布应用)
|
||||
label_release_softapplication: 发布应用
|
||||
|
@ -1877,6 +1880,8 @@ zh:
|
|||
label_edit_softapplication: 修改应用
|
||||
label_contest_delete: 删除竞赛
|
||||
label_softapplication_list: 应用列表
|
||||
label_contest_work_list: 参赛作品列表
|
||||
label_attending_contest: 我要参赛
|
||||
|
||||
label_coursefile_sharingarea: 课程资源共享区
|
||||
label_sort_by_activity: 按动态数排序
|
||||
|
@ -1891,3 +1896,6 @@ zh:
|
|||
label_contest_settings: 配置竞赛
|
||||
label_contest_delete: 删除竞赛
|
||||
|
||||
# ajax异步验证
|
||||
modal_valid_passing: 可以使用
|
||||
|
|
@ -70,7 +70,8 @@ RedmineApp::Application.routes.draw do
|
|||
match 'update_contest' , via: [:put]
|
||||
match 'show_contest' , via: :get
|
||||
match 'show_project' , via: :get
|
||||
match 'show_softapplication', via: :get
|
||||
match 'show_softapplication' , via: :get
|
||||
match 'show_attendingcontest' , via: :get
|
||||
match 'show_participator' , via: :get
|
||||
match 'add' , via: [:get, :post]
|
||||
match 'add_softapplication' , via: [:get, :post]
|
||||
|
@ -126,6 +127,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'account/register', :to => 'account#register', :via => [:get, :post], :as => 'register'
|
||||
match 'account/lost_password', :to => 'account#lost_password', :via => [:get, :post], :as => 'lost_password'
|
||||
match 'account/activate', :to => 'account#activate', :via => :get
|
||||
match 'account/valid_ajax', :to => 'account#valid_ajax', :via => :get
|
||||
|
||||
match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news', :via => [:get, :post, :put]
|
||||
match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put]
|
||||
|
@ -550,6 +552,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'calls/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
|
||||
match 'calls/:id/show_project_homework', :controller => 'bids', :action => 'show_project_homework', :as => 'project_for_bid_homework' # by huang
|
||||
match 'calls/:id/add', :controller => 'bids', :action => 'add'
|
||||
match 'calls/:id/delete', :controller => 'bids', :action => 'delete'
|
||||
match 'calls/:id/add_homework', :controller => 'bids', :action => 'add_homework', via: :post
|
||||
match 'calls/:id/new_submit_homework', to: 'bids#new_submit_homework', via: :get, as: 'new_submit_homework'
|
||||
match 'words/add_project_respond', :controller => 'words', :action => 'add_project_respond'
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class DropUserScores < ActiveRecord::Migration
|
||||
def change
|
||||
drop_table :user_scores
|
||||
end
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
class CreateUserLevels < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :user_levels do |t|
|
||||
t.integer :user_id
|
||||
t.integer :level
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,11 @@
|
|||
class CreateUserScores < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :user_scores do |t|
|
||||
t.integer :user_id
|
||||
t.integer :collaboration
|
||||
t.integer :influence
|
||||
t.integer :skill
|
||||
t.integer :activity
|
||||
end
|
||||
end
|
||||
end
|
14
db/schema.rb
14
db/schema.rb
|
@ -863,6 +863,11 @@ ActiveRecord::Schema.define(:version => 20140509020307) do
|
|||
add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id"
|
||||
add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id"
|
||||
|
||||
create_table "user_levels", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "level"
|
||||
end
|
||||
|
||||
create_table "user_preferences", :force => true do |t|
|
||||
t.integer "user_id", :default => 0, :null => false
|
||||
t.text "others"
|
||||
|
@ -873,16 +878,11 @@ ActiveRecord::Schema.define(:version => 20140509020307) do
|
|||
add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
|
||||
|
||||
create_table "user_scores", :force => true do |t|
|
||||
t.integer "user_id", :null => false
|
||||
t.integer "user_id"
|
||||
t.integer "collaboration"
|
||||
t.integer "influence"
|
||||
t.integer "skill"
|
||||
t.integer "active"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "level"
|
||||
t.integer "file"
|
||||
t.integer "issue"
|
||||
t.integer "activity"
|
||||
end
|
||||
|
||||
create_table "user_statuses", :force => true do |t|
|
||||
|
|
|
@ -279,8 +279,10 @@ end
|
|||
###new add by linchun
|
||||
Redmine::MenuManager.map :contest_menu do |menu|
|
||||
menu.push :respond, :show_contest_contest_path, :caption => :label_user_response
|
||||
menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
||||
menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application
|
||||
#menu.push :project, :show_project_contest_path, :caption => :label_contest_project
|
||||
#menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application
|
||||
menu.push :attendingcontest, {:controller => 'contests', :action => 'show_attendingcontest'}, :caption => :label_attending_contest
|
||||
# menu.push :attendingcontest, :show_attendingcontest_contest_path, :caption => :label_attendin,g_contest
|
||||
# menu.push :result, { :controller => 'bids', :action => 'show_results' },
|
||||
# :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p }
|
||||
end
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
/* TODO: base/common/page 准备封装一些基本样式组合调用 参考YUI
|
||||
*******************************************************************************/
|
||||
span[id^=valid_user]{
|
||||
padding-left: 10px;
|
||||
}
|
||||
.red{
|
||||
color: red;
|
||||
}
|
||||
.green{
|
||||
color: green;
|
||||
}
|
||||
.border_box {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
|
|
Loading…
Reference in New Issue