Merge branch 'szzh' into dev_zanle

Conflicts:
	app/controllers/courses_controller.rb
	public/stylesheets/new_user.css
This commit is contained in:
lizanle 2015-10-27 14:08:08 +08:00
commit 07a2263b16
34 changed files with 160 additions and 77 deletions

View File

@ -381,6 +381,11 @@ class ApplicationController < ActionController::Base
if allowed
true
else
if params[:action] == 'show'
#更新申请结果反馈消息的状态
messages = CourseMessage.where("course_message_type =? and course_id =? and user_id =? and viewed =?", 'CourseRequestDealResult', @course.id, User.current.id, false)
messages.update_all(:viewed => true)
end
if @course && @course.archived?
render_403 :message => :notice_not_authorized_archived_project
else

View File

@ -36,6 +36,12 @@ class CoursesController < ApplicationController
join = cs.join_course params,@user
@state = join[:state]
@course = join[:course]
Mailer.run.join_course_request(@course, User.current, params[:role])
# else
# @course = Course.find_by_id params[:object_id]
# CourseMessage.create(:user_id => @course.tea_id, :course_id => @course.id, :viewed => false,:content=> params[:role],:course_message_id=>User.current.id,:course_message_type=>'JoinCourseRequest')
# @state = 6
# end
else
@state = 5 #未登录
end
@ -283,14 +289,11 @@ class CoursesController < ApplicationController
def export_course_member_excel
@all_members = student_homework_score(0,0,0,"desc")
filename="#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}";
# 如果是ie 需要转码
if(/trident/.match(request.env["HTTP_USER_AGENT"]) != nil)
filename= URI::encode(filename)
end
respond_to do |format|
format.xls {
send_data(member_to_xls(@all_members,@course.course_groups), :type => "text/excel;charset=utf-8; header=present",
:filename => "#{filename}.xls")
:filename => filename_for_content_disposition("#{filename}.xls"))
}
end
end
@ -611,6 +614,10 @@ class CoursesController < ApplicationController
create_course_messages = @course.course_messages.where("user_id =? and course_message_type =? and course_id =? and viewed =?", User.current.id, 'Course', @course.id, 0)
create_course_messages.update_all(:viewed => true)
#更新申请结果反馈消息的状态
course_request_messages = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @course.id, 'CourseRequestDealResult', false)
course_request_messages.update_all(:viewed => true)
course_activities = @course.course_activities
@canShowRealName = User.current.member_of_course? @course
@page = params[:page] ? params[:page].to_i + 1 : 0

View File

@ -42,8 +42,8 @@ class GanttsController < ApplicationController
respond_to do |format|
format.html { render :action => "show", :layout => 'base_projects' }#by young
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{basename}.png") } if @gantt.respond_to?('to_image')
format.pdf { send_data(@gantt.to_pdf, :type => 'application/pdf', :filename => "#{basename}.pdf") }
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => filename_for_content_disposition("#{basename}.png")) } if @gantt.respond_to?('to_image')
format.pdf { send_data(@gantt.to_pdf, :type => 'application/pdf', :filename => filename_for_content_disposition("#{basename}.pdf") ) }
end
end
end

View File

@ -33,7 +33,7 @@ class HomeworkAttachController < ApplicationController
format.js
format.xls {
send_data(homework_to_xls(@all_homework_list), :type => "text/excel;charset=utf-8; header=present",
:filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@bid.name}#{l(:excel_homework_list)}(#{l(:excel_not_rated)}).xls")
:filename => filename_for_content_disposition("#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@bid.name}#{l(:excel_homework_list)}(#{l(:excel_not_rated)}).xls") )
}
end
end
@ -66,7 +66,7 @@ class HomeworkAttachController < ApplicationController
format.js
format.xls {
send_data(homework_to_xls(all_homework_list), :type => "text/excel;charset=utf-8; header=present",
:filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@bid.name}#{l(:excel_homework_list)}(#{l(:excel_been_rated)}).xls")
:filename => filename_for_content_disposition("#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@bid.name}#{l(:excel_homework_list)}(#{l(:excel_been_rated)}).xls") )
}
end
end
@ -101,7 +101,7 @@ class HomeworkAttachController < ApplicationController
format.js
format.xls {
send_data(homework_to_xls(all_homework_list), :type => "text/excel;charset=utf-8; header=present",
:filename => "#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@bid.name}#{l(:excel_homework_list)}.xls")
:filename => filename_for_content_disposition("#{@course.teacher.lastname.to_s + @course.teacher.firstname}_#{@course.name}_#{@course.time.to_s + @course.term}_#{@bid.name}#{l(:excel_homework_list)}.xls") )
}
end
end

