Merge branch 'szzh' into develop
This commit is contained in:
commit
2e07f78c57
|
@ -236,13 +236,7 @@ class ApplicationController < ActionController::Base
|
|||
# Authorize the user for the requested action
|
||||
def authorize(ctrl = params[:controller], action = params[:action], global = false)
|
||||
#modify by NWB
|
||||
if @project
|
||||
allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project || @projects, :global => global)
|
||||
elsif @course
|
||||
allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @course || @courses, :global => global)
|
||||
else
|
||||
allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project || @projects, :global => global)
|
||||
end
|
||||
allowed = authorize_allowed(params[:controller], params[:action],global)
|
||||
|
||||
if allowed
|
||||
true
|
||||
|
@ -255,6 +249,17 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
def authorize_allowed(ctrl = params[:controller], action = params[:action], global = false)
|
||||
#modify by NWB
|
||||
if @project
|
||||
allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project || @projects, :global => global)
|
||||
elsif @course
|
||||
allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @course || @courses, :global => global)
|
||||
else
|
||||
allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project || @projects, :global => global)
|
||||
end
|
||||
allowed
|
||||
end
|
||||
def authorize_attachment_download(ctrl = params[:controller], action = params[:action], global = false)
|
||||
case @attachment.container_type
|
||||
when "Memo"
|
||||
|
|
|
@ -213,11 +213,12 @@ class CoursesController < ApplicationController
|
|||
q = "#{params[:name].strip}"
|
||||
#(redirect_to stores_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
||||
if params[:incourse]
|
||||
@results = searchStudent_by_name(@course, q)
|
||||
@results = searchmember_by_name(@@member_scores, q)
|
||||
elsif params[:ingroup]
|
||||
@group = CourseGroup.find(params[:search_group_id])
|
||||
@results = searchgroupstudent_by_name(@group, @course, q)
|
||||
@results = @results =searchgroupmember_by_name(@@member_scores, @group, q)
|
||||
end
|
||||
|
||||
@result_count = @results.count
|
||||
@results = paginateHelper @results
|
||||
|
||||
|
@ -233,8 +234,7 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
||||
@is_remote = true
|
||||
@members = searchStudent(@course)
|
||||
@membercount = @members.count
|
||||
|
||||
@course_groups = @course.course_groups
|
||||
end
|
||||
|
||||
|
@ -243,8 +243,7 @@ class CoursesController < ApplicationController
|
|||
@subPage_title = l :label_student_list
|
||||
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
||||
@is_remote = true
|
||||
@members = searchStudent(@course)
|
||||
@membercount = @members.count
|
||||
|
||||
@course_groups = @course.course_groups
|
||||
end
|
||||
|
||||
|
@ -257,10 +256,28 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
||||
@is_remote = true
|
||||
@members = searchStudent(@course)
|
||||
@membercount = @members.count
|
||||
|
||||
@course_groups = @course.course_groups
|
||||
end
|
||||
|
||||
def valid_ajax
|
||||
req = Hash.new(false)
|
||||
req[:message] = ''
|
||||
|
||||
valid_attr = params[:valid]
|
||||
valid_value = params[:value]
|
||||
|
||||
faker = CourseGroup.new
|
||||
|
||||
if valid_attr.eql?('name')
|
||||
faker.name = valid_value
|
||||
faker.valid?
|
||||
req[:valid] = faker.errors[:name].blank?
|
||||
req[:message] = faker.errors[:name]
|
||||
end
|
||||
req[:message] = l(:modal_valid_passing) if req[:message].blank?
|
||||
render :json => req
|
||||
end
|
||||
def join_group
|
||||
@subPage_title = l :label_student_list
|
||||
group = CourseGroup.find(params[:object_id])
|
||||
|
@ -292,26 +309,18 @@ class CoursesController < ApplicationController
|
|||
@is_remote = true
|
||||
if params[:group_id] && params[:group_id] != "0"
|
||||
@group = CourseGroup.find(params[:group_id])
|
||||
@results = searchStudent_by_group(@group, @course)
|
||||
@results = @@member_scores.find_all {|mem| mem.course_group_id == group.id}
|
||||
else
|
||||
@results = searchStudent(@course)
|
||||
@results = @@member_scores
|
||||
end
|
||||
@@result = @results
|
||||
|
||||
@members = searchStudent(@course)
|
||||
@membercount = @members.count
|
||||
@results = paginateHelper @results
|
||||
end
|
||||
def search_group_members group
|
||||
@subPage_title = l :label_student_list
|
||||
@render_file = 'member_list'
|
||||
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
||||
@is_remote = true
|
||||
@members = searchStudent(@course)
|
||||
@membercount = @members.count
|
||||
@results = searchStudent_by_group(group, @course)
|
||||
@@result = @results
|
||||
@results = paginateHelper @results
|
||||
end
|
||||
|
||||
|
||||
def member
|
||||
## 有角色参数的才是课程,没有的就是项目
|
||||
if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course)))
|
||||
|
@ -324,11 +333,14 @@ class CoursesController < ApplicationController
|
|||
case params[:role]
|
||||
when '1'
|
||||
@subPage_title = l :label_teacher_list
|
||||
@members = searchTeacherAndAssistant(@course)
|
||||
@members = @teachers
|
||||
when '2'
|
||||
@subPage_title = l :label_student_list
|
||||
|
||||
@members = searchStudent_sort(@course, 'desc')
|
||||
teachers = @teachers.map{|teacher| teacher.user_id}.join(",")
|
||||
@@member_scores = student_homework_score teachers
|
||||
@members = @@member_scores
|
||||
# @member_scores = @@member_scores
|
||||
# @members = searchStudent_sort(@course, 'desc', @@member_scores)
|
||||
@membercount = @members.count
|
||||
|
||||
else
|
||||
|
@ -352,6 +364,7 @@ class CoursesController < ApplicationController
|
|||
@show_serch = params[:role] == '2'
|
||||
@subPage_title = l :label_student_list
|
||||
@render_file = 'member_list'
|
||||
|
||||
unless @@result.nil?
|
||||
@results = @@result.reverse
|
||||
@@result = @results
|
||||
|
@ -360,6 +373,7 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
# 显示每个学生的作业评分详情
|
||||
def show_member_score
|
||||
|
||||
@member_score = Member.find(params[:member_id]) if params[:member_id]
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'course_base'}
|
||||
|
@ -867,5 +881,35 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def student_homework_score teachers
|
||||
homework_scores = Member.find_by_sql("SELECT id, user_id,course_id, course_group_id,created_on,IFNULL(SUM(CASE WHEN t_score <> 0 AND t_score IS NOT NULL THEN t_score ELSE s_score END),0) as score
|
||||
FROM (
|
||||
SELECT members.id as id, members.user_id AS user_id, members.course_id AS course_id, members.created_on as created_on,members.course_group_id AS course_group_id,
|
||||
(SELECT AVG(seems_rateable_rates.stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id IN (3040,4762,4765)) AS t_score,
|
||||
(SELECT AVG(seems_rateable_rates.stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id NOT IN (3040,4762,4765)) AS s_score
|
||||
FROM `homework_attaches` , members
|
||||
WHERE members.course_id = #{@course.id}
|
||||
AND members.user_id NOT IN (#{teachers}) AND homework_attaches.bid_id IN (SELECT bid_id FROM homework_for_courses WHERE course_id = #{@course.id})
|
||||
AND homework_attaches.user_id = members.user_id
|
||||
) AS table1 GROUP BY user_id ORDER BY score DESC")
|
||||
homework_scores
|
||||
end
|
||||
#获取课程的老师列表
|
||||
def find_course_teachers course
|
||||
searchTeacherAndAssistant(course).map{|teacher| teacher.user_id}.join(",")
|
||||
end
|
||||
|
||||
#当加入,退出分班时查询分班的学生
|
||||
def search_group_members group
|
||||
@subPage_title = l :label_student_list
|
||||
@render_file = 'member_list'
|
||||
@canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1'
|
||||
@is_remote = true
|
||||
|
||||
@members = searchStudent(@course)
|
||||
@membercount = @members.count
|
||||
@results = @@member_scores.find_all {|mem| mem.course_group_id == group.id}
|
||||
@@result = @results
|
||||
@results = paginateHelper @results
|
||||
end
|
||||
end
|
||||
|
|
|
@ -201,6 +201,7 @@ class FilesController < ApplicationController
|
|||
|
||||
def quote_resource_show
|
||||
@file = Attachment.find(params[:id])
|
||||
@can_quote = attachment_candown @file
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
@ -377,7 +377,7 @@ class UsersController < ApplicationController
|
|||
}
|
||||
scope = User.logged.status(@status)
|
||||
@search_by = params[:search_by] ? params[:search_by][:id] : 0
|
||||
scope = scope.like(params[:name],@search_by) if params[:name].present?
|
||||
scope = scope.like(params[:name],"0") if params[:name].present?
|
||||
@user_count = scope.count
|
||||
@user_pages = Paginator.new @user_count, @limit, params['page']
|
||||
@user_base_tag = params[:id] ? 'base_users':'users_base'
|
||||
|
@ -433,9 +433,16 @@ class UsersController < ApplicationController
|
|||
else
|
||||
activity = Activity.where(where_condition).where('user_id = ?', @user.id).order('id desc')
|
||||
end
|
||||
|
||||
@activity_count = activity.count
|
||||
@activity_pages = Paginator.new @activity_count, pre_count, params['page']
|
||||
@activity = activity.offset(@activity_pages.offset).limit(@activity_pages.per_page).all
|
||||
activity_page = activity.slice(@activity_pages.offset,@activity_pages.per_page * 2)
|
||||
activity_page = activity_page.reject { |e|
|
||||
((e.act_type=="Issue") && ( !e.act.visible?(User.current))) ||
|
||||
((e.act_type == "Journal") && (!e.act.project.visible?(User.current))) ||
|
||||
((e.act_type == "Bid") && ((!User.current.member_of_course?(e.act.courses.first) || !User.current.admin?)))
|
||||
}
|
||||
@activity = activity.slice(0,@activity_pages.per_page)
|
||||
@state = 0
|
||||
end
|
||||
|
||||
|
|
|
@ -175,22 +175,7 @@ module CoursesHelper
|
|||
end
|
||||
members
|
||||
end
|
||||
def searchStudent_sort project, sort_by
|
||||
#searchPeopleByRoles(project, StudentRoles)
|
||||
members = []
|
||||
|
||||
project.members.each do |m|
|
||||
if m && m.user && m.user.allowed_to?(:as_student,project)
|
||||
members << m
|
||||
|
||||
end
|
||||
end
|
||||
members.sort!{ |mem1, mem2| mem1.student_homework_score[1].to_f <=> mem2.student_homework_score[1].to_f}
|
||||
if sort_by == "desc"
|
||||
members.reverse!
|
||||
end
|
||||
members
|
||||
end
|
||||
|
||||
|
||||
def searchStudent_by_name project, name
|
||||
|
@ -206,6 +191,32 @@ module CoursesHelper
|
|||
end
|
||||
members
|
||||
end
|
||||
def searchmember_by_name members, name
|
||||
#searchPeopleByRoles(project, StudentRoles)
|
||||
mems = []
|
||||
members.each do |m|
|
||||
|
||||
username = m.user[:lastname].to_s + m.user[:firstname].to_s
|
||||
if(m.user[:login].to_s.include?(name) || m.user.user_extensions[:student_id].to_s.include?(name) || username.include?(name))
|
||||
mems << m
|
||||
end
|
||||
|
||||
end
|
||||
mems
|
||||
end
|
||||
def searchgroupmember_by_name members, name, group
|
||||
#searchPeopleByRoles(project, StudentRoles)
|
||||
mems = []
|
||||
members.each do |m|
|
||||
if m.course_group_id == group.id
|
||||
username = m.user[:lastname].to_s + m.user[:firstname].to_s
|
||||
if(m.user[:login].to_s.include?(name) || m.user.user_extensions[:student_id].to_s.include?(name) || username.include?(name))
|
||||
mems << m
|
||||
end
|
||||
end
|
||||
end
|
||||
mems
|
||||
end
|
||||
def searchgroupstudent_by_name(group, project, name)
|
||||
members = []
|
||||
group.members.each do |m|
|
||||
|
|
|
@ -227,7 +227,7 @@ module IssuesHelper
|
|||
strings = []
|
||||
values_by_field = {}
|
||||
details.each do |detail|
|
||||
unless detail.property == 'attachment'
|
||||
|
||||
if detail.property == 'cf'
|
||||
field_id = detail.prop_key
|
||||
field = CustomField.find_by_id(field_id)
|
||||
|
@ -243,7 +243,7 @@ module IssuesHelper
|
|||
end
|
||||
end
|
||||
strings << show_detail(detail, no_html, options)
|
||||
end
|
||||
|
||||
end
|
||||
values_by_field.each do |field_id, changes|
|
||||
detail = JournalDetail.new(:property => 'cf', :prop_key => field_id)
|
||||
|
|
|
@ -98,7 +98,7 @@ module WatchersHelper
|
|||
# modify by nwb
|
||||
# 主讲教师不允许退出课程
|
||||
return '' if user.id == course.tea_id
|
||||
joined = user.member_of_course?(course)
|
||||
joined = course.members.map{|m| m.user}.include? user
|
||||
text = joined ? l(:label_exit_course) : l(:label_new_join)
|
||||
url = joined ? join_path(:object_id => course.id) : try_join_path(:object_id => course.id)
|
||||
method = joined ? 'delete' : 'post'
|
||||
|
|
|
@ -51,7 +51,7 @@ class Issue < ActiveRecord::Base
|
|||
|
||||
|
||||
acts_as_nested_set :scope => 'root_id', :dependent => :destroy
|
||||
acts_as_attachable :after_add => :attachment_added, :after_remove => :attachment_removed
|
||||
acts_as_attachable :before_add => :attachment_added, :after_remove => :attachment_removed
|
||||
acts_as_customizable
|
||||
acts_as_watchable
|
||||
acts_as_searchable :columns => ['subject', "#{table_name}.description", "#{Journal.table_name}.notes"],
|
||||
|
@ -1359,7 +1359,7 @@ class Issue < ActiveRecord::Base
|
|||
|
||||
# Callback on file attachment
|
||||
def attachment_added(obj)
|
||||
if @current_journal && !obj.new_record? && @current_journal.journalized_id == obj.author_id
|
||||
if @current_journal && @current_journal.user_id == obj.author_id && JournalDetail.find_all_by_value(obj.filename).count == 0
|
||||
@current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => obj.id, :value => obj.filename)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -116,18 +116,16 @@ class Member < ActiveRecord::Base
|
|||
|
||||
# 查找每个学生每个作业的评分
|
||||
def student_homework_score
|
||||
teachers = find_course_teachers(self.course)
|
||||
|
||||
score_count = 0
|
||||
homework_scores = HomeworkAttach.find_by_sql("SELECT homework_attaches.bid_id as bid_id, bids.name as name,
|
||||
homework_score = HomeworkAttach.find_by_sql("SELECT bids.`name`, 0 as score,
|
||||
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach'
|
||||
AND rateable_id = homework_attaches.id AND rater_id IN (#{teachers}) ) AS t_score,
|
||||
AND rateable_id = homework_attaches.id ) AS t_score,
|
||||
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach'
|
||||
AND rateable_id = homework_attaches.id AND rater_id NOT IN (#{teachers})) AS s_score
|
||||
AND rateable_id = homework_attaches.id ) AS s_score
|
||||
FROM homework_attaches, bids where homework_attaches.user_id = #{self.user_id}
|
||||
and homework_attaches.bid_id IN (SELECT bid_id FROM homework_for_courses where course_id = #{self.course_id}
|
||||
and homework_attaches.bid_id = bids.id)")
|
||||
homework_scores.each do |homework|
|
||||
and homework_attaches.bid_id IN (SELECT bid_id FROM homework_for_courses where course_id = #{self.course_id})
|
||||
AND homework_attaches.bid_id = bids.id ")
|
||||
homework_score.each do |homework|
|
||||
if !homework.t_score.nil? && homework.t_score != 0
|
||||
score = homework.t_score
|
||||
else
|
||||
|
@ -139,7 +137,7 @@ class Member < ActiveRecord::Base
|
|||
end
|
||||
score_count = score_count + score
|
||||
end
|
||||
[homework_scores, format("%0.2f", score_count)]
|
||||
[homework_score, format("%0.2f", score_count)]
|
||||
end
|
||||
protected
|
||||
|
||||
|
@ -148,10 +146,7 @@ class Member < ActiveRecord::Base
|
|||
end
|
||||
|
||||
|
||||
#获取课程的老师列表
|
||||
def find_course_teachers course
|
||||
searchTeacherAndAssistant(course).map{|teacher| teacher.user_id}.join(",")
|
||||
end
|
||||
|
||||
def searchTeacherAndAssistant project
|
||||
#searchPeopleByRoles(project, TeacherRoles)
|
||||
members = []
|
||||
|
|
|
@ -206,11 +206,11 @@ class User < Principal
|
|||
pattern = "%#{arg.to_s.strip.downcase}%"
|
||||
#where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern)
|
||||
if type == "0"
|
||||
where(" LOWER(login) LIKE :p ", :p => pattern)
|
||||
where(" LOWER(login) LIKE '#{pattern}' ")
|
||||
elsif type == "1"
|
||||
where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern)
|
||||
where(" LOWER(concat(lastname, firstname)) LIKE '#{pattern}' ")
|
||||
else
|
||||
where(" LOWER(mail) LIKE :p ", :p => pattern)
|
||||
where(" LOWER(mail) LIKE '#{pattern}' ")
|
||||
end
|
||||
end
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<td>
|
||||
<table width="580px" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<td valign="top">
|
||||
<strong>
|
||||
<%= link_to(bid.author.lastname+bid.author.firstname, user_path(bid.author)) %>
|
||||
</strong>
|
||||
|
@ -55,6 +55,8 @@
|
|||
<span>
|
||||
<%= link_to(bid.name, course_for_bid_path(bid), :class => 'bid_path') %>
|
||||
</span>
|
||||
</td>
|
||||
<td style="width: 110px;">
|
||||
<span style="float: right">
|
||||
<% if User.current.logged? && is_cur_course_student(@course) %>
|
||||
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
|
||||
|
@ -83,8 +85,8 @@
|
|||
<%end%>
|
||||
<span class="span_wping">
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id}
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id}
|
||||
) %>
|
||||
</span>
|
||||
<%#= link_to(
|
||||
|
@ -156,7 +158,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<td style="text-align: left" colspan="2">
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_create_time) %>
|
||||
:
|
||||
|
@ -176,7 +178,6 @@
|
|||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
|
||||
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
|
||||
div,img,tr,td{ border:0;}
|
||||
table,tr,td{border:0 cellspacing:0; cellpadding:0;}
|
||||
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
|
||||
ul,li{ list-style-type:none}
|
||||
.cl{ clear:both; overflow:hidden; }
|
||||
a{ text-decoration:none; }
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff;}
|
||||
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
|
||||
div,img,tr,td{ border:0;}
|
||||
table,tr,td{border:0 cellspacing:0; cellpadding:0;}
|
||||
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
|
||||
ul,li{ list-style-type:none}
|
||||
.cl{ clear:both; overflow:hidden; }
|
||||
a{ text-decoration:none; }
|
||||
|
|
|
@ -21,36 +21,36 @@
|
|||
<td rowspan="2" >
|
||||
<div class="project-search" style="float: right">
|
||||
<script type="text/javascript">
|
||||
function regexName()
|
||||
function regexName1()
|
||||
{
|
||||
var name = $.trim($("#name").val());
|
||||
if(name.length == 0)
|
||||
{
|
||||
$("#contest_name_span").text("<%= l(:label_search_conditions_not_null) %>");
|
||||
$("#contest_name_span").css('color','#ff0000');
|
||||
$("#contest_name_span").focus();
|
||||
$("#contest_name_span_head").text("<%= l(:label_search_conditions_not_null) %>");
|
||||
$("#contest_name_span_head").css('color','#ff0000');
|
||||
$("#contest_name_span_head").focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#contest_name_span").text("");
|
||||
$("#contest_name_span_head").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function submitSerch()
|
||||
{
|
||||
if(regexName()){$("#contests_serch").submit();}
|
||||
if(regexName1()){$("#contests_serch").submit();}
|
||||
}
|
||||
</script>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30, :onkeyup => 'regexName();' %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30, :onkeyup => 'regexName1();', :width => "125px" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="padding-top: 7px !important;">
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<br />
|
||||
<span id="contest_name_span"></span>
|
||||
<span id="contest_name_span_head"></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<div class="dis">
|
||||
<div class="msg_box" id='leave-message'>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<%# reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
||||
<h3><%= l(:label_user_response) %></h3>
|
||||
<h3>
|
||||
<%= l(:label_user_response) %>
|
||||
</h3>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
|
@ -30,5 +32,7 @@
|
|||
<div id="history">
|
||||
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
|
||||
</div>
|
||||
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,17 +1,19 @@
|
|||
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
<ul>
|
||||
<li class="classbox" id = "group_name_0" name="check_group_name">
|
||||
<% course_member_count = l(:label_all) + " ( " + @membercount.to_s + "人)" %>
|
||||
<% course_member_count = l(:label_all) %>
|
||||
<%= link_to course_member_count, searchgroupmembers_course_path(@course,:group_id => 0), :onclick => "checkclass('group_name_0')", method: 'get', remote: true,:style => " border:0px; color: #0d90c3; float:left;"%>
|
||||
</li>
|
||||
<% if course_groups.any? %>
|
||||
<% course_groups.each do |group| %>
|
||||
<% group_display = group.name + " ( " + group.members.count.to_s + "人)" %>
|
||||
<% group_display = group.name %>
|
||||
<% group_count = " ( " + group.members.count.to_s + "人)" %>
|
||||
<li class="classbox" id="group_name_<%= group.id %>" name="check_group_name">
|
||||
<%= link_to group_display, searchgroupmembers_course_path(@course,:group_id => group.id), method: 'get', remote: true,
|
||||
:onclick => "checkclass('group_name_#{group.id}')",:style => " border:0px; color: #0d90c3; float:left;"%>
|
||||
:onclick => "checkclass('group_name_#{group.id}')"%>
|
||||
<%= link_to group_count, searchgroupmembers_course_path(@course,:group_id => group.id), method: 'get', remote: true,
|
||||
:onclick => "checkclass('group_name_#{group.id}')", :style => "color: red;"%>
|
||||
<% if @canShowCode && group.members.count == 0 %>
|
||||
<%= link_to '', deletegroup_course_path(:group_id => group.id), :method => 'delete', :remote => true,
|
||||
:data => {confirm: l(:label_delete_group)},
|
||||
|
|
|
@ -5,18 +5,29 @@
|
|||
<% if journals.size > 0 %>
|
||||
<% for journal in journals %>
|
||||
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
||||
<div class="ping_dispic"><a target="_blank" href="#"><%= image_tag(url_to_avatar(journal.user)) %></a></div>
|
||||
<div class="ping_dispic">
|
||||
<a target="_blank" href="#">
|
||||
<%= image_tag(url_to_avatar(journal.user)) %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ping_discon" style="width: 85%;">
|
||||
<div class="ping_distop">
|
||||
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||
<span><%= link_to journal.user, user_path(journal.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= format_time(journal.created_on) %></span>
|
||||
<span>
|
||||
<%= link_to journal.user, user_path(journal.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%>
|
||||
</span>
|
||||
<span style="color:#a6a6a6; margin-right:40px; margin-left:30px;">
|
||||
<%= format_time(journal.created_on) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<p><%= textilizable journal.notes%></p>
|
||||
<p>
|
||||
<%= textilizable journal.notes%>
|
||||
</p>
|
||||
</div>
|
||||
<div class="ping_disfoot">
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<span style="float: right">
|
||||
<% if journal.user == User.current|| User.current.admin? %>
|
||||
<% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
|
@ -43,7 +54,7 @@
|
|||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true} %>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true, :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -18,51 +18,52 @@
|
|||
<%= @group.name %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if @subPage_title && @subPage_title == l(:label_student_list)%>
|
||||
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:style => "margin-left: 5px; ",:remote=>true) do %>
|
||||
<%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1', :style => "height:15px"%>
|
||||
<% if @group %>
|
||||
<%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group.id}", name: 'search_group_id' %>
|
||||
<%= submit_tag l(:label_search_member_in_group), :name => "ingroup",:class => "f_2"%>
|
||||
<% end %>
|
||||
<%= submit_tag l(:label_search_member_in_course), :name => 'incourse',:onclick => "checkclass('group_name_0')",:class => "f_2"%>
|
||||
<%#= link_to l(:label_search),'' , :class => 'f_2' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if members.any? %>
|
||||
<% if @result_count %>
|
||||
<p style="font-size: 18px;"><%= l(:label_search_member_count) %><%= @result_count %><%= l(:label_member_people) %></p>
|
||||
<p style="font-size: 18px;">
|
||||
<%= l(:label_search_member_count) %>
|
||||
<%= @result_count %>
|
||||
<%= l(:label_member_people) %>
|
||||
</p>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div class="st_box">
|
||||
<ul class="st_box_top">
|
||||
<ul class="st_box_top" style="margin-left: 17px;">
|
||||
<% if @subPage_title == l(:label_student_list) %>
|
||||
<li class="ml358"><%= link_to '作业积分', member_score_sort_course_path ,method: 'get', remote: true, :onclick => "change_pic('pic')"%>
|
||||
<a id="pic" href="#" class="st_down"></a></li>
|
||||
<li class="ml50"><a href="#" >加入时间</a></li>
|
||||
<a id="pic" href="#" class="st_down"></a>
|
||||
</li>
|
||||
<li class="ml50">
|
||||
<a href="#" >加入时间</a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="ml50" style="margin-left: 470px"><li class="ml50"><a href="#" >加入时间</a></li>
|
||||
<li class="ml50" style="margin-left: 470px">
|
||||
</li>
|
||||
<li class="ml50">
|
||||
<a href="#" >加入时间</a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
<div id="list_detail">
|
||||
<div id="list_detail" style="margin-left: 17px">
|
||||
<% members.each do |member| %>
|
||||
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
<div class="st_boxlist">
|
||||
<% next if member.new_record? %>
|
||||
|
||||
<a href="#" class="st_img" style="float:left;"> <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %></a>
|
||||
<a href="#" class="st_img" style="float:left;">
|
||||
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %>
|
||||
</a>
|
||||
<ul style="margin-left: 15px">
|
||||
<% if @canShowCode %>
|
||||
<li>
|
||||
<%= l(:label_bidding_user_studentname) %> :
|
||||
<%= link_to member.user.show_name, user_path(member.user) %>
|
||||
|
||||
</li> </br>
|
||||
</li>
|
||||
</br>
|
||||
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
|
||||
<% else %>
|
||||
<%= content_tag "li", link_to(member.user.name, user_path(member.user)) %>
|
||||
|
@ -78,7 +79,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% if @subPage_title == l(:label_student_list) %>
|
||||
<%= link_to member.student_homework_score[1].to_s, {
|
||||
<%= link_to format("%0.2f",member.score.to_s), {
|
||||
:action => 'show_member_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
|
@ -99,7 +100,9 @@
|
|||
<% end; reset_cycle %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagination"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %></div>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% if @subPage_title == l(:label_student_list) %>
|
||||
<%= link_to member.student_homework_score[1].to_s, {
|
||||
<%= link_to format("%0.2f",member.score.to_s), {
|
||||
:action => 'show_member_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
var $group_name = $('#group_name')
|
||||
$group_name.blur(function (event) {
|
||||
if ($(this).is('#group_name')) {
|
||||
$.get(
|
||||
'<%=valid_ajax_course_path%>',
|
||||
{ valid: "name",
|
||||
value: this.value },
|
||||
function (data) {
|
||||
if (!data.valid) {
|
||||
alert('<%= l(:label_groupname_repeat) %>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type=" text/javascript" charset="utf-8">
|
||||
function validate_groupname(value1) {
|
||||
|
||||
|
@ -38,9 +57,21 @@
|
|||
<%= stylesheet_link_tag 'course_group', :media => 'all' %>
|
||||
<script type="text/javascript" src="javascripts/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js"></script>
|
||||
<div class="st_list">
|
||||
<div class="st_search">
|
||||
<div class="st_search" style="margin-left: 14px">
|
||||
<span class="f_l"><%= @subPage_title %></span>
|
||||
|
||||
<span>
|
||||
<% if @subPage_title && @subPage_title == l(:label_student_list)%>
|
||||
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:style => "margin-left: 5px; ",:remote=>true) do %>
|
||||
<%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1', :style => "height:15px; float: left;"%>
|
||||
<% if @group %>
|
||||
<%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group.id}", name: 'search_group_id' %>
|
||||
<%= submit_tag l(:label_search_member), :name => "ingroup",:class => "f_2", :style => "float: left "%>
|
||||
<% else %>
|
||||
<%= submit_tag l(:label_search_member),:style => "float: left", :name => 'incourse',:onclick => "checkclass('group_name_0')",:class => "f_2"%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if @subPage_title == l(:label_student_list) %>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div class=" ">
|
||||
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<% if User.current.logged? %>
|
||||
<% if is_course_teacher(User.current,@course) && file.author_id == User.current.id %>
|
||||
<% if is_course_teacher(User.current,@course) && file.author_id == User.current.id && course_contains_attachment?(@course,file) %>
|
||||
<%= link_to("选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true) if has_course?(User.current,file) %>
|
||||
|
||||
<% if delete_allowed && file.container_id == @course.id && file.container_type == "Course" %>
|
||||
|
|
|
@ -1,17 +1,24 @@
|
|||
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
|
||||
<div class="upload_con">
|
||||
<h2>将此课件引入我的课程资源库</h2>
|
||||
<div class="upload_box">
|
||||
<div id="error_show" style="color: red;"></div>
|
||||
<%= form_tag course_attach_relations_path,
|
||||
method: :post,
|
||||
remote: true,
|
||||
id: "relation_file_form" do %>
|
||||
<%= hidden_field_tag(:file_id, file.id) %>
|
||||
<%= content_tag('div', courses_check_box_tags('courses[course][]', User.current.courses,course,file), :id => 'courses')%>
|
||||
<a id="submit_quote" href="javascript:void(0)" class="upload_btn" onclick="submit_quote();">引 用</a><a href="javascript:void(0)" class="upload_btn upload_btn_grey" onclick="closeModal();">取 消</a>
|
||||
<% end -%>
|
||||
</div>
|
||||
<% if error == '403' %>
|
||||
<div class="upload_box">
|
||||
<div style="color: red;">您没有权限引用此资源</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="upload_box">
|
||||
<div id="error_show" style="color: red;"></div>
|
||||
<%= form_tag course_attach_relations_path,
|
||||
method: :post,
|
||||
remote: true,
|
||||
id: "relation_file_form" do %>
|
||||
<%= hidden_field_tag(:file_id, file.id) %>
|
||||
<%= content_tag('div', courses_check_box_tags('courses[course][]', User.current.courses,course,file), :id => 'courses')%>
|
||||
<a id="submit_quote" href="javascript:void(0)" class="upload_btn" onclick="submit_quote();">引 用</a><a href="javascript:void(0)" class="upload_btn upload_btn_grey" onclick="closeModal();">取 消</a>
|
||||
<% end -%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource',:locals => {:course => @course,:file => @file}) %>');
|
||||
<% if @can_quote %>
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource',:locals => {:course => @course,:file => @file,:error => ''}) %>');
|
||||
<% else %>
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource',:locals => {:course => @course,:file => @file,:error => '403'}) %>');
|
||||
<% end %>
|
||||
|
||||
showModal('ajax-modal', '513px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
|
|
|
@ -37,37 +37,38 @@
|
|||
</td>
|
||||
<td rowspan="2" width="250px">
|
||||
<script type="text/javascript">
|
||||
function regexName()
|
||||
function regexName1()
|
||||
{
|
||||
var name = $.trim($("#name").val());
|
||||
if(name.length == 0)
|
||||
{
|
||||
$("#contest_name_span").text("<%= l(:label_search_conditions_not_null) %>");
|
||||
$("#contest_name_span").css('color','#ff0000');
|
||||
$("#contest_name_span").focus();
|
||||
$("#contest_name_span_head").text("<%= l(:label_search_conditions_not_null) %>");
|
||||
$("#contest_name_span_head").css('color','#ff0000');
|
||||
$("#contest_name_span_head").focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#contest_name_span").text("");
|
||||
$("#contest_name_span_head").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function submitSerch()
|
||||
{
|
||||
if(regexName()){$("#contst_search_form").submit();}
|
||||
if(regexName1()){$("#contst_search_form").submit();}
|
||||
}
|
||||
</script>
|
||||
<div class="project-search">
|
||||
<%= form_tag({controller: 'contests', action: 'index'}, method: :get, :id => "contst_search_form") do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName();' %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="padding-top: 7px !important;">
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<span id="contest_name_span"></span>
|
||||
<br />
|
||||
<span id="contest_name_span_head"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="padding-top: 7px !important;">
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<br />
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<% @nav_dispaly_project_label = 1
|
||||
@nav_dispaly_forum_label = 1 %>
|
||||
<% @nav_dispaly_home_path_label = 1
|
||||
@nav_dispaly_main_course_label = 1
|
||||
@nav_dispaly_main_project_label = 1
|
||||
@nav_dispaly_main_contest_label = 1 %>
|
||||
<% @nav_dispaly_forum_label = 1%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= current_language %>">
|
||||
<head>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<div class="member_header">
|
||||
|
||||
<div class="member_header">
|
||||
<p>
|
||||
<%= @subPage_title %>
|
||||
</p>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
</p>
|
||||
<p>
|
||||
<%= f.text_field :login, :size => 30 %>
|
||||
<input type="text" hidden="hidden">
|
||||
</p>
|
||||
<p>
|
||||
<%= f.password_field :password, :size => 30, :name => 'ignore',
|
||||
|
|
|
@ -11,9 +11,15 @@
|
|||
|
||||
<div class="table1">
|
||||
<div class='table_row1'>
|
||||
<div class='table_cell1 filename1' style='text-align: center;'><%=l(:label_attachment)%></div>
|
||||
<div class='table_cell1 filedown1'><%=l(:field_downloads)%></div>
|
||||
<div class='table_cell1 downicon1'><%=l(:button_download)%></div>
|
||||
<div class='table_cell1 filename1' style='text-align: center;'>
|
||||
<%=l(:label_attachment)%>
|
||||
</div>
|
||||
<div class='table_cell1 filedown1'>
|
||||
<%=l(:field_downloads)%>
|
||||
</div>
|
||||
<div class='table_cell1 downicon1'>
|
||||
<%=l(:button_download)%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -46,9 +46,10 @@
|
|||
<% act = e.act %>
|
||||
<% unless act.nil? %>
|
||||
<% if e.act_type == 'JournalsForMessage' || e.act_type == 'Bid' || e.act_type == 'Journal'|| e.act_type == 'Changeset' || e.act_type == 'Message' || e.act_type == 'Principal' || e.act_type == 'News' || e.act_type == 'Issue' || e.act_type == 'Contest'%>
|
||||
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
||||
|
||||
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50">
|
||||
<td colspan="2" valign="top" width="50">
|
||||
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -430,8 +431,9 @@
|
|||
</td>
|
||||
</tr>
|
||||
<% when 'Issue' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<% if e.user == User.current %>
|
||||
<tr>
|
||||
|
||||
<td colspan="2" valign="top">
|
||||
<strong>
|
||||
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
||||
|
@ -445,20 +447,42 @@
|
|||
:action => 'show',
|
||||
:id => act.id} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong>
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
</strong>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"),
|
||||
{:controller => 'issues',
|
||||
:action => 'show',
|
||||
:id => act.id} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
||||
<%= textAreailizable act, :description %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter">
|
||||
<%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
|
||||
</span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span>
|
||||
<%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||
</span>
|
||||
<a class="font_lighter">
|
||||
<%= l(:label_comments_count, :count => e.act.journals.count) %>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong>
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
</strong>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"),
|
||||
{:controller => 'issues',
|
||||
:action => 'show',
|
||||
:id => act.id} %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
||||
|
@ -482,6 +506,9 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% when 'Contest' %>
|
||||
<tr>
|
||||
<% if e.user == User.current && @show_contest == 1%>
|
||||
|
@ -531,7 +558,9 @@
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
<% end %><!-- < % #unless act.nil? end %> -->
|
||||
<% end %><!-- < % #@activity.each do |e| end%> -->
|
||||
</div>
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<% if @content.current_version? %>
|
||||
<%= link_to_if_authorized(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
|
||||
<%= watcher_link(@page, User.current) %>
|
||||
<%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
||||
<%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
||||
<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
||||
<%#= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
||||
<%#= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
||||
<%#= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
||||
<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %>
|
||||
<% else %>
|
||||
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
<% id = "journal_reply_ul_" + journal.id.to_s%>
|
||||
<% allow_delete ||= false%>
|
||||
<div id = '<%= id %>' >
|
||||
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
|
||||
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name} %>
|
||||
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name, :allow_delete => allow_delete} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
|
||||
<% allow_delete ||= false %>
|
||||
<% if parent_jour%>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
|
||||
|
@ -30,7 +31,7 @@
|
|||
<%= format_time reply.created_on %>
|
||||
</span>
|
||||
<span class="ping_disfoot" style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
||||
<% if User.current.admin? || reply.user.id == User.current.id%>
|
||||
<% if User.current.admin? || reply.user.id == User.current.id || allow_delete%>
|
||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
|
|
|
@ -570,14 +570,14 @@ zh:
|
|||
label_role_new: 新建角色
|
||||
label_role_and_permissions: 角色和权限
|
||||
label_member: 成员
|
||||
label_search_member_in_group: 班内搜索
|
||||
label_search_member_in_course: 课内搜索
|
||||
label_search_member: 搜索
|
||||
label_search_member_count: 共搜索到
|
||||
label_member_people: 人
|
||||
label_delete_group: 确定删除分班?
|
||||
label_current_group: 当前分班
|
||||
label_limit_groupname: 组别名不能超出20字符
|
||||
label_limit_groupname_null: 组别名不能为空
|
||||
label_limit_groupname: 班名不能超出20字符
|
||||
label_groupname_repeat: 该班名已存在
|
||||
label_limit_groupname_null: 班名不能为空
|
||||
label_member_new: 添加成员
|
||||
label_member_plural: 成员
|
||||
label_tracker: 跟踪标签
|
||||
|
@ -1382,7 +1382,7 @@ zh:
|
|||
label_activity_time: 发布时间
|
||||
label_update_time: 更新时间
|
||||
label_current_contributors: 位当前贡献者
|
||||
label_commit_limit: 截止了,可补交
|
||||
label_commit_limit: 已截止,但可补交
|
||||
label_commit_ar: 作业提交截止时间快到了!
|
||||
lable_has_commit_homework: 您已提交过作业
|
||||
#modify by men
|
||||
|
|
|
@ -651,6 +651,7 @@ RedmineApp::Application.routes.draw do
|
|||
match "addgroups", :via => [:post, :get]
|
||||
match 'deletegroup', :via => [:delete]
|
||||
match 'show_member_score', :via => [:get]
|
||||
match 'valid_ajax', :to => 'courses#valid_ajax', :via => :get
|
||||
post 'join_in/join_group', :to => 'courses#join_group', :as => 'join_group'
|
||||
delete 'join_in/join_group', :to => 'courses#unjoin_group'
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20141201085218) do
|
||||
ActiveRecord::Schema.define(:version => 20141210070327) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
|
@ -2899,7 +2899,7 @@ div.repos_explain{
|
|||
input[class~='ButtonClolr'],.ButtonColor{
|
||||
|
||||
color: #fffbff !important;
|
||||
padding: 5px;
|
||||
/*padding: 5px;*/
|
||||
width: auto;
|
||||
height: 24px ;
|
||||
font-family: '微软雅黑',Arial,Helvetica,sans-serif;
|
||||
|
|
|
@ -40,12 +40,14 @@ input.f_2 {
|
|||
.st_list{ width:688px; padding-left:5px; height:800px;}
|
||||
.st_search{ margin:10px 0;}
|
||||
.st_search span{ font-size:14px; font-weight:bold; color:#606060; margin-right:35px;}
|
||||
.st_search input{ border:1px solid #1c9ec7; background:#fff; height:20px; color:#c4c4c4; width:200px;}
|
||||
.st_search input{ border:1px solid #1c9ec7; height:20px; width:200px;}
|
||||
.st_search a:hover{ background:#048fbb; text-decoration:none;}
|
||||
/*.st_search input.f_2{ background:#1c9ec7; padding: 3px; margin-left: 3px; color:#fff;border:1px solid #1c9ec7; text-align:center; display:block; width:45px; height:28px; font-size:12px; }*/
|
||||
|
||||
.classbox{ border:1px solid #f8df8c; background:#fffce6; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
|
||||
.st_addclass ul li.selected { border:1px solid #f8df8c; background:#f8df8c; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
|
||||
.classbox a { border:0px; color: #0d90c3; float:left;text-decoration: none;}
|
||||
.st_addclass ul li.selected {border:1px solid #f8df8c; background:#f6f098; padding:0 3px; float:left; margin-left:15px;}
|
||||
.st_addclass ul li.selected a { color:#716cad;text-decoration: none;}
|
||||
.st_addclass{ margin-top:5px;}
|
||||
.st_addclass ul li{ margin-bottom:10px;}
|
||||
.st_addclass ul li,.st_addclass a,.st_addclass img{ float:left;}
|
||||
|
@ -83,11 +85,11 @@ a:hover.st_add{ color:#ff8e15;}
|
|||
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
|
||||
.group_in {
|
||||
width:90px !important;
|
||||
height:28px !important;
|
||||
|
||||
color:#1c9ec7!important;
|
||||
margin-right:5px !important;
|
||||
border:none !important;
|
||||
font-size: 14px !important;
|
||||
font-size: 12px !important;
|
||||
margin-left:0px !important;
|
||||
box-shadow: none !important;
|
||||
float: right;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
body{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9 !important; background:#fff !important; font-style:normal !important;}
|
||||
.resource{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9 !important; background:#fff !important; font-style:normal !important;}
|
||||
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,form,span,textarea{ margin:0; padding:0;}
|
||||
div,img,tr,td,textarea{ border:0;}
|
||||
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
|
||||
ul,li{ list-style-type:none}
|
||||
.cl{ clear:both; overflow:hidden; }
|
||||
a{ text-decoration:none; text-align:center; }
|
||||
#resource a{ text-decoration:none; text-align:center; }
|
||||
a:hover{ text-decoration:underline;}
|
||||
/**** 常用***/
|
||||
.f_l{ float:left;}
|
||||
|
@ -72,12 +72,14 @@ a:hover.re_select{
|
|||
border: 1px solid #64bdd9 !important;
|
||||
color: #64bdd9 !important;
|
||||
margin-left: 10px !important;
|
||||
text-align: center;
|
||||
}
|
||||
a:hover.re_open
|
||||
{
|
||||
background: #64bdd9;
|
||||
color: #fff !important;
|
||||
text-decoration: none !important;
|
||||
text-align: center;
|
||||
}
|
||||
a.re_de{ color:#6883b6; margin-left:15px;}
|
||||
.re_con_box{ border-bottom:1px dashed #dadada; padding:10px 0;}
|
||||
|
|
|
@ -36,6 +36,7 @@ div.loginForm{
|
|||
border-bottom: 1px dashed rgb(229, 229, 229);
|
||||
width: 95%;
|
||||
height: auto;
|
||||
min-height: 60px;
|
||||
}
|
||||
li {
|
||||
list-style-type: none;
|
||||
|
|
Loading…
Reference in New Issue