Conflicts:
	public/stylesheets/application.css

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-11-19 17:30:53 +08:00
commit 972b788687
25 changed files with 227 additions and 125 deletions

View File

@ -7,6 +7,7 @@ class BidsController < ApplicationController
menu_item :project, :only => [:show_project,:show_results, :new_submit_homework] menu_item :project, :only => [:show_project,:show_results, :new_submit_homework]
menu_item :homework_respond, :only => :homework_respond menu_item :homework_respond, :only => :homework_respond
menu_item :homework_statistics, :only => :homework_statistics menu_item :homework_statistics, :only => :homework_statistics
menu_item :edit, :only => :edit
before_filter :can_show_course,only: [] before_filter :can_show_course,only: []
before_filter :can_show_contest,only: [] before_filter :can_show_contest,only: []

View File

@ -8,7 +8,7 @@ class CoursesController < ApplicationController
menu_item :overview menu_item :overview
menu_item :feedback, :only => :feedback menu_item :feedback, :only => :feedback
menu_item :homework, :only => :homework menu_item :homework, :only => :homework
menu_item :new_homework menu_item :new_homework, :only => :new_homework
menu_item l(:label_sort_by_time), :only => :index menu_item l(:label_sort_by_time), :only => :index
menu_item l(:label_sort_by_active), :only => :index menu_item l(:label_sort_by_active), :only => :index
@ -271,7 +271,6 @@ class CoursesController < ApplicationController
@issue_custom_fields = IssueCustomField.sorted.all @issue_custom_fields = IssueCustomField.sorted.all
@trackers = Tracker.sorted.all @trackers = Tracker.sorted.all
if User.current.user_extensions.identity == 0
if @course.save if @course.save
#unless User.current.admin? #unless User.current.admin?
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
@ -307,8 +306,6 @@ class CoursesController < ApplicationController
end end
end end
end
def course def course
@school_id = params[:school_id] @school_id = params[:school_id]
per_page_option = 10 per_page_option = 10

View File

@ -106,7 +106,7 @@ class HomeworkAttachController < ApplicationController
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = #{User.current.id}) AS m_score (SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = #{User.current.id}) AS m_score
FROM homework_attaches FROM homework_attaches
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id} ORDER BY s_score DESC") WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id} ORDER BY m_score DESC")
@cur_page = params[:page] || 1 @cur_page = params[:page] || 1
@cur_type = 4 @cur_type = 4
@homework_list = paginateHelper all_homework_list,10 @homework_list = paginateHelper all_homework_list,10

View File

@ -72,7 +72,7 @@ class ZipdownController < ApplicationController
homeattach.attachments.each do |attach| homeattach.attachments.each do |attach|
homeworks_attach_path << attach.diskfile#.to_s.slice((length+1)..-1) homeworks_attach_path << attach.diskfile#.to_s.slice((length+1)..-1)
end end
zipping("#{Time.now.to_i.to_s}_#{homeattach.user.name}_#{homeattach.user.user_extensions.student_id}.zip", homeworks_attach_path, OUTPUT_FOLDER, true) zipping("#{homeattach.user.lastname}#{homeattach.user.firstname}_#{homeattach.user.user_extensions.student_id}_#{Time.now.to_i.to_s}.zip", homeworks_attach_path, OUTPUT_FOLDER, true)
end end

View File

@ -97,7 +97,7 @@ module WatchersHelper
return '' unless user && user.logged? return '' unless user && user.logged?
# modify by nwb # 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) joined = user.member_of_course?(course)
text = joined ? l(:label_exit_course) : l(:label_new_join) text = joined ? l(:label_exit_course) : l(:label_new_join)
url_t = join_path(:object_id => course.id) url_t = join_path(:object_id => course.id)

View File

