Merge branch 'szzh' into dev_hjq

This commit is contained in:
huang 2015-06-11 16:36:19 +08:00
commit 5c36cf5c9d
25 changed files with 311 additions and 70 deletions

View File

@ -836,7 +836,7 @@ class CoursesController < ApplicationController
sql_select = "" sql_select = ""
if groupid == 0 if groupid == 0
sql_select = "SELECT members.*,( sql_select = "SELECT members.*,(
SELECT SUM(student_works.final_score) SELECT AVG(student_works.final_score)
FROM student_works,homework_commons FROM student_works,homework_commons
WHERE student_works.homework_common_id = homework_commons.id WHERE student_works.homework_common_id = homework_commons.id
AND homework_commons.course_id = #{@course.id} AND homework_commons.course_id = #{@course.id}
@ -848,7 +848,7 @@ class CoursesController < ApplicationController
WHERE members.course_id = #{@course.id} ORDER BY score #{score_sort_by}" WHERE members.course_id = #{@course.id} ORDER BY score #{score_sort_by}"
else else
sql_select = "SELECT members.*,( sql_select = "SELECT members.*,(
SELECT SUM(student_works.final_score) SELECT AVG(student_works.final_score)
FROM student_works,homework_commons FROM student_works,homework_commons
WHERE student_works.homework_common_id = homework_commons.id WHERE student_works.homework_common_id = homework_commons.id
AND homework_commons.course_id = #{@course.id} AND homework_commons.course_id = #{@course.id}

View File

@ -1,8 +1,8 @@
class PollController < ApplicationController class PollController < ApplicationController
before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer,:publish_poll,:republish_poll,:poll_result,:close_poll] before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer,:publish_poll,:republish_poll,:poll_result,:close_poll,:export_poll]
before_filter :find_container, :only => [:new,:create, :index] before_filter :find_container, :only => [:new,:create, :index]
before_filter :is_member_of_course, :only => [:index,:show,:poll_result] before_filter :is_member_of_course, :only => [:index,:show,:poll_result]
before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll,:close_poll] before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll,:close_poll,:export_poll]
include PollHelper include PollHelper
def index def index
if @course if @course
@ -360,6 +360,17 @@ class PollController < ApplicationController
end end
end end
#导出问卷
def export_poll
poll_questions = @poll.poll_questions
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")
}
end
end
private private
def find_poll_and_course def find_poll_and_course
@poll = Poll.find params[:id] @poll = Poll.find params[:id]
@ -438,4 +449,41 @@ class PollController < ApplicationController
end end
pu pu
end end
#将poll中题目转换为Excel
def poll_to_xls poll_questions
xls_report = StringIO.new
book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet :name => "poll"
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
count_row = 0
poll_questions.each do |poll_question|
if poll_question.question_type == 1 || poll_question.question_type == 2
sheet1.row(count_row).default_format = blue
sheet1[count_row,0]= l(:label_poll_question_num,:num => poll_question.question_number)
sheet1[count_row + 1,0] = l(:label_poll_subtotal)
sheet1[count_row + 2,0] = l(:label_poll_proportion)
poll_question.poll_answers.each_with_index do |poll_answer,i|
sheet1[count_row, i + 1] = poll_answer.answer_text
sheet1[count_row + 1, i + 1] = poll_answer.poll_votes.count
sheet1[count_row + 2, i + 1] = statistics_result_percentage(poll_answer.poll_votes.count, total_answer(poll_question.id)).to_s + "%"
end
sheet1[count_row + 3,0] = l(:label_poll_valid_commit)
sheet1[count_row + 3,1] = total_answer(poll_question.id)
count_row += 5
else
sheet1.row(count_row).default_format = blue
sheet1[count_row,0] = l(:label_poll_question_num,:num => poll_question.question_number)
sheet1[count_row,1] = poll_question.question_title
count_row += 1
poll_question.poll_votes.each do |poll_vote|
sheet1[count_row,0] = poll_vote.vote_text
count_row += 1
end
count_row += 1
end
end
book.write xls_report
xls_report.string
end
end end

View File

