Merge branch 'szzh' into develop

This commit is contained in:
sw 2015-06-26 14:47:25 +08:00
commit 2598894a59
39 changed files with 553 additions and 166 deletions

View File

@ -247,7 +247,7 @@ module Mobile
end
get "course_dynamic/:id" do
cs = CoursesService.new
count = cs.course_dynamic(params,current_user)
count = cs.all_course_dynamics(params,current_user)
present :data, count, with: Mobile::Entities::CourseDynamic
present :status, 0
end

View File

@ -1,13 +1,18 @@
module Mobile
module Entities
class Attachment < Grape::Entity
include Redmine::I18n
def self.attachment_expose(field)
expose field do |f,opt|
if f.is_a?(Hash) && f.key?(field)
f[field]
elsif f.is_a?(::Attachment)
if f.respond_to?(field)
f.send(field)
if field == :created_on
format_time(f.send(field))
else
f.send(field)
end
else
#case field
# when ""
@ -21,6 +26,7 @@ module Mobile
attachment_expose :description
attachment_expose :downloads
attachment_expose :quotes
attachment_expose :created_on
end
end
end

View File

@ -6,6 +6,62 @@ module Mobile
expose field do |c,opt|
if field == :update_time
(format_time(c[field]) if (c.is_a?(Hash) && c.key?(field)))
elsif field == :news_count
obj = nil
c[:dynamics].each do |d|
if d[:type] == 1
obj = d[:count]
end
end
obj
elsif field == :document_count
obj = nil
c[:dynamics].each do |d|
if d[:type] == 3
obj = d[:count]
end
end
obj
elsif field == :topic_count
obj = nil
c[:dynamics].each do |d|
if d[:type] == 2
obj = d[:count]
end
end
obj
elsif field == :homework_count
obj = nil
c[:dynamics].each do |d|
if d[:type] == 4
obj = d[:count]
end
end
obj
elsif field == :homework_submit_num
obj = nil
c[:dynamics].each do |d|
if d[:type] == 4
obj = d[:submit_count]
end
end
obj
elsif field == :homework_submit_students
obj = nil
c[:dynamics].each do |d|
if d[:type] == 4
obj = d[:studentlist]
end
end
obj
elsif field == :homework_status
obj = nil
c[:dynamics].each do |d|
if d[:type] == 4
obj = d[:homework_status]
end
end
obj
else
c[field] if (c.is_a?(Hash) && c.key?(field))
end
@ -21,6 +77,53 @@ module Mobile
course_dynamic_expose :course_img_url
course_dynamic_expose :message
course_dynamic_expose :update_time
course_dynamic_expose :count
course_dynamic_expose :news_count
course_dynamic_expose :document_count
course_dynamic_expose :topic_count
course_dynamic_expose :homework_count
course_dynamic_expose :homework_submit_students
course_dynamic_expose :homework_submit_num
course_dynamic_expose :homework_status
#在dynamics里解析出四种动态
expose :document,using:Mobile::Entities::Attachment do |f,opt|
obj = nil
f[:dynamics].each do |d|
if d[:type] == 3
obj = d[:documents]
end
end
obj
end
expose :topic,using:Mobile::Entities::Message do |f,opt|
obj = nil
f[:dynamics].each do |d|
if d[:type] == 2
obj = d[:topic]
end
end
obj
end
expose :homework,using:Mobile::Entities::Homework do |f,opt|
obj = nil
f[:dynamics].each do |d|
if d[:type] == 4
obj = d[:homework]
end
end
obj
end
expose :news,using:Mobile::Entities::News do |f,opt|
obj = nil
f[:dynamics].each do |d|
if d[:type] == 1
obj = d
end
end
obj
end
end
end
end

View File

@ -1,3 +1,4 @@
# 这个模块由于作业模块的改变,里边的注释以及属性不可信
module Mobile
module Entities
class Homework < Grape::Entity
@ -14,7 +15,12 @@ module Mobile
if f.respond_to?(field)
f.send(field)
else
case field
when :homework_name
f.send(:name)
when :homework_notsubmit_num
f.course.members.count - f.student_works.count
end
end
end
end
@ -60,6 +66,12 @@ module Mobile
f[:homework_for_anonymous_comments] if f.is_a?(Hash) && f.key?(:homework_for_anonymous_comments)
end
homework_expose :homework_notsubmit_num
expose :submit_student_list ,using:Mobile::Entities::User do |f,opt|
f[:studentlist]
end
end
end
end

View File

