Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into cxt_course
This commit is contained in:
commit
03b00f0af5
|
@ -82,6 +82,27 @@ class HomeworkCommonController < ApplicationController
|
|||
@homework.publish_time = params[:homework_common][:publish_time]
|
||||
end
|
||||
homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new
|
||||
param_end_time = Time.parse(params[:homework_common][:end_time]).strftime("%Y-%m-%d")
|
||||
homework_end_time = Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d")
|
||||
if homework_end_time != param_end_time
|
||||
if homework_end_time > param_end_time
|
||||
@homework.student_works.where("work_status = 1").each do |st|
|
||||
if param_end_time < Time.parse(st.commit_time.to_s).strftime("%Y-%m-%d")
|
||||
st.late_penalty = @homework.late_penalty
|
||||
st.work_status = 2
|
||||
st.save
|
||||
end
|
||||
end
|
||||
else
|
||||
@homework.student_works.where("work_status = 2").each do |st|
|
||||
if param_end_time >= Time.parse(st.commit_time.to_s).strftime("%Y-%m-%d")
|
||||
st.late_penalty = 0
|
||||
st.work_status = 1
|
||||
st.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@homework.end_time = params[:homework_common][:end_time] || Time.now
|
||||
@homework.course_id = params[:course_id]
|
||||
if params[:homework_type] && params[:homework_type].to_i != @homework.homework_type
|
||||
|
|
|
@ -543,12 +543,12 @@ class ProjectsController < ApplicationController
|
|||
@users -= watched.watcher_users if @watched
|
||||
end
|
||||
@watchers = @project.watcher_users
|
||||
@limit = 20
|
||||
@limit = 32
|
||||
@is_remote = true
|
||||
@watchers_count = @watchers.count
|
||||
@watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1
|
||||
@offset ||= @watcher_pages.offset
|
||||
@watchers = paginateHelper @watchers, 20
|
||||
@watchers = paginateHelper @watchers, @limit
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -611,14 +611,14 @@ class ProjectsController < ApplicationController
|
|||
@applied_members = appied_project_members(@project, @members)
|
||||
end
|
||||
end
|
||||
@members = paginateHelper @members
|
||||
@members = paginateHelper @members, 32
|
||||
|
||||
end
|
||||
|
||||
def member_forked
|
||||
@forked_projects = Project.where(:forked_from_project_id => @project.id)
|
||||
|
||||
@limit = 20
|
||||
@limit = 32
|
||||
@is_remote = true
|
||||
@forked_count = @forked_projects.count
|
||||
@forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1
|
||||
|
|
|
@ -38,12 +38,12 @@ class PullRequestsController < ApplicationController
|
|||
@requests_merged_count = merge_requests.select{|request| request.state == "merged"}.count
|
||||
@requests_closed_count = merge_requests.select{|request| request.state == "closed"}.count
|
||||
|
||||
@limit = 10
|
||||
@limit = 20
|
||||
@is_remote = true
|
||||
@count = type_count(type, @requests_opened_count, @requests_merged_count, @requests_closed_count)
|
||||
@pages = Paginator.new @count, @limit, params['page'] || 1
|
||||
@offset ||= @pages.offset
|
||||
@requests = paginateHelper @requests, 10
|
||||
@requests = paginateHelper @requests, 20
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
|
@ -101,16 +101,16 @@ class PullRequestsController < ApplicationController
|
|||
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id)
|
||||
@fork_project_name = Project.find(params[:target_project_id]).try(:name)
|
||||
@fork_pr_message = true if @fork_project_name
|
||||
# 发送消息
|
||||
#send_message(User.current.id, target_project_id, title)
|
||||
# 创建Trustie数据
|
||||
#PullRequest.create(:pull_request_id => request.id, :user_id => User.current.id, :status => 1, :project_id => target_project_id)
|
||||
# 向管理员发送消息
|
||||
send_message_to_manager(params[:target_project_id].to_i, request.id, 1)
|
||||
PullRequest.create(:pull_request_id => request.id, :user_id => User.current.id, :status => 1, :project_id => target_project_id, :title => title)
|
||||
else
|
||||
@project_member = Member.where(:project_id => @project.id)
|
||||
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch)
|
||||
# 发送消息
|
||||
#send_message(User.current.id, @project.id, title)
|
||||
send_message_to_manager(@project.id, request.id, 1)
|
||||
# 创建Trustie数据
|
||||
#PullRequest.create(:pull_request_id => request.id, :user_id => User.current.id, :status => 1, :project_id => @project.id)
|
||||
PullRequest.create(:pull_request_id => request.id, :user_id => User.current.id, :status => 1, :project_id => @project.id, :title => title)
|
||||
respond_to do |format|
|
||||
format.js{redirect_to project_pull_request_path(request.id, :project_id => @project.id)}
|
||||
end
|
||||
|
@ -189,7 +189,9 @@ class PullRequestsController < ApplicationController
|
|||
def accept_pull_request
|
||||
begin
|
||||
status = @g.accept_merge_rquest(@project.gpid, params[:id], User.current.gid)
|
||||
PullRequest.create(:pull_request_id => status.id, :user_id => User.current.id, :gpid => status.project_id)
|
||||
# 接受后,给用户发消息
|
||||
send_message_to_author(@project.id, status.author.try(:username), params[:id], 2)
|
||||
|
||||
respond_to do |format|
|
||||
format.js{redirect_to project_pull_request_path(status.id, :project_id => @project.id)}
|
||||
end
|
||||
|
@ -214,7 +216,13 @@ class PullRequestsController < ApplicationController
|
|||
# @return [Gitlab::ObjectifiedHash] Information about updated merge request.
|
||||
def update_pull_request
|
||||
begin
|
||||
@g.update_merge_request(@project.gpid, params[:id], User.current.gid, :state_event => params[:state])
|
||||
request = @g.update_merge_request(@project.gpid, params[:id], User.current.gid, :state_event => params[:state])
|
||||
user = User.find_by_login(request.author.try(:username))
|
||||
status = params[:state] == "close" ? 4 : 3
|
||||
send_message_to_manager(@project.id, params[:id], status)
|
||||
if is_project_manager?(User.current.id, @project.id)
|
||||
send_message_to_author(@project.id, user.login, request.id, status)
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html{redirect_to project_pull_request_path(params[:id], :project_id => @project.id)}
|
||||
end
|
||||
|
@ -320,8 +328,31 @@ class PullRequestsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def send_message user_id, project_id, title
|
||||
self.forge_acts << ForgeMessage.new(:user_id => user_id, :project_id => project_id, :title => title)
|
||||
def send_message_to_manager project_id, pull_request_id, status
|
||||
project = Project.find(project_id)
|
||||
project.members.each do |member|
|
||||
if is_project_manager?(member.user_id, project_id) && User.current.id != member.user_id
|
||||
add_message(member.user_id, project_id, pull_request_id, status)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def send_message_to_author(project_id, user_login, request_id, status)
|
||||
user = get_user_by_login_and(user_login)
|
||||
if user.id != User.current.id
|
||||
add_message(user.id, project_id, request_id, status)
|
||||
end
|
||||
end
|
||||
|
||||
def add_message(user_id, project_id, pull_request_id, status)
|
||||
ForgeMessage.create(:user_id => user_id,
|
||||
:project_id => project_id,
|
||||
:forge_message_id => pull_request_id,
|
||||
:forge_message_type => "PullRequest",
|
||||
:viewed => true,
|
||||
:status => status,
|
||||
:operate_user_id => User.current.id,
|
||||
)
|
||||
end
|
||||
|
||||
def authorize_logged
|
||||
|
|
|
@ -430,29 +430,21 @@ update
|
|||
|
||||
end
|
||||
|
||||
# 注:由于考虑到性能所以commits api每次返回20条记录
|
||||
def changes
|
||||
# 顶部导航
|
||||
@project_menu_type = 5
|
||||
|
||||
@entry = @repository.entry(@path, @rev)
|
||||
(show_error_not_found; return) unless @entry
|
||||
g = Gitlab.client
|
||||
limit = 20
|
||||
#每次页面的换回值从1开始,但是gitlab的页面查询是从0开始,所以先改变page的类型减一在改回来
|
||||
limit = 10
|
||||
# 每次页面的换回值从1开始,但是gitlab的页面查询是从0开始,所以先改变page的类型减一在改回来
|
||||
@commits = g.commits(@project.gpid, page:(params[:page].to_i - 1).to_s, ref_name:@rev)
|
||||
@commits_count = params[:commit_count].nil? ? @g.user_static(@project.gpid, :rev => @rev).count : params[:commit_count].to_i
|
||||
@commits_pages = Paginator.new @commits_count, limit, params[:page]
|
||||
# @offset ||= @commits_pages.offset
|
||||
# @commits = paginateHelper @commits, limit
|
||||
|
||||
#add by hx
|
||||
#rep_count = commit_count(@project)
|
||||
|
||||
#页面传递必须要str类型,但是Paginator的初始化必须要num类型,需要类型转化
|
||||
@commits_count = params[:commit_count].to_i
|
||||
@commits_pages = Redmine::Pagination::Paginator.new @commits_count,limit,params[:page]
|
||||
|
||||
@commit = g.commit(@project.gpid,@rev)
|
||||
# @changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}")
|
||||
#@changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i)
|
||||
@properties = @repository.properties(@path, @rev)
|
||||
@changeset = @repository.find_changeset_by_name(@rev)
|
||||
render :layout => 'base_projects'
|
||||
end
|
||||
|
||||
|
|
|
@ -587,6 +587,14 @@ class StudentWorkController < ApplicationController
|
|||
if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d")
|
||||
student_work.late_penalty = @homework.late_penalty
|
||||
student_work.work_status = 2
|
||||
# 缺评扣分
|
||||
if @homework.homework_detail_manual.no_anon_penalty == 0 && @homework.homework_detail_manual.comment_status == 3 && @homework.anonymous_comment == 0
|
||||
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
|
||||
all_dis_eva = StudentWorksEvaluationDistribution.where("student_work_id IN #{work_ids}")
|
||||
has_sw_count = all_dis_eva.select("distinct user_id").count
|
||||
anon_count = all_dis_eva.count / has_sw_count
|
||||
student_work.absence_penalty = @homework.homework_detail_manual.absence_penalty * anon_count
|
||||
end
|
||||
else
|
||||
student_work.late_penalty = 0
|
||||
student_work.work_status = 1
|
||||
|
|
|
@ -1186,10 +1186,18 @@ class UsersController < ApplicationController
|
|||
student_work = StudentWork.where(homework_common_id: homework.id, user_id: User.current.id).first
|
||||
if student_work
|
||||
|
||||
#提交作品时,计算是否迟交
|
||||
# 提交作品时,计算是否迟交
|
||||
if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d")
|
||||
student_work.late_penalty = homework.late_penalty
|
||||
student_work.work_status = 2
|
||||
# 缺评扣分
|
||||
if homework.homework_detail_manual.no_anon_penalty == 0 && homework.homework_detail_manual.comment_status == 3 && homework.anonymous_comment == 0
|
||||
work_ids = "(" + homework.student_works.has_committed.map(&:id).join(",") + ")"
|
||||
all_dis_eva = StudentWorksEvaluationDistribution.where("student_work_id IN #{work_ids}")
|
||||
has_sw_count = all_dis_eva.select("distinct user_id").count
|
||||
anon_count = all_dis_eva.count / has_sw_count
|
||||
student_work.absence_penalty = homework.homework_detail_manual.absence_penalty * anon_count
|
||||
end
|
||||
else
|
||||
student_work.late_penalty = 0
|
||||
student_work.work_status = 1
|
||||
|
|
|
@ -42,6 +42,11 @@ module ApplicationHelper
|
|||
number > 10000 ? (number.to_f / 1000).round.to_s + "k" : number
|
||||
end
|
||||
|
||||
# 判断某个课程是否包含仅对自己可见的作业
|
||||
def course_has_score_open_common_homework course
|
||||
course.homework_commons.select{|hc| hc.score_open == 0}.count > 0 ? true : false
|
||||
end
|
||||
|
||||
# 隐藏项目以外的信息
|
||||
# return: true 显示,false 不显示
|
||||
def hidden_unproject_infos
|
||||
|
|
|
@ -90,6 +90,20 @@ module UsersHelper
|
|||
end
|
||||
end
|
||||
|
||||
# 获取pullrequest消息状态
|
||||
def pull_request_message_status ma
|
||||
case ma.status
|
||||
when 1
|
||||
"创建了PullRequest:"
|
||||
when 2
|
||||
"接受了PullRequest:"
|
||||
when 3
|
||||
"重新打开了PullRequest:"
|
||||
when 4
|
||||
"关闭了PullRequest:"
|
||||
end
|
||||
|
||||
end
|
||||
# 判断当前用户能否对消息进行操作
|
||||
def allow_to_show applied_message
|
||||
(User.current.id == applied_message.user_id && applied_message.status == 1) ? true : false
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class ForgeMessage < ActiveRecord::Base
|
||||
# status在不同的类中,作用不同
|
||||
# Isseu: satus nil:发布了缺陷;:1:缺陷计划完成日志到了提醒
|
||||
attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key, :status
|
||||
attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key, :status, :operate_user_id
|
||||
|
||||
belongs_to :forge_message ,:polymorphic => true
|
||||
belongs_to :project
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
class ProfessionalLevel < ActiveRecord::Base
|
||||
attr_accessible :level
|
||||
end
|
|
@ -1,6 +1,6 @@
|
|||
class PullRequest < ActiveRecord::Base
|
||||
# status 1:创建 2:接受 3:重新打开 4:关闭
|
||||
attr_accessible :gpid, :pull_request_id, :user_id, :status
|
||||
attr_accessible :gpid, :pull_request_id, :user_id, :project_id, :title
|
||||
validates_uniqueness_of :pull_request_id
|
||||
|
||||
has_many :forge_messages, :class_name => 'ForgeMessage', :as => :forge_message, :dependent => :destroy
|
||||
|
|
|
@ -15,9 +15,15 @@
|
|||
</div>
|
||||
<% hero_homework_scores.each do |student_score| %>
|
||||
<% if student_score.score.to_i != 0 %>
|
||||
<li> <a href="javascript:void:(0);"><%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %></a>
|
||||
<p><a href="javascript:void:(0);"><%=link_to student_score.user.show_name, user_path(student_score.user), :title => student_score.user.show_name %></a></p>
|
||||
<p><span class="c_red" style="cursor:pointer" ><%= student_score.score<0 ? 0 : student_score.score.to_i %></span></p>
|
||||
<li> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(student_score.user), :width => "35", :height => "35", :class=> "rankPortrait"),user_path(student_score.user) %></a>
|
||||
<p><a href="javascript:void(0);"><%=link_to student_score.user.show_name, user_path(student_score.user), :title => student_score.user.show_name %></a></p>
|
||||
<p><span class="c_red" style="cursor:pointer" >
|
||||
<% if !(User.current.allowed_to?(:as_teacher, @course) || User.current.admin?) && User.current.id != student_score.user.id && course_has_score_open_common_homework(@course) %>
|
||||
<%= "**" %>
|
||||
<% else %>
|
||||
<%= student_score.score<0 ? 0 : student_score.score.to_i %>
|
||||
<% end %>
|
||||
</span></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -86,22 +86,32 @@
|
|||
<span class="sy_class_users_st_num" title="<%= user.user_extensions.student_id %>"><%= user.user_extensions.student_id %></span>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to format("%0.2f", hw_score), {
|
||||
:action => 'show_member_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => "" %>
|
||||
<% if !is_teacher && User.current.id != member.user_id && course_has_score_open_common_homework(@course) %>
|
||||
<a>**</a>
|
||||
<% else %>
|
||||
<%= link_to format("%0.2f", hw_score), {
|
||||
:action => 'show_member_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => "" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= ex_score %></td>
|
||||
<td>
|
||||
<%= link_to act_score, {
|
||||
:action => 'show_member_act_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => '' %>
|
||||
:action => 'show_member_act_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => '' %>
|
||||
</td>
|
||||
<td class="pr">
|
||||
<span class="sum_score_tip"><%= format("%0.2f", sum) %></span>
|
||||
<span class="sum_score_tip">
|
||||
<% if !is_teacher && User.current.id != member.user_id && course_has_score_open_common_homework(@course) %>
|
||||
<a>**</a>
|
||||
<% else %>
|
||||
<%= format("%0.2f", sum) %>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="sy_tips_box_inner undis" style="left: <%=is_teacher ? '230px' : '215px' %>; top: -60px; text-align: left;">
|
||||
<span style="top: 75px;"></span>
|
||||
<p >
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
<%= render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project, :tag_name => @tag_name}%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if @tip_all_attachments > 0 %>
|
||||
<div class="re_con_top">
|
||||
<p class="f_l fontBlue f_b f_14" id="tip_attachment_count">
|
||||
<%= render :partial => "files/tip_attachment_count" %>
|
||||
|
@ -124,5 +125,8 @@
|
|||
<div id="course_list">
|
||||
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%# html_title(l(:label_attachment_plural)) -%>
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
<div class="clear">
|
||||
<div>
|
||||
<ul class="new_roadmap_nav fl" >
|
||||
<ul class="new_roadmap_nav fl" style="margin-left: 0px">
|
||||
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
|
||||
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@issues_filter.count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
|
||||
</li>
|
||||
|
|
|
@ -214,6 +214,9 @@
|
|||
</div><!--issues_statistics end-->
|
||||
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr " >新建</a>
|
||||
</div>
|
||||
<% if @issues.empty? %>
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
<% else %>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'xls', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
|
@ -236,7 +239,6 @@
|
|||
<%= calendar_for('issue_create_date_start_show')%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="issues_con_list" style="position: relative;">
|
||||
<ul id="issues_list_nav" >
|
||||
<li id="issues_list_nav_1" onclick="HoverLi(1);all_reset_form();" class="issues_nav_hover">
|
||||
|
@ -309,9 +311,7 @@
|
|||
</div><!--issues_filter end-->
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata mt10"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
|
||||
<div id="issue_list">
|
||||
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="pro_new_info mb10">
|
||||
<div class="pro_new_info">
|
||||
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
|
||||
<p class="sy_tab_con_p ">没有数据可供显示!</p>
|
||||
</div>
|
|
@ -1,3 +1,4 @@
|
|||
<% if @forked_count > 0 %>
|
||||
<div class="pro_new_info mb10">
|
||||
<h2 class="clear">成员<span class="fr pro_new_font mr15" >本页面展示Fork了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
|
||||
<ul class="clear pro_new_users_box">
|
||||
|
@ -24,4 +25,8 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<% else %>
|
||||
<div class="mb10">
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<% if @watchers.count > 0 %>
|
||||
<div class="pro_new_info mb10">
|
||||
<h2 class="clear">成员<span class="fr pro_new_font mr15" > 本页面展示关注了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
|
||||
<ul class="clear pro_new_users_box">
|
||||
|
@ -24,6 +25,11 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="mb10">
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
<p class=" fl c_grey pro_new_grey">
|
||||
1.长度必须在1到254个字符之间<br/>
|
||||
2.仅限使用小写字母(a-z)、数字、破折号(-)和下划线(_)<br>
|
||||
3.一旦保存,标识无法修改
|
||||
3.一旦保存,标识无法修改<br>
|
||||
4.版本库名不能是纯数字
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -16,6 +16,15 @@
|
|||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @pages, @count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -14,8 +14,17 @@
|
|||
<div class="c_grey clear mt5">
|
||||
<p class="fl">由 <%= link_to get_user_by_login_and(request.author.try(:username)).try(:show_name), user_path(get_user_by_login_and(request.author.try(:username))), :class => "linkBlue2" %> 创建于<%= time_tag(request.created_at) %>前</p>
|
||||
<span class="fl ml10"><%= time_tag(request.updated_at) %>前更新</span>
|
||||
<p class="fr"><%= find_gitlab_project(request.source_project_id)+"/"+request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= find_gitlab_project(request.target_project_id)+"/"+request.target_branch %></p>
|
||||
<p class="fr"><%#= find_gitlab_project(request.source_project_id)+"/"+request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%#= find_gitlab_project(request.target_project_id)+"/"+request.target_branch %></p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @pages, @count, :per_page_links => false, :remote => true, :flag => true, :is_new => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
|
@ -21,7 +21,10 @@
|
|||
<div class="c_grey clear mt5">
|
||||
<p class="fl">由 <%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "linkBlue2" %>于 <%= format_time(@request.created_at) %> 创建</p>
|
||||
<span class="fl ml10">最近更新:<%= format_time(@request.updated_at) %></span>
|
||||
<p class="fr"><%= @request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= @request.target_branch %></p>
|
||||
<p class="fr">
|
||||
<%= find_gitlab_project(@request.source_project_id)+"/"+@request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= find_gitlab_project(@request.target_project_id)+"/"+@request.target_branch %>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -28,16 +28,6 @@
|
|||
<!--</div>-->
|
||||
<div id="pull_requests_list">
|
||||
<%= render "pull_requests/pull_requests_list" %>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @pages, @count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
@ -62,6 +52,8 @@
|
|||
|
||||
</script>
|
||||
<% else %>
|
||||
<div class="mb10">
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -12,4 +12,7 @@
|
|||
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %> 前</time>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if params[:action] == "commit_diff" %>
|
||||
<div class="fr">Commit<a class="ml5" style="color: #3498db"><%= changeset.id %></a></div>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,48 +1,21 @@
|
|||
<%= form_tag(
|
||||
{:controller => 'repositories', :action => 'diff', :id => project,
|
||||
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
|
||||
:method => :get
|
||||
) do %>
|
||||
<table class="list changesets">
|
||||
<!--<thead><tr>-->
|
||||
<!--<th>#</th>-->
|
||||
<!--<th></th>-->
|
||||
<!--<th></th>-->
|
||||
<!--<th><%= l(:label_date) %></th>-->
|
||||
<!--<th><%= l(:field_author) %></th>-->
|
||||
<!--<th><%= l(:field_comments) %></th>-->
|
||||
<!--</tr></thead>-->
|
||||
<tbody>
|
||||
|
||||
<% show_diff = revisions.size > 1 %>
|
||||
<% line_num = 1 %>
|
||||
<% revisions.each do |changeset| %>
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<ul class="bordered-list">
|
||||
<li class="commit js-toggle-container">
|
||||
<%= render :partial => 'commit_details', :locals => {:changeset => changeset} %>
|
||||
<div style="padding-left:30px;" class="commit-row-title">
|
||||
<strong class="str-truncated">
|
||||
<a class="commit-row-message"><%= textilizable(truncate_at_line_break(changeset.message)) %></a>
|
||||
</strong>
|
||||
<div class="pull-right" title="修订号">
|
||||
<%= link_to truncate(changeset.short_id.to_s, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => project.id, :changeset => changeset.id} %>
|
||||
</div>
|
||||
<div class="notes_count">
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="padding-top: 10px;">
|
||||
<%#= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
|
||||
</p>
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full commits_pages, commits_count, :per_page_links => false, :remote => false, :flag => true %>
|
||||
</ul>
|
||||
|
||||
<% @commits.chunk { |c| format_date(c.created_at).to_date }.each do |day, commits| %>
|
||||
<div class="pullreques_pullbox">
|
||||
<div class="pullreques_pull_top clear">
|
||||
<p class="fl c_grey ml15"><%= day %></p>
|
||||
<p class="fr c_green mr15"><%= commits.count %>个提交</p>
|
||||
</div>
|
||||
<ul class="pullreques_pull_list">
|
||||
<% commits.each do |commit| %>
|
||||
<li class="clear">
|
||||
<span class="fl c_grey ml15 "><%= time_tag(commit.created_at) %>前</span>
|
||||
<%= link_to get_user_by_mail(commit.author_email).show_name, user_path(get_user_by_mail(commit.author_email)), :target => "_blank", :class => "pullreques_pull_name fl ml10" %>
|
||||
<p class="pullreques_pull_txt ml10 fl"><%= commit.title %></p>
|
||||
<%= link_to truncate(commit.short_id, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "fr mr15 c_grey" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,26 +1,38 @@
|
|||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
<div class="wrap-big">
|
||||
<div class="project_r_h">
|
||||
<%= render :partial => "top" %>
|
||||
<div class="new_roadmap_conbox mb10" >
|
||||
<div class=" clear">
|
||||
<ul class="reply-container-branch fl" >
|
||||
<%= render :partial => 'navigation' %>
|
||||
</ul>
|
||||
</div>
|
||||
<% @commits.chunk { |c| format_date(c.created_at).to_date }.each do |day, commits| %>
|
||||
<div class="pullreques_pullbox">
|
||||
<div class="pullreques_pull_top clear">
|
||||
<p class="fl c_grey ml15"><%= day %></p>
|
||||
<p class="fr c_green mr15"><%= commits.count %>个提交</p>
|
||||
</div>
|
||||
<ul class="pullreques_pull_list">
|
||||
<% commits.each do |commit| %>
|
||||
<li class="clear">
|
||||
<span class="fl c_grey ml15 "><%= time_tag(commit.created_at) %>前</span>
|
||||
<%= link_to get_user_by_mail(commit.author_email).show_name, user_path(get_user_by_mail(commit.author_email)), :target => "_blank", :class => "pullreques_pull_name fl ml10" %>
|
||||
<p class="pullreques_pull_txt ml10 fl"><%= commit.title %></p>
|
||||
<%= link_to truncate(commit.short_id, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "fr mr15 c_grey" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="repository_con " style="line-height:1.9;">
|
||||
<%= render :partial => 'navigation' %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => 'link_to_functions' %>
|
||||
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<div class="mt10">
|
||||
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @commits_pages, @commits_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
||||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
<% html_title(l(:label_change_plural)) -%>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,16 +1,27 @@
|
|||
<div class="container-big">
|
||||
<div class="project_r_h">
|
||||
<%= render :partial => "top" %>
|
||||
<div class="new_roadmap_conbox mb10" >
|
||||
<div class="new_roadmap_info_top clear ">
|
||||
<%= link_to "<span class='new_roadmap_icons_back mr5'></span>返回提交历史".html_safe, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1}, :class => "fl linkBlue2 mt3" %>
|
||||
<!--<a href="javascript:void(0);" class="fl linkBlue2 mt3" ><span class="new_roadmap_icons_back mr5"></span>返回提交历史</a>-->
|
||||
</div>
|
||||
<div class="clear new_roadmap_listbox_commit">
|
||||
<div class="c_grey02 mb10">
|
||||
<p><%= @commit_details.message %></p>
|
||||
</div>
|
||||
<!--<div class=" clear mb10">-->
|
||||
<!--<p class="fb">关联Issue:</p>-->
|
||||
<!--<a href="javascript:void(0);" class="btn-small fl mr10">#123</a>-->
|
||||
<!--<a href="javascript:void(0);" class="btn-small fl mr10">#123</a>-->
|
||||
<!--<a href="javascript:void(0);" class="btn-small fl mr10">#123</a>-->
|
||||
<!--</div>-->
|
||||
<li class="commit js-toggle-container">
|
||||
<%= render :partial => 'commit_details', :locals => {:changeset => @commit_details} %>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
<div class="showing-changes-info fontGrey2"> Commit <a href="javascript:void(0);" class="linkGrey3">
|
||||
<%= @commit_details.id %></a><br />
|
||||
<li class="commit js-toggle-container">
|
||||
<%= render :partial => 'commit_details', :locals => {:changeset => @commit_details} %>
|
||||
</li>
|
||||
</div>
|
||||
<div class="showing-changes-project f14"><%= @commit_details.message %></div>
|
||||
|
||||
<% @commit_diff.each do |commit_diff| %>
|
||||
<div class="showing-changes-row fontGrey2">
|
||||
<div class="showing-changes-row-commit fontGrey2">
|
||||
<a href="javascript:void(0);" class="linkGrey3" id="changed-files">
|
||||
<img src="/images/vlicon/file.png" width="18" height="20" style="vertical-align:middle;" class="mr5" /><%= commit_diff.new_path %>
|
||||
</a>
|
||||
|
|
|
@ -22,27 +22,25 @@
|
|||
<div class="flex-container fl" style="width:340px;">
|
||||
<div class="flex-cell student_work_<%= st.id%>">
|
||||
<span class="<%= score_color (!score_open || st.teacher_score.nil? ? nil : st.teacher_score) %>">
|
||||
<%= !score_open || st.teacher_score.nil? ? "--" : format("%.1f",st.teacher_score)%>
|
||||
<%= st.teacher_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",st.teacher_score))%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex-cell student_work_<%= st.id%>">
|
||||
<span class="<%= score_color (!score_open || st.teaching_asistant_score.nil? ? nil : st.teaching_asistant_score) %>">
|
||||
<%= !score_open || st.teaching_asistant_score.nil? ? "--" : format("%.1f",st.teaching_asistant_score)%>
|
||||
<%= st.teaching_asistant_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",st.teaching_asistant_score))%>
|
||||
</span>
|
||||
</div>
|
||||
<% if @homework.anonymous_comment == 0 %>
|
||||
<div class="flex-cell student_work_<%= st.id%>">
|
||||
<div class="<%= score_color (!score_open || st.student_score.nil? ? nil : st.student_score)%> student_score_info pr">
|
||||
<% if !score_open || st.student_score.nil? %>
|
||||
<% if st.student_score.nil? %>
|
||||
<% pro = @homework.student_work_projects.where("user_id = #{st.user_id}").first
|
||||
if pro.nil? || pro.student_work_id == "" || pro.student_work_id.nil?
|
||||
work = st
|
||||
else
|
||||
work = StudentWork.find pro.student_work_id
|
||||
end %>
|
||||
<% if !score_open %>
|
||||
<span title="">--</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status < 2 %>
|
||||
end %>
|
||||
<% if @homework.homework_detail_manual.comment_status < 2 %>
|
||||
<span title="尚未开启匿评">未参与</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 2 && work.student_works_evaluation_distributions.count != 0 %>
|
||||
<span title="匿评期间,尚未获得他人匿评">待匿评</span>
|
||||
|
@ -52,16 +50,20 @@
|
|||
<span title="匿评开启后提交的作品,不参加匿评">迟交</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= format("%.1f", st.student_score) %>
|
||||
<span class="linkBlue">
|
||||
(<%= anon_count %>)
|
||||
</span>
|
||||
<div class="g_infoNi none">
|
||||
现共有
|
||||
<span class="c_red"> <%= anon_count %> </span>
|
||||
名学生进行了匿评,平均分为
|
||||
<span class="c_red"> <%= format("%.1f", st.student_score) %> </span>分。
|
||||
</div>
|
||||
<% if !score_open %>
|
||||
<span title="">**</span>
|
||||
<% else %>
|
||||
<%= format("%.1f", st.student_score) %>
|
||||
<span class="linkBlue">
|
||||
(<%= anon_count %>)
|
||||
</span>
|
||||
<div class="g_infoNi none">
|
||||
现共有
|
||||
<span class="c_red"> <%= anon_count %> </span>
|
||||
名学生进行了匿评,平均分为
|
||||
<span class="c_red"> <%= format("%.1f", st.student_score) %> </span>分。
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -69,7 +71,7 @@
|
|||
<div class="flex-cell">
|
||||
<% score = st.work_score %>
|
||||
<div class="<%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr" style="display: inline">
|
||||
<%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<%= score.nil? ? "--" : (!score_open ? "**" : format("%.1f",score<0 ? 0 : score))%>
|
||||
<% unless !score_open || score.nil?%>
|
||||
<div class="score-tip none tl" style="line-height: 18px; top:-32px; right:-273px;">
|
||||
<em></em>
|
||||
|
|
|
@ -53,25 +53,23 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.teacher_score.nil? ? nil : student_work.teacher_score)%>">
|
||||
<%= !score_open || student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||
<%= student_work.teacher_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",student_work.teacher_score))%>
|
||||
</td>
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.teaching_asistant_score.nil? ? nil : student_work.teaching_asistant_score)%>">
|
||||
<%= !score_open || student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||
<%= student_work.teaching_asistant_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",student_work.teaching_asistant_score)) %>
|
||||
</td>
|
||||
|
||||
<% if @homework.homework_type == 2%>
|
||||
<!-- 系统评分 -->
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>">
|
||||
<%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
<%= student_work.system_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",student_work.system_score))%>
|
||||
</td>
|
||||
<% end%>
|
||||
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.student_score.nil? ? nil : student_work.student_score)%> student_score_info pr">
|
||||
<% if !score_open || student_work.student_score.nil? %>
|
||||
<% if !score_open %>
|
||||
<span title="">--</span>
|
||||
<% elsif student_work.work_status != 0 %>
|
||||
<% if student_work.student_score.nil? %>
|
||||
<% if student_work.work_status != 0 %>
|
||||
<% if @homework.homework_detail_manual.comment_status < 2 %>
|
||||
<span title="尚未开启匿评">未参与</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status >= 2 && student_work.student_works_evaluation_distributions.count == 0 %>
|
||||
|
@ -85,18 +83,22 @@
|
|||
<span title="">--</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%=format("%.1f",student_work.student_score) %>
|
||||
<span class="linkBlue">
|
||||
(<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>)
|
||||
</span>
|
||||
<div class="anonymous-tip none">
|
||||
<em></em>
|
||||
<font></font>
|
||||
现共有
|
||||
<span class="c_red"> <%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%> </span>
|
||||
名学生进行了匿评,平均分为
|
||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||
</div>
|
||||
<% if !score_open %>
|
||||
<span title="">**</span>
|
||||
<% else %>
|
||||
<%=format("%.1f",student_work.student_score) %>
|
||||
<span class="linkBlue">
|
||||
(<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>)
|
||||
</span>
|
||||
<div class="anonymous-tip none">
|
||||
<em></em>
|
||||
<font></font>
|
||||
现共有
|
||||
<span class="c_red"> <%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%> </span>
|
||||
名学生进行了匿评,平均分为
|
||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
|
@ -107,7 +109,7 @@
|
|||
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
||||
<% end %>
|
||||
<td class="hworkList70 <%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr">
|
||||
<%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<%= score.nil? ? "--" : (!score_open ? "**" : format("%.1f",score<0 ? 0 : score))%>
|
||||
<% unless !score_open || score.nil?%>
|
||||
<div class="score-tip none tl" style="line-height: 18px;">
|
||||
<em></em>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<% if @homework.homework_type == 2%>
|
||||
<!-- 系统评分 -->
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>">
|
||||
<%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
<%= student_work.system_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",student_work.system_score))%>
|
||||
</td>
|
||||
<% end%>
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的课程成员申请:</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的班级成员申请:</span>
|
||||
</li>
|
||||
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
|
||||
<a href="javascript:void(0);" class="newsGrey">
|
||||
<% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教辅"}" %>
|
||||
<% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "助教"}" %>
|
||||
<%= link_to content, user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
|
@ -14,12 +14,13 @@
|
|||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下:
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:
|
||||
</p>
|
||||
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
|
||||
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
|
||||
<div class="fl">课程描述:</div>
|
||||
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %></div> <p>申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "教辅"%></p>
|
||||
<p>申请班级:<%= Course.find(ma.course_id).name%></p>
|
||||
<div class="fl">班级描述:</div>
|
||||
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %></div>
|
||||
<p>申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "助教"%></p>
|
||||
</div>
|
||||
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContentWarn2' : 'homepageHomeworkContentWarn' %> fl">
|
||||
<span id="deal_info_<%=ma.id%>">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
<div class=" fl ml5">
|
||||
<div class="issues_list_titlebox clear">
|
||||
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
|
||||
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" style="width: 320px" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="issues_list_small">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<div id="project-boardlist">
|
||||
<div class="container-big mt10" >
|
||||
<p class="list-h2">讨论区列表</p>
|
||||
<% if topics.any? %>
|
||||
<div class="category">
|
||||
<span class="grayTxt ">排序:</span>
|
||||
<%= link_to "时间", {:controller => 'boards', :action => 'index', :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
||||
|
@ -15,7 +16,6 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="bloglistbox">
|
||||
<% if topics.any? %>
|
||||
<% topics.each do |activity| %>
|
||||
<div class="list-file">
|
||||
<div><span class="item_list fl"></span>
|
||||
|
@ -59,11 +59,11 @@
|
|||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//如果右边的博客列表比左边的高度低则将右边的高度设为与左边对齐
|
||||
|
|
|
@ -194,24 +194,29 @@
|
|||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<!--
|
||||
<%# if ma.forge_message_type == "PullRequest" %>
|
||||
|
||||
<% if ma.forge_message_type == "PullRequest" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);">
|
||||
<%#=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
|
||||
<% send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
|
||||
<% author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
|
||||
<%= link_to image_tag(url_to_avatar(author), :width => "30", :height => "30"), user_path(author), :target => '_blank' %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%#=link_to User.find(ma.forge_message.author).show_name, user_path(ma.forge_message.author),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%#= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">创建了PullRequest:</span>
|
||||
<%= link_to User.find(author.id).show_name, user_path(author),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||||
<%= pull_request_message_status(ma) %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%#= link_to "#{ma.forge_message.commented.title}",
|
||||
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<%= link_to "#{send_message_user[0].title}", project_pull_requests_path(ma.project_id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
|
||||
</li>
|
||||
<li class="homepageNewsTime fl"><%#= time_tag(ma.created_at).html_safe %> </li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<%# end %>-->
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -5,14 +5,14 @@
|
|||
<div class="postContainer mb10">
|
||||
<div class="postBanner" style="padding-bottom:5px;">
|
||||
<span class="linkGrey2 f16">组织列表</span>
|
||||
|
||||
<a href="<%= new_organization_path %>" class="sy_btn_green fr" style="margin-top: -5px">新建组织</a>
|
||||
<%#= form_tag url_for(:controller => 'users', :action => 'search_user_orgs', :id => User.current.id), :method => 'get', :id => "search_org_form", :class=>"resourcesSearchloadBox", :style=>"float:right; margin-top:-5px;" do %>
|
||||
<!--<input type="text" name="search_orgs" placeholder="输入关键词进行搜索" class="searchResource" />-->
|
||||
|
||||
<!--<!–<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#search_org_form').submit();"></a>–>-->
|
||||
<!--<a href="javascript:void(0);" class="problem_search_btn fl" onclick="$('#search_org_form').submit();">搜索</a>-->
|
||||
<!--<%# end %>-->
|
||||
<div class="cl"></div>
|
||||
|
||||
</div>
|
||||
<div id="org_list">
|
||||
<% @orgs.each do |org| %>
|
||||
|
|
|
@ -19,9 +19,13 @@
|
|||
<!-- <a href="javascript:void(0);" class="btn btn-green fr mr15 mt10"> 新建 </a>-->
|
||||
<%= link_to "新建", new_project_version_path(@project, :is_create => true), :class => 'btn btn-green fr mr15 mt10', :remote => true %>
|
||||
</div>
|
||||
<div id="version_list">
|
||||
<%= render :partial => "versions/list" %>
|
||||
</div>
|
||||
<% if @versions_count > 0 %>
|
||||
<div id="version_list">
|
||||
<%= render :partial => "versions/list" %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
<% end %>
|
||||
</div><!--new_roadmap end-->
|
||||
<!--里程碑列表结束-->
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="new_roadmap_conbox mb10" >
|
||||
<% if @version.issues_count > 0 %>
|
||||
<div class="new_roadmap_conbox mb10" >
|
||||
<div class=" clear">
|
||||
<ul class="new_roadmap_nav fl" >
|
||||
<li id="new_roadmap_nav_1" class="new_roadmap_nav_hover " onclick="HoverLi(1);">
|
||||
|
@ -103,7 +104,13 @@
|
|||
<!--缺陷列表结束-->
|
||||
|
||||
</div><!--new_roadmap_content_2 end-->
|
||||
|
||||
</div><!--new_roadmap end-->
|
||||
<% else %>
|
||||
<div class="mb10">
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<!--里程碑详情结束-->
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
class AddStatusToPullRequests < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :pull_requests, :status, :integer, :default => false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddTitilToPullRequsts < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :pull_requests, :title, :string
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
class CreateProfessionalLevels < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :professional_levels do |t|
|
||||
t.string :level
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddAperateIdtoForgeMessage < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :forge_messages, :operate_user_id, :integer
|
||||
end
|
||||
end
|
|
@ -0,0 +1,19 @@
|
|||
class UpdateStudentWorkScore < ActiveRecord::Migration
|
||||
def up
|
||||
homework = HomeworkCommon.where("id = 4198").first
|
||||
unless homework.nil?
|
||||
homework.student_works.each do |st|
|
||||
if st.late_penalty != 0 && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") > Time.parse(st.commit_time.to_s).strftime("%Y-%m-%d")
|
||||
if st.work_status == 2
|
||||
st.work_status = 1
|
||||
end
|
||||
st.late_penalty = 0
|
||||
st.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20161201083030) do
|
||||
ActiveRecord::Schema.define(:version => 20161128072528) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -820,13 +820,11 @@ ActiveRecord::Schema.define(:version => 20161201083030) do
|
|||
t.integer "exercise_status"
|
||||
t.integer "user_id"
|
||||
t.integer "time"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "publish_time"
|
||||
t.datetime "end_time"
|
||||
t.integer "show_result"
|
||||
t.integer "question_random", :default => 0
|
||||
t.integer "choice_random", :default => 0
|
||||
end
|
||||
|
||||
create_table "first_pages", :force => true do |t|
|
||||
|
@ -966,7 +964,6 @@ ActiveRecord::Schema.define(:version => 20161201083030) do
|
|||
t.integer "homework_common_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "no_anon_penalty", :default => 1
|
||||
end
|
||||
|
||||
create_table "homework_detail_programings", :force => true do |t|
|
||||
|
|
|
@ -399,6 +399,7 @@ tr.open span.expander {background-image: url(/images/bullet_toggle_minus.png);}
|
|||
.showing-changes-info {width:710px; padding:10px; padding-top: 0px; background-color:#ffffff; line-height:2;}
|
||||
.showing-changes-project {padding:10px; border-top:1px solid #dce0e6; border-bottom:1px solid #dce0e6; background-color:#f1f1f1;}
|
||||
.showing-changes-row {padding:10px; border-bottom:1px solid #dce0e6; background-color:#f1f1f1;}
|
||||
.showing-changes-row-commit {padding:10px; border:1px solid #dbdbdb; background-color:#f1f1f1;border-bottom: none}
|
||||
#changed-files-detail {display:none;}
|
||||
#changed-files-detail li {list-style-type:disc; margin-left:15px;}
|
||||
.showing-changes-detail {width:670px; border-bottom:1px solid #dce0e6; background-color:#f1f1f1;}
|
||||
|
@ -771,7 +772,7 @@ input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
|||
|
||||
.issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8;}
|
||||
.issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;}
|
||||
a.issues_list_title{ color:#444; max-width:260px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
|
||||
a.issues_list_title{ color:#444; max-width:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
|
||||
a:hover.issues_list_title{color:#3b94d6;}
|
||||
.issues_list_titlebox span{ font-size: 12px;color: #888; font-weight: normal; }
|
||||
.issues_ciricons_01{ width: 22px; height: 22px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 0 no-repeat;}
|
||||
|
@ -787,7 +788,7 @@ a:hover.issues_list_title{color:#3b94d6;}
|
|||
.hw_search_box{ position:relative; }
|
||||
.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;padding-right: 25px;}
|
||||
.hw_search_box a.hw_btn_search{display:block; width:20px; height:20px; background:url(/images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:5px; cursor:pointer;}
|
||||
.hw_search_box a:hover.hw_btn_search{background:url(../images/hw/icons_hw.png) -40px -57px no-repeat;}
|
||||
.hw_search_box a:hover.hw_btn_search{background:url(/images/hw/icons_hw.png) -40px -57px no-repeat;}
|
||||
.hw_files_icon{display:block; width:17px; height:14px; background:url(../images/hw/icons_hw.png) 0 -135px no-repeat;}
|
||||
/* 编辑删除 与课程相同 */
|
||||
.sy_icons_edit{ display: inline-block; padding:9px;background:url(/images/sy/sy_icons02.png) 0 1px no-repeat; }
|
||||
|
@ -887,7 +888,7 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
|
|||
.table-td-w180{display:inline-block;with:180px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||
.table-td-w380{display:inline-block;with:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||
/*项目简介*/
|
||||
.pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;}
|
||||
.pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 100%;}
|
||||
.pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;}
|
||||
/*.pro_new_info p{ padding-bottom:2px; padding-left: 15px; color: #666; padding-right: 5px}*/
|
||||
.pro_new_info_weight{ font-size: 16px; font-weight: bold;}
|
||||
|
@ -931,6 +932,7 @@ p.pro_new_grey{ line-height: 1.9; }
|
|||
.container-big-grey {width:970px; background-color:#f1f1f1;}
|
||||
.reply-banner {width:968px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
|
||||
.reply-container {border-bottom:1px solid #e3e3e3; width:940px; margin-top:15px; min-height:50px;}
|
||||
.reply-container-branch {width:940px; margin-top:6px; min-height:35px; padding-left: 10px;}
|
||||
.reply-content {float:left; width:892px;}
|
||||
|
||||
/* 新版里程碑 20161019byLB */
|
||||
|
@ -950,6 +952,7 @@ p.pro_new_grey{ line-height: 1.9; }
|
|||
.undis {display:none;}
|
||||
.dis {display:block;}
|
||||
.new_roadmap_listbox{ padding:15px;border-bottom:1px solid #dbdbdb;}
|
||||
.new_roadmap_listbox_commit{ padding:15px;}
|
||||
.new_roadmap_listtitle a{ color: #333;display:block;max-width:800px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
.new_roadmap_listtitle a:hover{ color:#3498db;}
|
||||
.new_roadmap_list_txt{ color: #666;}
|
||||
|
@ -997,7 +1000,7 @@ a.sortdownbtn{background: url(/images/sy/liststyle.png) 0 -12px no-repeat; width
|
|||
a.pullreques_reply_name{ font-weight: bold; color: #333;}
|
||||
.pullreques_reply_txt{ width: 900px;color: #666;}
|
||||
.pullreques_pull_top { width: 100%; height: 40px; line-height: 40px; background: #f4f4f4; border-top:1px solid #e1e1e1;border-bottom:1px solid #e1e1e1;}
|
||||
a.pullreques_pull_name{display: block; margin-left: 10px;max-width:80px; color:#3b94d6 !important; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
a.pullreques_pull_name{display: block; margin-left: 5px;max-width:80px; color:#3b94d6 !important; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
.pullreques_pull_list li{ height: 30px; line-height: 30px; }
|
||||
.pullreques_pull_txt{display: block; margin-left: 10px;max-width:740px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
.pullreques_change_list li{height: 40px; line-height: 40px;border-bottom:1px solid #e1e1e1; }
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :professional_level do
|
||||
level "MyString"
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ProfessionalLevel, :type => :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Loading…
Reference in New Issue