@ -0,0 +1,55 @@
<div id="floatpoint" class="course_ad" >
<table border=0>
<tr>
<td align=center bgcolor=#15bccf >
<span class="ad_title"><%= l(:label_contact_us) %></span>
</td>
</tr>
<tr><td><p class="ad_content"><%= l(:label_course_ad_description) %></p></td></tr>
<tr>
<td align=center bgcolor="#ececec" >
<%= l(:label_course_adcolick) %><a href="http://user.trustie.net/users/12/user_newfeedback">黄井泉</a><br>
</td>
</tr>
<tr>
<td align=center bgcolor="#ececec" >
Tel:15388083362<br>
</td>
<tr>
<td align=center bgcolor="#ececec" >
<%= l(:label_course_adcolick) %><a href="http://user.trustie.net/users/6/user_newfeedback">王林春</a><br>
</td>
</tr>
<tr>
<td align=center bgcolor="#ececec" >
Tel:13467631747<br>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var xstep=1; // 移动步长此参数越小移动越平滑最小值为1
var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快
var YY=0;
var screen_height = $(window).height(); //浏览器当前窗口文档的高度
var screen_width = $(window).width(); //浏览器当前窗口文档的宽度
window.setInterval(function(){move();},delay_time);
function move()
{
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("top",YY);
}
function change_size(){var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10);}
$(document).ready(function(){change_size();});
$(window).resize(function(){screen_width = $(window).width();change_size();});
</script>

View File

@ -5,10 +5,11 @@
</style> </style>
<%= javascript_include_tag 'attachments' %> <%= javascript_include_tag 'attachments' %>
<!-- fq --> <!-- fq -->
<!--modified by huang-->
<div class="content-title-top"> <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))%> <% 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') %> <%= 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 %> <% end %>
</div> </div>
<div id="bid-show"> <div id="bid-show">

View File

@ -1,3 +1,4 @@
<% if @events_by_day != nil && @events_by_day.size >0 %> <% if @events_by_day != nil && @events_by_day.size >0 %>
<div class="content-title-top-avtive"> <div class="content-title-top-avtive">
<p class="subtitle"> <p class="subtitle">
@ -98,8 +99,6 @@
</table> </table>
</div> </div>
<% end %> <% end %>
</div> </div>
<%else%> <%else%>
<div class="font_description"> <div class="font_description">

View File

@ -13,7 +13,37 @@
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %> <%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %>
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @course) %> <%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @course) %>
<p></p> <p></p>
<div id="upload_file_div" class="relation_file_div hidden">
<%= render :partial => 'course_new', locals: {course: @course} %>
</div>
<div id="relation_file_div" class="relation_file_div hidden">
<fieldset>
<legend>搜索</legend>
<%= form_tag(
attachments_autocomplete_path(:format => 'js'),
:remote => true,
:method => :post) do %>
<%= label_tag(:attach_search, "按关键字搜索:") %>
<%= text_field_tag(:attach_search) %>
<%#= submit_tag("Search") %>
<% end -%>
<%= form_tag course_attach_relation_path(:format => 'js'),
method: :post,
remote: true,
id: "relation_file_form",
:class => 'hidden' do %>
<%= hidden_field_tag(:class_name, 'course') %>
<%= hidden_field_tag(:class_id, params[:course_id]) %>
<div id="relation_file">
</div>
<div class="kclearfix" style='margin-top: 10px;'>
<%= submit_tag(l(:button_add)) -%>
</div>
<% end -%>
</fieldset>
<div class="line_under" style="margin:20px 0px;"></div>
</div>
</div> </div>
<div class="box" id="files-box"> <div class="box" id="files-box">

View File