View File

@ -151,7 +151,7 @@ class IssuesController < ApplicationController
format.atom { render :template => 'journals/index', :layout => false, :content_type => 'application/atom+xml' }
format.pdf {
pdf = issue_to_pdf(@issue, :journals => @journals)
send_data(pdf, :type => 'application/pdf', :filename => "#{@project.identifier}-#{@issue.id}.pdf")
send_data(pdf, :type => 'application/pdf', :filename => filename_for_content_disposition("#{@project.identifier}-#{@issue.id}.pdf") )
}
end
end

View File

@ -413,7 +413,7 @@ class PollController < ApplicationController
respond_to do |format|
format.xls {
send_data(poll_to_xls(poll_questions), :type => "text/excel;charset=utf-8; header=present",
:filename => "#{@poll.polls_name}.xls")
:filename => filename_for_content_disposition("#{@poll.polls_name}.xls") )
}
end
end

View File

@ -84,7 +84,7 @@ class StoresController < ApplicationController
respond_to do |format|
format.xls {
send_data(homework_to_xls(attachments), :type => "text/excel;charset=utf-8; header=present",
:filename => "#{l(:label_file_lost_list)}.xls")
:filename => filename_for_content_disposition("#{l(:label_file_lost_list)}.xls") )
}
end
end

View File

@ -918,6 +918,12 @@ class UsersController < ApplicationController
end
def show
#更新用户申请成为课程老师或教辅消息的状态
if params[:course_id] != nil
join_course_messages = CourseMessage.where("course_id =? and course_message_type =? and user_id =? and course_message_id =? and viewed =?",
params[:course_id], 'JoinCourseRequest', User.current.id, @user.id, false)
join_course_messages.update_all(:viewed => true)
end
@page = params[:page] ? params[:page].to_i + 1 : 0
user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"

View File

@ -82,14 +82,14 @@ class WikiController < ApplicationController
@content = @page.content_for_version(params[:version])
if User.current.allowed_to?(:export_wiki_pages, @project)
if params[:format] == 'pdf'
send_data(wiki_page_to_pdf(@page, @project), :type => 'application/pdf', :filename => "#{@page.title}.pdf")
send_data(wiki_page_to_pdf(@page, @project), :type => 'application/pdf', :filename => filename_for_content_disposition("#{@page.title}.pdf") )
return
elsif params[:format] == 'html'
export = render_to_string :action => 'export', :layout => false
send_data(export, :type => 'text/html', :filename => "#{@page.title}.html")
send_data(export, :type => 'text/html', :filename => filename_for_content_disposition("#{@page.title}.html"))
return
elsif params[:format] == 'txt'
send_data(@content.text, :type => 'text/plain', :filename => "#{@page.title}.txt")
send_data(@content.text, :type => 'text/plain', :filename => filename_for_content_disposition("#{@page.title}.txt") )
return
end
end
@ -286,7 +286,7 @@ class WikiController < ApplicationController
send_data(export, :type => 'text/html', :filename => "wiki.html")
}
format.pdf {
send_data(wiki_pages_to_pdf(@pages, @project), :type => 'application/pdf', :filename => "#{@project.identifier}.pdf")
send_data(wiki_pages_to_pdf(@pages, @project), :type => 'application/pdf', :filename => filename_for_content_disposition("#{@project.identifier}.pdf") )
}
end
end

View File

@ -1009,6 +1009,16 @@ class Mailer < ActionMailer::Base
end
end
def join_course_request(course, user, role)
@receive = User.find(course.tea_id)
@course = course
@user = user
@role = role
@subject = "#{@user.show_name} #{l(:label_apply_join_course)} #{@course.name} "
mail :to => @receive.mail,
:subject => @subject
end
private
@ -1066,4 +1076,5 @@ class Mailer < ActionMailer::Base
1.upto(len) { |i| newpass << chars[rand(chars.size-1)] }
return newpass
end
end

View File