@ -0,0 +1,46 @@
module Mobile
module Entities
class Message < Grape::Entity
include ApplicationHelper
include ApiHelper
def self.message_expose(f)
expose f do |u,opt|
if u.is_a?(Hash) && u.key?(f)
u[f]
elsif u.is_a?(::Message)
if u.respond_to?(f)
if f == :created_on
format_time( u.send(f))
else
u.send(f)
end
else
# case f
# when :xx
# #
# end
end
end
end
end
expose :user, using: Mobile::Entities::User do |c, opt|
if c.is_a?(::Message)
c.author
end
end
message_expose :board_id
message_expose :subject
message_expose :content
message_expose :replies_count
message_expose :created_on
message_expose :id
expose :message_children,using:Mobile::Entities::Message do |c,opt|
if c.is_a? (::Message)
c.children
end
end
end
end
end

View File

@ -1,6 +1,6 @@
#added by baiyu
class GitUsageController < ApplicationController
layout "project_base"
layout "base_projects"
def ch_usage
end

View File

@ -206,7 +206,7 @@ class HomeworkCommonController < ApplicationController
#当前用户是不是课程的成员
def member_of_course
render_403 unless User.current.member_of_course?(@course) || User.current.admin?
render_403 unless @course.is_public || User.current.member_of_course?(@course) || User.current.admin?
end
def get_assigned_homeworks(student_works, n, index)

View File

@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class IssueCategoriesController < ApplicationController
layout "project_base"
layout "base_projects"
menu_item :settings
model_object IssueCategory
before_filter :find_model_object, :except => [:index, :new, :create]

View File

@ -1,5 +1,5 @@
class OrganizationController < ApplicationController
layout 'project_base'
layout 'base_projects'
before_filter :require_admin, :except => [:index]
def index

View File

@ -438,9 +438,9 @@ class ProjectsController < ApplicationController
case params[:role]
when '1'
@subPage_title = l :label_teacher_list
@members = searchTeacherAndAssistant(@project)
@members = searchTeacherAndAssistant(@project)
when '2'
@subPage_title = l :label_student_list
@subPage_title = l :label_student_list
@members = searchStudent(@project)
else
@subPage_title = ''
@ -578,7 +578,7 @@ class ProjectsController < ApplicationController
format.api { render_api_ok }
end
else
render :layout => "project_base"
render :layout => "base_projects"
end
# hide project in layout
@project = nil
@ -586,7 +586,7 @@ class ProjectsController < ApplicationController
def show_projects_score
respond_to do |format|
format.html { render :layout => "project_base"}
format.html { render :layout => "base_projects"}
format.js
end
end
@ -674,10 +674,10 @@ class ProjectsController < ApplicationController
private
def memberAccess
# 是课程,则判断当前用户是否参加了课程
# return 0 if @project.project_type == Project::ProjectType_project
# currentUser = User.current
render_403 unless User.current.member_of?(@project)
# 如果是私有项目,项目成员不对外公开,公开项目成员列表对外公开。
unless @project.is_public?
render_403 unless User.current.member_of?(@project)
end
end
def toggleCourse

View File

@ -284,7 +284,7 @@ class StudentWorkController < ApplicationController
#是不是当前课程的成员
#当前课程成员才可以看到作品列表
def member_of_course
render_403 unless User.current.member_of_course? @course || User.current.admin?
render_403 unless User.current.member_of_course?(@course) || User.current.admin?
end
#判断是不是当前作品的提交者

View File

@ -361,16 +361,15 @@ module IssuesHelper
end
end
# 之所以注释是因为该功能冗余了
if detail.property == 'attr' && detail.prop_key == 'description'
s = l(:text_journal_changed_no_detail, :label => label)
# unless no_html
# diff_link = link_to l(:label_diff),
# {:controller => 'journals', :action => 'diff', :id => detail.journal_id,
# :detail_id => detail.id, :only_path => options[:only_path]},
# :title => l(:label_view_diff)
# s << " (#{ diff_link })"
# end
unless no_html
diff_link = link_to l(:label_diff),
{:controller => 'journals', :action => 'diff', :id => detail.journal_id,
:detail_id => detail.id, :only_path => options[:only_path]},
:title => l(:label_view_diff)
s << " (#{ diff_link })"
end
s.html_safe
elsif detail.value.present?
case detail.property

View File

@ -124,8 +124,8 @@ class Mailer < ActionMailer::Base
attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order('attachments.created_on DESC')
@bids += bids if bids.count > 0
@attachments += attachments if attachments.count > 0
end
@bids.sort {|a, b| a.created_at <=> b.created_at}
end
# 项目附件

View File

