Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
01ab676622
|
@ -525,7 +525,7 @@ class ApplicationController < ActionController::Base
|
||||||
#
|
#
|
||||||
# @return [boolean, string] name of the layout to use or false for no layout
|
# @return [boolean, string] name of the layout to use or false for no layout
|
||||||
def use_layout
|
def use_layout
|
||||||
request.xhr? ? false : 'base'
|
request.xhr? ? false : 'users_base'
|
||||||
end
|
end
|
||||||
|
|
||||||
def invalid_authenticity_token
|
def invalid_authenticity_token
|
||||||
|
|
|
@ -9,6 +9,7 @@ class MemosController < ApplicationController
|
||||||
|
|
||||||
helper :attachments
|
helper :attachments
|
||||||
include AttachmentsHelper
|
include AttachmentsHelper
|
||||||
|
include ApplicationHelper
|
||||||
|
|
||||||
layout 'base_memos'
|
layout 'base_memos'
|
||||||
|
|
||||||
|
@ -19,6 +20,11 @@ class MemosController < ApplicationController
|
||||||
@content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)} <br/> "
|
@content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)} <br/> "
|
||||||
@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
||||||
@content = "<blockquote>" << @content
|
@content = "<blockquote>" << @content
|
||||||
|
#@content = "> #{ll(Setting.default_language, :text_user_wrote, @memo.author)}\n> "
|
||||||
|
#@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||||
|
#@content_html = textilizable(@content)
|
||||||
|
@temp = Memo.new
|
||||||
|
@temp.content = @content
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
@ -34,12 +40,13 @@ class MemosController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
@quote = params[:quote][:quote]
|
||||||
@memo = Memo.new(params[:memo])
|
@memo = Memo.new(params[:memo])
|
||||||
@memo.forum_id = params[:forum_id]
|
@memo.forum_id = params[:forum_id]
|
||||||
@memo.author_id = User.current.id
|
@memo.author_id = User.current.id
|
||||||
|
|
||||||
@memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads]))
|
@memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads]))
|
||||||
|
@memo.content = @quote + @memo.content
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @memo.save
|
if @memo.save
|
||||||
format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" }
|
format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" }
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class MessagesController < ApplicationController
|
class MessagesController < ApplicationController
|
||||||
|
include ApplicationHelper
|
||||||
menu_item :boards
|
menu_item :boards
|
||||||
default_search_scope :messages
|
default_search_scope :messages
|
||||||
before_filter :find_board, :only => [:new, :preview,:edit]
|
before_filter :find_board, :only => [:new, :preview,:edit]
|
||||||
|
@ -80,10 +81,12 @@ class MessagesController < ApplicationController
|
||||||
if params[:reply][:content] == ""
|
if params[:reply][:content] == ""
|
||||||
(redirect_to board_message_path(@board, @topic, :r => @reply), :notice => l(:label_reply_empty);return)
|
(redirect_to board_message_path(@board, @topic, :r => @reply), :notice => l(:label_reply_empty);return)
|
||||||
end
|
end
|
||||||
|
@quote = params[:quote][:quote]
|
||||||
@reply = Message.new
|
@reply = Message.new
|
||||||
@reply.author = User.current
|
@reply.author = User.current
|
||||||
@reply.board = @board
|
@reply.board = @board
|
||||||
@reply.safe_attributes = params[:reply]
|
@reply.safe_attributes = params[:reply]
|
||||||
|
@reply.content = @quote + @reply.content
|
||||||
@topic.children << @reply
|
@topic.children << @reply
|
||||||
#@topic.update_attribute(:updated_on, Time.now)
|
#@topic.update_attribute(:updated_on, Time.now)
|
||||||
if !@reply.new_record?
|
if !@reply.new_record?
|
||||||
|
@ -143,8 +146,18 @@ class MessagesController < ApplicationController
|
||||||
@subject = @message.subject
|
@subject = @message.subject
|
||||||
@subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
|
@subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
|
||||||
|
|
||||||
@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
|
#@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
|
||||||
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
#@temp = Message.new
|
||||||
|
##@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> "
|
||||||
|
#@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||||
|
#@content_html = textilizable(@content)
|
||||||
|
#@temp.content = @content_html
|
||||||
|
@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)} <br/> "
|
||||||
|
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
||||||
|
@content = "<blockquote>" << @content
|
||||||
|
@temp = Message.new
|
||||||
|
@temp.content = @content
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def preview
|
def preview
|
||||||
|
|
|
@ -41,7 +41,7 @@ class UsersController < ApplicationController
|
||||||
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
||||||
:activity_new_score_index, :influence_new_score_index, :score_new_index]
|
:activity_new_score_index, :influence_new_score_index, :score_new_index]
|
||||||
before_filter :auth_user_extension, only: :show
|
before_filter :auth_user_extension, only: :show
|
||||||
#before_filter :rest_user_score, only: :show
|
before_filter :rest_user_score, only: :show
|
||||||
accept_api_auth :index, :show, :create, :update, :destroy,:tag_save , :tag_saveEx
|
accept_api_auth :index, :show, :create, :update, :destroy,:tag_save , :tag_saveEx
|
||||||
|
|
||||||
#william
|
#william
|
||||||
|
@ -794,7 +794,9 @@ class UsersController < ApplicationController
|
||||||
praise_num(@user)
|
praise_num(@user)
|
||||||
changeset_num(@user)
|
changeset_num(@user)
|
||||||
document_num(@user)
|
document_num(@user)
|
||||||
|
attachment_num(@user)
|
||||||
|
issue_done_ratio_num(@user)
|
||||||
|
post_issue_num(@user)
|
||||||
end
|
end
|
||||||
|
|
||||||
#验证是否显示课程
|
#验证是否显示课程
|
||||||
|
|
|
@ -98,11 +98,11 @@ module CoursesHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
alias teacherCountOrigin teacherCount
|
#alias teacherCountOrigin teacherCount
|
||||||
def teacherCount project
|
#def teacherCount project
|
||||||
count = teacherCountOrigin project
|
# count = teacherCountOrigin project
|
||||||
garble count
|
# garble count
|
||||||
end
|
#end
|
||||||
|
|
||||||
# 注意:此方法有问题,速度慢且结果不准
|
# 注意:此方法有问题,速度慢且结果不准
|
||||||
# alias studentCountOrigin studentCount
|
# alias studentCountOrigin studentCount
|
||||||
|
@ -114,7 +114,20 @@ module CoursesHelper
|
||||||
# 学生人数计算
|
# 学生人数计算
|
||||||
# add by nwb
|
# add by nwb
|
||||||
def studentCount course
|
def studentCount course
|
||||||
count = course.student.count
|
count = searchStudent(course).count#course.student.count
|
||||||
|
if count <= 5
|
||||||
|
result = count.to_s
|
||||||
|
elsif count < 10 && count > 5
|
||||||
|
result = "5+"
|
||||||
|
else
|
||||||
|
result = (count-count % 10).to_s + "+"
|
||||||
|
end
|
||||||
|
result
|
||||||
|
end
|
||||||
|
|
||||||
|
#课程成员数计算
|
||||||
|
def memberCount course
|
||||||
|
count = searchStudent(course).count + searchTeacherAndAssistant(course).count
|
||||||
if count <= 5
|
if count <= 5
|
||||||
result = count.to_s
|
result = count.to_s
|
||||||
elsif count < 10 && count > 5
|
elsif count < 10 && count > 5
|
||||||
|
|
|
@ -600,7 +600,7 @@ module UserScoreHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def praise_num(user,project=nil)
|
def praise_num(user,project=nil)
|
||||||
if project.nil?
|
if !project.nil?
|
||||||
pts = PraiseTread.where("praise_tread_object_type = 'Issue' || praise_tread_object_type = 'Message' and praise_or_tread = 1").all
|
pts = PraiseTread.where("praise_tread_object_type = 'Issue' || praise_tread_object_type = 'Message' and praise_or_tread = 1").all
|
||||||
result = []
|
result = []
|
||||||
result1 = []
|
result1 = []
|
||||||
|
@ -674,7 +674,7 @@ module UserScoreHelper
|
||||||
update_score(option_number)
|
update_score(option_number)
|
||||||
end
|
end
|
||||||
|
|
||||||
def document_num(user,project=nil?)
|
def document_num(user,project=nil)
|
||||||
if project.nil?
|
if project.nil?
|
||||||
Document.includes(:user).where("user_id = '#{user.id}'").all.count
|
Document.includes(:user).where("user_id = '#{user.id}'").all.count
|
||||||
else
|
else
|
||||||
|
@ -689,14 +689,13 @@ module UserScoreHelper
|
||||||
option_number.attachment = Attachment.includes(:author).where("author_id = '#{user.id}'").all.count
|
option_number.attachment = Attachment.includes(:author).where("author_id = '#{user.id}'").all.count
|
||||||
update_score(option_number)
|
update_score(option_number)
|
||||||
end
|
end
|
||||||
#===================here to continue============================
|
|
||||||
def attachment_num(user,project=nil)
|
def attachment_num(user,project=nil)
|
||||||
if project.nil?
|
if project.nil?
|
||||||
Attachment.includes(:author).where("author_id = '#{user.id}'").all.count
|
Attachment.includes(:author,:container).where("author_id = '#{user.id}' and container_type = 'Project'").all.count
|
||||||
else
|
else
|
||||||
Attachment.includes(:author,:container).where("author_id = '#{user.id}' and container_type = 'Project' and container_id = #{project.id}").all.count
|
Attachment.includes(:author,:container).where("author_id = '#{user.id}' and container_type = 'Project' and container_id = #{project.id}").all.count
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#更新缺陷完成度次数
|
#更新缺陷完成度次数
|
||||||
|
@ -706,8 +705,13 @@ module UserScoreHelper
|
||||||
update_score(option_number)
|
update_score(option_number)
|
||||||
end
|
end
|
||||||
|
|
||||||
def issue_done_ratio_num(user,project)
|
def issue_done_ratio_num(user,project=nil)
|
||||||
|
if project.nil?
|
||||||
Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count
|
Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count
|
||||||
|
else
|
||||||
|
Journal.joins(:issue,:details,:user).where("#{Issue.table_name}.project_id = '#{project.id}' and #{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#更新发布缺陷次数
|
#更新发布缺陷次数
|
||||||
|
@ -718,6 +722,11 @@ module UserScoreHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def post_issue_num(user,project=nil)
|
def post_issue_num(user,project=nil)
|
||||||
|
if project.nil?
|
||||||
Issue.includes(:author).where("author_id = '#{user.id}'").all.count
|
Issue.includes(:author).where("author_id = '#{user.id}'").all.count
|
||||||
|
else
|
||||||
|
Issue.includes(:author).where("author_id = '#{user.id}' and project_id = '#{project.id}'").all.count
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -324,7 +324,7 @@ class User < Principal
|
||||||
# Returns the user that matches provided login and password, or nil
|
# Returns the user that matches provided login and password, or nil
|
||||||
#登录,返回用户名与密码匹配的用户
|
#登录,返回用户名与密码匹配的用户
|
||||||
def self.try_to_login(login, password)
|
def self.try_to_login(login, password)
|
||||||
login = login.to_s
|
login = login.to_s.lstrip.rstrip
|
||||||
password = password.to_s
|
password = password.to_s
|
||||||
|
|
||||||
# Make sure no one can sign in with an empty login or password
|
# Make sure no one can sign in with an empty login or password
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
<p style="width:500px;"><%= l(:label_bids_form_contest_new_description) %></p>
|
<p style="width:500px;"><%= l(:label_bids_form_contest_new_description) %></p>
|
||||||
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Contest::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_name)}" %></p>
|
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Contest::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_name)}" %></p>
|
||||||
|
|
||||||
<p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Contest::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_description)}" %></p>
|
<p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 5, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Contest::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_description)}" %></p>
|
||||||
|
|
||||||
<p style="margin-left:-10px;"><%= f.text_field :password, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
|
<p style="margin-left:-10px;"><%= f.text_field :password, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
|
<%= f.text_area :budget, :required => true, :size => 60,:rows => 4,:maxlength => Contest::DESCRIPTION_LENGTH_LIMIT, :style => "width:490px;", :placeholder => l(:label_bids_reward_what) %>
|
||||||
|
|
||||||
<!-- 设置奖项设置的打开 关闭开关-->
|
<!-- 设置奖项设置的打开 关闭开关-->
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
||||||
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
||||||
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
||||||
|
<div id="message_quote" class="wiki"></div>
|
||||||
|
|
||||||
|
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||||
<%= label_tag(l(:label_reply_plural)) %>:
|
<%= label_tag(l(:label_reply_plural)) %>:
|
||||||
<!-- <p> < %= f.text_area :content, :required => true, :size => "75%", :resize => "none", id: 'editor01' %> </p> -->
|
<!-- <p> < %= f.text_area :content, :required => true, :size => "75%", :resize => "none", id: 'editor01' %> </p> -->
|
||||||
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %></p>
|
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %></p>
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
ckeditor.setData("<%= raw escape_javascript(@content) %>");
|
//ckeditor.setData("<%= raw escape_javascript(@content) %>");
|
||||||
|
$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>");
|
||||||
|
$('#quote_quote').html("<%= raw escape_javascript(@content) %>");
|
||||||
showAndScrollTo("new_memo", "cke_editor01");
|
showAndScrollTo("new_memo", "cke_editor01");
|
|
@ -32,7 +32,9 @@
|
||||||
<%= f.select :board_id, boards_options_for_select(@message.course.boards) %></p>
|
<%= f.select :board_id, boards_options_for_select(@message.course.boards) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<div id="message_quote" class="wiki"></div>
|
||||||
|
|
||||||
|
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||||
<p>
|
<p>
|
||||||
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
|
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
|
||||||
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %></p>
|
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %></p>
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
$('#message_subject').val("<%= raw escape_javascript(@subject) %>");
|
$('#message_subject').val("<%= raw escape_javascript(@subject) %>");
|
||||||
$('#message_content').val("<%= raw escape_javascript(@content) %>");
|
$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>");
|
||||||
|
//$('#message_content').val("<#%= raw escape_javascript(@content) %>");
|
||||||
|
$('#quote_quote').html("<%= raw escape_javascript(@content) %>");
|
||||||
|
|
||||||
showAndScrollTo("reply", "message_content");
|
showAndScrollTo("reply", "message_content");
|
||||||
$('#message_content').scrollTop = $('#message_content').scrollHeight - $('#message_content').clientHeight;
|
$('#message_content').scrollTop = $('#message_content').scrollHeight - $('#message_content').clientHeight;
|
||||||
|
|
|
@ -71,6 +71,12 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function word_keydown(e){
|
||||||
|
if(e&& e.keyCode==13){
|
||||||
|
ssearch();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -85,7 +91,7 @@
|
||||||
<li style="width: 40%; float: left">请选择省份:
|
<li style="width: 40%; float: left">请选择省份:
|
||||||
<select id="province" name="province" onchange="get_school(this.value)"></select>
|
<select id="province" name="province" onchange="get_school(this.value)"></select>
|
||||||
</li>
|
</li>
|
||||||
<li style="width: 50%; float: left"><input type="text" id="key_word" name="key_word" />
|
<li style="width: 50%; float: left"><input type="text" id="key_word" name="key_word" onkeydown="word_keydown(event);"/>
|
||||||
<input type="button" class="enterprise" value="搜索" onclick="ssearch()"></li>
|
<input type="button" class="enterprise" value="搜索" onclick="ssearch()"></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
<div class='desc_item text_nowrap'>
|
<div class='desc_item text_nowrap'>
|
||||||
[<%= get_course_term course %>]
|
[<%= get_course_term course %>]
|
||||||
<%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
<%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||||
(<%= "#{studentCount(course)}人" %>)
|
(<%= "#{memberCount(course)}人" %>)
|
||||||
<% files_count = course.attachments.count.to_s %>
|
<% files_count = course.attachments.count.to_s %>
|
||||||
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
||||||
</div>
|
</div>
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
<div class='desc_item text_nowrap'>
|
<div class='desc_item text_nowrap'>
|
||||||
[<%= get_course_term course %>]
|
[<%= get_course_term course %>]
|
||||||
<%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
<%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||||
(<%= "#{studentCount(course)}人" %>)
|
(<%= "#{memberCount(course)}人" %>)
|
||||||
<% files_count = course.attachments.count.to_s %>
|
<% files_count = course.attachments.count.to_s %>
|
||||||
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
||||||
</div>
|
</div>
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
<div class='desc_item text_nowrap'>
|
<div class='desc_item text_nowrap'>
|
||||||
[<%= get_course_term course %>]
|
[<%= get_course_term course %>]
|
||||||
<%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
<%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||||
(<%= "#{studentCount(course)}人" %> )
|
(<%= "#{memberCount(course)}人" %> )
|
||||||
<% files_count = course.attachments.count.to_i.to_s %>
|
<% files_count = course.attachments.count.to_i.to_s %>
|
||||||
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
||||||
</div>
|
</div>
|
||||||
|
|
75
db/schema.rb
75
db/schema.rb
|
@ -177,6 +177,58 @@ ActiveRecord::Schema.define(:version => 20140730024419) do
|
||||||
|
|
||||||
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
||||||
|
|
||||||
|
create_table "code_review_assignments", :force => true do |t|
|
||||||
|
t.integer "issue_id"
|
||||||
|
t.integer "change_id"
|
||||||
|
t.integer "attachment_id"
|
||||||
|
t.string "file_path"
|
||||||
|
t.string "rev"
|
||||||
|
t.string "rev_to"
|
||||||
|
t.string "action_type"
|
||||||
|
t.integer "changeset_id"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "code_review_project_settings", :force => true do |t|
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "tracker_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.integer "updated_by"
|
||||||
|
t.boolean "hide_code_review_tab", :default => false
|
||||||
|
t.integer "auto_relation", :default => 1
|
||||||
|
t.integer "assignment_tracker_id"
|
||||||
|
t.text "auto_assign"
|
||||||
|
t.integer "lock_version", :default => 0, :null => false
|
||||||
|
t.boolean "tracker_in_review_dialog", :default => false
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "code_review_user_settings", :force => true do |t|
|
||||||
|
t.integer "user_id", :default => 0, :null => false
|
||||||
|
t.integer "mail_notification", :default => 0, :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "code_reviews", :force => true do |t|
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "change_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.integer "line"
|
||||||
|
t.integer "updated_by_id"
|
||||||
|
t.integer "lock_version", :default => 0, :null => false
|
||||||
|
t.integer "status_changed_from"
|
||||||
|
t.integer "status_changed_to"
|
||||||
|
t.integer "issue_id"
|
||||||
|
t.string "action_type"
|
||||||
|
t.string "file_path"
|
||||||
|
t.string "rev"
|
||||||
|
t.string "rev_to"
|
||||||
|
t.integer "attachment_id"
|
||||||
|
t.integer "file_count", :default => 0, :null => false
|
||||||
|
t.boolean "diff_all"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "comments", :force => true do |t|
|
create_table "comments", :force => true do |t|
|
||||||
t.string "commented_type", :limit => 30, :default => "", :null => false
|
t.string "commented_type", :limit => 30, :default => "", :null => false
|
||||||
t.integer "commented_id", :default => 0, :null => false
|
t.integer "commented_id", :default => 0, :null => false
|
||||||
|
@ -367,9 +419,9 @@ ActiveRecord::Schema.define(:version => 20140730024419) do
|
||||||
t.string "web_title"
|
t.string "web_title"
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.string "page_type"
|
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.string "page_type"
|
||||||
t.integer "sort_type"
|
t.integer "sort_type"
|
||||||
t.integer "image_width", :default => 107
|
t.integer "image_width", :default => 107
|
||||||
t.integer "image_height", :default => 63
|
t.integer "image_height", :default => 63
|
||||||
|
@ -796,7 +848,7 @@ ActiveRecord::Schema.define(:version => 20140730024419) do
|
||||||
t.integer "osp_id"
|
t.integer "osp_id"
|
||||||
t.integer "parent_id"
|
t.integer "parent_id"
|
||||||
t.string "subject", :null => false
|
t.string "subject", :null => false
|
||||||
t.text "content", :null => false
|
t.text "content", :limit => 16777215, :null => false
|
||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.integer "replies_count", :default => 0
|
t.integer "replies_count", :default => 0
|
||||||
t.integer "last_reply_id"
|
t.integer "last_reply_id"
|
||||||
|
@ -830,6 +882,19 @@ ActiveRecord::Schema.define(:version => 20140730024419) do
|
||||||
|
|
||||||
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
||||||
|
|
||||||
|
create_table "rich_rich_files", :force => true do |t|
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
t.string "rich_file_file_name"
|
||||||
|
t.string "rich_file_content_type"
|
||||||
|
t.integer "rich_file_file_size"
|
||||||
|
t.datetime "rich_file_updated_at"
|
||||||
|
t.string "owner_type"
|
||||||
|
t.integer "owner_id"
|
||||||
|
t.text "uri_cache"
|
||||||
|
t.string "simplified_type", :default => "file"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "roles", :force => true do |t|
|
create_table "roles", :force => true do |t|
|
||||||
t.string "name", :limit => 30, :default => "", :null => false
|
t.string "name", :limit => 30, :default => "", :null => false
|
||||||
t.integer "position", :default => 1
|
t.integer "position", :default => 1
|
||||||
|
@ -884,6 +949,7 @@ ActiveRecord::Schema.define(:version => 20140730024419) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
t.string "description"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "softapplications", :force => true do |t|
|
create_table "softapplications", :force => true do |t|
|
||||||
|
@ -989,8 +1055,8 @@ ActiveRecord::Schema.define(:version => 20140730024419) do
|
||||||
t.integer "zip_code"
|
t.integer "zip_code"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "identity"
|
|
||||||
t.string "technical_title"
|
t.string "technical_title"
|
||||||
|
t.integer "identity"
|
||||||
t.string "student_id"
|
t.string "student_id"
|
||||||
t.string "teacher_realname"
|
t.string "teacher_realname"
|
||||||
t.string "student_realname"
|
t.string "student_realname"
|
||||||
|
@ -1048,9 +1114,6 @@ ActiveRecord::Schema.define(:version => 20140730024419) do
|
||||||
t.integer "active"
|
t.integer "active"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "level"
|
|
||||||
t.integer "file"
|
|
||||||
t.integer "issue"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "user_statuses", :force => true do |t|
|
create_table "user_statuses", :force => true do |t|
|
||||||
|
|
|
@ -489,6 +489,7 @@ color: #000000;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
border-right:1px solid #C6E9F1;
|
border-right:1px solid #C6E9F1;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
|
word-wrap:break-word;
|
||||||
/*by young*/
|
/*by young*/
|
||||||
-moz-box-shadow:#C6E9F1 1px 1px 2px;
|
-moz-box-shadow:#C6E9F1 1px 1px 2px;
|
||||||
-webkit-box-shadow:2px 2px 0px -2px #C6E9F1;
|
-webkit-box-shadow:2px 2px 0px -2px #C6E9F1;
|
||||||
|
@ -903,6 +904,7 @@ hr
|
||||||
p
|
p
|
||||||
{
|
{
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
word-break: break-all;
|
||||||
/*position: static;/*gcm*/
|
/*position: static;/*gcm*/
|
||||||
}
|
}
|
||||||
/*end*/
|
/*end*/
|
||||||
|
|
Loading…
Reference in New Issue