Merge remote-tracking branch 'origin/szzh' into szzh

This commit is contained in:
lizanle 2015-05-07 09:03:08 +08:00
commit f214a26329
9 changed files with 40 additions and 16 deletions

View File

@ -38,12 +38,13 @@ class TrackersController < ApplicationController
@tracker ||= Tracker.new(params[:tracker]) @tracker ||= Tracker.new(params[:tracker])
@trackers = Tracker.sorted.all @trackers = Tracker.sorted.all
@projects = Project.where("project_type = #{Project::ProjectType_project}").all @projects = Project.where("project_type = #{Project::ProjectType_project}").all
@courses = Course.all # 去掉原因,这块代码已经没有用到
@course_activity_count=Hash.new # @courses = Course.all
@courses.each do |course| # @course_activity_count=Hash.new
@course_activity_count[course.id]=0 # @courses.each do |course|
end # @course_activity_count[course.id]=0
@course_activity_count=get_course_activity @courses,@course_activity_count # end
# @course_activity_count=get_course_activity @courses,@course_activity_count
end end
def create def create

View File

@ -58,14 +58,14 @@
<%= content_tag('span', "#{garble @course.members.count}", :class => "info") %> <%= content_tag('span', "#{garble @course.members.count}", :class => "info") %>
<%= content_tag('span', l(:label_x_member, :count => memberCount(@course))) %> <%= content_tag('span', l(:label_x_member, :count => memberCount(@course))) %>
</p> </p>
<!--gcm--> <!--gcm-->
<p class="stats"> <p class="stats">
<%= content_tag('span', link_to("#{@course_activity_count[@course.id]}", course_path(@course)), :class => "info") %> <%= content_tag('span', link_to("#{@course_activity_count[@course.id]}", course_path(@course)), :class => "info") %>
<%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %> <%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>
</p> </p>
<!--gcm--> <!--gcm-->
<div class="buttons_for_course" style="margin-top:30px;margin-left:144px"> <div class="buttons_for_course" style="margin-top:30px;margin-left:144px">
<span class="info"></span> <span class="info"></span>
<% if(course_endTime_timeout? @course) %> <% if(course_endTime_timeout? @course) %>

View File

@ -24,9 +24,9 @@
<%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %> <%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
<% if manage_allowed && file.container_id == project.id && file.container_type == "Project" %> <% if manage_allowed && file.container_id == project.id && file.container_type == "Project" %>
<span id="is_public_<%= file.id %>"> <span id="is_public_<%= file.id %>">
<%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %> <%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %>
</span> </span>
<% else %> <% else %>
<!-- <#%= link_to (file.is_public? ? "公开":"私有"),"javascript:void(0)",:class=>"f_l re_open" %> --> <!-- <#%= link_to (file.is_public? ? "公开":"私有"),"javascript:void(0)",:class=>"f_l re_open" %> -->
<% end %> <% end %>

View File

@ -25,7 +25,7 @@
</li> </li>
<li> <li>
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div> <div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
<label class="fl ml3" >&nbsp;<%= l(:field_description) %>&nbsp;&nbsp;</label> <label class="fl ml3" ><span class="c_red">*</span>&nbsp;<%= l(:field_description) %>&nbsp;</label>
<%= text_area :quote,:quote,:style => 'display:none' %> <%= text_area :quote,:quote,:style => 'display:none' %>
<%= f.text_area :content, :class => 'talk_text fl', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %> <%= f.text_area :content, :class => 'talk_text fl', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %>
<div class="cl"></div> <div class="cl"></div>

View File

@ -30,7 +30,7 @@
</p> </p>
</div> </div>
</div> </div>
<div class="repos_more"><a id="showgithelp" value="hide_help" onclick ="showhelpAndScrollTo('repos_git_more'); " class="c_dblue lh23">收起Git操作指南</a></div> <div class="repos_more"><a id="showgithelp" value="show_help" onclick ="showhelpAndScrollTo('repos_git_more'); " class="c_dblue lh23">展开Git操作指南</a></div>
<div id="repos_git_more"> <div id="repos_git_more">
<br> <br>
<div class=" c_dark f14"> <div class=" c_dark f14">

View File

@ -415,4 +415,4 @@ zh:
# #
field_sharing: 共享 field_sharing: 共享
label_title_code_review: 代码评审 label_title_code_review: 代码评审
label_home_non_project: 您还没有创建项目,您可能对系统的其它项目感兴趣 label_home_non_project: 您还没有创建项目,您可以查看系统的其它项目

View File

@ -1,4 +1,4 @@
class AddIndexToHomeworkattachCourseId < ActiveRecord::Migration class AddIndexToHomeworkforcourseCourseId < ActiveRecord::Migration
def change def change
add_index(:homework_for_courses,:course_id) add_index(:homework_for_courses,:course_id)
end end

View File

@ -71,13 +71,35 @@ function showhelpAndScrollTo(id) {
{ {
cookiesave("repositories_visiable", true,'','',''); cookiesave("repositories_visiable", true,'','','');
} }
var information = $("#showgithelp");
var val = information.attr("value");
if(val=="show_help")
{
$("#showgithelp").text("收起Git操作指南");
information.attr("value", "hide_help");
}
else
{
$("#showgithelp").text("展开Git操作指南");
information.attr("value", "show_help");
}
} }
$(function(){ $(function(){
var information = $("#showgithelp");
var val = information.attr("value");
if(cookieget("repositories_visiable") == "true") if(cookieget("repositories_visiable") == "true")
{ {
$('#repos_git_more').hide(); $('#repos_git_more').hide();
} }
else
{
$('#repos_git_more').show();
$("#showgithelp").text("收起Git操作指南");
information.attr("value", "hide_help");
}
}); });

View File

@ -76,7 +76,7 @@ a.problem_name{ color:#ff5722; }
a:hover.problem_name{ color:#d33503;} a:hover.problem_name{ color:#d33503;}
a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;} a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;}
.problem_tit_div{ color:#0781b4; font-weight:bold;width:400px; } .problem_tit_div{ color:#0781b4; font-weight:bold;max-width:400px; }
a.problem_tit_a{ color:#0781b4; } a.problem_tit_a{ color:#0781b4; }
.problem_tit_a:hover{ color:#09658c; } .problem_tit_a:hover{ color:#09658c; }
a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; } a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; }
@ -180,6 +180,7 @@ a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; col
/* 版本库展示Git操作文档 */ /* 版本库展示Git操作文档 */
.repos_more{height:23px; width:100%; border:1px solid #CCC; background:#F6F6F6; text-align:center; font-size:12px; padding-top:2px;} .repos_more{height:23px; width:100%; border:1px solid #CCC; background:#F6F6F6; text-align:center; font-size:12px; padding-top:2px;}
.lh23{line-height: 23px;} .lh23{line-height: 23px;}
.repos_git_more{display: none;}
/* 弹框 新样式还没设计出来,暂时用的课程那边的样式 */ /* 弹框 新样式还没设计出来,暂时用的课程那边的样式 */
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;} .alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}