@ -330,7 +330,7 @@ class CoursesService
def homework_list params,current_user
course = Course.find(params[:id])
if course.is_public != 0 || current_user.member_of_course?(course)
bids = course.homework_commons.order('end_time DESC')
bids = course.homework_commons.page(1).per(3).order('created_at DESC')
bids = bids.like(params[:name]) if params[:name].present?
homeworks = []
bids.each do |bid|
@ -540,14 +540,35 @@ class CoursesService
#student_questions_count = bid.journals_for_messages.where('m_parent_id IS NULL').count
description = bid.description
#if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2
state = bid.homework_detail_manual.comment_status
#state = bid.homework_detail_manual.comment_status
if !bid.nil?
if bid.homework_type == 1 && bid.homework_detail_manual
case bid.homework_detail_manual.comment_status
when 1
state = show_homework_deadline bid
when 2
state = "正在匿评中"
when 3
state = "匿评已结束"
end
elsif bid.homework_type == 0
state = "未启用匿评"
elsif bid.homework_type == 2
state = "编程作业"
else
end
end
studentlist = []
bid.student_works.order("created_at desc").page(1).per(6).each do |work|
studentlist << work.user
end
unless is_course_teacher
homework_for_anonymous_comments = get_student_batch_homework_list bid,current_user
end
#end
open_anonymous_evaluation = bid.homework_detail_manual.comment_status
{:course_name => course.name,:course_id => course.id,:id => bid.id, :author => bid.user,:author_real_name => author_real_name, :homework_times => many_times, :homework_name => name, :homework_count => homework_count,:student_questions_count => 0,
:description => description, :homework_state => state,:open_anonymous_evaluation => open_anonymous_evaluation,:homework_for_anonymous_comments => homework_for_anonymous_comments,:created_on => bid.created_at,:deadline => bid.end_time}
:description => description, :homework_state => state,:open_anonymous_evaluation => open_anonymous_evaluation,:homework_for_anonymous_comments => homework_for_anonymous_comments,:created_on => bid.created_at,:deadline => bid.end_time,:studentlist => studentlist}
end
@ -615,9 +636,103 @@ class CoursesService
homework_scores
end
#app新版api
#
#
#课程动态
public
def all_course_dynamics params, current_user
#获取当前用户的所有课程
@user = User.find(params[:id])
if current_user.nil? && !current_user.admin? && !@user.active?
raise '404'
return
end
if current_user == @user || current_user.admin?
membership = @user.coursememberships.page(1).per(10)
else
membership = @user.coursememberships.page(1).per(10).all(:conditions => Course.visible_condition(current_user))
end
if membership.nil? || membership.count == 0
raise l(:label_no_courses, :locale => get_user_language(current_user))
end
membership.sort! { |older, newer| newer.created_on <=> older.created_on }
#定义一个数组集合存放hash数组该hash数组包括课程的信息并包含课程的最新发布的资源最新的讨论区留言最新的作业最新的通知
result = []
#对用户所有的课程进行循环,找到每个课程最新发布的资源,最新的讨论区留言,最新的作业,最新的通知,并存进数组
membership.each do |mp|
course = mp.course
latest_course_dynamics = []
dynamics_count = 0
# 课程通知
latest_news = course.news.order("created_on desc").first
unless latest_news.nil?
latest_course_dynamics << {:type => 1, :time => latest_news.created_on,:count=>course.news.count,
:news => latest_news}
dynamics_count += 1
end
# 课程讨论区
latest_message = course.boards.first.topics[0]
unless latest_message.nil?
latest_course_dynamics << {:type => 2, :time => latest_message.created_on, :count =>course.boards.nil? ? 0 : course.boards.first.topics.count,
:topic => latest_message}
dynamics_count += 1
end
# 课程资源
latest_attachment = course.attachments.order("created_on desc").first
unless latest_attachment.nil?
latest_course_dynamics << {:type => 3, :time => latest_attachment.created_on,:count =>course.attachments.count , :documents=>latest_attachment}
dynamics_count += 1
end
#课程作业 已经交的学生列表暂定显示6人未交的学生列表作业的状态
homework = course.homework_commons.order('created_at desc').first
homework_status = "";
# 判断作业所处的状态,如果是刚发布,就获取剩余时间
#如果是匿评状态,显示正在匿评
#如果是匿评结束,显示匿评结束
#获取作业提交的前6个人不足6个显示所有
studentlist = []
if !homework.nil?
if homework.homework_type == 1 && homework.homework_detail_manual
case homework.homework_detail_manual.comment_status
when 1
homework_status = show_homework_deadline homework
when 2
homework_status = "正在匿评中"
when 3
homework_status = "匿评已结束"
end
elsif homework.homework_type == 0
homework_status = "未启用匿评"
elsif homework.homework_type == 2
homework_status = "编程作业"
else
end
# 获取提交作业的前六个学生的名字 和 头像路径
homework.student_works.order("created_at desc").page(1).per(6).each do |work|
studentlist << {:image_url=> url_to_avatar(work.user),:user_name=>work.user.realname}
end
latest_course_dynamics << {:type => 4, :time => homework.updated_at, :count=>course.homework_commons.count,:submit_count => homework.student_works.count , :homework => homework, :homework_status => homework_status, :studentlist => studentlist}
dynamics_count += 1
end
latest_course_dynamics.sort! { |order, newer| newer[:time] <=> order[:time] }
latest_course_dynamic = latest_course_dynamics.first
unless latest_course_dynamic.nil?
result << {:course_name => course.name, :course_id => course.id, :course_img_url => url_to_avatar(course), :course_time => course.time, :course_term => course.term,:message => dynamics_count, :dynamics => latest_course_dynamics, :count => dynamics_count}
end
end
#返回数组集合
result.sort! { |order, newer| newer[:update_time] <=> order[:update_time] }
result
end
#计算作业的截止日期,剩余日期
def show_homework_deadline homework
"距作业截止还有" << (Date.parse(Time.now.to_s) - Date.parse(homework.end_time.to_s)).to_i.to_s << ""
end
end
end