@ -116,21 +116,23 @@ class Member < ActiveRecord::Base
# 查找每个学生每个作业的评分 # 查找每个学生每个作业的评分
def student_homework_score def student_homework_score
score_count = 0
homework_score = StudentWork.find_by_sql("SELECT homework_commons.name,student_works.final_score as score homework_score = StudentWork.find_by_sql("SELECT homework_commons.name,student_works.final_score as score
FROM student_works,homework_commons FROM student_works,homework_commons
WHERE student_works.homework_common_id = homework_commons.id WHERE student_works.homework_common_id = homework_commons.id
AND homework_commons.course_id = #{self.course_id} AND homework_commons.course_id = #{self.course_id}
AND student_works.user_id = #{self.user_id}") AND student_works.user_id = #{self.user_id}")
homework_score.each do |homework| score_count = StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f
mem_score = 0
if homework[:score]
mem_score = homework[:score]
end
score_count = score_count + mem_score
end
[homework_score, format("%0.2f", score_count)] [homework_score, format("%0.2f", score_count)]
end end
def student_work_score
StudentWork.select("homework_commons.name, student_works.final_score").joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}")
end
def student_work_score_avg
StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f
end
protected protected
def validate_role def validate_role

View File

@ -53,7 +53,7 @@
<% end %> <% end %>
<% if options[:author] %> <% if options[:author] %>
<span class="author" title="<%= attachment.author%>"> <span class="author" title="<%= attachment.author%>">
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>, <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "author_name" %>,
<%= format_time(attachment.created_on) %> <%= format_time(attachment.created_on) %>
</span> </span>
<% end %> <% end %>

View File

