Merge branch 'develop' of 10.0.47.245:/home/trustie2 into tmp1
Conflicts: app/controllers/bids_controller.rb app/helpers/bids_helper.rb config/locales/zh.yml db/schema.rb
|
@ -152,7 +152,8 @@ class AccountController < ApplicationController
|
|||
unless @user.id.nil?
|
||||
ue = UserExtensions.create(:identity => params[:identity].to_i,:technical_title => params[:technical_title], :gender => params[:gender].to_i, :user_id => @user.id, :student_id => params[:no])
|
||||
unless params[:province].nil? || params[:city].nil?
|
||||
ue.location = params[:province]+params[:city]
|
||||
ue.location = params[:province]
|
||||
ue.location_city = params[:city]
|
||||
ue.save
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,6 +12,7 @@ class BidsController < ApplicationController
|
|||
helper :watchers
|
||||
helper :attachments
|
||||
include AttachmentsHelper
|
||||
helper :projects
|
||||
|
||||
def index
|
||||
# Modified by nie
|
||||
|
@ -62,6 +63,46 @@ class BidsController < ApplicationController
|
|||
end
|
||||
#end
|
||||
end
|
||||
|
||||
def fork
|
||||
@new_bid = Bid.new
|
||||
@new_bid.safe_attributes = params[:bid]
|
||||
@courses = []
|
||||
@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
@membership.each do |membership|
|
||||
if membership.project.project_type == 1
|
||||
@courses << membership.project
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def create_fork
|
||||
@homework = Bid.new
|
||||
@homework.name = params[:bid][:name]
|
||||
@homework.description = params[:bid][:description]
|
||||
@homework.reward_type = 3
|
||||
# @bid.budget = params[:bid][:budget]
|
||||
@homework.deadline = params[:bid][:deadline]
|
||||
@homework.budget = 0
|
||||
@homework.author_id = User.current.id
|
||||
@homework.commit = 0
|
||||
@homework.homework_type = params[:bid][:homework_type]
|
||||
@homework.parent_id = @bid.id
|
||||
@homework.save_attachments(params[:attachments] || (params[:bid] && params[:bid][:uploads]))
|
||||
# @bid.
|
||||
if @homework.save
|
||||
HomeworkForCourse.create(:project_id => params[:course], :bid_id => @homework.id)
|
||||
unless @bid.watched_by?(User.current)
|
||||
if @bid.add_watcher(User.current)
|
||||
flash[:notice] = l(:label_bid_succeed)
|
||||
end
|
||||
end
|
||||
redirect_to respond_path(@homework)
|
||||
else
|
||||
@homework.safe_attributes = params[:bid]
|
||||
render :action => 'fork'
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
@user = @bid.author
|
||||
|
@ -393,6 +434,7 @@ class BidsController < ApplicationController
|
|||
def find_bid
|
||||
if params[:id]
|
||||
@bid = Bid.find(params[:id])
|
||||
@user = @bid.author
|
||||
end
|
||||
rescue
|
||||
render_404
|
||||
|
|
|
@ -79,30 +79,41 @@ class MyController < ApplicationController
|
|||
|
||||
# added by bai
|
||||
if @user.user_extensions.nil?
|
||||
se = UserExtensions.new
|
||||
se.user_id = @user.id
|
||||
se.occupation = params[:occupation]
|
||||
se.gender = params[:gender]
|
||||
if params[:province] && params[:city]
|
||||
se.location = params[:province]+params[:city]
|
||||
end
|
||||
if params[:identity]
|
||||
se.identity = params[:identity].to_i
|
||||
end
|
||||
if params[:technical_title]
|
||||
se.technical_title = params[:technical_title]
|
||||
end
|
||||
if params[:no]
|
||||
se.student_id = params[:no]
|
||||
end
|
||||
se = UserExtensions.new
|
||||
se.user_id = @user.id
|
||||
if params[:occupation]
|
||||
se.occupation = params[:occupation]
|
||||
end
|
||||
|
||||
se.gender = params[:gender]
|
||||
|
||||
if params[:province] && params[:city]
|
||||
se.location = params[:province]
|
||||
se.location_city = params[:city]
|
||||
end
|
||||
if params[:identity]
|
||||
se.identity = params[:identity].to_i
|
||||
end
|
||||
if params[:technical_title]
|
||||
se.technical_title = params[:technical_title]
|
||||
end
|
||||
if params[:no]
|
||||
se.student_id = params[:no]
|
||||
end
|
||||
se.save
|
||||
else
|
||||
se = @user.user_extensions
|
||||
se.occupation = params[:occupation]
|
||||
if params[:occupation]
|
||||
se.occupation = params[:occupation]
|
||||
end
|
||||
|
||||
se.gender = params[:gender]
|
||||
|
||||
if params[:province] && params[:city]
|
||||
se.location = params[:province]+params[:city]
|
||||
end
|
||||
se.location = params[:province]
|
||||
se.location_city = params[:city]
|
||||
end
|
||||
|
||||
if params[:identity]
|
||||
se.identity= params[:identity].to_i
|
||||
end
|
||||
|
|
|
@ -39,7 +39,7 @@ module BidsHelper
|
|||
Bid.tagged_with(tag_name).order('updated_on desc')
|
||||
end
|
||||
|
||||
def sort_bid(state)
|
||||
def sort_bid(state)
|
||||
content = ''.html_safe
|
||||
case state
|
||||
when 0
|
||||
|
@ -54,6 +54,17 @@ module BidsHelper
|
|||
content_tag('div', content, :class => "tabs")
|
||||
end
|
||||
|
||||
def course_options_for_select(courses)
|
||||
# <option value = '0'>#{l(:label_choose_reward)}</option>
|
||||
html = ''
|
||||
courses.each do |course|
|
||||
html << "<option value = #{course.id}>"
|
||||
html << course.name
|
||||
html << "</option>"
|
||||
end
|
||||
html.html_safe
|
||||
end
|
||||
|
||||
|
||||
# used to get the reward and handle the value which can be used to display in views
|
||||
# added by william
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<!-- fq -->
|
||||
<%= error_messages_for 'bid' %>
|
||||
<!--[form:project]-->
|
||||
<p><%= l(:label_homeworks_form_new_description) %></p>
|
||||
<p>选择课程<%= select_tag 'course', course_options_for_select(@courses) %></p>
|
||||
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :value => @bid.name %></p>
|
||||
|
||||
<p style="margin-left:-10px;padding-right: 20px;">
|
||||
<%= f.text_area :description, :rows => 8, :value => @bid.description, :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;" %><%= calendar_for('bid_deadline')%>
|
||||
</p>
|
||||
<p><%= f.select :homework_type, homework_type_option %>
|
||||
</p>
|
||||
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
||||
<p><%= render :partial => 'attachments/form', :locals => {:container => @homework} %></p>
|
||||
</fieldset>
|
|
@ -0,0 +1,10 @@
|
|||
<!-- fq -->
|
||||
<h3><%=l(:label_new_call)%></h3>
|
||||
|
||||
<%= labelled_form_for @new_bid, :url => {:controller => 'bids', :action => 'create_fork', :id => @bid.id} do |f| %>
|
||||
<div class="box tabular">
|
||||
<%= render :partial => 'fork_form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<!-- <%= javascript_tag "$('#bid_name').focus();" %> -->
|
||||
<% end %>
|
||||
</div>
|
|
@ -38,7 +38,7 @@
|
|||
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @bid.name %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"> <%= watcher_link(@bid, User.current) %> </td>
|
||||
<td align="center"> <%= watcher_link(@bid, User.current) %> <%= link_to("选为作业", fork_path(@bid)) %></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;">课程学期:</td><td class="font_lighter_sidebar"><%= @course.term %></td>
|
||||
</tr>
|
||||
<% unless @course.teacher.user_extensions.occupation.nil? %>
|
||||
<% unless @course.teacher.user_extensions.nil?%>
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;">教师单位:</td><td class="font_lighter_sidebar"><%= @course.teacher.user_extensions.occupation %></td>
|
||||
</tr>
|
||||
|
|
|
@ -49,7 +49,13 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><%= l(:label_limit_time) %>: <%= @bid.deadline %></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<% unless @bid.parent_id.nil?%>
|
||||
<tr>
|
||||
<td><div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; -o-text-overflow: ellipsis; width:200px">
|
||||
作业来源:<%= link_to(Bid.find(@bid.parent_id).name, respond_path(Bid.find(@bid.parent_id))) %></div></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -111,23 +111,23 @@
|
|||
|
||||
<% 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>
|
||||
<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>
|
||||
<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>
|
||||
<tr>
|
||||
<td style="padding-left: 8px" width="70px">
|
||||
<% if @user.user_extensions.identity == 0 %>
|
||||
<%= l(:label_technical_title) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.technical_title %></td>
|
||||
<%= l(:label_technical_title) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.technical_title %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% else%>
|
||||
<tr>
|
||||
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %></td>
|
||||
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %>:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %></td>
|
||||
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %>:</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tr>
|
||||
|
|
|
@ -70,8 +70,8 @@
|
|||
|
||||
<!-- added by bai 增加了地区 -->
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function showcity(province, cityField) {
|
||||
<script type="text/javascript" language="javascript">
|
||||
function showcity(province, cityField) {
|
||||
switch (province) {
|
||||
case "北京" :
|
||||
var cityOptions = new Array(
|
||||
|
@ -271,19 +271,38 @@ function init_province_and_city(pField, province, cField, city) {
|
|||
}
|
||||
}
|
||||
}
|
||||
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(){
|
||||
var province = "<%= "#{province}" %>"
|
||||
var city = "<%= "#{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);
|
||||
|
||||
});
|
||||
</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 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>
|
||||
|
@ -386,7 +405,16 @@ $().ready(funtion(){
|
|||
<span id = 'technical_title' style = 'display:none'>
|
||||
<select name="technical_title" id="userTechnical_title"></select></span>
|
||||
<span id = 'no' style = 'display:none'>
|
||||
<input name="no" id="no" placeholder="请输入学号"></span>
|
||||
|
||||
<!-- 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>
|
||||
<!-- end -->
|
||||
</div>
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
|
||||
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
|
||||
<% @flag = @is_valuate.first.praise_or_tread %>
|
||||
<% if @flag == 1 %> <!-- 顶过 -->
|
||||
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
|
||||
<table style="line-height: 1px">
|
||||
<tr>
|
||||
<td ><%= image_tag "/images/praise_tread/praise_true.png" ,:title => l(:label_issue_praise_over) %></td>
|
||||
<td ><%= image_tag "/images/praise_tread/praise_false.png" , weight:"35px", height:"35px",:title => l(:label_issue_praise_over) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><%= image_tag "/images/praise_tread/tread_false.png",:title => l(:label_issue_appraise_over) %></td>
|
||||
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"35px", height:"35px",:title => l(:label_issue_appraise_over) %></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
@ -23,14 +23,14 @@
|
|||
|
||||
<table style="line-height: 1px">
|
||||
<tr>
|
||||
<td > <%= image_tag "/images/praise_tread/praise_false.png", :title => l(:label_issue_appraise_over) %></td>
|
||||
<td > <%= image_tag "/images/praise_tread/praise_false.png",weight:"35px", height:"35px", :title => l(:label_issue_appraise_over) %></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= image_tag "/images/praise_tread/tread_true.png",:title => l(:label_issue_tread_over) %> </td>
|
||||
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"35px", height:"35px",:title => l(:label_issue_tread_over) %> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
|
@ -39,18 +39,18 @@
|
|||
|
||||
<table style="line-height: 1px">
|
||||
<tr>
|
||||
<td > <%= link_to image_tag("/images/praise_tread/praise_false.png",:title => l(:label_issue_praise)),
|
||||
<td > <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"35px", height:"35px",:title => l(:label_issue_praise)),
|
||||
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class%> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> <%= link_to image_tag("/images/praise_tread/tread_false.png",:title => l(:label_issue_tread)),:controller=>"praise_tread",
|
||||
<td> <%= link_to image_tag("/images/praise_tread/tread_true.png",weight:"35px", height:"35px",:title => l(:label_issue_tread)),:controller=>"praise_tread",
|
||||
:action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class %></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- end -->
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
<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) %> <%= 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) %> <%= 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) %> <%= bid.budget%> <%= 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) %> <%= bid.budget%> <%= 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> -->
|
||||
|
|
|
@ -85,12 +85,14 @@ default:
|
|||
delivery_method: :smtp
|
||||
smtp_settings:
|
||||
|
||||
address: smtp.163.com
|
||||
port: 25
|
||||
domain: smtp.163.com
|
||||
authentication: :login
|
||||
user_name: trustie2@163.com
|
||||
password: PDLtrustie2
|
||||
|
||||
|
||||
address: smtp.gmail.com
|
||||
port: 587
|
||||
domain: smtp.gmail.com
|
||||
authentication: :plain
|
||||
user_name: trustieforge@gmail.com
|
||||
password: '!@#$%^&*()'
|
||||
|
||||
# Absolute path to the directory where attachments are stored.
|
||||
# The default is the 'files' directory in your Redmine instance.
|
||||
|
|
|
@ -1402,12 +1402,13 @@ zh:
|
|||
|
||||
label_welcome_leave_message: 您好!系统目前正在内测,有意见和建议请
|
||||
label_welcome_click_me: 点击我
|
||||
|
||||
# modified by bai
|
||||
label_issue_praise: 好问题,顶!
|
||||
label_issue_tread: 烂问题,踩!
|
||||
label_issue_praise_over: 已顶!
|
||||
label_issue_tread_over: 已踩!
|
||||
label_issue_appraise_over: 已评价!
|
||||
label_issue_praise_over: 我刚才顶过了~
|
||||
label_issue_tread_over: 我刚才踩过了~
|
||||
#end
|
||||
label_issue_appraise_over: 只能评价一次哦!
|
||||
label_welcome_my_respond: 请在此留下你的意见和建议!
|
||||
label_no_current_fans: 该用户暂无粉丝
|
||||
label_no_current_watchers: 该用户暂未关注其他用户
|
||||
|
@ -1515,6 +1516,7 @@ zh:
|
|||
label_course_homework_new: 发布作业
|
||||
label_course_data: 资料
|
||||
label_homework_statistics: 作业统计
|
||||
label_technical_title: 职称
|
||||
|
||||
# added by william 无english版本
|
||||
label_bidding_results: 应标结果
|
||||
|
|
|
@ -446,6 +446,8 @@ RedmineApp::Application.routes.draw do
|
|||
match 'calls/create_homework', :to => 'bids#create_homework'
|
||||
match 'calls/:id/homework_respond', :to => 'bids#homework_respond'
|
||||
match 'calls/:id/homework_statistics', :to => 'bids#homework_statistics'
|
||||
match 'calls/:id/fork', :to => 'bids#fork', :as => 'fork'
|
||||
match 'calls/:id/create_fork', :to => 'bids#create_fork'
|
||||
|
||||
post 'join_in/join', :to => 'courses#join', :as => 'join'
|
||||
delete 'join_in/join', :to => 'courses#unjoin'
|
||||
|
|
|
@ -56,7 +56,7 @@ activity_days_default:
|
|||
per_page_options:
|
||||
default: '25,50,100'
|
||||
mail_from:
|
||||
default: trustie2@163.com
|
||||
default: trustieforge@gmail.com
|
||||
bcc_recipients:
|
||||
default: 1
|
||||
plain_text_mail:
|
||||
|
@ -90,11 +90,6 @@ diff_max_lines_displayed:
|
|||
enabled_scm:
|
||||
serialized: true
|
||||
default:
|
||||
- Subversion
|
||||
- Darcs
|
||||
- Mercurial
|
||||
- Cvs
|
||||
- Bazaar
|
||||
- Git
|
||||
autofetch_changesets:
|
||||
default: 1
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
class AddidentityToUserExtensions < ActiveRecord::Migration
|
||||
def up
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
class RemoveidentityFromUserExtensions < ActiveRecord::Migration
|
||||
def up
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddIdentityToUserExtensions < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :user_extensions, :identity, :integer
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddStudentIdToUserExtensions < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :user_extensions, :student_id, :integer
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddTeacherRealnameToUserExtensions < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :user_extensions, :teacher_realname, :string
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddStudentrRealnameToUserExtensions < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :user_extensions, :student_realname, :string
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddParentIdToBid < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :bids, :parent_id, :integer
|
||||
end
|
||||
end
|
75
db/schema.rb
|
@ -11,8 +11,15 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20130926005448) do
|
||||
|
||||
|
||||
create_table "a_user_watchers", :force => true do |t|
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "member_id"
|
||||
end
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -88,6 +95,7 @@
|
|||
t.integer "commit"
|
||||
t.integer "reward_type"
|
||||
t.integer "homework_type"
|
||||
t.integer "parent_id"
|
||||
end
|
||||
|
||||
create_table "boards", :force => true do |t|
|
||||
|
@ -281,9 +289,9 @@
|
|||
add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
|
||||
|
||||
create_table "issue_relations", :force => true do |t|
|
||||
t.integer "issue_from_id", :null => false
|
||||
t.integer "issue_to_id", :null => false
|
||||
t.string "relation_type", :default => "", :null => false
|
||||
t.integer "issue_from_id", :null => false
|
||||
t.integer "issue_to_id", :null => false
|
||||
t.string "relation_type", :null => false
|
||||
t.integer "delay"
|
||||
end
|
||||
|
||||
|
@ -425,6 +433,22 @@
|
|||
add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id"
|
||||
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
||||
|
||||
create_table "messages_for_bids", :force => true do |t|
|
||||
t.string "message"
|
||||
t.integer "user_id"
|
||||
t.integer "bid_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "messages_for_users", :force => true do |t|
|
||||
t.integer "messager_id"
|
||||
t.integer "user_id"
|
||||
t.string "message"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "news", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.string "title", :limit => 60, :default => "", :null => false
|
||||
|
@ -564,26 +588,6 @@
|
|||
t.string "issues_visibility", :limit => 30, :default => "default", :null => false
|
||||
end
|
||||
|
||||
create_table "seems_rateable_cached_ratings", :force => true do |t|
|
||||
t.integer "cacheable_id", :limit => 8
|
||||
t.string "cacheable_type"
|
||||
t.float "avg", :null => false
|
||||
t.integer "cnt", :null => false
|
||||
t.string "dimension"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "seems_rateable_rates", :force => true do |t|
|
||||
t.integer "rater_id", :limit => 8
|
||||
t.integer "rateable_id"
|
||||
t.string "rateable_type"
|
||||
t.float "stars", :null => false
|
||||
t.string "dimension"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "settings", :force => true do |t|
|
||||
t.string "name", :default => "", :null => false
|
||||
t.text "value"
|
||||
|
@ -594,9 +598,9 @@
|
|||
|
||||
create_table "shares", :force => true do |t|
|
||||
t.date "created_on"
|
||||
t.string "url"
|
||||
t.string "title"
|
||||
t.integer "share_type"
|
||||
t.string "share_type"
|
||||
t.string "url"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "project_id"
|
||||
|
@ -604,9 +608,8 @@
|
|||
t.string "description"
|
||||
end
|
||||
|
||||
create_table "students_for_courses", :force => true do |t|
|
||||
t.integer "student_id"
|
||||
t.integer "course_id"
|
||||
create_table "students", :force => true do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
@ -669,7 +672,7 @@
|
|||
create_table "tokens", :force => true do |t|
|
||||
t.integer "user_id", :default => 0, :null => false
|
||||
t.string "action", :limit => 30, :default => "", :null => false
|
||||
t.string "value", :limit => 40, :default => "", :null => false
|
||||
t.string "value", :limit => 40
|
||||
t.datetime "created_on", :null => false
|
||||
end
|
||||
|
||||
|
@ -701,13 +704,12 @@
|
|||
t.integer "student_id"
|
||||
t.string "teacher_realname"
|
||||
t.string "student_realname"
|
||||
=======
|
||||
t.string "location_city"
|
||||
t.integer "identity"
|
||||
t.string "technical_title"
|
||||
|
||||
|
||||
|
||||
>>>>>>> .theirs
|
||||
end
|
||||
|
||||
create_table "user_preferences", :force => true do |t|
|
||||
|
@ -732,13 +734,12 @@
|
|||
|
||||
create_table "user_tags", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "tag_id"
|
||||
t.string "description"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count"
|
||||
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
|
||||
|
||||
create_table "users", :force => true do |t|
|
||||
t.string "login", :default => "", :null => false
|
||||
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 8.2 KiB |