View File

@ -70,31 +70,41 @@
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
$(function(){
function nh_show_btn(){
if($("#contentmessage<%=topic.id %>").height()>182){
$("#project_show_<%= topic.id%>").show();
if($("#project_show_<%= topic.id%>").is(':hidden')){
if($("#contentmessage<%=topic.id %>").height()>182){
$("#project_show_<%= topic.id%>").show();
}
}
}
var div = $("#contentmessage<%=topic.id %>");
var imgs = $('img',div);
var lens = imgs.length;
function nh_load_img_end(){
lens--;
if(lens <= 0){
nh_show_btn();
}
}
if(lens <= 0){
nh_show_btn();
}else{
// lens--;
// if(lens <= 0){
// nh_show_btn();
// }
}
if(lens > 0){
$('img',div).load(function(){
nh_load_img_end();
});
}
nh_show_btn();
// if(lens <= 0){
// nh_show_btn();
// }else{
// $('img',div).load(function(){
// nh_load_img_end();
// });
// }
});
</script>
<div class="project_board_content break_word" id="content_<%=topic.id%>">
<div id="contentmessage<%=topic.id %>" class="upload_img">
<%= topic.content.html_safe %>
<!-- -->
</div>
</div>
@ -157,7 +167,10 @@
<div class="Msg_txt">
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
<br/>
<div class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></div>
<div class="fl break_word">
<%= textAreailizable message,:content,:attachments => message.attachments %>
<!-- -->
</div>
<input nhname="nh_content_val" value="<%= message.content %>" type="hidden"/>
<br/><div class="cl"></div>
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>

View File

@ -62,26 +62,35 @@
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
$(function(){
function nh_show_btn(){
if($("#contentmessage<%=topic.id %>").height()>182){
$("#project_show_<%= topic.id%>").show();
if($("#project_show_<%= topic.id%>").is(':hidden')){
if($("#contentmessage<%=topic.id %>").height()>182){
$("#project_show_<%= topic.id%>").show();
}
}
}
var div = $("#contentmessage<%=topic.id %>");
var imgs = $('img',div);
var lens = imgs.length;
function nh_load_img_end(){
lens--;
if(lens <= 0){
nh_show_btn();
}
}
if(lens <= 0){
nh_show_btn();
}else{
// lens--;
// if(lens <= 0){
// nh_show_btn();
// }
}
if(lens > 0){
$('img',div).load(function(){
nh_load_img_end();
});
}
nh_show_btn();
// if(lens <= 0){
// nh_show_btn();
// }else{
// $('img',div).load(function(){
// nh_load_img_end();
// });
// }
});
</script>
</div>
@ -89,6 +98,7 @@
<div class="project_board_content break_word" id="content_<%=topic.id%>">
<div id="contentmessage<%=topic.id %>" class="upload_img">
<%= topic.content.html_safe %>
<!-- -->
</div>
</div>
<p style="display: none;" id="project_show_<%= topic.id%>">
@ -144,7 +154,10 @@
<div class="Msg_txt">
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
<br/>
<div class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></div>
<div class="fl break_word">
<%= textAreailizable message,:content,:attachments => message.attachments %>
<!-- -->
</div>
<input nhname="nh_content_val" type="hidden" value="<%= message.content %>"/>
<br/><div class="cl"></div>
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>

View File

@ -1,5 +1,5 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'join_private_course') %>');
showModal('ajax-modal', '510px');
showModal('ajax-modal', '540px');
$('#ajax-modal').css('height','330px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +

View File

@ -25,7 +25,7 @@
<% if file.is_public? || User.current.member_of_course?(course) %>
<div class="re_con_box" id="container_files_<%= file.id %>">
<div class="">
<%= link_to truncate(file.filename,length: 35, omission: '...'),
<%= link_to truncate(file.filename,length: 35, omission: '...'),
download_named_attachment_path(file.id, file.filename),
: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? %>

View File

@ -5,7 +5,11 @@
<p>
开启匿评后学生将不能对作品进行
<span class="c_blue">修改、删除</span>
等操作,目前有
等操作,开启匿评后的提交作品,将
<span class="c_blue">不能参与匿评</span>
匿评评分将被记为
<span class="c_pink">0分</span>
。目前有
<span class="c_pink"><%= @totle_size%>个</span>
学生,共提交了
<span class="c_pink"><%= @cur_size %></span>

View File

@ -7,7 +7,7 @@
<div class="wmail_main" style="padding:20px 10px 0px;">
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h3>
<!-- 课程通知 -->
<% unless @course_news.first.nil? %>
<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<%= l(:label_course_news) %>
@ -25,7 +25,7 @@
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice) %></span>
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
<%= link_to truncate(course_new.title.html_safe,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@ -33,31 +33,23 @@
</li>
<% end %>
<div class="cl"></div>
</ul><!--课程通知 end-->
<% end %>
<!-- 课程通知回复 -->
<% unless @course_news_comments.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<%= l(:label_course_mail_news_reply) %>
</span>
<!--课程通知回复-->
<% @course_news_comments.each do |course_news_comment|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<% unless course_news_comment.commented.nil? %>
<%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% end %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice) %></span>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice_reply) %></span>
<%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value),
<%= link_to truncate(course_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@ -65,7 +57,7 @@
</li>
<% end %>
<div class="cl"></div>
</ul><!--课程通知回复 end-->
</ul><!--课程通知 end-->
<% end %>
<!--课程作业-->
@ -89,7 +81,7 @@
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_course_homework) %></span>
<%= link_to truncate(bid.name,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
<%= link_to truncate(bid.name.html_safe,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@ -150,7 +142,7 @@
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_messages) %></span>
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
<%= link_to truncate(course_message.subject.html_safe,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(course_message.created_on) %></span>
@ -164,7 +156,7 @@
<% unless @attachments.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_course_attendingcontestwork_download) %>
<%= l(:label_course_mail_files) %>
</span>
<% @attachments.each do |attachment|%>
<li style="clear: both; list-style: none;">
@ -198,7 +190,7 @@
@project_news_comments.first %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h3 class="wmail_h2" style="color:#15BCCF; "><%= l(:label_project_overview_new)%></h3>
<% unless @issues.first.nil? %>
<% unless @issues.first.nil? || @issues_journals.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_issue_tracking) %>
@ -220,44 +212,32 @@
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issue.created_on) %></span>
</li>
<% end %>
<div class="cl"></div>
<% @issues_journals.each do |issues_journal| %>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue_update) %></span>
<% if issues_journal.notes.blank? || issues_journal.notes.nil? %>
<%= link_to truncate(l(:label_isuue_mail_status),length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% else %>
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% end %>
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issues_journal.created_on) %></span>
</li>
<% end %>
<div class="cl"></div>
</ul><!--问题跟踪 end-->
<% end %>
<!-- issues回复 -->
<% unless @issues_journals.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_issue_tracking) %>
</span>
<% @issues_journals.each do |issues_journal| %>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue) %></span>
<% if issues_journal.notes.blank? || issues_journal.notes.nil? %>
<%= l(:label_isuue_mail_status) %>
<% else %>
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
<% end %>
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issues_journal.created_on) %></span>
</li>
<% end %>
<div class="cl"></div>
</ul><!--问题跟踪 end-->
<% end %>
<!-- 讨论区 -->
<% unless @project_messages.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
@ -322,7 +302,7 @@
<% end %>
<!--项目新闻-->
<% unless @project_news.first.nil? %>
<% unless @project_news.first.nil? || @project_news_comments.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_project_news) %>
@ -347,28 +327,20 @@
</li>
<% end %>
<div class="cl"></div>
</ul><!-- 项目新闻end -->
<% end %>
<!-- 项目新闻回复 -->
<% unless @project_news_comments.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_project_news) %>
</span>
<!--新闻回复-->
<% @project_news_comments.each do |project_news_comment|%>
<li style="clear: both; list-style: none;">
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
<% unless project_news_comment.commented.nil? %>
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value),
:class=> "wmail_column",
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
<% end %>
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
<%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value), :class => "wmail_name",
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_mail_notice) %></span>
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:lable_project_mail_notice_reply) %></span>
<%= link_to truncate(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value),
:class => 'wmail_info',
@ -377,7 +349,7 @@
</li>
<% end %>
<div class="cl"></div>
</ul><!-- 项目新闻回复end -->
</ul><!-- 项目新闻end -->
<% end %>
<!-- 项目上传资源 -->