@ -104,8 +104,8 @@ function nh_check_field(params){
result=false; result=false;
} }
if(params.content.html()!=params.textarea.html() || params.issubmit==true){ if(params.content.html()!=params.textarea.html() || params.issubmit==true){
// params.textarea.html(params.content.html()); //用这个ie11提交到服务器居然木有值 真特么旧梦已尘风 params.textarea.html(params.content.html());
params.content.sync(); //但是这个貌似编辑器没内容时不会同步到textarea中 新愁不言中... params.content.sync(); //用上面那句ie11提交到服务器居然木有值
if(params.content.isEmpty()){ if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空'); params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'}); params.contentmsg.css({color:'#ff0000'});

View File

@ -1,25 +1,41 @@
<style type="text/css">
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
div.recall_con{width:600px;}
div.recall_con .reply_btn{margin-left:555px;margin-top:5px;}
</style>
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %> <%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
<div class="msg_box" id='leave-message'> <div class="msg_box" id='leave-message' nhname="new_message">
<%# reply_allow = JournalsForMessage.create_by_user? User.current %> <%# reply_allow = JournalsForMessage.create_by_user? User.current %>
<h4><%= l(:label_leave_message) %></h4> <h4><%= l(:label_leave_message) %></h4>
<% if !User.current.logged?%> <% if !User.current.logged?%>
<div style="font-size: 14px;margin:20px;"> <div style="font-size: 14px;margin:20px;">
<%= l(:label_user_login_tips) %> <%= l(:label_user_login_tips) %>
<%= link_to l(:label_user_login_new), signin_path %> <%= link_to l(:label_user_login_new), signin_path %>
<hr/> <hr/>
</div> </div>
<% else %> <% else %>
<%= form_for('new_form', :method => :post, <%= form_for('new_form', :method => :post,
:url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%> :url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor 'course_message',:height => '140px;',:editor_id => 'leave_message_editor',:input_html=>{:id => "leave_meassge",:style => "resize: none;", <%#= f.kindeditor 'course_message',:height => '140px;',:editor_id => 'leave_message_editor',:input_html=>{:id => "leave_meassge",:style => "resize: none;",
:placeholder => "#{l(:label_welcome_my_respond)}",:maxlength => 250}%> :placeholder => "#{l(:label_welcome_my_respond)}",:maxlength => 250}%>
<a href="javascript:void(0)" class="grey_btn fr ml10 mt10" onclick="KindEditor.instances[0].html('');">取&nbsp;&nbsp;消</a> <textarea cols="40" nhname="new_message_textarea" maxlength="250" name="new_form[course_message]" placeholder="请在此留下你的意见和建议!" rows="20" style="display: none;"></textarea>
<a href="javascript:void(0)" onclick='leave_message_editor.sync();$("#leave_message_form").submit();' class="blue_btn fr mt10"> <p nhname="contentmsg"></p>
<%= l(:button_leave_meassge)%> <div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
</a> <a href="javascript:void(0)" class="grey_btn fr ml10 mt10" nhname="cancel_btn">取&nbsp;&nbsp;消</a>
<% end %> <a href="javascript:void(0)" onclick='$("#leave_message_form").submit();' class="blue_btn fr mt10">
<%= l(:button_leave_meassge)%>
</a>
<% end %>
<% end %> <% end %>
</div> </div>
@ -29,3 +45,156 @@
<ul class="wlist"> <ul class="wlist">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul> </ul>
<div style="display:none;"><a href="#" id="nhjump"></a></div>
<script type="text/javascript">
$(function(){
function init_editor(params){
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
items:['emoticons'],
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
},
afterCreate:function(){
var toolbar = $("div[class='ke-toolbar']",params.div_form);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
}
}).loadPlugin('paste');
return editor;
}
function nh_check_field(params){
var result=true;
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function init_form(params){
// var flag = false;
// if(params.form.attr('data-remote') != undefined ){
// flag = true
// }
// params.form[0].onsubmit = function(){
// if(flag){
// $(this).removeAttr('data-remote');//不这么搞return false没用 花擦花擦
// }
// var is_checked = nh_check_field({
// issubmit:true,
// content:params.editor,
// contentmsg:params.contentmsg,
// textarea:params.textarea
// });
// if(is_checked){
// if(flag){
// alert('add')
// $(this).attr('data-remote','true');
// }
// alert('ok')
// return true;
// }
// return false;
// }
params.form.submit(function(){
var flag = false;
if(params.form.attr('data-remote') != undefined ){
flag = true
}
var is_checked = nh_check_field({
issubmit:true,
content:params.editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(flag){
return true;
}else{
$(this)[0].submit();
return false;
}
// return true; //这个涛哥的firefox不能提交
//$(this).trigger('submit'); //这个虽然能提交 但是他是个死循环
//$(this)[0].submit(); //用这个form的data-remote='true'没效果了
//肿么破阿 我滴个神 实在不行就用$.ajax()算了
}
return false;
});
}
function nh_reset_form(params){
params.form[0].reset();
params.textarea.empty();
if(params.editor != undefined){
params.editor.html(params.textarea.html());
}
params.contentmsg.hide();
}
KindEditor.ready(function(K){
$("a[nhname='reply_btn']").live('click',function(){
var params = {};
params.kindutil = K;
params.container = $(this).parent('div').parent('div');
params.div_form = $(">.respond-form",params.container);
params.form = $("form",params.div_form);
params.textarea = $("textarea[name='user_notes']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form),
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function(){
nh_reset_form(params);
});
}
params.cancel_btn.click();
setTimeout(function(){
if(!params.div_form.is(':hidden')){
$("#nhjump").attr('href','#'+params.div_form.attr('id'));
$("#nhjump")[0].click();
}
},300);
params.textarea.data('init',1);
});
$("div[nhname='new_message']").each(function(){
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form",params.div_form);
if(params.form==undefined || params.form.length==0){
return;
}
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form),
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
$("a[nhname='cancel_btn']",params.div_form).click(function(){
nh_reset_form(params);
});
params.textarea.data('init',1);
}
});
});
});
</script>

View File

