Merge branch 'szzh' into CouerseResources
Conflicts: db/schema.rb
This commit is contained in:
commit
f9b3cc6588
|
@ -136,7 +136,7 @@ class AccountController < ApplicationController
|
|||
session[:auth_source_registration] = nil
|
||||
self.logged_user = @user
|
||||
flash[:notice] = l(:notice_account_activated)
|
||||
render :action => 'email_valid'
|
||||
redirect_to my_account_path
|
||||
end
|
||||
else
|
||||
@user.login = params[:user][:login]
|
||||
|
|
|
@ -807,6 +807,7 @@ class BidsController < ApplicationController
|
|||
@bid.is_evaluation = params[:bid][:is_evaluation]
|
||||
@bid.proportion = params[:bid][:proportion]
|
||||
@bid.evaluation_num = params[:bid][:evaluation_num]
|
||||
@bid.open_anonymous_evaluation = params[:bid][:open_anonymous_evaluation]
|
||||
@bid.reward_type = 3
|
||||
# @bid.budget = params[:bid][:budget]
|
||||
@bid.deadline = params[:bid][:deadline]
|
||||
|
@ -863,6 +864,7 @@ class BidsController < ApplicationController
|
|||
@bid.is_evaluation = params[:bid][:is_evaluation]
|
||||
@bid.proportion = params[:bid][:proportion]
|
||||
@bid.evaluation_num = params[:bid][:evaluation_num]
|
||||
@bid.open_anonymous_evaluation = params[:bid][:open_anonymous_evaluation]
|
||||
@bid.reward_type = 3
|
||||
@bid.deadline = params[:bid][:deadline]
|
||||
@bid.budget = 0
|
||||
|
|
|
@ -511,6 +511,7 @@ class CoursesController < ApplicationController
|
|||
def new_homework
|
||||
@homework = Bid.new
|
||||
@homework.safe_attributes = params[:bid]
|
||||
@homework.open_anonymous_evaluation = 1
|
||||
if (User.current.logged? && User.current.member_of_course?(Course.find params[:id] ))
|
||||
render :layout => 'base_courses'
|
||||
else
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
class IssuesController < ApplicationController
|
||||
layout 'base_projects'#Added by young
|
||||
menu_item :new_issue, :only => [:new, :create]
|
||||
default_search_scope :issues
|
||||
|
||||
before_filter :find_issue, :only => [:show, :edit, :update]
|
||||
|
@ -59,8 +58,8 @@ class IssuesController < ApplicationController
|
|||
sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria)
|
||||
sort_update(@query.sortable_columns)
|
||||
@query.sort_criteria = sort_criteria.to_a
|
||||
|
||||
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young
|
||||
|
||||
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'
|
||||
|
||||
if @query.valid?
|
||||
case params[:format]
|
||||
|
|
|
@ -19,7 +19,7 @@ class MemosController < ApplicationController
|
|||
|
||||
@content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)} <br/> "
|
||||
@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
||||
@content = "<blockquote>" << @content
|
||||
@content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content
|
||||
#@content = "> #{ll(Setting.default_language, :text_user_wrote, @memo.author)}\n> "
|
||||
#@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||
#@content_html = textilizable(@content)
|
||||
|
|
|
@ -328,7 +328,7 @@ module CoursesHelper
|
|||
#当前用户是不是指定课程的学生
|
||||
def is_cur_course_student course
|
||||
#course.members.joins(:member_roles).where("member_roles.role_id IN (:role_id) and members.user_id = #{User.current.id}", {:role_id => StudentRoles}).count != 0
|
||||
!(User.current.allowed_to?(:as_teacher,course))
|
||||
User.current.logged? && User.current.member_of_course?(course) && !(User.current.allowed_to?(:as_teacher,course))
|
||||
#修改:能新建占位且不能新建任务的角色判定为学生
|
||||
#is_student = false
|
||||
#@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
|
|
|
@ -97,7 +97,7 @@ module WatchersHelper
|
|||
return '' unless user && user.logged?
|
||||
# modify by nwb
|
||||
# 主讲教师不允许退出课程
|
||||
return '' if user.id == course.tea_id || course.is_public == 0
|
||||
return '' if user.id == course.tea_id
|
||||
joined = user.member_of_course?(course)
|
||||
text = joined ? l(:label_exit_course) : l(:label_new_join)
|
||||
url_t = join_path(:object_id => course.id)
|
||||
|
|
|
@ -30,7 +30,7 @@ class Forum < ActiveRecord::Base
|
|||
|
||||
def destroyable_by? user
|
||||
# user && user.logged? && Forum.find(self.forum_id).creator_id == user.id || user.admin?
|
||||
user.admin?
|
||||
self.creator == user || user.admin?
|
||||
end
|
||||
|
||||
# Updates topic_count, memo_count and last_memo_id attributes for +board_id+
|
||||
|
|
|
@ -88,11 +88,11 @@ class Memo < ActiveRecord::Base
|
|||
|
||||
def editable_by? user
|
||||
# user && user.logged? || (self.author == usr && usr.allowed_to?(:edit_own_messages, project))
|
||||
user.admin?
|
||||
user.admin? || self.author == user
|
||||
end
|
||||
|
||||
def destroyable_by? user
|
||||
(user && user.logged? && (Forum.find(self.forum_id).creator_id == user.id) ) || user.admin?
|
||||
(user && self.author == user) || user.admin?
|
||||
#self.author == user || user.admin?
|
||||
end
|
||||
|
||||
|
|
|
@ -17,20 +17,23 @@
|
|||
|
||||
<% if @user.auth_source_id.nil? %>
|
||||
<p><%= f.text_field :login, :size => 25, :required => true %><span id="valid_user_login"></span>
|
||||
<em class="info"><%= l(:label_max_number) %></em>
|
||||
<em class="info" style="color: #acaeb1"><%= l(:label_max_number) %></em>
|
||||
</p>
|
||||
<p><%= f.password_field :password, :size => 25, :required => true %>
|
||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em>
|
||||
<em class="info" style="color: #acaeb1"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em>
|
||||
</p>
|
||||
<p><%= f.password_field :password_confirmation, :size => 25, :required => true %><span id="valid_password"></span></p>
|
||||
<p><%= f.password_field :password_confirmation, :size => 25, :required => true %><span id="valid_password" style="padding-left: 10px;"></span></p>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= f.text_field :mail,:size => 25, :required => true %>
|
||||
<span id="valid_user_mail"></span>
|
||||
<span id="valid_user_mail" ></span>
|
||||
</p>
|
||||
<p>
|
||||
<em class="info"><%= "#{l(:label_mail_attention)} " %></em>
|
||||
<em class="info" style="color: #acaeb1">
|
||||
<p><%= "#{l(:label_mail_attention)} " %></p>
|
||||
<p><%= "#{l(:label_mail_attention1)} " %></p>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="created_on" align="center" title='<%=format_time(user.created_on)%>'><%= format_time(user.created_on) %></td>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="last_login_on" align="center" title='<%= format_time(user.last_login_on)%>'><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
|
||||
<td class="buttons"> <%= change_status_link(user) %>
|
||||
<%= delete_link user_path(user, :back_url => admin_users_path(params)) unless User.current == user %> </td>
|
||||
<%= delete_link user_path(user, :back_url => admin_search_path(params)) unless User.current == user %> </td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
|
||||
/* 匿名评分弹框 */
|
||||
.anonymos{width:480px;height:180px;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;}
|
||||
.anonymos{width:480px;height:180px;position:fixed;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;}
|
||||
.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; }
|
||||
|
|
|
@ -1,4 +1,38 @@
|
|||
<!--modified by huang-->
|
||||
<script type="text/javascript">
|
||||
function ShowCountDown(year,month,day,divname)
|
||||
{
|
||||
var now = new Date();
|
||||
var endDate = new Date(year, month-1, day);
|
||||
var leftTime=endDate.getTime()-now.getTime();
|
||||
var leftsecond = parseInt(leftTime/1000);
|
||||
var day1=Math.floor(leftsecond/(60*60*24));
|
||||
var hour=Math.floor((leftsecond-day1*24*60*60)/3600);
|
||||
var minute=Math.floor((leftsecond-day1*24*60*60-hour*3600)/60);
|
||||
var second=Math.floor(leftsecond-day1*24*60*60-hour*3600-minute*60);
|
||||
$("#"+divname).html("<span style='color: #acaeb1;'>作业提交还剩 :</span> <span style='color: red;'>"
|
||||
+day1+" </span><span style='color: #acaeb1;'>天</span><span style='color: red;'> "
|
||||
+hour+" </span><span style='color: #acaeb1;'>时</span><span style='color: red;'> "
|
||||
+minute+" </span><span style='color: #acaeb1;'>分</span><span style='color: red;'> "
|
||||
+second+" </span><span style='color: #acaeb1;'>秒</span>");
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.span_wping{}
|
||||
.span_wping a{
|
||||
margin-top: 18px;
|
||||
margin-bottom: 3px;
|
||||
width: 43px;
|
||||
height: 23px;
|
||||
background: #15bccf;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding-top: 3px;
|
||||
padding-left: 3px;
|
||||
}
|
||||
.span_wping a:hover{ background-color:#03a1b3;}
|
||||
</style>
|
||||
|
||||
<% if bids.blank? %>
|
||||
<%#= l(:label_uncommit_homework) %>
|
||||
暂无作业!
|
||||
|
@ -26,7 +60,15 @@
|
|||
<% if User.current.logged? && is_cur_course_student(@course) %>
|
||||
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
|
||||
<% if cur_user_homework!= nil && cur_user_homework.empty? %>
|
||||
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
|
||||
<% if bid.comment_status == 0 || bid.comment_status == 2%>
|
||||
<span class="span_wping">
|
||||
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span title="匿评阶段不可提交作业!" class="span_wping">
|
||||
<a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a>
|
||||
</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span style="color: green; float: right">
|
||||
<%= l(:lable_has_commit_homework)%>
|
||||
|
@ -34,7 +76,8 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
<% if (User.current.admin?||User.current.id==bid.author_id) %>
|
||||
<span id="<%=bid.id %>_anonymous_comment">
|
||||
<% if bid.open_anonymous_evaluation == 1%>
|
||||
<span id="<%=bid.id %>_anonymous_comment" class="span_wping">
|
||||
<% case bid.comment_status %>
|
||||
<% when 0 %>
|
||||
<%= link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...' %>
|
||||
|
@ -44,11 +87,13 @@
|
|||
匿评结束
|
||||
<% end %>
|
||||
</span>
|
||||
<%= link_to(
|
||||
<%end%>
|
||||
<span class="span_wping">
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id},
|
||||
:class => 'icon icon-edit'
|
||||
{:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id}
|
||||
) %>
|
||||
</span>
|
||||
<%#= link_to(
|
||||
l(:button_delete),
|
||||
{:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id},
|
||||
|
@ -94,19 +139,6 @@
|
|||
</strong>
|
||||
)
|
||||
</span>
|
||||
<span style="float: right">
|
||||
<% if betweentime(bid.deadline) < 0 %>
|
||||
<span style="color: red; float: right">
|
||||
<%= l(:label_commit_limit)%>
|
||||
</span>
|
||||
<% else %>
|
||||
<% if betweentime(bid.deadline) < 3 %>
|
||||
<span style="color: red">
|
||||
<%= l(:label_commit_ar) %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -146,10 +178,18 @@
|
|||
<%=format_time bid.created_on %>
|
||||
</span>
|
||||
<span style="float: right">
|
||||
<%= l(:field_deadline) %>
|
||||
:
|
||||
<%=bid.deadline %>
|
||||
</span>
|
||||
<% if betweentime(bid.deadline) < 0 %>
|
||||
<span style="color: red; float: right">
|
||||
<%= l(:label_commit_limit)%>
|
||||
</span>
|
||||
<% else %>
|
||||
<script type="text/javascript">
|
||||
window.setInterval(function(){ShowCountDown(<%= bid.deadline.year%>,<%= bid.deadline.month%>,<%= bid.deadline.day + 1%>,"show_deadtime_span_<%= bid.id%>");},1000)
|
||||
</script>
|
||||
<span id="show_deadtime_span_<%= bid.id%>" style="float: right">
|
||||
</span>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
|
|
@ -43,9 +43,9 @@
|
|||
<% end %>
|
||||
|
||||
<% unless @is_teacher%>
|
||||
<% if @bid.comment_status == 0%>
|
||||
<% if @bid.comment_status == 0 && @bid.open_anonymous_evaluation == 1%>
|
||||
$("#my_homework").click();
|
||||
<% elsif @bid.comment_status == 2%>
|
||||
<% elsif @bid.comment_status == 2 || @bid.open_anonymous_evaluation == 0%>
|
||||
$("#all_homeworks").click();
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -44,6 +44,10 @@
|
|||
<%= f.select :proportion, proportion_option %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %>
|
||||
<span>未开启匿评作业将直接进入众评点赞阶段</span>
|
||||
</p>
|
||||
<p id="evaluation_num_p">
|
||||
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%>
|
||||
<span id="bid_evaluation_num_span">匿评分配数量不宜太大,否则会影响开启匿评速度</span>
|
||||
</p>
|
||||
|
|
|
@ -28,14 +28,17 @@
|
|||
</ul>
|
||||
<% else %>
|
||||
<ul>
|
||||
<li id="tb_5" class="hovertab">
|
||||
<%= link_to @bid.comment_status == 2 ? "已评作品" : "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%>
|
||||
</li>
|
||||
<% if @bid.open_anonymous_evaluation == 1%>
|
||||
<li id="tb_5" class="hovertab">
|
||||
<!-- 开启了匿评才能看到匿评列表 -->
|
||||
<%= link_to @bid.comment_status == 2 ? "已评作品" : "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%>
|
||||
</li>
|
||||
<% end %>
|
||||
<li id="tb_6" class="normaltab">
|
||||
<%= link_to "我的作品", get_my_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'my_homework',:remote => true}%>
|
||||
</li>
|
||||
<% if @bid.comment_status == 2 %>
|
||||
<!-- 匿评结束后才能看到全部作业列表 -->
|
||||
<% if @bid.comment_status == 2 || @bid.open_anonymous_evaluation == 0%>
|
||||
<!-- 匿评结束后或者未开启匿评才能看到全部作业列表 -->
|
||||
<li id="tb_7" class="normaltab">
|
||||
<%= link_to "所有作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {id: 'all_homeworks',:remote => true}%>
|
||||
</li>
|
||||
|
|
|
@ -43,35 +43,66 @@
|
|||
{
|
||||
var evaluation_num = $.trim($("#bid_evaluation_num").val());
|
||||
var regex = /^\d+$/;
|
||||
if(evaluation_num=="")
|
||||
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量不能为空");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
else if(regex.test(evaluation_num))
|
||||
{
|
||||
if(evaluation_num > 0)
|
||||
if(evaluation_num=="")
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("填写正确");
|
||||
$("#bid_evaluation_num_span").css('color','#008000');
|
||||
return true;
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量不能为空");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
else if(regex.test(evaluation_num))
|
||||
{
|
||||
if(evaluation_num > 0)
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("填写正确");
|
||||
$("#bid_evaluation_num_span").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量必须为大于0");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量必须为大于0");
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量只能为数字");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量只能为数字");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#bid_open_anonymous_evaluation").click(function(){
|
||||
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
|
||||
{
|
||||
$("#evaluation_num_p").slideDown();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#evaluation_num_p").slideUp();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(function(){
|
||||
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
|
||||
{
|
||||
$("#evaluation_num_p").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#evaluation_num_p").hide();
|
||||
}
|
||||
});
|
||||
|
||||
function submitHomework(id)
|
||||
{
|
||||
if(regexDeadLine()&®exName()&®exEvaluationNum())
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
<div id="floatpoint" class="course_ad" >
|
||||
<table border=0 width="180px" >
|
||||
<table border=0>
|
||||
<tr>
|
||||
<td align=center bgcolor=#15bccf >
|
||||
<span class="ad_title"><%= l(:label_contact_us) %></span>
|
||||
|
@ -30,85 +30,25 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var XX=1150; // 浮动层的X坐标,即左边距
|
||||
var xstep=1; // 移动步长,此参数越小,移动越平滑,最小值为1
|
||||
var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快
|
||||
var YY=0;
|
||||
var ch=0;
|
||||
var oh=0;
|
||||
var yon=1;
|
||||
var ns4=document.layers?1:0
|
||||
var ie=document.all?1:0
|
||||
var ns6=document.getElementById&&!document.all?1:0
|
||||
|
||||
if(ie){
|
||||
YY=document.body.clientHeight; //由clientHeight取得页面的高度
|
||||
floatpoint.style.top=YY; //将浮动层位置调整到页面底部
|
||||
}
|
||||
else if (ns4){
|
||||
|
||||
YY=window.innerHeight; //由innerHeight取得页面的高度
|
||||
document.floatpoint.pageY=YY; //将浮动层位置调整到页面底部
|
||||
document.floatpoint.visibility="hidden"; //将浮动层隐藏。
|
||||
}
|
||||
else if (ns6){
|
||||
|
||||
YY=window.innerHeight //由innerHeight取得页面的高度
|
||||
document.getElementById('floatpoint').style.top=YY //将浮动层位置调整到页面底部
|
||||
}
|
||||
YY = 0;
|
||||
function reloc1(){
|
||||
if (ie){
|
||||
ch=document.body.clientHeight;
|
||||
oh=floatpoint.offsetHeight;
|
||||
}
|
||||
else if (ns4){
|
||||
ch=window.innerHeight;
|
||||
oh=document.floatpoint.clip.height;
|
||||
}
|
||||
else if (ns6){ //如果是NS6
|
||||
ch=window.innerHeight //取页面高度
|
||||
oh=document.getElementById("floatpoint").offsetHeight //取浮动层的高度
|
||||
}
|
||||
|
||||
if(yon==0)
|
||||
{
|
||||
YY=YY-xstep;
|
||||
} //如果当前应该上移,则减小YY值
|
||||
else
|
||||
{
|
||||
YY=YY+xstep;
|
||||
} //否则增加YY值下移
|
||||
if(YY<0){yon=1;YY=0;} //如果浮动层超出了上界,则设定移动方向为向下;并设定层的位置为正好在上界处
|
||||
if(YY>=(ch-oh)){yon=0;YY=(ch-oh);} //如果浮动层超出了下界,则设定移动方向为向上;并设定层的位置为正好在下界处
|
||||
if(ie){ //如果是IE
|
||||
floatpoint.style.left=XX; //用style.left设定浮动层左边距
|
||||
floatpoint.style.top=YY+document.body.scrollTop; //用style.top设定浮动层上边距
|
||||
}
|
||||
else if (ns4){ //如果是NS4
|
||||
document.floatpoint.pageX=XX; //用.pageX设定浮动层左边距
|
||||
document.floatpoint.pageY=YY+window.pageYOffset; //用.pageY设定浮动层上边距
|
||||
}
|
||||
else if (ns6){ //如果是NS6
|
||||
// document.getElementById("floatpoint").style.left=XX
|
||||
// document.getElementById("floatpoint").style.top=YY+window.pageYOffset
|
||||
$("#floatpoint").offset({left:XX});
|
||||
$("#floatpoint").offset({top:YY+window.pageYOffset});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function onad(){
|
||||
|
||||
if(ns4) //如果是NS4
|
||||
document.floatpoint.visibility="visible"; //设定浮动层为可见
|
||||
loopfunc(); //开始主循环,以不断改变浮动层位置
|
||||
}
|
||||
function loopfunc(){
|
||||
reloc1(); //调整浮动层位置
|
||||
setTimeout('loopfunc()',delay_time); //设定下一次调整的延时
|
||||
}
|
||||
if (ie||ns4||ns6)
|
||||
//window.onload=onad //初始化事件触发器
|
||||
$(document).ready(onad());
|
||||
window.setInterval(function(){move();},delay_time);
|
||||
function move()
|
||||
{
|
||||
var screen_height = $(window).height(); //浏览器当前窗口文档的高度
|
||||
var floatpoint_height = $("#floatpoint").height();
|
||||
YY += xstep;
|
||||
if(YY <= 0){xstep = 1; YY = 0;} //如果浮动层超出了上界,则设定移动方向为向下;并设定层的位置为正好在上界处
|
||||
if(YY >= (screen_height-floatpoint_height)) //如果浮动层超出了下界,则设定移动方向为向上;并设定层的位置为正好在下界处
|
||||
{
|
||||
xstep = -1;
|
||||
YY=(screen_height-floatpoint_height);
|
||||
}
|
||||
$("#floatpoint").css("margin-top",YY);
|
||||
}
|
||||
function change_size(){var screen_width = $(window).width();var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10).css("position", "fixed");}
|
||||
$(document).ready(function(){change_size();});
|
||||
$(window).resize(function(){change_size();});
|
||||
</script>
|
|
@ -49,6 +49,10 @@
|
|||
<%= f.select :proportion, proportion_option %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %>
|
||||
<span>未开启匿评作业将直接进入众评点赞阶段</span>
|
||||
</p>
|
||||
<p id="evaluation_num_p">
|
||||
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%>
|
||||
<span id="bid_evaluation_num_span">匿评分配数量不宜太大,否则会影响开启匿评速度</span>
|
||||
</p>
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
</style>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<!-- fq -->
|
||||
<!--modified by huang-->
|
||||
<div class="content-title-top">
|
||||
<% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.roles&Role.where(id: [3, 4, 7, 9] )).size >0))%>
|
||||
<%= link_to(l(:label_course_homework_new), {:controller => 'courses', :action => 'new_homework'}, :class => 'icon icon-add') %>
|
||||
<% end %>
|
||||
<% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.roles&Role.where(id: [3, 4, 7, 9] )).size >0))%>
|
||||
<%= link_to(l(:label_course_homework_new), {:controller => 'courses', :action => 'new_homework'}, :class => 'icon icon-add') %>
|
||||
<% else %>
|
||||
<span class="font_lighter"><%= l(:label_coursejoin_tip) %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div id="bid-show">
|
||||
<%= render :partial => 'bids/bid_homework_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>
|
||||
|
|
|
@ -43,35 +43,55 @@
|
|||
{
|
||||
var evaluation_num = $.trim($("#bid_evaluation_num").val());
|
||||
var regex = /^\d+$/;
|
||||
if(evaluation_num=="")
|
||||
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量不能为空");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
else if(regex.test(evaluation_num))
|
||||
{
|
||||
if(evaluation_num > 0)
|
||||
if(evaluation_num=="")
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("填写正确");
|
||||
$("#bid_evaluation_num_span").css('color','#008000');
|
||||
return true;
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量不能为空");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
else if(regex.test(evaluation_num))
|
||||
{
|
||||
if(evaluation_num > 0)
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("填写正确");
|
||||
$("#bid_evaluation_num_span").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量必须为大于0");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量必须为大于0");
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量只能为数字");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#bid_evaluation_num_span").text("匿评分配数量只能为数字");
|
||||
$("#bid_evaluation_num_span").css('color','#ff0000');
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#bid_open_anonymous_evaluation").click(function(){
|
||||
if($("#bid_open_anonymous_evaluation").attr("checked") == "checked")
|
||||
{
|
||||
$("#evaluation_num_p").slideDown();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#evaluation_num_p").slideUp();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function submitHomework()
|
||||
{
|
||||
if(regexDeadLine()&®exName()&®exEvaluationNum())
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<% members.each do |member| %>
|
||||
<% next if member.new_record? %>
|
||||
<tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
|
||||
<td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
|
||||
<td class="roles">
|
||||
<td class="<%= member.principal.class.name.downcase %>" style="text-align: center"><%= link_to_user member.principal %></td>
|
||||
<td class="roles" style="text-align: center">
|
||||
<span id="member-<%= member.id %>-roles">
|
||||
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||
</span>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<% end %>
|
||||
<div style="width: 120%;">
|
||||
<div class="field">
|
||||
<%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share' %>
|
||||
<%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share', :maxlength => 50%>
|
||||
</div>
|
||||
<div>
|
||||
<% if User.current.logged? && User.current.admin? %>
|
||||
|
@ -36,7 +36,9 @@
|
|||
</p>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
|
||||
|
||||
<p style="color: #ff0000">(<%= l(:label_forums_max_length) %>)</p>
|
||||
<p style="color: #ff0000">
|
||||
(<%= l(:label_forums_max_length) %>)
|
||||
</p>
|
||||
</div>
|
||||
<div class="actions" style=" padding-top: 10px; float:right">
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
|
|
|
@ -4,23 +4,54 @@
|
|||
<% forums.each do |forum| %>
|
||||
<div class="forums-index">
|
||||
<div class="forums-inex-avatar">
|
||||
<%= forum.creator.nil? ? (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar")) : (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator)) %>
|
||||
</div>
|
||||
<%= forum.creator.nil? ? (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar")) : (link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator)) %>
|
||||
</div>
|
||||
<div class="forums-index-content">
|
||||
<table class="content-text-list">
|
||||
<tr><td valign="top" width="500px" class=" <%= forum.sticky? ? 'sticky' : '' %>
|
||||
<%= forum.locked? ? 'locked' : '' %>">
|
||||
<p ><%= link_to h(forum.name), forum_path(forum) %></p></td></tr>
|
||||
<tr><td><p ><%= textAreailizable forum.description%></p></td></tr>
|
||||
<tr><td><p ><%= authoring forum.created_at, forum.creator %></p></td></tr>
|
||||
<table class="content-text-list" style="table-layout: fixed;">
|
||||
<tr>
|
||||
<td valign="top" width="500px" class=" <%= forum.sticky? ? 'sticky' : '' %><%= forum.locked? ? 'locked' : '' %>" style="word-break: break-all;word-wrap: break-word;">
|
||||
<p >
|
||||
<%= link_to h(forum.name), forum_path(forum) %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="word-break: break-all;word-wrap: break-word;">
|
||||
<p>
|
||||
<%= textAreailizable forum.description%>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="word-break: break-all;word-wrap: break-word;">
|
||||
<p >
|
||||
<%= authoring forum.created_at, forum.creator %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="forums-index-count">
|
||||
<table class="forums-count-color"><tr class="forums-count-color" align="center"><td><%= link_to (forum.memo_count), forum_path(forum) %></td><td><%= link_to (forum.topic_count), forum_path(forum) %></td></tr>
|
||||
<tr align="center"><td>回答</td><td>帖子</td></tr></table></div>
|
||||
<table class="forums-count-color">
|
||||
<tr class="forums-count-color" align="center">
|
||||
<td>
|
||||
<%= link_to (forum.memo_count), forum_path(forum) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to (forum.topic_count), forum_path(forum) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td>回答</td>
|
||||
<td>帖子</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pagination"><%= pagination_links_full @forums_pages, @forums_count %></div>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @forums_pages, @forums_count %>
|
||||
</div>
|
||||
<% else %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -7,12 +7,15 @@
|
|||
<table width="940px">
|
||||
<tr>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf">公共贴吧 </td>
|
||||
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
||||
<td class="location-list">
|
||||
<strong>
|
||||
<%= l(:label_user_location) %> :
|
||||
</strong>
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged? %>
|
||||
<%= link_to( l(:label_forum_new), new_forum_path, :class => 'icon icon-add') %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<%= link_to( l(:label_forum_new), new_forum_path, :class => 'icon icon-add') %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td rowspan="2" width="250px" >
|
||||
<div class="top-content-search">
|
||||
|
@ -24,8 +27,15 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><a><%= link_to request.host()+"/forums", forums_path %> </a></td>
|
||||
<td ><%= link_to l(:field_homepage), home_path %> > <%= link_to "公共贴吧", forums_path %></td>
|
||||
<td style="padding-left: 8px">
|
||||
<a>
|
||||
<%= link_to request.host()+"/forums", forums_path %>
|
||||
</a>
|
||||
</td>
|
||||
<td >
|
||||
<%= link_to l(:field_homepage), home_path %> >
|
||||
<%= link_to "公共贴吧", forums_path %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -1,16 +1,25 @@
|
|||
<!-- added by fq -->
|
||||
<div id="add-memo" class='lz' style="<% unless @memo.errors.any?%>display: none;<% end %> padding: 20px;">
|
||||
<h3><%=l(:label_memo_new)%></h3>
|
||||
<h3>
|
||||
<%=l(:label_memo_new)%>
|
||||
</h3>
|
||||
<% if User.current.logged? %>
|
||||
<%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
|
||||
<div class="actions" style="max-width:680px">
|
||||
<p><%= f.text_field :subject, :required => true%></p>
|
||||
<p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>
|
||||
<p style="color: #ff0000">(<%= l(:label_memos_max_length) %>)</p>
|
||||
<p>
|
||||
<%= l(:label_attachment_plural) %><br />
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
||||
<%= f.text_field :subject, :required => true, :maxlength => 50%>
|
||||
</p>
|
||||
<p style="max-width:680px">
|
||||
<%= f.text_area :content, :required => true, :id => 'editor02' %>
|
||||
</p>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>
|
||||
<p style="color: #ff0000">
|
||||
(<%= l(:label_memos_max_length) %>)
|
||||
</p>
|
||||
<p>
|
||||
<%= l(:label_attachment_plural) %>
|
||||
<br />
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
||||
</p>
|
||||
<%= f.submit :value => l(:label_memo_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
</span>
|
||||
</li>
|
||||
<li class="c_red" style="margin:25px 0 0 20px;"> 您还没交作业,请创建作业!</li>
|
||||
<% if @bid.comment_status == 0 %>
|
||||
<% if @bid.comment_status == 0 || @bid.comment_status == 1%>
|
||||
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
|
||||
<li class="wping">
|
||||
<%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="wping" title="只有开启匿评之前才能创建作业哦!">
|
||||
<li class="wping" title="匿评阶段不可提交作业!">
|
||||
<a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form' %>
|
||||
<%= submit_tag l(:button_create), :class => "ButtonAddTags"%>
|
||||
<%= submit_tag l(:button_create_and_continue), :class => 'ButtonAddTags' %>
|
||||
<%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form','preview',{:class => "ButtonColor"}%>
|
||||
|
||||
<%= javascript_tag "$('#issue_subject').focus();" %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% if hasCourse %>
|
||||
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
|
||||
<%=link_to l(:label_my_course), user_courses_user_path(User.current.id) %>
|
||||
<ul class="course_sub_menu">
|
||||
<% course_index = 0 %>
|
||||
<% User.current.courses.each do |course| %>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<% if course %>
|
||||
<li id="homework_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%=course.name%>" onmouseover="homeworkSlipMenuOver(<%= course.id%>);" onmouseout="homeworkSlipMenuOut(<%= course.id%>);">
|
||||
<%= link_to course.name, {:controller => 'courses',:action => 'show',id:course.id} %>
|
||||
<%= link_to course.name, course_path(course.id, host: Setting.host_course) %>
|
||||
<ul class="homework_sub_menu" id="homework_loggedas_ul_<%= course.id%>" style="top:<%= course_index * 28.1%>px;">
|
||||
<% course.homework_for_courses.map(&:bid).each do |bid| %>
|
||||
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=bid.name%>">
|
||||
<%= link_to bid.name, course_for_bid_path(bid), :target => "_blank" %>
|
||||
<%= link_to bid.name, course_for_bid_path(bid, host: Setting.host_course), :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -106,6 +106,7 @@
|
|||
<% if (User.current.admin?||User.current.id==@bid.author_id) %>
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px; font-size: 15px" colspan="2">
|
||||
<% if @bid.open_anonymous_evaluation == 1%>
|
||||
<span id="<%=@bid.id %>_anonymous_comment">
|
||||
<% case @bid.comment_status %>
|
||||
<% when 0 %>
|
||||
|
@ -116,6 +117,7 @@
|
|||
匿评结束
|
||||
<% end %>
|
||||
</span>
|
||||
<%end%>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
</div>
|
||||
<div id="content">
|
||||
<div class="tabs_new">
|
||||
<%= render_main_menu(@project) %>
|
||||
<%= render_main_menu(@project) %>
|
||||
</div>
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<%= form_for(@memo_new, url: forum_memos_path, :html => {:multipart => true}) do |f| %>
|
||||
<%= f.hidden_field :subject, :required => true, value: "RE: "+@memo.subject %>
|
||||
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
||||
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
||||
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
||||
<div id="message_quote" class="wiki"></div>
|
||||
|
@ -7,11 +7,12 @@
|
|||
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
|
||||
<%= label_tag(l(:label_reply_plural)) %>:
|
||||
<!-- <p> < %= f.text_area :content, :required => true, :size => "75%", :resize => "none", id: 'editor01' %> </p> -->
|
||||
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %></p>
|
||||
|
||||
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
|
||||
<p><%= l(:label_attachment_plural) %><br />
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
<p>
|
||||
<%= l(:label_attachment_plural) %>
|
||||
<br />
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
<%= f.submit value: l(:label_reply_plural), class: "replies" %>
|
||||
<% end %>
|
|
@ -4,30 +4,43 @@
|
|||
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %>
|
||||
<% if @memo.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2>
|
||||
<h2>
|
||||
<%= pluralize(@memo.errors.count, "error") %>
|
||||
prohibited this memo from being saved:
|
||||
</h2>
|
||||
<ul>
|
||||
<% @memo.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<li>
|
||||
<%= msg %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="actions">
|
||||
<p><%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying%></p>
|
||||
<p>
|
||||
<% unless @replying %>
|
||||
<% if @memo.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %> <%= label_tag 'memo_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<% if @memo.safe_attribute? 'lock' %>
|
||||
<%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying, :maxlength => 50%>
|
||||
</p>
|
||||
<% if User.current.admin?%>
|
||||
<p>
|
||||
<% unless @replying %>
|
||||
<% if @memo.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %>
|
||||
<%= label_tag 'memo_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<% if @memo.safe_attribute? 'lock' %>
|
||||
<%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p>
|
||||
<%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %>
|
||||
</p>
|
||||
<p><%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %></p>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>
|
||||
<p>
|
||||
<%= l(:label_attachment_plural) %><br />
|
||||
<%= l(:label_attachment_plural) %>
|
||||
<br />
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
||||
</p>
|
||||
<br/>
|
||||
|
|
|
@ -117,28 +117,34 @@
|
|||
|
||||
</div>
|
||||
<br/>
|
||||
<table class="borad-text-list">
|
||||
<table class="borad-text-list" style="table-layout: fixed;">
|
||||
<tr>
|
||||
<td rowspan="3" valign="top" width="60px">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %>
|
||||
</td>
|
||||
<td class="comments">
|
||||
<div class="reply_content" ><%=h sanitize(reply.content.html_safe) %></div>
|
||||
<td class="comments" style="word-wrap: break-word;word-break: break-all;">
|
||||
<div class="reply_content" >
|
||||
<%=h sanitize(reply.content.html_safe) %>
|
||||
</div>
|
||||
<p>
|
||||
<% if reply.attachments.any?%>
|
||||
<% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %>
|
||||
<%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options} %>
|
||||
<% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %>
|
||||
<%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options} %>
|
||||
<% end %>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font_lighter" style="float:right"><%= authoring reply.created_at, reply.author %></td>
|
||||
<td class="font_lighter" style="float:right">
|
||||
<%= authoring reply.created_at, reply.author %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></div>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if User.current.login? %>
|
||||
|
|
|
@ -9,6 +9,47 @@
|
|||
function () {
|
||||
$("#province").attr("href", "#WOpenWindow")
|
||||
$("#province").leanModal({top: 100, closeButton: ".modal_close"});
|
||||
var $lastname = $('#user_lastname')
|
||||
var $firstname = $('#user_firstname')
|
||||
var $enterprise = $('#enterprise_name')
|
||||
$lastname.blur(function () {
|
||||
var pas1 = document.getElementById("user_lastname").value;
|
||||
|
||||
if (pas1 == "") {
|
||||
$('#valid_lastname').html('<span class="red">' + "<%= l(:lastname_empty) %>"+ "</span>");
|
||||
$('#lastname_limit').hide();
|
||||
}
|
||||
else {
|
||||
$('#valid_lastname').html('<span class="red">' + "</span>");
|
||||
$('#lastname_limit').show();
|
||||
}
|
||||
|
||||
});
|
||||
$firstname.blur(function () {
|
||||
var pas1 = document.getElementById("user_firstname").value;
|
||||
|
||||
if (pas1 == "") {
|
||||
$('#valid_firstname').html('<span class="red">' + "<%= l(:firstname_empty) %>"+ "</span>");
|
||||
$('#firstname_limit').hide();
|
||||
}
|
||||
else {
|
||||
$('#valid_firstname').html('<span class="red">' + "</span>");
|
||||
$('#firstname_limit').show();
|
||||
}
|
||||
});
|
||||
$enterprise.blur(function () {
|
||||
var pas1 = document.getElementById("enterprise_name").value;
|
||||
|
||||
if (pas1 == "") {
|
||||
$('#valid_companyname').html('<span class="red">' + "<%= l(:enterprise_empty) %>"+ "</span>");
|
||||
|
||||
}
|
||||
else {
|
||||
$('#valid_lastname').html('<span class="red">' + "</span>");
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
@ -61,16 +102,19 @@
|
|||
<%= l(:label_information_plural) %>
|
||||
</legend>
|
||||
|
||||
|
||||
<div>
|
||||
<!-- 昵称 -->
|
||||
<p style="width:630px;padding-left: 40px;">
|
||||
<%= f.text_field :login, :required => true, :size => 25, :name => "login"%>
|
||||
<%= f.text_field :login, :required => true, :size => 25, :name => "login", :readonly => true %>
|
||||
<span class='font_lighter'><%= l(:label_max_number) %></span>
|
||||
<br/>
|
||||
</p>
|
||||
|
||||
<p style="width:400px;padding-left: 54px;">
|
||||
<%= l(:label_identity) %><span style="color: #ff0000"> *</span>
|
||||
<select onchange="showtechnical_title(this.value, $('#userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
||||
<p style="width:400px;padding-left: 52px;">
|
||||
<label style="margin-right: 1px;">
|
||||
<%= l(:label_identity) %><span style="color: #bb0000;"> *</span></label>
|
||||
<select onchange="showtechnical_title(this.value, $('#userTechnical_title'));" name="identity" id="userIdentity" class="location" style="margin: 0px;">
|
||||
<option value="">
|
||||
<%= l(:label_account_identity_choose) %>
|
||||
</option>
|
||||
|
@ -93,34 +137,38 @@
|
|||
</span>
|
||||
<span id='no' style='display:none'>
|
||||
<!-- modified by fq -->
|
||||
<% unless User.current.user_extensions.student_id.nil? %>
|
||||
|
||||
<% if !User.current.user_extensions.nil? && !User.current.user_extensions.student_id.nil? %>
|
||||
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %>
|
||||
<% else %>
|
||||
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
|
||||
<% end %>
|
||||
|
||||
<!-- end -->
|
||||
</span>
|
||||
</p>
|
||||
<div>
|
||||
<span id='name' style='display:none'>
|
||||
<p style="width:530px;padding-left: 54px;">
|
||||
<p style="width:530px;padding-left: 53px;">
|
||||
<%= f.text_field :lastname, :size => 25, :required => true %>
|
||||
<span class='font_lighter'>
|
||||
<span class='font_lighter' id="lastname_limit">
|
||||
<%= l(:field_lastname_eg) %>
|
||||
</span>
|
||||
<span id="valid_lastname"></span>
|
||||
</p>
|
||||
<p style="width:530px;padding-left: 54px;">
|
||||
<p style="width:530px;padding-left: 53px;">
|
||||
<%= f.text_field :firstname, :size => 25, :required => true %>
|
||||
<span class='font_lighter'>
|
||||
<span class='font_lighter' id="firstname_limit">
|
||||
<%= l(:field_firstname_eg) %>
|
||||
</span>
|
||||
<span id="valid_firstname"></span>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
<span id='enterprise' style='display:none'>
|
||||
<p style="width:400px;padding-left: 40px;">
|
||||
<%= l(:label_company_name)%><span style="color: red"> *</span>
|
||||
<p style="width:400px;padding-left: 39px;">
|
||||
<%= l(:label_company_name)%><span style="color: #bb0000"> *</span>
|
||||
<%= text_field_tag :enterprise_name, @user.firstname %>
|
||||
<span id="valid_companyname"></span>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
|
@ -152,11 +200,16 @@
|
|||
|
||||
|
||||
<!-- added by Wen -->
|
||||
<p id="occupation_detail" style="padding-left: 26px; display: none">
|
||||
<p id="occupation_detail" style="padding-left: 24px; display: none">
|
||||
|
||||
<%= l(:field_occupation) %>
|
||||
<span class="required"> </span>
|
||||
<% if User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
|
||||
<% if User.current.user_extensions.nil? %>
|
||||
<input id="province" name="province" style="display: none" type="text" value="请单击选择省份及学校" readonly>
|
||||
<input id="occupation" name="occupation" style="display: none" type="text" value="" />
|
||||
<input id="occupation_name" type="text" style="display: none" readonly/>
|
||||
<% else %>
|
||||
<% if User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
|
||||
|
||||
<input id="province" name="province" style="display: none" type="text" value="请单击选择省份及学校" readonly>
|
||||
<input id="occupation" name="occupation" style="display: none" type="text" value="<%= @user.user_extensions.occupation %>" />
|
||||
|
@ -172,7 +225,7 @@
|
|||
<input id="occupation" name="occupation" type="text" style="display: none" value="<%= User.current.user_extensions.school.id %>"/>
|
||||
<input id="occupation_name" type="text" style="display: none" value="<%= User.current.user_extensions.school.name %>" readonly="true" style="background-color: #E2E2E2;"/>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<div id="WOpenWindow">
|
||||
|
@ -213,7 +266,7 @@
|
|||
|
||||
<!-- end -->
|
||||
|
||||
<p style="width:357px;padding-left: 26px;">
|
||||
<p style="width:357px;padding-left: 27px;">
|
||||
<%= f.text_field :mail, :required => true %>
|
||||
</p>
|
||||
|
||||
|
@ -222,14 +275,22 @@
|
|||
</p>
|
||||
|
||||
|
||||
|
||||
<% province = User.current.user_extensions.location %>
|
||||
<% city = User.current.user_extensions.location_city %>
|
||||
<% identity = User.current.user_extensions.identity %>
|
||||
<% occupation1 = User.current.user_extensions.occupation %>
|
||||
<% occupation = User.current.user_extensions.occupation %>
|
||||
<% title = User.current.user_extensions.technical_title %>
|
||||
<% language = User.current.language %>
|
||||
<% if !User.current.user_extensions.nil? %>
|
||||
<% province = User.current.user_extensions.location %>
|
||||
<% city = User.current.user_extensions.location_city %>
|
||||
<% identity = User.current.user_extensions.identity %>
|
||||
<% occupation1 = User.current.user_extensions.occupation %>
|
||||
<% occupation = User.current.user_extensions.occupation %>
|
||||
<% title = User.current.user_extensions.technical_title %>
|
||||
<% language = User.current.language %>
|
||||
<% else %>
|
||||
<% province = "湖南省" %>
|
||||
<% city = "长沙"%>
|
||||
<% identity = ""%>
|
||||
<% occupation1 = ""%>
|
||||
<% title = "" %>
|
||||
<% language = ""%>
|
||||
<% end %>
|
||||
<script type="text/javascript" language="javascript">
|
||||
$().ready(function () {
|
||||
var province = "<%= "#{province}" %>"
|
||||
|
@ -245,7 +306,7 @@
|
|||
});
|
||||
</script>
|
||||
|
||||
<p style="width:400px;padding-left: 58px;"><%= l(:label_location) %>
|
||||
<p style="width:400px;padding-left: 57px;"><label style="margin-right: 5px;"><%= l(:label_location) %></label>
|
||||
<select onchange="showcity(this.value, document.getElementById('userCity'));" name="province" id="userProvince" class="location">
|
||||
<option value="">--请选择省份--</option>
|
||||
<option value="北京">北京</option>
|
||||
|
@ -648,7 +709,7 @@
|
|||
$('#name').show()
|
||||
$('#enterprise').hide()
|
||||
$('#gender').show()
|
||||
$('#occupation_detail').show()
|
||||
$('#occupation_detail').hide()
|
||||
var technical_titleOptions = new Array(
|
||||
"<%= l(:label_technicl_title_professor) %>", "<%= l(:label_technicl_title_associate_professor) %>", "<%= l(:label_technicl_title_lecturer) %>", "<%= l(:label_technicl_title_teaching_assistant) %>");
|
||||
|
||||
|
|
|
@ -11,11 +11,13 @@
|
|||
</ul>
|
||||
</div>
|
||||
-->
|
||||
<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',
|
||||
:action => 'index',
|
||||
:set_filter => 1,
|
||||
:assigned_to_id => 'me',
|
||||
:sort => 'priority:desc,updated_on:desc' %></p>
|
||||
<p class="small">
|
||||
<%#= link_to l(:label_issue_view_all), :controller => 'issues',
|
||||
:action => 'index',
|
||||
:set_filter => 1,
|
||||
:assigned_to_id => 'me',
|
||||
:sort => 'priority:desc,updated_on:desc' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<% reported_issues = issuesreportedbyme_items %>
|
||||
<%= render :partial => 'issues/list_simple', :locals => { :issues => reported_issues } %>
|
||||
<% if reported_issues.length > 0 %>
|
||||
<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',
|
||||
<p class="small"><%#= link_to l(:label_issue_view_all), :controller => 'issues',
|
||||
:action => 'index',
|
||||
:set_filter => 1,
|
||||
:status_id => '*',
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %>
|
||||
<% if watched_issues.length > 0 %>
|
||||
<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',
|
||||
<p class="small"><%#= link_to l(:label_issue_view_all), :controller => 'issues',
|
||||
:action => 'index',
|
||||
:set_filter => 1,
|
||||
:watcher_id => 'me',
|
||||
|
|
|
@ -74,10 +74,10 @@
|
|||
<%= labelled_form_for @news, :url => course_news_index_path(@course),
|
||||
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
||||
<%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
|
||||
<%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>
|
||||
<%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'ButtonColor m3p10' %>
|
||||
<%#= preview_link preview_news_path, 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'whiteButton m3p10' %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'ButtonColor m3p10' %>
|
||||
<% end if @course %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
</div>
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
<%= form_tag({:action => 'edit'}) do %>
|
||||
|
||||
<div class="box tabular settings">
|
||||
<p><%= setting_text_field :app_title, :size => 30 %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_text_field :app_title, :size => 30 %></p>
|
||||
|
||||
<p><%= setting_text_area :welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_text_area :welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p>
|
||||
<%= wikitoolbar_for 'settings_welcome_text' %>
|
||||
|
||||
<p><%= setting_text_field :attachment_max_size, :size => 6 %> <%= l(:"number.human.storage_units.units.kb") %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_text_field :attachment_max_size, :size => 6 %> <%= l(:"number.human.storage_units.units.kb") %></p>
|
||||
|
||||
<p><%= setting_text_field :per_page_options, :size => 20 %>
|
||||
<p style="padding-left: 180px;"><%= setting_text_field :per_page_options, :size => 20 %>
|
||||
<em class="info"><%= l(:text_comma_separated) %></em></p>
|
||||
|
||||
<p><%= setting_text_field :activity_days_default, :size => 6 %> <%= l(:label_day_plural) %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_text_field :activity_days_default, :size => 6 %> <%= l(:label_day_plural) %></p>
|
||||
|
||||
<p><%= setting_text_field :host_name, :size => 60 %>
|
||||
<p style="padding-left: 180px;"><%= setting_text_field :host_name, :size => 60 %>
|
||||
<em class="info"><%= l(:label_example) %>: <%= @guessed_host_and_path %></em></p>
|
||||
|
||||
<p><%= setting_select :protocol, [['HTTP', 'http'], ['HTTPS', 'https']] %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_select :protocol, [['HTTP', 'http'], ['HTTPS', 'https']] %></p>
|
||||
|
||||
<p><%= setting_select :text_formatting, Redmine::WikiFormatting.format_names.collect{|name| [name, name.to_s]}, :blank => :label_none %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_select :text_formatting, Redmine::WikiFormatting.format_names.collect{|name| [name, name.to_s]}, :blank => :label_none %></p>
|
||||
|
||||
<p><%= setting_check_box :cache_formatted_text %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_check_box :cache_formatted_text %></p>
|
||||
|
||||
<p><%= setting_select :wiki_compression, [['Gzip', 'gzip']], :blank => :label_none %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_select :wiki_compression, [['Gzip', 'gzip']], :blank => :label_none %></p>
|
||||
|
||||
<p><%= setting_text_field :feeds_limit, :size => 6 %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_text_field :feeds_limit, :size => 6 %></p>
|
||||
|
||||
<p><%= setting_text_field :file_max_size_displayed, :size => 6 %> <%= l(:"number.human.storage_units.units.kb") %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_text_field :file_max_size_displayed, :size => 6 %> <%= l(:"number.human.storage_units.units.kb") %></p>
|
||||
|
||||
<p><%= setting_text_field :diff_max_lines_displayed, :size => 6 %></p>
|
||||
<p style="padding-left: 180px;"><%= setting_text_field :diff_max_lines_displayed, :size => 6 %></p>
|
||||
|
||||
<p><%= setting_text_field :repositories_encodings, :size => 60 %>
|
||||
<p style="padding-left: 180px;"><%= setting_text_field :repositories_encodings, :size => 60 %>
|
||||
<em class="info"><%= l(:text_comma_separated) %></em></p>
|
||||
|
||||
<%= call_hook(:view_settings_general_form) %>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<%= form_tag({:action => 'edit', :tab => 'notifications'}) do %>
|
||||
|
||||
<div class="box tabular settings">
|
||||
<p><%= setting_text_field :mail_from, :size => 60 %></p>
|
||||
<p><%= setting_text_field :mail_from, :size => 50 %></p>
|
||||
|
||||
<p><%= setting_check_box :bcc_recipients %></p>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div class="cb">
|
||||
<span style=""><%= result.filename %></span>
|
||||
<span style="margin-left: 4px;">
|
||||
<%= link_to_attachment result, {:download => true, :text => image_tag("/images/button/dl.png", width: "70px", alt: l(:button_download), :class => 'download_icon')}%>
|
||||
<%= link_to_attachment result, { :text => image_tag("/images/button/dl.png", width: "70px", alt: l(:button_download), :class => 'download_icon')}%>
|
||||
</span>
|
||||
</div>
|
||||
<%= result.description %>
|
||||
|
|
|
@ -76,8 +76,9 @@
|
|||
<%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
|
||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<%= f.submit l(:button_project_tags_add),:class => "small" %>
|
||||
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%>
|
||||
<%= f.submit l(:button_project_tags_add),:class => "ButtonAddTags" %>
|
||||
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();',:class=>'ButtonColor'%>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
<span class="font_lighter">
|
||||
<%= l(:label_i_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
|
@ -117,7 +117,7 @@
|
|||
<span class="font_lighter">
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<%= f.text_field :name, :maxlength => 60, :required => true %>
|
||||
</p>
|
||||
<p style="margin-left:-20px;">
|
||||
<%= f.text_field :description, :maxlength => 100, :style => "margin-left:10px;" %>
|
||||
<%= f.text_field :description, :maxlength => 60, :style => "margin-left:10px;" %>
|
||||
</p>
|
||||
<p style="margin-left:-20px;">
|
||||
<span style="margin-left:10px;">
|
||||
|
@ -15,7 +15,7 @@
|
|||
</p>
|
||||
<p style="margin-left:-20px;">
|
||||
<span style="margin-left:10px;">
|
||||
<%= f.text_field :wiki_page_title, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
|
||||
<%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
|
||||
</span>
|
||||
</p>
|
||||
<p style="margin-left:-20px;">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% course_list.map do |course| %>
|
||||
<li class='<%= cycle("odd", "even") %>' title=<%= course.description.to_s.gsub(/<\/?.*?>/,"") %>>
|
||||
<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") %>
|
||||
</div>
|
||||
|
@ -9,11 +9,11 @@
|
|||
<% unless course.is_public == 1 %>
|
||||
<span class="private_project"><%= l(:label_private) %></span>
|
||||
<% end %>
|
||||
<%= link_to(course.name.truncate(30, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||
<%= link_to(course.name.truncate(25, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||
|
||||
</span>
|
||||
<span class='font_bolder'>
|
||||
<%= link_to(course.try(:teacher).try(:realname), user_path(course.teacher)) %>
|
||||
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
||||
<%#=course.try(:teacher).try(:name)%>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -246,8 +246,11 @@ zh:
|
|||
field_summary: 摘要
|
||||
field_is_required: 必填
|
||||
field_firstname: 名字
|
||||
firstname_empty: 名字不能为空
|
||||
field_firstname_eg: '(例:张三丰,请填写[三丰])'
|
||||
field_lastname: 姓氏
|
||||
lastname_empty: 姓氏不能为空
|
||||
enterprise_empty: 企业名不能为空
|
||||
field_lastname_eg: '(例:张三丰,请填写[张])'
|
||||
field_mail: 邮件地址
|
||||
field_filename: 文件
|
||||
|
@ -299,7 +302,7 @@ zh:
|
|||
field_effective_date: 日期
|
||||
field_password: 密码
|
||||
field_new_password: 新密码
|
||||
field_password_confirmation: 确认
|
||||
field_password_confirmation: 密码确认
|
||||
field_version: 版本
|
||||
field_type: 类型
|
||||
field_host: 主机
|
||||
|
@ -1595,8 +1598,9 @@ zh:
|
|||
label_tags_user_mail: 用户邮箱:
|
||||
label_tags_user_name: 用户名:
|
||||
label_tags_numbers: Tag统计:
|
||||
label_max_number: 登录名是在网站中显示的您的公开标识,至多25个字符。
|
||||
label_mail_attention: qq邮箱可能收不到此邮件,其他邮箱如果没有收到可能在垃圾邮件中,其中gmail与教育网邮箱的激活邮件有时比较慢,请耐心等待。
|
||||
label_max_number: 登录名是在网站中显示的您的公开标识,只能为英文。
|
||||
label_mail_attention: qq邮箱可能收不到此邮件,其他邮箱如果没有收到可能在垃圾邮件中,
|
||||
label_mail_attention1: 其中gmail与教育网邮箱的激活邮件有时比较慢,请耐心等待。
|
||||
label_your_course: 您的课程《
|
||||
label_have_message : 》有新的留言
|
||||
label_all_revisions: 所有版本:
|
||||
|
@ -1872,7 +1876,7 @@ zh:
|
|||
label_account_identity_teacher: 教师
|
||||
label_account_identity_student: 学生
|
||||
label_account_identity_developer: 开发者
|
||||
label_account_identity_enterprise: 企业
|
||||
label_account_identity_enterprise: 组织
|
||||
label_account_identity_choose: --请选择身份--
|
||||
label_teaching_course: 我执教的课程
|
||||
label_release_homework: 我发布的作业
|
||||
|
@ -2056,7 +2060,7 @@ zh:
|
|||
label_contest_work_list: 参赛作品列表
|
||||
label_attending_contest: 我要参赛
|
||||
label_contest_notification: 竞赛通知
|
||||
label_company_name: 企业名
|
||||
label_company_name: 组织名
|
||||
|
||||
label_coursefile_sharingarea: 课程资源共享区
|
||||
label_sort_by_activity: 按动态数排序
|
||||
|
@ -2134,6 +2138,7 @@ zh:
|
|||
label_notification: 通知公告
|
||||
label_course_ad_description: 课程模块正在优化中,使用过程中如有问题请您与我们联系,感谢大家的支持!
|
||||
label_course_adcolick: 请点击:
|
||||
label_coursejoin_tip: 提示:加入课程才有权限查看或提交作业,“加入”按钮见课程图标右侧!
|
||||
#end
|
||||
|
||||
#end
|
||||
|
@ -2197,3 +2202,4 @@ zh:
|
|||
label_submit_comments: 提交评论
|
||||
field_evaluation_num: 匿评分配数量
|
||||
label_my_score: 我的评分
|
||||
field_open_anonymous_evaluation: 是否开启匿评
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class AddOpenAnonymousEvaluation < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :bids, :open_anonymous_evaluation, :integer, default: 1
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :bids, :open_anonymous_evaluation
|
||||
end
|
||||
end
|
16
db/schema.rb
16
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20141120091234) do
|
||||
ActiveRecord::Schema.define(:version => 20141119011439) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -52,7 +52,6 @@ ActiveRecord::Schema.define(:version => 20141120091234) do
|
|||
t.string "disk_directory"
|
||||
t.integer "attachtype", :default => 1
|
||||
t.integer "is_public", :default => 1
|
||||
t.integer "copy_from"
|
||||
end
|
||||
|
||||
add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id"
|
||||
|
@ -96,21 +95,22 @@ ActiveRecord::Schema.define(:version => 20141120091234) do
|
|||
|
||||
create_table "bids", :force => true do |t|
|
||||
t.string "name"
|
||||
t.string "budget", :null => false
|
||||
t.string "budget", :null => false
|
||||
t.integer "author_id"
|
||||
t.date "deadline"
|
||||
t.text "description"
|
||||
t.datetime "created_on", :null => false
|
||||
t.datetime "updated_on", :null => false
|
||||
t.datetime "created_on", :null => false
|
||||
t.datetime "updated_on", :null => false
|
||||
t.integer "commit"
|
||||
t.integer "reward_type"
|
||||
t.integer "homework_type"
|
||||
t.integer "parent_id"
|
||||
t.string "password"
|
||||
t.integer "is_evaluation"
|
||||
t.integer "proportion", :default => 60
|
||||
t.integer "comment_status", :default => 0
|
||||
t.integer "evaluation_num", :default => 3
|
||||
t.integer "proportion", :default => 60
|
||||
t.integer "comment_status", :default => 0
|
||||
t.integer "evaluation_num", :default => 3
|
||||
t.integer "open_anonymous_evaluation", :default => 1
|
||||
end
|
||||
|
||||
create_table "boards", :force => true do |t|
|
||||
|
|
|
@ -12,7 +12,8 @@ h4 {border-bottom: 1px dotted #bbb;}
|
|||
.course_ad{
|
||||
position:absolute;
|
||||
visibility:visible;
|
||||
background:#ffffff
|
||||
background:#ffffff;
|
||||
width:14%;
|
||||
}
|
||||
|
||||
.ad_title{
|
||||
|
@ -1276,7 +1277,7 @@ input#openid_url { background: url(../images/openid-bg.gif) no-repeat; backgroun
|
|||
.clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||
|
||||
/***** Links *****/
|
||||
a, a:link, a:visited{ color: #169; text-decoration: none; }
|
||||
a, a:link, a:visited{ color: #169 ; text-decoration: none; }
|
||||
a:hover, a:active{ color: #c61a1a; text-decoration: underline;}
|
||||
a img{ border: 0; }
|
||||
|
||||
|
@ -1579,13 +1580,15 @@ form {display: inline;}
|
|||
/*added by bai*/
|
||||
input[type="submit"].bid_btn {
|
||||
padding-bottom: 5px;
|
||||
width: 55px;
|
||||
width: 50px;
|
||||
height: 25px;
|
||||
text-align: center;
|
||||
font-family: '微软雅黑', Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
padding: 0px;
|
||||
padding: 8px;
|
||||
background: #15bccf;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #15bccf;
|
||||
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;
|
||||
|
@ -1593,6 +1596,25 @@ input[type="submit"].bid_btn {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
input[type="submit"].ButtonAddTags {
|
||||
color: #fffbff ;
|
||||
padding-bottom:5px ;
|
||||
width:auto ;
|
||||
height: 25px ;
|
||||
font-family: '微软雅黑',Arial,Helvetica,sans-serif ;
|
||||
font-size: 15px ;
|
||||
font-weight: normal;
|
||||
text-align: center ;
|
||||
margin:0 auto;
|
||||
border-radius: 0px !important;
|
||||
background: #15bccf;
|
||||
border: 0px solid #15bccf !important;
|
||||
position: relative;
|
||||
top:3px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
input[type="button"].bid_btn {
|
||||
/*padding-bottom: 5px;*/
|
||||
width: 55px;
|
||||
|
@ -1602,6 +1624,7 @@ input[type="button"].bid_btn {
|
|||
color: #fff;
|
||||
padding: 0px;
|
||||
background: #15bccf;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #15bccf;
|
||||
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset;
|
||||
|
@ -1655,8 +1678,8 @@ div.issue table.attributes td {width:28%;}
|
|||
#relations td.buttons {padding:0;}
|
||||
|
||||
fieldset.collapsible { border-width: 1px 0 0 0; font-size: 0.9em; }
|
||||
fieldset.collapsible>legend { padding-left: 16px; background: url(../images/arrow_expanded.png) no-repeat 0% 40%; cursor:pointer; }
|
||||
fieldset.collapsible.collapsed>legend { background-image: url(../images/arrow_collapsed.png); }
|
||||
fieldset.collapsible>legend { padding-left: 16px; background:url(../images/arrow_collapsed.png) no-repeat 0% 40%; cursor:pointer; }
|
||||
fieldset.collapsible.collapsed>legend { background-image: url(../images/arrow_expanded.png); }
|
||||
|
||||
fieldset#date-range p { margin: 2px 0 2px 0; }
|
||||
fieldset#filters table { border-collapse: collapse; }
|
||||
|
@ -1890,7 +1913,7 @@ input#time_entry_comments { width: 90%;}
|
|||
|
||||
.tabular.settings p{ padding-left: 300px; }
|
||||
.tabular.settings label{ margin-left: -300px; width: 295px; }
|
||||
.tabular.settings textarea { width: 99%; }
|
||||
.tabular.settings textarea { width: 85%; }
|
||||
|
||||
.settings.enabled_scm table {width:100%}
|
||||
.settings.enabled_scm td.scm_name{ font-weight: bold; }
|
||||
|
@ -1898,7 +1921,8 @@ input#time_entry_comments { width: 90%;}
|
|||
fieldset.settings label { display: block; }
|
||||
fieldset#notified_events .parent { padding-left: 20px; }
|
||||
|
||||
span.required {color: #bb0000;}
|
||||
span.required {color: #bb0000; margin-right: 2px;}
|
||||
|
||||
.summary {font-style: italic;}
|
||||
|
||||
#attachments_fields input.description {margin-left:4px; width:100px; }
|
||||
|
@ -2178,7 +2202,7 @@ button.tab-right {
|
|||
padding-bottom: 2px;
|
||||
text-align: center;
|
||||
border: 1px solid #15BCCF;
|
||||
/*border-bottom: 0px solid #15BCCF;*/
|
||||
border-bottom: 0px solid #15BCCF;
|
||||
|
||||
color:#606060;
|
||||
font-weight:bold;
|
||||
|
|
|
@ -69,7 +69,7 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
|
|||
|
||||
|
||||
/****评分弹框****/
|
||||
.alert_box {width:488px;height:550px;position:absolute;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; }
|
||||
.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; }
|
||||
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}
|
||||
.alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
|
||||
|
||||
|
@ -143,7 +143,7 @@ a:hover.tijiao{ background:#0f99a9 !important;}
|
|||
.N_search{ height:20px !important; border:1px solid #999 !important;}
|
||||
|
||||
/* 匿名评分弹框 */
|
||||
.alert_praise{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_praise{width:480px;height:200px;position:fixed;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;}
|
||||
|
|
|
@ -15,7 +15,7 @@ span[id^=valid_user] {
|
|||
}
|
||||
|
||||
.red {
|
||||
color: red;
|
||||
color: red;margin-right: 10px;text-align: right;
|
||||
}
|
||||
|
||||
.green {
|
||||
|
@ -474,6 +474,21 @@ body {
|
|||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
input[class~='ButtonClolr'],.ButtonColor{
|
||||
|
||||
color: #fffbff !important;
|
||||
padding: 5px;
|
||||
width: auto;
|
||||
height: 24px ;
|
||||
font-family: '微软雅黑',Arial,Helvetica,sans-serif;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
padding: 0px;
|
||||
background: #15bccf !important;
|
||||
border: 0px solid #15bccf ;
|
||||
display:inline-block
|
||||
}
|
||||
|
||||
|
||||
input[class~='whiteButton'], .whiteButton {
|
||||
-moz-box-shadow: inset 0px 1px 0px 0px #ffffff;
|
||||
|
@ -493,9 +508,9 @@ input[class~='whiteButton'], .whiteButton {
|
|||
border: 1px solid #dcdcdc;
|
||||
display: inline-block;
|
||||
color: #666666;
|
||||
color: #116699;
|
||||
color: #fffbff;
|
||||
font-family: arial;
|
||||
font-size: 15px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding: 6px 24px;
|
||||
/*padding:3px 10px;*/
|
||||
|
@ -513,13 +528,14 @@ input[class~='whiteButton']:hover, .whiteButton:hover {
|
|||
background: linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f6f6f6', endColorstr = '#ffffff', GradientType = 0);
|
||||
text-decoration: none;
|
||||
background-color: #f6f6f6;
|
||||
background-color: #09bbff;
|
||||
}
|
||||
|
||||
input[class~='whiteButton']:active, .whiteButton:active {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
text-decoration: none;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
input[class~='m3p10'], .m3p10 {
|
||||
|
@ -527,6 +543,7 @@ input[class~='m3p10'], .m3p10 {
|
|||
padding: 3px 10px;
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
input[class~='h30'], .h30 {
|
||||
|
@ -632,14 +649,14 @@ input[class='nyan-clean-gray']:active, .nyan-clean-gray:active {
|
|||
}
|
||||
|
||||
.tools a:visited {
|
||||
color: #116699;
|
||||
color: #fffbff;
|
||||
text-decoration: none;
|
||||
padding: 3px 5px 0px 5px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.tools a:hover {
|
||||
color: white;
|
||||
color: #fffbff;
|
||||
padding: 3px 3px 0px 20px;
|
||||
width: 88px;
|
||||
text-decoration: none;
|
||||
|
|
Loading…
Reference in New Issue