View File

@ -23,7 +23,7 @@
<% end %>
]
<%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value) %>
<%= l(:label_project_notice) %>
<%= l(:label_project_notice_reply) %>
<%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value) %>
<%= format_time(course_news_comment.created_on) %>
<% end %>
@ -49,7 +49,7 @@
[ <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value) %>]
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value) %>
<%= l(:label_send_course_journals_for_messages) %>
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value) %>
<%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value) %>
<%= format_time(course_journal_message.created_on) %>
<% end %>
<% end %>
@ -66,7 +66,7 @@
<% end %>
<% unless @attachments.first.nil? %>
<%= l(:label_course_attendingcontestwork_download) %>
<%= l(:label_course_mail_files) %>
<% @attachments.each do |attachment|%>
▪[<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value) %>]
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value) %>
@ -101,11 +101,11 @@
<% @issues_journals.each do |issues_journal| %>
▪[<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value) %>]
<%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value) %>
<%= l(:label_project_issue) %>
<%= l(:label_project_issue_update) %>
<% if issues_journal.notes.nil? %>
<%= link_to truncate(issues_journal.issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value) %>
<% else %>
<%= link_to truncate(issues_journal.notes,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value) %>
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value) %>
<% end %>
<%= format_time(issues_journal.created_on) %>
<% end %>
@ -148,7 +148,7 @@
▪[<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value) %> ]
<%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value) %>
<%= l(:label_project_mail_notice) %>
<%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new,:token => @token.value) %>
<%= link_to truncate(project_new.title.html_safe,length: 30,omission: '...'), news_url(project_new,:token => @token.value) %>
<%= format_time(project_new.created_on) %>
<% end %>
<% end %>
@ -161,7 +161,7 @@
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value) %>
<% end %>]
<%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value) %>
<%= l(:label_project_mail_notice) %>
<%= l(:lable_project_mail_notice_reply) %>
<%= link_to truncate(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value) %>
<%= format_time(project_news_comment.created_on) %>
<% end %>
@ -204,7 +204,7 @@
<% @user_journal_messages.each do |user_journal_message|%>
▪ <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value)%>
<%= l(:label_show_your_message) %>
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'), feedback_url(@user,:token => @token.value) %>
<%= link_to truncate(user_journal_message.notes.html_safe,length: 30,omission: '...'), feedback_url(@user,:token => @token.value) %>
<%= format_time(user_journal_message.created_on) %>
<% end %>
<% end %>
@ -216,7 +216,7 @@
<% @forums.each do |forum|%>
▪<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value) %>
<%= l(:label_forum_new) %>
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value) %>
<%= link_to truncate(forum.name.html_safe,length: 30,omission: '...'),forum_url(forum,:token => @token.value) %>
<%= format_time(forum.created_at) %>
<% end %>
<!-- 新建贴吧 end-->
@ -226,7 +226,7 @@
<% @memos.each do |memo|%>
▪<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value)%>
<%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %>
<%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))%>
<%= link_to truncate(memo.subject.html_safe,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))%>
<%= format_time(memo.created_at) %>
<% end %>
<!-- 新建贴吧 end-->