@ -30,8 +30,7 @@
<% end %> <% end %>
<% if reply_allow %> <% if reply_allow %>
<%= link_to l(:label_bid_respond_quote),'', <%= link_to l(:label_bid_respond_quote),'',
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %> {:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %>
<% end %> <% end %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -1,6 +1,6 @@
<% <%
id = "finish_course_#{course.id}" id = "finish_course_#{course.id}"
display = (course.teacher.id == User.current.id || User.current.admin?) display = (User.current.allowed_to?(:as_teacher,course) || User.current.admin?)
%> %>
<% if display #如果课程已结束%> <% if display #如果课程已结束%>

View File

@ -17,17 +17,17 @@
<h2><%= @member_score.user.name %> 历次作业积分</h2> <h2><%= @member_score.user.name %> 历次作业积分</h2>
<ul class="tscore_box"> <ul class="tscore_box">
<li ><span class="c_blue02 w280">作业名称</span><span class="c_blue02 w70">得分</span></li> <li ><span class="c_blue02 w280">作业名称</span><span class="c_blue02 w70">得分</span></li>
<% @member_score.student_homework_score[0].each do |homework_score| %> <% @member_score.student_work_score.each do |homework_score| %>
<li> <li>
<span class="c_grey02 w280"> <span class="c_grey02 w280">
<%= homework_score.name %> <%= homework_score.name %>
</span> </span>
<span class="c_red w70"> <span class="c_red w70">
<%= format("%0.2f",homework_score[:score].nil? ? 0 : homework_score[:score]) %> <%= format("%0.2f",homework_score.final_score.nil? ? 0 : homework_score.final_score) %>
</span> </span>
</li> </li>
<% end %> <% end %>
<li><span class="c_blue03 w280">作业积分(总得分)</span><span class="c_red w70"><%= @member_score.student_homework_score[1] %></span></li> <li><span class="c_blue03 w280">作业积分(平均分)</span><span class="c_red w70"><%= @member_score.student_work_score_avg %></span></li>
</ul> </ul>
</div> </div>

View File

@ -41,9 +41,9 @@
<%= homework.description.html_safe %> <%= homework.description.html_safe %>
</div> </div>
</div> </div>
<div class="news_foot c_red" id="bid_show_more_des_button<%= homework.id%>" onclick="bid_show_more_des(<%= homework.id%>);" style="cursor:pointer;display: none;">
<%= l(:button_more)%>... <div class="news_foot currentDd" id="bid_show_more_des_button<%= homework.id%>" onclick="bid_show_more_des(<%= homework.id%>);" style="cursor:pointer;display: none;">
<span class="g-arr-down"></span> [展开]
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -20,19 +20,6 @@
<li id="current_user_li"> <li id="current_user_li">
<%= link_to "#{User.current.login}<span class='pic_triangle'></span>".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, target:"_blank", :class => "uses_name"%> <%= link_to "#{User.current.login}<span class='pic_triangle'></span>".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, target:"_blank", :class => "uses_name"%>
<ul id="user_sub_menu" style="right: 0px;display: none;"> <ul id="user_sub_menu" style="right: 0px;display: none;">
<% unless User.current.projects.empty? %>
<li id="my_projects_li">
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
<ul id="my_projects_ul" >
<% User.current.projects.each do |project| %>
<li title="<%=project.name%>">
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name }, target:"_blank" %>
</li>
<% end %>
</ul>
</li>
<% end %>
<% if @show_course == 1 && User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) %> <% if @show_course == 1 && User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) %>
<% user_course = get_user_course User.current%> <% user_course = get_user_course User.current%>
<% unless user_course.empty? %> <% unless user_course.empty? %>
@ -48,6 +35,19 @@
</li> </li>
<% end %> <% end %>
<% end %> <% end %>
<% unless User.current.projects.empty? %>
<li id="my_projects_li">
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
<ul id="my_projects_ul" >
<% User.current.projects.each do |project| %>
<li title="<%=project.name%>">
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name }, target:"_blank" %>
</li>
<% end %>
</ul>
</li>
<% end %>
<li> <li>
<%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.host_user}%> <%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.host_user}%>
</li> </li>

View File

@ -44,12 +44,13 @@
<%= news.description.html_safe %> <%= news.description.html_safe %>
</div> </div>
</div> </div>
<div class="news_foot c_red" style="cursor:pointer;display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>"> <div class="news_foot currentDd" style="cursor:pointer;display: none;" onclick="news_show_more_des(<%= news.id %>);" id="news_foot_<%= news.id %>">
<%= l(:button_more)%>... [展开]
<span class="g-arr-down"></span>
</div> </div>
<span class="fl"><%= l(:label_create_time)%><%= format_time(news.created_on)%></span> <span class="fl"><%= l(:label_create_time)%><%= format_time(news.created_on)%></span>
<%= link_to_attachments_course news %> <%= link_to_attachments_course news %>
<div class="cl"></div>
<%#= render :partial => 'student_work/work_attachments', :locals => {:attachments => news.attachments} %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div><!--problem_main end--> </div><!--problem_main end-->