@ -317,6 +317,7 @@ class CoursesService
elsif current_user.allowed_to?(:as_teacher,course)
@state = 3
else
Mailer.run.join_course_request(course, User.current, params[:role])
#如果加入角色为教师或者教辅
CourseMessage.create(:user_id => course.tea_id, :course_id => course.id, :viewed => false,:content=> params[:role],:course_message_id=>User.current.id,:course_message_type=>'JoinCourseRequest',:status=>0)
@state = 6
@ -340,6 +341,7 @@ class CoursesService
if CourseMessage.where("course_message_type = 'JoinCourseRequest' and user_id = #{course.tea_id} and content = #{params[:role]} and course_message_id = #{User.current.id} and course_id = #{course.id} and status = 0").count != 0
@state = 7
else
Mailer.run.join_course_request(course, User.current, params[:role])
CourseMessage.create(:user_id => course.tea_id, :course_id => course.id, :viewed => false,:content=> params[:role],:course_message_id=>User.current.id,:course_message_type=>'JoinCourseRequest',:status=>0)
@state = 6
end

View File

@ -4,33 +4,33 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>快速进入课程通道</title>
<style>
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;}
ul,li{ list-style-type:none}
.cl{ clear:both; overflow:hidden; }
a{ text-decoration:none; }
a:hover{}
#popbox{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
#popbox div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
#popbox div,img,tr,td{ border:0;}
#popbox table,tr,td{border:0; cellspacing:0; cellpadding:0;}
#popbox ul,li{ list-style-type:none}
#popbox .cl{ clear:both; overflow:hidden; }
#popbox a{ text-decoration:none; }
#popbox a:hover{}
.alert_box {width:488px;height:550px;position:fixed;z-index:1002;left:50%;top:40%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; padding:5px; overflow:auto; }
#popbox{width:488px;height:368px;}
.alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
.C_top{ margin-top:20px; width:368px; height:100px; background:#e9e9e9; padding:0px 60px; }
.C_top h2{ color:#1c1d1d; font-size:24px; font-style:normal; font-weight:normal;}
.C_top p{ color:#a9aaaa; line-height:22px;}
.C_form{ margin:20px 0 0 60px;}
.C_form ul li{ font-size:14px; color:#3f3a39; line-height:30px; }
.C_form ul li input{ margin-left:20px; border:0px; border:1px solid #e1e1e1; color:#898989; padding-left:5px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding: 0 !important; }
.C_form ul li.mB5{ color:#898989; font-size:12px; padding-left:97px;}
.width190{ width:190px; height:26px; border-color:#e1e1e1;}
.C_form a{ font-size:12px; color:#15bccf; float:left; display:block; height:40px; width:200px; margin-top:25px;}
.C_form a:hover{ text-decoration:underline;}
.C_form a.btn_join{ display:block; width:100px; height:36px; padding-top:4px; text-align: center; background:#269ac9; color:#fff; font-size:14px; margin:20px 20px 0 95px;}
.C_form a.btn_join:hover{ background:#297fb8; text-decoration: none;}
.C_form a.btn_cancel{ display:block; width:100px; height:36px; padding-top:4px; text-align: center; background:#c1c1c1; color:#fff; font-size:14px; margin:20px 20px 0 95px;}
.C_form a.btn_cancel:hover{ background:#717171; text-decoration: none;}
.IDType {border:1px solid #e1e1e1; outline: none; width: 65px; height: 25px;}
#popbox .C_top{ margin-top:20px; width:368px; height:100px; background:#e9e9e9; padding:0px 60px; }
#popbox .C_top h2{ color:#1c1d1d; font-size:24px; font-style:normal; font-weight:normal;}
#popbox .C_top p{ color:#a9aaaa; line-height:22px;}
#popbox .C_form{ margin:20px 0 0 60px;}
#popbox .C_form ul li{ font-size:14px; color:#3f3a39; line-height:30px; }
#popbox .C_form ul li input{ margin-left:20px; border:0px; border:1px solid #e1e1e1; color:#898989; padding-left:5px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding: 0 !important; }
#popbox .C_form ul li.mB5{ color:#898989; font-size:12px; padding-left:97px;}
#popbox .width190{ width:190px; height:26px; border-color:#e1e1e1;}
#popbox .C_form a{ font-size:12px; color:#15bccf; float:left; display:block; height:40px; width:200px; margin-top:25px;}
#popbox .C_form a:hover{ text-decoration:underline;}
#popbox .C_form a.btn_join{ display:block; width:100px; height:36px; padding-top:4px; text-align: center; background:#269ac9; color:#fff; font-size:14px; margin:20px 20px 0 95px;}
#popbox .C_form a.btn_join:hover{ background:#297fb8; text-decoration: none;}
#popbox .C_form a.btn_cancel{ display:block; width:100px; height:36px; padding-top:4px; text-align: center; background:#c1c1c1; color:#fff; font-size:14px; margin:20px 20px 0 95px;}
#popbox .C_form a.btn_cancel:hover{ background:#717171; text-decoration: none;}
#popbox .IDType {border:1px solid #e1e1e1; outline: none; width: 65px; height: 25px;}
</style>
<script type="text/javascript">
function submit_form(obj)

View File

@ -105,7 +105,21 @@
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">课程</a>
<% if is_current_user%>
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
<%=link_to "", new_course_path(:host=> Setting.host_course), :class => "homepageMenuSetting fr", :title => "新建课程"%>
<div class="courseMenu" id="courseMenu">
<ul>
<li class="courseMenuIcon" id="courseMenuIcon">
<ul class="topnav_course_menu" id="topnav_course_menu">
<li>
<%= link_to "新建课程", new_course_path(:host=> Setting.host_course), :class => "menuGrey"%>
</li>
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
<li>
<%= link_to "加入课程",join_private_courses_courses_path,:remote => true,:class => "menuGrey",:method => "post"%>
</li>
</ul>
</li>
</ul>
</div>
<% else%>
<%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:remote => true, :title => "加入课程"%>
<% end%>
@ -203,5 +217,13 @@
<div class="cl"></div>
</div><!--floatbox end-->
</div>
<script type="text/javascript">
$("#courseMenu").mouseenter(function(){
$("#topnav_course_menu").show();
});
$("#courseMenu").mouseleave(function(){
$("#topnav_course_menu").hide();
});
</script>
</body>
</html>

View File

@ -0,0 +1,4 @@
<p>
<%= @user.show_name %>申请成为课程<%= @course.name %>的<%= @role.eql?('9') ? '老师': '教辅' %>
<%=link_to user_message_url(@receive),user_message_url(@receive)%>
</p>

View File

@ -0,0 +1,4 @@
<%= @user.show_name %>申请成为课程<%= @course.name %>的<%= @role.eql?('9') ? '老师': '教辅' %>
<%=link_to user_message_url(@receive),user_message_url(@receive)%>

View File

@ -115,7 +115,7 @@
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
<% end %>
</div>
<div class="homepagePostReplyContent upload_img break_word" id="reply_message_description_<%= reply.id %>">
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
<%= reply.content.html_safe%>
</div>
<div style="margin-top: -7px; margin-bottom: 5px">

View File

@ -2,7 +2,7 @@
<div id="attachment_<%= attachment.id%>">
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) if attachment.id && User.current == attachment.author %>
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
<span class="postAttSize fl ">(<%= number_to_human_size attachment.filesize %>)</span>
<div class="cl"></div>
</div>
<% end -%>

View File

@ -43,7 +43,7 @@
<div class="homepagePostDeadline">截止时间:<%= activity.end_time.to_s %></div>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">
<%= activity.description.html_safe %>
</div>
@ -52,6 +52,10 @@
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div>
<div>
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => activity.attachments} %>
<div class="cl"></div>
</div>
<%# if is_teacher%>
<!--<div class="homepagePostSetting">
<ul>
@ -119,7 +123,7 @@
<% end %>
<%= format_time(comment.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= comment.id %>">
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
<%= comment.notes.html_safe %></div>
</div>
<div class="cl"></div>

View File

@ -67,7 +67,7 @@
<% end %>
<%= format_time(comment.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= comment.id %>">
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
<%= comment.notes.html_safe %></div>
<% fetch_user_leaveWord_reply(comment).each do |reply| unless fetch_user_leaveWord_reply(comment).nil? %>
<script type="text/javascript">
@ -94,7 +94,7 @@
<% end %>
<%= format_time reply.created_on %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" style="max-width: 580px;" id="reply_to_content_<%= reply.id %>">
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" style="max-width: 580px;" id="reply_to_content_<%= reply.id %>">
<%= reply.notes.html_safe %></div>
<div class="cl"></div>
</div>

View File

@ -30,7 +30,7 @@
<div class="homepagePostDate">
发帖时间:<%= format_time(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">
<% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%>
@ -104,7 +104,7 @@
<% end %>
<%= format_time(reply.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= reply.id %>">
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
<%= reply.content.html_safe %>
</div>
</div>

View File

@ -18,7 +18,7 @@
<div class="homepagePostDate">
发布时间:<%= format_time(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">
<%= activity.description.html_safe %>
</div>
@ -71,7 +71,7 @@
<% end %>
<%= format_time(comment.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= comment.id %>">
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
<%= comment.comments.html_safe %></div>
</div>
<div class="cl"></div>

View File

@ -29,7 +29,7 @@
<div class="homepagePostDate">
发布时间:<%= format_time(activity.published_at) %>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">
<%= activity.polls_description.html_safe %>
</div>

View File

@ -33,7 +33,7 @@
<%=format_time(activity.created_on) %>
</div>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">
<% if activity.description? %>
<%= textAreailizable activity, :description, :attachments => activity.attachments %>
@ -48,19 +48,26 @@
<% if activity.attachments.any? %>
<% activity.attachments.each do |attachment| %>
<div class="break_word">
<span class="fl">
<span title="<%= attachment.filename %>" id="attachment_">
<%= link_to_short_attachment attachment,:length=> 58, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
<%= link_to_short_attachment attachment,:length=> 58, :class => 'link_file_a fl newsBlue', :download => true -%>
</span>
<% if attachment.is_text? %>
<%= link_to image_tag('magnifier.png'),
:controller => 'attachments',
:action => 'show',
:id => attachment,
:class => 'fl',
:filename => attachment.filename %>
<% end %>
</span>
<span class="postAttSize">(
<%= number_to_human_size attachment.filesize %>)
</span>
<span class="author" title="<%= attachment.author%>">
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>,
<%= format_time(attachment.created_on) %>
</span>
</div>
<% end %>
<% end %>
@ -107,7 +114,7 @@
<% end %>
<%= format_time(reply.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= reply.id %>">
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
<% if reply.details.any? %>
<% details_to_strings(reply.details).each do |string| %>
<p><%= string %></p>

View File

@ -26,7 +26,7 @@
<div class="homepagePostDate">
时间:<%= format_time(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">
<% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%>
@ -85,7 +85,7 @@
<% end %>
<%= format_time(reply.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= reply.id %>">
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
<%= reply.content.html_safe %></div>
</div>
<div class="cl"></div>

View File

@ -43,7 +43,7 @@
<%= l(:label_end_time)%><%= homework_common.end_time%>
</div>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18" id="homework_description_<%= homework_common.id%>">
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="homework_description_<%= homework_common.id%>">
<div id="intro_content_<%= homework_common.id%>">
<%= homework_common.description.html_safe %>
</div>
@ -127,7 +127,7 @@
<% end %>
<%= format_time(comment.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= comment.id %>">
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
<%= comment.notes.html_safe %></div>
</div>
<div class="cl"></div>

View File

@ -60,7 +60,7 @@
<% end %>
<%= format_time(comment.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= user_activity_id %>">
<%= comment.notes.html_safe %>
</div>
<% end %>

View File

@ -309,7 +309,7 @@
<% content = ma.content.gsub("作业评分:","").split("&nbsp;&nbsp;&nbsp; 评语:")%>
<li>作品评分:<span style="color:Red;"><%= content[0] %>分</span></li>
<% if content.size > 1 %>
<div class="fl"><li>作品评语:</li></div>
<div class="fl" style="width:74px;"><li>作品评语:</li></div>
<div style="margin-left:74px"><span style="color:Red;"><%= content[1] %></span></div>
<% end %>
</ul>
@ -442,7 +442,7 @@
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的课程成员申请:</span>
</li>
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id)),
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>

View File

@ -27,7 +27,7 @@ zh:
# 资源库 (课程、项目按类型分)
label_course_file: 资源库
label_upload_files: 上传资源
label_apply_join_course: 申请加入课程
#
# 课程托管平台主页
#

View File

@ -1862,7 +1862,7 @@ span.required {color: #bb0000;}
#attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
#attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
#attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%; width:1px; display:inline-block; padding-left:16px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%; width:1px; display:inline-block; padding-left:16px;margin-left: 5px;}
a.remove-upload:hover {text-decoration:none !important;}
/*gcm upload file count and deleteall*/

View File

@ -156,11 +156,12 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyDes {float:left; width:632px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/public_icon.png) -27px -577px no-repeat; padding-left:25px; font-size:14px; margin-right:25px;}
.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/public_icon.png) -27px -577px no-repeat; padding-left:25px; font-size:14px;}
.homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;}
.postAttSize {color:#888888; font-size:12px;}
.postAttSize {color:#888888; font-size:12px; margin-left: 5px;}
a.postGrey {color:#484848;}
a.postGrey:hover {color:#000000;}
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;margin-top: 2px;margin-right: 15px;}
@ -550,7 +551,7 @@ blockquote {background: #e8e8e8;padding: 10px;margin-bottom: 5px;word-break: bre
#attachments_fields input.description {margin-left: 4px;width: 100px;}
#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;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
#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;}
@ -568,7 +569,7 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;}
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;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
.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;}
span.add_attachment {font-size: 80%;line-height: 2.5em;}
.attachments_fields span {display: block;white-space: nowrap;}
@ -972,7 +973,7 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
.SearchIcon:hover{background:url(../images/homepage_icon2.png) 676px -419px no-repeat; }
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
.ProResultUl span { display:block; float:left;}

View File

@ -683,11 +683,12 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyDes {float:left; width:642px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/public_icon.png) -27px -577px no-repeat; padding-left:25px; font-size:14px; margin-right:25px;}
.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/public_icon.png) -27px -577px no-repeat; padding-left:25px; font-size:14px;}
.homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;}
.postAttSize {color:#888888; font-size:12px;}
.postAttSize {color:#888888; font-size:12px; margin-left: 5px;}
a.postGrey {color:#484848;}
a.postGrey:hover {color:#000000;}
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;margin-top: 2px;margin-right: 15px;}
@ -696,6 +697,11 @@ a:hover.gz_btn{ color:#ff5722;}
.lh18 {line-height: 18px;}
.maxh360 {max-height: 360px;}
.courseMenu {width:30px; display:block; float:right;height: 50px;}
.courseMenuIcon {display:inline-block; background:url(../images/homepage_icon2.png) -190px -365px no-repeat; width:15px; height:15px; margin-top: 16px; margin-right: 15px; position: relative;line-height:0;}
.topnav_course_menu{display: none; border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 20px;}
.topnav_course_menu a{color:#269ac9;}
/*课程主页css*/
.homepageCoursesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-65px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;}
@ -1072,7 +1078,7 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r
.SearchIcon:hover{background:url(../images/homepage_icon2.png) 676px -419px no-repeat; }
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
.ProResultUl span { display:block; float:left;}
@ -1301,5 +1307,5 @@ a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; c
.list_style ul li{list-style-type: disc;margin-left: 20px;}
.ul_grey li {color:#909090; list-style-position:inside; padding-left:1px;list-style-image:url('../images/news_dot2.png')}
.ul_normal_color li {list-style-position:inside; padding-left:1px; list-style-image:url('../images/news_dot.png')}
span.author { font-size: 0.9em; color: #888; }
.ReplyToMessageInputContainer {width: 582px;float: left;}

View File

@ -727,6 +727,9 @@ div.actions input[type="text"] {
.memo-content ol li {
list-style-type: decimal;
}
.memo-content ul li {
list-style-type: disc;
}
.memo-content ul li {
list-style-type: disc;

View File

@ -359,7 +359,7 @@ blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;}
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;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
#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;}
@ -377,7 +377,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;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;margin-left: 5px;}
.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;}
span.add_attachment {font-size: 80%;line-height: 2.5em;}
.attachments_fields span {display: block;white-space: nowrap;}

View File

@ -569,11 +569,12 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyDes {float:left; width:620px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:5px;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf; height:30px; line-height:30px; vertical-align:middle;}
.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;}
.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:14px;}
.homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;}
.postAttSize {color:#888888; font-size:12px;}
.postAttSize {color:#888888; font-size:12px; margin-left: 5px;}
a.postGrey {color:#484848;}
a.postGrey:hover {color:#000000;}
.homepagePostReplyjournal{margin-left: 15px; float: left;}