View File

@ -3,3 +3,15 @@
<% elsif @course %>
<%= render :partial => 'course_show', locals: {course: @course} %>
<% end %>
<script type="text/javascript">
$(function(){
$("#add_comment_form").submit(function(){
if($("#comment").val() == ''){
alert('请输入评论内容');
return false;
}
$(this)[0].submit();
//return true;
});
})
</script>

View File

@ -1,5 +1,5 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/join_project') %>');
showModal('ajax-modal', '510px');
showModal('ajax-modal', '540px');
$('#ajax-modal').css('height','260px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +

View File

@ -0,0 +1,14 @@
<div id="popbox02">
<div class="ni_con_work">
<p>
当前作业
<span class="c_pink">已开启匿评</span>
您提交作品后将
<span class="c_pink">不会收到任何匿评作品</span>,
您的作品也
<span class="c_pink">不会被其他用户匿评</span>.
如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分
</p>
<a href="javascript:void(0)" class="tijiao" style="margin-left:200px;" onclick="clickCanel()">确定</a>
</div>
</div>

View File

@ -0,0 +1,9 @@
<div id="popbox02">
<div class="ni_con">
<h2><img src="/images/bid/pic_top.jpg" width="188" height="37" alt="匿名评价" /></h2>
<p>&nbsp;&nbsp;&nbsp;&nbsp;据说雷锋做完好事是从来不留名的呢,我们这次评分也不留名!!!但是,但是,您给的分数一定要公正哦,老天爷看不到,我们的系统可是清楚得很!</p>
<p style="margin-bottom:15px;">&nbsp;&nbsp;&nbsp;&nbsp;别怪我没告诉你,系统分配给你的作品不评价可是要扣分的哈!</p>
<a href="javascript:" class="tijiao" style="margin-left:100px;" onclick="clickCanel()">匿名评分</a>
<a href="javascript:" style="color:#15bccf; margin-top:20px; display:block;" onclick="clickCanel()">冒着扣分的危险残忍拒绝</a>
</div>
</div>

View File

@ -1,3 +1,17 @@
<script type="text/javascript">
<% if @homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @stundet_works.count > 1%>
$(function(){
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/praise_alert') %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("anonymos");
});
<% end%>
</script>
<div class="project_r_h">
<div id="menu_r">
<ul class="menu_r">
@ -41,11 +55,20 @@
<% if @is_teacher%>
<div class="fr">
<% if @homework.student_works.empty?%>
<%= link_to "附件", "javascript:void(0)", class: "down_btn fr", :onclick => "alert('没有学生提交作业,无法下载附件')" %>
<%= link_to "附件", "javascript:void(0)", class: "down_btn fr zip_download_alert", :onclick => "alert('没有学生提交作业,无法下载附件')" %>
<% else%>
<%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json),
remote: true, class: "down_btn fr", :id => "download_homework_attachments" %>
remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %>
<% end%>
<div class="info_ni">
使用
<span class="c_red">winzip</span>
工具进行解压可能会导致
<span class="c_red">下载文件乱码</span>
,建议您使用
<span class="c_red">winrar</span>
工具进行解压
</div>
<%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%>
<span class="mt3 fr " style="color:#136b3b;">导出全部:</span>