View File

@ -37,6 +37,13 @@
<li class="polls_de_grey fr ml5">关闭</li> <li class="polls_de_grey fr ml5">关闭</li>
<% end%> <% end%>
<% if poll.polls_status == 1%>
<li class="polls_de_grey fr ml5">导出</li>
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
<li><%= link_to "导出", export_poll_poll_path(poll.id,:format => "xls"), :class => "polls_de fr ml5"%></li>
<% end%>
<li class="polls_date fr"><%= format_date poll.created_at.to_date%></li> <li class="polls_date fr"><%= format_date poll.created_at.to_date%></li>
<% else%> <% else%>
<% if poll.polls_status == 2%> <% if poll.polls_status == 2%>

View File

@ -1,6 +1,6 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'commit_alert',:locals => {:status => @status}) %>'); $('#ajax-modal').html('<%= escape_javascript(render :partial => 'commit_alert',:locals => {:status => @status}) %>');
showModal('ajax-modal', '250px'); showModal('ajax-modal', '270px');
$('#ajax-modal').css('height','100px'); $('#ajax-modal').css('height','110px');
$('#ajax-modal').siblings().remove(); $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" + $('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='hidden_atert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>"); "<a href='javascript:' onclick='hidden_atert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");

View File

@ -34,7 +34,7 @@
<% end %> <% end %>
<% if reply_allow %> <% if reply_allow %>
<%= link_to l(:button_reply),'', <%= link_to l(:button_reply),'',
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %> {:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %>
<% end %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: --> <% end %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: -->
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -4,12 +4,14 @@
:placeholder => l(:label_feedback_respond_content), :placeholder => l(:label_feedback_respond_content),
:maxlength => 250 %> :maxlength => 250 %>
<p nhname="contentmsg"></p>
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %> <%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %>
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %> <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %>
<%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %> <%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %>
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
<%= submit_tag l(:button_feedback_respond), :name => nil , <%= submit_tag l(:button_feedback_respond), :name => nil ,
:class => "reply_btn"%> :class => "reply_btn"%>
<input nhname="cancel_btn" type="button" style="display:none;"/>
<% end %> <% end %>

View File

@ -219,7 +219,7 @@ zh:
label_submit: 提交 label_submit: 提交
button_project_tags_add: 增加 button_project_tags_add: 增加
button_download: 下载 button_download: 下载
button_more: "更多»" button_more: "更多"
button_delete: 删除 button_delete: 删除
button_unfollow: 取消关注 button_unfollow: 取消关注
button_follow: 关注 button_follow: 关注

View File

@ -1939,6 +1939,7 @@ zh:
label_poll_description: 问卷描述 label_poll_description: 问卷描述
label_poll_options: 选项 label_poll_options: 选项
label_poll_subtotal: 小计 label_poll_subtotal: 小计
label_poll_question_num: "第%{num}题"
label_poll_proportion: 比例 label_poll_proportion: 比例
label_poll_valid_commit: 本题有效填写人次 label_poll_valid_commit: 本题有效填写人次
label_poll_result: 问卷调查_问卷统计 label_poll_result: 问卷调查_问卷统计

View File

@ -70,6 +70,7 @@ RedmineApp::Application.routes.draw do
get 'republish_poll' get 'republish_poll'
get 'poll_result' get 'poll_result'
get 'close_poll' get 'close_poll'
get 'export_poll'
end end
collection do collection do
delete 'delete_poll_question' delete 'delete_poll_question'

View File

@ -5054,8 +5054,7 @@ KEditor.prototype = {
} }
}); });
statusbar.removeClass('statusbar').addClass('ke-statusbar') statusbar.removeClass('statusbar').addClass('ke-statusbar')
.append('<span class="ke-inline-block ke-statusbar-center-icon"></span>') .append('<span class="ke-inline-block ke-statusbar-center-icon"></span>');
.append('<span class="ke-inline-block ke-statusbar-right-icon"></span>');
if (self._fullscreenResizeHandler) { if (self._fullscreenResizeHandler) {
K(window).unbind('resize', self._fullscreenResizeHandler); K(window).unbind('resize', self._fullscreenResizeHandler);
self._fullscreenResizeHandler = null; self._fullscreenResizeHandler = null;

View File

@ -5102,8 +5102,7 @@ KEditor.prototype = {
} }
}); });
statusbar.removeClass('statusbar').addClass('ke-statusbar') statusbar.removeClass('statusbar').addClass('ke-statusbar')
.append('<span class="ke-inline-block ke-statusbar-center-icon"></span>') .append('<span class="ke-inline-block ke-statusbar-center-icon"></span>');
.append('<span class="ke-inline-block ke-statusbar-right-icon"></span>');
if (self._fullscreenResizeHandler) { if (self._fullscreenResizeHandler) {
K(window).unbind('resize', self._fullscreenResizeHandler); K(window).unbind('resize', self._fullscreenResizeHandler);
self._fullscreenResizeHandler = null; self._fullscreenResizeHandler = null;

View File

@ -353,10 +353,26 @@ function show_more_msg()
function news_show_more_des(id) function news_show_more_des(id)
{ {
$('#news_description_' + id).toggleClass("news_description_none"); $('#news_description_' + id).toggleClass("news_description_none");
if($("#news_description_" + id).hasClass("news_description_none"))
{
$("#news_foot_" + id).html("[收起]");
}
else
{
$("#news_foot_" + id).html("[展开]");
}
} }
function bid_show_more_des(id) function bid_show_more_des(id)
{ {
$("#bid_description_" + id).toggleClass("news_description_none"); $("#bid_description_" + id).toggleClass("news_description_none");
if($("#bid_description_" + id).hasClass("news_description_none"))
{
$("#bid_show_more_des_button" + id).html("[收起]");
}
else
{
$("#bid_show_more_des_button" + id).html("[展开]");
}
} }
//课程作业结束时间倒计时 //课程作业结束时间倒计时

View File

@ -30,10 +30,6 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.box_h3{ color:#15bccf; text-align:center; font-size:16px;} .box_h3{ color:#15bccf; text-align:center; font-size:16px;}
.box_p{ color:#404040; margin-bottom:5px;} .box_p{ color:#404040; margin-bottom:5px;}
.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;} .fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;}
/*.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;}*/
/*.icon_addm:hover{background:url(../images/img_floatbox.png) 0 -61px no-repeat; }*/
/*.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}*/
/*.icon_removem:hover{background:url(../images/img_floatbox.png) -22px -61px no-repeat;}*/
a.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;} a.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;}
a:hover.btn_free{ background:#d63502;} a:hover.btn_free{ background:#d63502;}
/*成员邀请*/ /*成员邀请*/

View File

@ -127,7 +127,7 @@ a:hover.btn_de{ background:#ff5d31;}
a.btn_pu{ border:1px solid #3cb761; color:#3cb761; } a.btn_pu{ border:1px solid #3cb761; color:#3cb761; }
a:hover.btn_pu{ background:#3cb761;} a:hover.btn_pu{ background:#3cb761;}
.pollsbtn_grey{ border:1px solid #b1b1b1; color:#b1b1b1; padding:0px 9px; height:19px; padding-top:3px; } .pollsbtn_grey{ border:1px solid #b1b1b1; color:#b1b1b1; padding:0px 9px; height:19px; padding-top:3px; }
.polls_title_w { width:330px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} .polls_title_w { width:300px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.polls_title_st { max-width:530px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} .polls_title_st { max-width:530px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.polls_de_grey{ color:#b1b1b1; margin-top:3px;} .polls_de_grey{ color:#b1b1b1; margin-top:3px;}
.ml5{ margin-left:5px;} .ml5{ margin-left:5px;}

View File

@ -439,3 +439,4 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
img{max-width: 100%;} img{max-width: 100%;}
.attachments {clear: both;} .attachments {clear: both;}
.is_public_checkbox{margin-left: 15px;margin-right: 10px;} .is_public_checkbox{margin-left: 15px;margin-right: 10px;}
.author_name{color: #3ca5c6 !important;}