@ -20,28 +20,6 @@
<% end %> <% end %>
<div class="line_under" style="margin:20px 0px;"></div> <div class="line_under" style="margin:20px 0px;"></div>
<fieldset>
<legend><%=l(:label_attachment_new)%></legend>
<% attachmenttypes = course.attachmenttypes %>
<%= error_messages_for 'attachment' %>
<%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form", :class => "tabular") do %>
<p>
<% if attachmenttypes.any? %>
<%= l(:attachment_type) %></label>
<%= select_tag "attachment_type",
options_from_collection_for_select(attachmenttypes, "id",
"typeName", 2), {style: 'width:100px'} %>
<% end %>
</p>
<p><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
<%= submit_tag l(:button_add) %>
<% end %>
</fieldset>
<script type='text/javascript'> <script type='text/javascript'>
function tagAddClick(id,objId,objTag) function tagAddClick(id,objId,objTag)
{ {

View File

@ -38,7 +38,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="debug"> <div class="debug">
<%= debug(params) if Rails.env.development? %> <%= debug(params) if Rails.env.development? %>
<div class="hidden"> <div class="hidden">
@ -56,56 +55,3 @@
</div> </div>
</div> </div>
<!--add by huang-->
<% cache "footer" do %>
<div class="clearfix"></div>
<div id="footer" style="margin-left:-5px;padding-top: 20px;clear: both;font-size: 12px;">
<div style="border-top:solid 1px #C6E9F1;"></div>
<div class="base_footer">
<div align="center">
<!--gcm-->
<p>
<span><%=l(:label_organizers)%></span>
<span class="footer_text_link"><%= link_to l(:label_organizers_information),"http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%></span>
<span class="footer_text_link"><%= link_to l(:label_organizers_information_institute), "http://www.nudt.edu.cn/ArticleShow.asp?ID=41", :target => "_blank" %></span>
<span id="copyright"><%=l(:label_copyright)%>©2007~2014</span>
<span id="contact_us" class="footer_text_link"><%= link_to l(:label_contact_us),"http://" + Setting.host_name + "/projects/2/member", :target=>"_blank" %></span>
<span id="record"class="footer_text_link"><%= link_to l(:label_record),"http://www.miibeian.gov.cn/", :target => "_blank" %></span>
</p>
<div id="logo_link">
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/nudt.png',:size=>'100x30',:alt=>"国防科学技术大学计算机学院"),"http://www.nudt.edu.cn/special.asp?classid=12", :target => "_blank" %></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>"北京大学信息科学技术学院软件研究所"), "http://eecs.pku.edu.cn", :target => "_blank" %></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/buaa_scse.png',:size=>'100x30',:alt=>"北京航空航天大学计算机学院"), "http://scse.buaa.edu.cn/", :target => "_blank" %></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/iscas.png',:size=>'100x30',:alt=>"中国科学院软件研究所"), "http://www.iscas.ac.cn", :target => "_blank" %></span>
<span class="footer_logo_link"><%= link_to image_tag('/images/footer_logo/inforbus.png',:size=>'100x30',:alt=>"山东中创软件商用中间件股份有限公司"), "http://www.inforbus.com", :target => "_blank" %></span>
</div>
<!--gcm-->
</div>
</div>
</div>
</div>
<div class="debug hidden">
<%= debug(params) if Rails.env.development? %>
</div>
<div class="hidden">
<script src="http://s4.cnzz.com/z_stat.php?id=1000482288&web_id=1000482288" language="JavaScript">
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46523987-1', 'trustie.net');
ga('send', 'pageview');
</script>
</div>
<% end %>

View File

@ -74,13 +74,13 @@
<script type="text/javascript"> <script type="text/javascript">
function setMessageCount () { function setMessageCount () {
var mes = $('#loggedas .my-message') var mes = $('#loggedas .my-message');
mes.html(mes.html()+ '(' + <%=User.current.count_new_jour.to_s%> + ")") mes.html(mes.html()+ '(' + <%=User.current.count_new_jour.to_s%> + ")");
} }
function addSlipMenu () { function addSlipMenu () {
var loggedas = $('#loggedas ul li:first') var loggedas = $('#loggedas ul li:first');
var sub_menu = $('.sub_menu') var sub_menu = $('.sub_menu');
loggedas.mouseenter(function(event) { loggedas.mouseenter(function(event) {
sub_menu.show(); sub_menu.show();
}); });
@ -90,9 +90,9 @@
} }
function addProjectSlipMenu () { function addProjectSlipMenu () {
var loggedas = $('#project_loggedas_li') var loggedas = $('#project_loggedas_li');
var project_sub_menu = $('.project_sub_menu') var project_sub_menu = $('.project_sub_menu');
var course_sub_menu = $('.course_sub_menu') var course_sub_menu = $('.course_sub_menu');
loggedas.mouseenter(function(event) { loggedas.mouseenter(function(event) {
course_sub_menu.hide(); course_sub_menu.hide();
project_sub_menu.show(); project_sub_menu.show();
@ -102,9 +102,9 @@
}); });
} }
function addCourseSlipMenu () { function addCourseSlipMenu () {
var loggedas = $('#course_loggedas_li') var loggedas = $('#course_loggedas_li');
var project_sub_menu = $('.project_sub_menu') var project_sub_menu = $('.project_sub_menu');
var course_sub_menu = $('.course_sub_menu') var course_sub_menu = $('.course_sub_menu');
loggedas.mouseenter(function(event) { loggedas.mouseenter(function(event) {
project_sub_menu.hide(); project_sub_menu.hide();
course_sub_menu.show(); course_sub_menu.show();
@ -114,6 +114,18 @@
}); });
} }
function homeworkSlipMenuOver(id)
{
$('.project_sub_menu').hide();
$('#course_loggedas_li').show();
$("#homework_loggedas_ul_" + id).show();
}
function homeworkSlipMenuOut(id)
{
$("#homework_loggedas_ul_" + id).hide();
}
$(document).ready(function () { $(document).ready(function () {
addSlipMenu(); addSlipMenu();
addProjectSlipMenu (); addProjectSlipMenu ();

View File

@ -67,11 +67,18 @@ end
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%=User.current%> <b class="caret"></b></a> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><%=User.current%> <b class="caret"></b></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li> <li>
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.user_domain }, {:class => 'my-message'} if User.current.logged? -%></li> <%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.user_domain }, {:class => 'my-message'} if User.current.logged? -%>
<li><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %></li> </li>
<li><%=link_to l(:label_my_projects),{:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %></li> <li>
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %>
</li>
<li>
<%=link_to l(:label_my_projects),{:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
</li>
<li class="divider"></li> <li class="divider"></li>
<li><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%></li> <li>
<%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%>
</li>
</ul> </ul>
</li> </li>
<%= bootstrap_render_menu :account_menu -%> <%= bootstrap_render_menu :account_menu -%>

View File

@ -2,11 +2,11 @@
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> <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), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
<ul class="course_sub_menu"> <ul class="course_sub_menu">
<% course_index = 0 %>
<% User.current.courses.each do |course| %> <% User.current.courses.each do |course| %>
<% if !course_endTime_timeout?(course) %> <% if !course_endTime_timeout?(course) %>
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=course.name%>"> <%= render :partial => 'layouts/user_homework_list', :locals => {:course => course,:course_index => course_index} %>
<%= link_to course.name, {:controller => 'courses',:action => 'show',id:course.id} %> <% course_index += 1 %>
</li>
<% end %> <% end %>
<% end %> <% end %>
</ul> </ul>

View File

@ -0,0 +1,12 @@
<% 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} %>
<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" %>
</li>
<% end %>
</ul>
</li>
<% end %>

View File

@ -24,6 +24,7 @@
</head> </head>
<!--add by huang--> <!--add by huang-->
<body class="<%= h body_css_classes %>"> <body class="<%= h body_css_classes %>">
<%= render :partial => 'courses/course_ad' %>
<div id="wrapper"> <div id="wrapper">
<div id="wrapper2"> <div id="wrapper2">
<div id="wrapper3"> <div id="wrapper3">
@ -272,7 +273,7 @@
<%= link_to l(:label_course_overview), course_path(@course), :class => link_class(:overview) %> <%= link_to l(:label_course_overview), course_path(@course), :class => link_class(:overview) %>
</li> </li>
<li> <li>
<%= link_to l(:label_homework), homework_course_path(@course), :class => link_class(:homework), :course_type => 1 %> <%= link_to l(:label_homework), homework_course_path(@course), :class => link_class([:homework,:new_homework,:edit]), :course_type => 1 %>
</li> </li>
<li> <li>
<%= link_to l(:label_course_file), course_files_path(@course), :class => link_class(:files) %> <%= link_to l(:label_course_file), course_files_path(@course), :class => link_class(:files) %>

View File

@ -74,10 +74,10 @@
<%= labelled_form_for @news, :url => course_news_index_path(@course), <%= labelled_form_for @news, :url => course_news_index_path(@course),
:html => {:id => 'news-form', :multipart => true} do |f| %> :html => {:id => 'news-form', :multipart => true} do |f| %>
<%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %> <%= 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'} %> <%#= 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 %> <% end if @course %>
<div id="preview" class="wiki"></div> <div id="preview" class="wiki"></div>
</div> </div>

View File

@ -58,10 +58,10 @@
$('.download_icon').find("a").attr("target", "_blank"); $('.download_icon').find("a").attr("target", "_blank");
$('.download_icon').each(function(){ $('.download_icon').each(function(){
$(this).mouseenter(function(event) { $(this).mouseenter(function(event) {
$(this).find('img').attr("src", "/images/button/download_focus.png") $(this).find('img').attr("src", "<%= path_to_image("/images/button/download_focus.png") %>")
}); });
$(this).mouseleave(function(event) { $(this).mouseleave(function(event) {
$(this).find('img').attr("src", "/images/button/download.png") $(this).find('img').attr("src", "<%= path_to_image("/images/button/download.png") %>")
}); });
}); });
if(navigator.appName=="Microsoft Internet Explorer"){ if(navigator.appName=="Microsoft Internet Explorer"){

View File

@ -8,12 +8,13 @@
<p class="font_description"> <p class="font_description">
<%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'courses',:action=>'index'}, :class => 'icon icon-add' %> <%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'courses',:action=>'index'}, :class => 'icon icon-add' %>
<%= link_to "#{l(:label_course_new)}", {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
</p> </p>
<% end %> <% end %>
<% else %> <% else %>
<div class="user_course_list menu-div"> <div class="user_course_list menu-div">
<div class="menu"> <div class="menu">
<%= link_to"#{l(:label_course_view_student)}",courses_path, :class => 'icon icon-add' %> <%= link_to "#{l(:label_course_new)}", new_course_path, class: 'icon icon-add' if @user == User.current %>
<ul> <ul>
<li mode='doing' class="on">进行中</li> <li mode='doing' class="on">进行中</li>
<li mode='end'>已完结</li> <li mode='end'>已完结</li>

View File

@ -2136,6 +2136,9 @@ zh:
label_record: 湘ICP备09019772 label_record: 湘ICP备09019772
label_check_comment: 查看通知评论 label_check_comment: 查看通知评论
label_notification: 通知公告 label_notification: 通知公告
label_course_ad_description: 课程模块正在优化中,使用过程中如有问题请您与我们联系,感谢大家的支持!
label_course_adcolick: 请点击:
label_coursejoin_tip: 提示:加入课程才有权限查看或提交作业,“加入”按钮见课程图标右侧!
#end #end
#end #end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20141103065703) do ActiveRecord::Schema.define(:version => 20141105012624) do
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
@ -108,6 +108,8 @@ ActiveRecord::Schema.define(:version => 20141103065703) do
t.string "password" t.string "password"
t.integer "is_evaluation" t.integer "is_evaluation"
t.integer "proportion", :default => 60 t.integer "proportion", :default => 60
t.integer "comment_status", :default => 0
t.integer "evaluation_num", :default => 3
end end
create_table "boards", :force => true do |t| create_table "boards", :force => true do |t|
@ -480,6 +482,13 @@ ActiveRecord::Schema.define(:version => 20141103065703) do
t.integer "project_id", :default => 0 t.integer "project_id", :default => 0
end end
create_table "homework_evaluations", :force => true do |t|
t.string "user_id"
t.string "homework_attach_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "homework_for_courses", :force => true do |t| create_table "homework_for_courses", :force => true do |t|
t.integer "course_id" t.integer "course_id"
t.integer "bid_id" t.integer "bid_id"

View File

@ -9,6 +9,22 @@ h4, .wiki h3 {font-size: 13px;}
h4 {border-bottom: 1px dotted #bbb;} h4 {border-bottom: 1px dotted #bbb;}
/*huang*/ /*huang*/
/*current position*/ /*current position*/
.course_ad{
position:absolute;
visibility:visible;
background:#ffffff;
width:14%;
}
.ad_title{
color: #FFFFFF;
font-weight: bold;
}
.ad_content{
text-indent: 2em;
}
.contest_count{ .contest_count{
width: 20%; width: 20%;
height: 60px; height: 60px;

View File

@ -15,7 +15,7 @@ span[id^=valid_user] {
} }
.red { .red {
color: red; color: red;margin-left: 10px;margin-right: 10px;text-align: right;
} }
.green { .green {
@ -474,6 +474,19 @@ body {
position: relative; position: relative;
top: 1px; top: 1px;
} }
input[class~='ButtonClolr'],.ButtonColor{
color: #fffbff !important;
padding-bottom: 5px;
width: 40px;
height: 20px;
font-family: '微软雅黑',Arial,Helvetica,sans-serif;
font-size: 15px;
padding: 0px;
background: #15bccf;
border: 1px solid #15bccf;
}
input[class~='whiteButton'], .whiteButton { input[class~='whiteButton'], .whiteButton {
-moz-box-shadow: inset 0px 1px 0px 0px #ffffff; -moz-box-shadow: inset 0px 1px 0px 0px #ffffff;
@ -493,9 +506,9 @@ input[class~='whiteButton'], .whiteButton {
border: 1px solid #dcdcdc; border: 1px solid #dcdcdc;
display: inline-block; display: inline-block;
color: #666666; color: #666666;
color: #116699; color: #fffbff;
font-family: arial; font-family: arial;
font-size: 15px; font-size: 20px;
font-weight: bold; font-weight: bold;
padding: 6px 24px; padding: 6px 24px;
/*padding:3px 10px;*/ /*padding:3px 10px;*/
@ -513,13 +526,14 @@ input[class~='whiteButton']:hover, .whiteButton:hover {
background: linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%); background: linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f6f6f6', endColorstr = '#ffffff', GradientType = 0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f6f6f6', endColorstr = '#ffffff', GradientType = 0);
text-decoration: none; text-decoration: none;
background-color: #f6f6f6; background-color: #09bbff;
} }
input[class~='whiteButton']:active, .whiteButton:active { input[class~='whiteButton']:active, .whiteButton:active {
position: relative; position: relative;
top: 1px; top: 1px;
text-decoration: none; text-decoration: none;
color: #ffffff;
} }
input[class~='m3p10'], .m3p10 { input[class~='m3p10'], .m3p10 {
@ -527,6 +541,8 @@ input[class~='m3p10'], .m3p10 {
padding: 3px 10px; padding: 3px 10px;
height: 20px; height: 20px;
display: inline-block; display: inline-block;
text-align: center;
color: #ffffff;
} }
input[class~='h30'], .h30 { input[class~='h30'], .h30 {

View File

@ -2219,6 +2219,24 @@ ul.messages-for-user-reply li {
margin: 0px; margin: 0px;
} }
#homework_loggedas_li .homework_sub_menu {
box-shadow: 2px 2px 6px #b0b0b0 ;
display: none;
background: #13AEBF 0 0 no-repeat;
left: 110px;
padding-bottom: 5px;
position: absolute;
top: 0px;
font-size: 1.1em;
margin: 0px auto;
padding: 0px 0px;
text-align: left;
z-index: 1;
}
#homework_loggedas_li .homework_sub_menu a{
margin: 0px;
}
#course_loggedas_li li { #course_loggedas_li li {
border-bottom: 1px solid #129DAD; border-bottom: 1px solid #129DAD;
color: white; color: white;