View File

@ -1,3 +1,17 @@
<script type="text/javascript">
<%if @homework.homework_type == 1 && @homework.homework_detail_manual.comment_status != 1%>
$(function(){
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/new_student_work_alert') %>');
showModal('ajax-modal', '360px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("anonymos_work");
// alert("当前作业已开启匿评,您提交作品后将不会收到任何匿评作品,您的作品也不会被其他用户匿评,如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分");
});
<% end%>
</script>
<div class="project_r_h">
<h2 class="project_h2">创建作品</h2>
</div>

View File

@ -53,7 +53,7 @@
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
</td>
<td>
<table width="580" border="0" class="info-break">
<table border="0" class="info-break" style="width:580px;">
<% case e.act_type %>
<% when 'JournalsForMessage' %>
<tr>
@ -97,7 +97,7 @@
</td>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act.notes %>
</p>
@ -144,7 +144,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act, :description %>
</p></td>
@ -204,7 +204,7 @@
<% else %>
<% desStr= textAreailizable(act, :notes) %>
<% end %>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= desStr %>
</p>
@ -259,7 +259,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act, :long_comments %>
</p>
@ -320,7 +320,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable(act, :content) %>
</p>
@ -361,7 +361,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description"></p>
</td>
</tr>
@ -404,7 +404,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act, :description %>
</p>
@ -446,7 +446,7 @@
</td>
</tr>
<tr>
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
<td colspan="2" class="upload_img" style="max-width:580px;">
<%= textAreailizable act, :description %>
</td>
</tr>
@ -482,7 +482,7 @@
</td>
</tr>
<tr>
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
<td colspan="2" class="upload_img" style="max-width:580px;">
<%= textAreailizable act, :description %>
</td>
</tr>
@ -535,7 +535,7 @@
<% end %>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable act, :description %>
</p>
@ -609,7 +609,7 @@
</td>
</tr>
<tr>
<td colspan="2" width="580" class="upload_img">
<td colspan="2" class="upload_img" style="max-width:580px;">
<p class="font_description">
<%= textAreailizable e.notes %>
</p>

View File

@ -1,7 +1,7 @@
<% course_list.map do |course| %>
<li class='<%= cycle("odd", "even") %>' title="<%= course.description.to_s.gsub(/<\/?.*?>/,'') %>" style="min-height: 69px;">
<div class='avatar'>
<%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
<%= image_tag(url_to_avatar(course), :class => "avatar-4") %>
</div>
<!-- 上左下右 -->
<div class='desc_item'>
@ -27,7 +27,7 @@
(<%= course.members.count %>人)
<% files_count = visable_attachemnts_incourse(course).count %>
<% if files_count > 0%>
(<%= link_to "#{files_count.to_s}份", course_files_path(course) %>公开资料)
(<%= link_to "#{files_count.to_s}份", course_files_path(course) %>资料)
<% end %>
</div>
</li>

View File

@ -20,7 +20,7 @@ zh:
label_course_mail_news_reply: 课程通知回复
label_main_teacher: 主讲教师
label_course_term: 开课学期
label_isuue_mail_status: 更新了issue状态
label_isuue_mail_status: 更新了issue状态
label_join_course: 加入
label_exit_course: 退出

View File

@ -183,10 +183,10 @@ en:
setting_bcc_recipients: Blind carbon copy recipients (bcc)
setting_plain_text_mail: Plain text mail (no HTML)
setting_host_name: Host name and path
setting_host_course: Host course and path
setting_host_contest: Host contest and path
setting_host_user: Host user and path
setting_host_repository: Host repository and path
setting_host_course: Host course and path
setting_host_contest: Host contest and path
setting_host_user: Host user and path
setting_host_repository: Host repository and path
setting_text_formatting: Text formatting
setting_wiki_compression: Wiki history compression
setting_feeds_limit: Maximum number of items in Atom feeds
@ -961,6 +961,8 @@ en:
label_overview: "Overview"
label_project_tool: "Tool"
label_project_issues: "Issues"
label_project_issue: "Created the Issue:"
label_project_issue_update: "Upadated the Issue:"
label_project_newother: "See other comments"
label_project_newshare: "has shared"
label_project_newadd: "added"
@ -1469,6 +1471,7 @@ en:
label_borad_course: Course-borad
label_project_notice: release the notice
label_project_notice_reply: reply the notice
label_forum_new: New forum
label_memo_new_from_forum: Release memo
@ -1524,7 +1527,7 @@ en:
label_recently_updated_courseware: Recently updated the courseware
label_no_courses: You do not participate in any course, please search the curriculum, course, or create a course!
label_commit_failed: commit failed
#api end
error_upload_avatar_to_large: "too big (%{max_size})"
not_valid_image_file: not a valid image file
#api end
error_upload_avatar_to_large: "too big (%{max_size})"
not_valid_image_file: not a valid image file

View File

@ -783,8 +783,11 @@ zh:
label_project_newother: "查看其他评论"
label_project_newshare: "分享了"
label_project_notice: "发布了通知:"
label_project_notice_reply: "回复了通知:"
label_project_mail_notice: "发布了新闻:"
label_project_issue: "发布了问题:"
lable_project_mail_notice_reply: "回复了新闻:"
label_project_issue: "发布了问题:"
label_project_issue_update: "更新了问题:"
label_project_newadd: "添加了"
label_project_unadd: "暂无项目,赶快去创建吧!"
label_project_un: "该用户暂未参与任何项目!"
@ -1845,6 +1848,7 @@ zh:
label_attendingcontestwork_adaptive_system: 系统支持
label_attendingcontestwork_download: 作品下载
label_course_attendingcontestwork_download: 课件下载
label_course_mail_files: 课程资源
label_attendingcontestwork_developers: 开发人员
label_attendingcontestwork_average_scores: 平均评分
label_attendingcontestwork_release_time: 发布时间

View File

@ -721,6 +721,16 @@ ActiveRecord::Schema.define(:version => 20150619060110) do
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
create_table "journal_details_copy", :force => true do |t|
t.integer "journal_id", :default => 0, :null => false
t.string "property", :limit => 30, :default => "", :null => false
t.string "prop_key", :limit => 30, :default => "", :null => false
t.text "old_value"
t.text "value"
end
add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
create_table "journal_replies", :id => false, :force => true do |t|
t.integer "journal_id"
t.integer "user_id"

View File

@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CodeReviewController < ApplicationController
layout "project_base"
layout "base_projects"
unloadable
before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository

View File

@ -671,6 +671,8 @@ function edit_student_work(id)
{$("#edit_student_work_" + id).submit();}
}
//
//滑动打分
$.fn.peSlider = function(settings){
//configurable options (none so far)
@ -795,6 +797,18 @@ $(function(){
});
$("#about_project label").eq(1).remove();
//附件下载提示
$(".zip_download_alert").bind("mouseover",function(e){
//alert($(this).html());
$(this).next("div").show();
$(this).next("div").css("top",e.pageY);
$(this).next("div").css("left",e.pageX);
});
$(".zip_download_alert").bind("mouseout",function(e){
//alert($(this).html());
$(this).next("div").hide();
});
});
//匿评弹框取消按钮

View File

@ -2795,3 +2795,5 @@ div.repos_explain{
}
.upload_img img{max-width: 100%;}
#activity .upload_img img{max-width: 580px;}
img,embed{max-width: 100%;}

View File

@ -278,14 +278,11 @@ a:hover.member_btn{ background:#329cbd;}
/* 匿名评分弹框 */
/*.popbox02{width:480px;height:200px;position:absolute;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}*/
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}
.ni_con { width:425px; margin:25px 30px;}
.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;}
.ni_con p{ color:#808181;}
.ni_con a:hover{ text-decoration:none;}
a.xls{ margin-left:5px; color:#136b3b;}
/* 开启匿评弹框 */
.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.ni_con { width:425px; margin:25px 30px;}
.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;}
.ni_con p{ color:#808181; }
@ -294,6 +291,8 @@ a.xls{ margin-left:5px; color:#136b3b;}
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;}
a:hover.tijiao{ background:#0f99a9;}
.c_pink{ color:#e65d5e;}
.ni_con_work { width:300px; margin:25px 20px;}
.ni_con_work p{ color:#808181; }
/* 学生列表*/
.st_list{ width:670px;}

View File

@ -244,7 +244,7 @@ a.remove-upload:hover {text-decoration:none !important;}
#attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;}
#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;}
#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px; white-space: nowrap; text-overflow:ellipsis;}
span.add_attachment {font-size: 80%;line-height: 2.5em;}
#attachments_fields span {display: block;white-space: nowrap;}
.file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);}

View File

@ -439,7 +439,7 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
/*文本左对齐*/
.tl{text-align: left;}
img{max-width: 100%;}
img,embed{max-width: 100%;}
.attachments {clear: both;}
.is_public_checkbox{margin-left: 15px;margin-right: 10px;}
.author_name{color: #3ca5c6 !important;}