This commit is contained in:
cxt 2015-08-01 15:46:49 +08:00
commit e558251d37
36 changed files with 114 additions and 436 deletions

View File

@ -223,17 +223,19 @@ class HomeworkCommonController < ApplicationController
homework_test = HomeworkTest.find id
homework_test.destroy if homework_test
end
if params[:input] && params[:output]
if params[:input] && params[:output] && params[:result]
params[:input].each do |k,v|
if params[:output].include? k
homework_test = HomeworkTest.find_by_id k
if homework_test #已存在的测试,修改
homework_test.input = v
homework_test.output = params[:output][k]
homework_test.result = params[:result][k]
else #不存在的测试,增加
homework_test = HomeworkTest.new
homework_test.input = v
homework_test.output = params[:output][k]
homework_test.result = params[:result][k]
homework_test.homework_common = @homework
end
homework_test.save

View File

@ -369,37 +369,6 @@ class ProjectsController < ApplicationController
end
end
# dts测试工具
def dts_dep
render_403 unless User.current.admin?
@dts = Dts.all
end
# dts云部署
def yun_dep
render_403 unless User.current.admin?
end
# 软件知识库
def soft_knowledge
render_403 unless User.current.admin?
end
# 在线开发平台
def online_dev
render_403 unless User.current.admin?
end
# 软件资源库
def soft_file
render_403 unless User.current.admin?
end
# 软件服务
def soft_service
render_403 unless User.current.admin?
end
#发送邮件邀请新用户
def invite_members_by_mail
if User.current.member_of?(@project) || User.current.admin?

View File

@ -321,6 +321,7 @@ module UsersHelper
list = obj.watcher_users.order("#{Watcher.table_name}.id desc").limit(10).all
return [count,list];
end
def get_visitor_users(obj)
query = Visitor.where("master_id=?",obj.id)
count = query.count
@ -332,33 +333,45 @@ module UsersHelper
end
def get_create_course_count(user)
if user == User.current
user.courses.count
else
user.courses.where("is_public = 1").count
end
user.courses.visible.where("tea_id = ?",user.id).count
end
#获取加入课程数
def get_join_course_count(user)
user.coursememberships.count - get_create_course_count(user)
user.courses.visible.count - get_create_course_count(user)
end
#发布作业数
def get_homework_commons_count(user)
HomeworkCommon.where("user_id = ?",user.id).count
end
#资源数
def get_projectandcourse_attachment_count(user)
Attachment.where("author_id = ? and container_type in ('Project','Course')",user.id).count
end
#创建项目数
def get_create_project_count(user)
Project.where("user_id = ? and project_type = ?",user.id,Project::ProjectType_project).count
user.projects.visible.where("projects.user_id=#{user.id}").count
end
#加入项目数
def get_join_project_count(user)
user.memberships.count(conditions: "projects.project_type = #{Project::ProjectType_project}") - get_create_project_count(user)
user.projects.visible.count - get_create_project_count(user)
end
#创建缺陷数
def get_create_issue_count(user)
Issue.where("author_id = ?",user.id).count
end
#解决缺陷数
def get_resolve_issue_count(user)
Issue.where("assigned_to_id = ? and status_id=3",user.id).count
end
#参与匿评数
def get_anonymous_evaluation_count(user)
StudentWorksScore.where("user_id = ? and reviewer_role=3",user.id).count
end
@ -388,6 +401,7 @@ module UsersHelper
end
return str.html_safe
end
def get_activity_act_showname(activity)
case activity.act_type
when "HomeworkCommon"
@ -418,6 +432,7 @@ module UsersHelper
return activity.act_type
end
end
def get_activity_act_createtime(activity)
case activity.act_type
when "HomeworkCommon"
@ -428,6 +443,7 @@ module UsersHelper
return activity.act.created_on
end
end
def get_activity_container_url e
if !e.visible?
return "javascript:;"
@ -438,6 +454,7 @@ module UsersHelper
end
return url_for(:controller => 'projects', :action=>"show", :id=>e.id, :host=>Setting.host_name)
end
def get_activity_url(activity,e)
if !e.visible?
return "javascript:;"
@ -466,6 +483,7 @@ module UsersHelper
return 'javascript:;'
end
end
def get_activity_opt(activity,e)
case activity.act_type
when "HomeworkCommon"

View File

@ -1,5 +1,5 @@
class HomeworkTest < ActiveRecord::Base
attr_accessible :input, :output, :homework_common_id
attr_accessible :input, :output, :homework_common_id,:result,:error_msg
belongs_to :homework_common
has_many :student_work_test

View File

@ -235,9 +235,10 @@ class Issue < ActiveRecord::Base
base_reload(*args)
end
def to_param
@to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize
end
# 之所以注释是以为最终以id形式显示另外如果项目名称带点号或者纯数字会出现问题
# def to_param
# @to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize
# end
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
def available_custom_fields

View File

@ -418,7 +418,7 @@ class User < Principal
end
def nickname(formatter = nil)
login
login.nil? || (login && login.empty?) ? "AnonymousUser" : login
end
def name(formatter = nil)

View File

@ -37,7 +37,7 @@
<% if options[:length] %>
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
<% else %>
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true -%>
<% end %>
</span>
<%if is_float%>

View File

@ -1,11 +1,11 @@
<% if object_id%>
$("#join_in_course_header").html("<%= escape_javascript(join_in_course_header(course, user)) %>");
$("#try_join_course_link").replaceWith("<a href='<%=url_for(:controller => 'homework_common', :action => 'index',:course=>course.id, :host=>Setting.host_course)%>' target='_blank' class='blue_n_btn fr mt20'>提交作品</a>");
<% end %>
<% if @state %>
<% if @state == 0 %>
alert("加入成功");
hideModal($("#popbox02"));
$("#try_join_course_link").replaceWith("<a href='<%=url_for(:controller => 'homework_common', :action => 'index',:course=>course.id, :host=>Setting.host_course)%>' target='_blank' class='blue_n_btn fr mt20'>提交作品</a>");
<% elsif @state == 1 %>
alert("密码错误");
<% elsif @state == 2 %>

View File

@ -24,6 +24,8 @@ $('#upload_file_div').slideToggle('slow');
<% if @project %>
closeModal();
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
$("#project_files_count_info").html("<%= @all_attachments.count%>");
$("#project_files_count_nav").html("(<%= @all_attachments.count%>)")
// 添加文件上传成功提示
<% unless params[:attachments].nil? %>
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');

View File

@ -78,7 +78,7 @@
<li >
<label class="label02">&nbsp;标准代码:&nbsp;</label>
<textarea name="standard_code" class=" w547 h150 mb10 fl"><%= homework.homework_detail_programing.standard_code%></textarea>
<textarea name="standard_code" class=" w547 h150 mb10 fl" oninput="init_programing_test();" onpropertychange="init_programing_test()"><%= homework.homework_detail_programing.standard_code%></textarea>
<div class="cl"></div>
</li>
@ -96,8 +96,16 @@
<li>
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
<a class="blue_btn fl ml5 mt1" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">测试</a>
<input type="hidden" id="test_result_<%= homework_test.id%>" name="result[<%= homework_test.id%>]" />
<% if homework_test.result && !homework_test.result.to_s.empty?%>
<% if homework_test.result == 0%>
<a class="green_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">成功</a>
<% else%>
<a class="red_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">错误</a>
<% end%>
<% else%>
<a class="blue_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">测试</a>
<% end%>
<input type="hidden" id="test_result_<%= homework_test.id%>" name="result[<%= homework_test.id%>]" value="<%= homework_test.result%>"/>
</li>
<div class="cl"></div>
</div>
@ -115,7 +123,7 @@
<li>
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
<a class="blue_btn fl ml5 mt1" onclick="programing_test('0')" id="test_send_0">测试</a>
<a class="blue_btn fl ml5 mt programing_test" onclick="programing_test('0')" id="test_send_0">测试</a>
<input type="hidden" id="test_result_0" name="result[0]" />
</li>
<div class="cl"></div>
@ -142,4 +150,12 @@
}
);
}
function init_programing_test()
{
$(".programing_test").each(function(){
$(this).removeClass("green_btn red_btn").addClass("blue_btn").text("测试");
$(this).next("input").val("");
});
}
</script>

View File

@ -1,2 +1,2 @@
$("#test_send_<%= @index%>").replaceWith("<a class='<%= @result == 0 ? 'green_btn' : 'red_btn'%> fl ml5 mt1' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%></a>");
$("#test_send_<%= @index%>").replaceWith("<a class='<%= @result == 0 ? 'green_btn' : 'red_btn'%> fl ml5 mt1 programing_test' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%></a>");
$("#test_result_<%= @index%>").val("<%= @result%>");

View File

@ -100,7 +100,7 @@
<span>|&nbsp;</span>
<%= l(:project_module_attachments) %>
<% attaments_num %>
<%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue' %></span>
<%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue', :id=>'project_files_count_info' %></span>
<% end %>
</div>
<div class="cl"></div>

View File

@ -171,11 +171,11 @@
<div class="leftbox">
<ul class="leftbox_ul_left">
<% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
<% if(get_create_course_count(@user)) == 0 %>
<% if @user.user_extensions && @user.user_extensions.identity == 0 %>
<% if(get_create_course_count(@user)) != 0 %>
<li>创建课程&nbsp;:</li>
<% end %>
<% if(get_homework_commons_count(@user)) == 0 %>
<% if(get_homework_commons_count(@user)) != 0 %>
<li>发布作业&nbsp;:</li>
<% end %>
<% end %>
@ -202,11 +202,11 @@
<% end %>
</ul>
<ul class="leftbox_ul_right c_dgrey">
<% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
<% if(get_create_course_count(@user)) == 0 %>
<% if @user.user_extensions && @user.user_extensions.identity == 0 %>
<% if(get_create_course_count(@user)) != 0 %>
<li><%= get_create_course_count(@user) %></li>
<% end %>
<% if(get_homework_commons_count(@user)) == 0 %>
<% if(get_homework_commons_count(@user)) != 0 %>
<li><%= get_homework_commons_count(@user) %></li>
<% end %>
<% end %>

View File

@ -31,7 +31,7 @@
<div class="subNav">
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
<% unless attaments_num == 0 %>
<a class="subnav_num">(<%= attaments_num %>)</a>
<%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
<% end %>
<% if User.current.member_of?(@project) %>
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>

View File

@ -19,7 +19,7 @@
<div class="subNav">
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
<% unless attaments_num == 0 %>
<a class="subnav_num">(<%= attaments_num %>)</a>
<%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
<% end %>
<% if User.current.member_of?(@project) %>
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>

View File

@ -30,7 +30,7 @@
<div class="subNav">
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
<% unless attaments_num == 0 %>
<a class="subnav_num">(<%= attaments_num %>)</a>
<%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
<% end %>
<% if User.current.member_of?(@project) %>
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>

View File

@ -36,74 +36,6 @@
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%>
</li>
<li>
<% if User.current.admin? %>
<%= link_to l(:label_project_dts_yun) ,yun_dep_project_path(@project), data: { confirm:'你确定要对本项目进行云化部署吗?' } %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS评估工具</a>
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS证据采集工具</a>
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS证据评估统计分析工具</a>
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<%= link_to "代码缺陷测试工具(DTS)" ,dts_dep_project_path(@project), data: { confirm:'你确定要对本项目进行代码缺陷测试分析吗?' } %>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://www.seforge.org/sase/" target="_Blank">软工服务平台(SASSP)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://tsr.sei.pku.edu.cn/home.action" target="_Blank">软件知识库(KnowledgeBase)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">可信评估工具(Evaluator)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">在线验证工具(BACH-Online)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">软件测试工具(SSCC-Web)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://www.service4all.org.cn/servicexchange/" target="_Blank">服务资源共享平台(ServiceXchange)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://www.service4all.org.cn/repository/ServiceCloud/MyServiceContainer.jsp" target="_Blank">在线服务开发平台(ServiceFoundry)</a>
<% end %>
</li>
<li>
<% if User.current.admin? %>
<a href="http://www.service4all.org.cn" target="_Blank">组合开发和运行演化平台(Service4All)</a>
<% end %>
</li>

View File

@ -1,77 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_dts_new) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
#font_color{background:yellow;text-align:center;color:white;}
td.redBox {border:1px solid #b0b0b0; width:80px; background-color:#EAEAEA; }
td.redBox2 {border:1px solid #b0b0b0; width:120px; }
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">代码上传分析中...</p>
<div style="width:300px;height:20px;background:#EEE;">
<div id="in" style="width:1%">1%</div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",70);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width=i+"%";
document.getElementById("in").innerHTML=i+"%";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px;">
<p class="fr f14 " style="padding-right: 32px;padding-bottom: 10px;">语言:<span style="color: red">Java</span> 总文件数:<span style="color: red">361</span> 代码行数:<span style="color: red">48662</span></p>
<% @dts.each do |dt| %>
<div style="padding-left: 35px;padding-top: 10px;">
<table width="600" border="0" style="padding-left: 30px;padding-top: 100px; border-spacing:0; border-collapse:collapse; border: 1px solid #b0b0b0;">
<tr>
<td align="center" class="redBox">错误变量</td>
<td class="redBox2"> &nbsp;<%= dt.Variable %></td>
<td align="center" class="redBox">起始行</td>
<td class="redBox2"> &nbsp;<%= dt.StartLine %></td>
<td align="center" class="redBox">IP行</td>
<td class="redBox2"> &nbsp;<%= dt.IPLine %></td>
</tr>
<tr>
<td align="center" class="redBox">缺陷代码</td>
<td colspan="5" class="redBox2"> &nbsp;<%= dt.IPLineCode %></td>
</tr>
<tr>
<td align="center" class="redBox">错误描述</td>
<td colspan="5" class="redBox2">&nbsp;<%= dt.Description %></td>
</tr>
<tr>
<td align="center" class="redBox">文件</td>
<td colspan="5" class="redBox2"> &nbsp;<%= dt.File %></td>
</tr>
</table>
</div>
<% end %>
</div>

View File

@ -1,3 +0,0 @@
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_project_dts) %></h2>
</div>

View File

@ -68,20 +68,20 @@
<label class="label02"><%=l(:field_status)%></label>
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
</li>
<li >
<label class="label02"><%=l(:label_wiki_page)%></label>
<%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
</li>
<!--<li >-->
<!--<label class="label02"><%#=l(:label_wiki_page)%></label>-->
<!--<%#= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>-->
<!--</li>-->
<li >
<label class="label02"><%=l(:label_date)%></label>
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %>
<%= calendar_for('version_effective_date') %>
</li>
<div class="cl mb10"></div>
<li >
<label class="label02"><%=l(:field_sharing)%></label>
<%= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>
</li>
<!--<li >-->
<!--<label class="label02"><%#=l(:field_sharing)%></label>-->
<!--<%#= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>-->
<!--</li>-->
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a>
</ul>

View File

@ -1,46 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_soft_file) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
#font_color{background:yellow;text-align:center;color:white;}
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">软件资源库部署中...</p>
<div style="width:300px;height:20px;background:#EEE;">
<div id="in" style="width:1%">0%</div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width=i+"%";
document.getElementById("in").innerHTML=i+"%";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px;">
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
</div>

View File

@ -1,46 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_soft_knowledge) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
#font_color{background:yellow;text-align:center;color:white;}
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
<div style="width:300px;height:20px;background:#EEE;">
<div id="in" style="width:1%">0%</div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width=i+"%";
document.getElementById("in").innerHTML=i+"%";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px;">
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
</div>

View File

@ -1,46 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_soft_service) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
#font_color{background:yellow;text-align:center;color:white;}
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
<div style="width:300px;height:20px;background:#EEE;">
<div id="in" style="width:1%">0%</div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width=i+"%";
document.getElementById("in").innerHTML=i+"%";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px;">
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
</div>

View File

@ -1,47 +0,0 @@
<div class="project_r_h">
<h2 class="project_h22"><%= l(:label_project_dts_yun) %></h2>
</div>
<!--JS进度条-->
<style type="text/css">
#out{}
#in{}
#font_color{background:yellow;text-align:center;color:white;}
</style>
<div style="padding-left: 200px;">
<div id='out'>
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;padding-top: 10px;">云化部署中....</p>
<div>
<div id="in" style="width:0%"></div>
<div>
<script type="text/javascript">
i=0;
$(function(){
ba=setInterval("begin()",60);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
});
function begin()
{
i+=1;
if(i<=100)
{
document.getElementById("in").style.width="";
document.getElementById("in").innerHTML="";}
else
{
clearInterval(ba);
$("#show_content_div").show();
$("#out").hide();
// document.getElementById("out").style.display="none";
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
}
}
</script>
</div>
</div>
</div>
</div>
<div id="show_content_div" style="display: none;padding-top: 0px; ">
<p class="pl10 f14 "><span style="color: #7f7f7f;font-size: 14px; ">所部署服务的网址:</span>
<span><a href="http://rubyblog.forge.trustie.net/accounts/login" target="_Blank" style="color: #15BCCF;font-size: 14px;">http://rubyblog.forge.trustie.net/accounts/login</a></span></p>
</div>

View File

@ -3,9 +3,9 @@
<div class="mes_box02" id = '<%= reply.id %>'>
<%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
<div class=" mes_box02_info fl">
<%= link_to "#{reply.user.login}&nbsp;".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
<%= link_to "#{reply.user.nickname}&nbsp;".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
<span class="fl c_grey">&nbsp;回复&nbsp;</span>
<%= link_to "#{parent_jour.user.login}&nbsp;:&nbsp;".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
<%= link_to "#{parent_jour.user.nickname}&nbsp;:&nbsp;".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
<div class="cl">
<%= reply.notes.html_safe %>
</div>

View File

@ -1,8 +1,8 @@
<div class="message_list" id="<%= jour.id %>" nhname="rec" data-id="<%= jour.id %>">
<div class="message_list break_word" id="<%= jour.id %>" nhname="rec" data-id="<%= jour.id %>">
<%= link_to image_tag(url_to_avatar(jour.user),:width => '46',:height => '46'), user_path(jour.user),:class => "users_pic fl" %>
<div class="fl ml5 mes_box mb10" >
<div>
<%= link_to "#{jour.user.login}&nbsp;:&nbsp;".html_safe, user_path(jour.user),:class => 'fl c_blue02 f14 fb mb5', :target => "_blank"%>
<%= link_to "#{jour.user.nickname}&nbsp;:&nbsp;".html_safe, user_path(jour.user),:class => 'fl c_blue02 f14 fb mb5', :target => "_blank"%>
</div>
<div class="cl"></div>
<div>

View File

@ -14,20 +14,20 @@
<label class="label02"><%=l(:field_status)%></label>
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %>
</li>
<li >
<label class="label02"><%=l(:label_wiki_page)%></label>
<%= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>
</li>
<!--<li >-->
<!--<label class="label02"><%#=l(:label_wiki_page)%></label>-->
<!--<%#= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>-->
<!--</li>-->
<li >
<label class="label02"><%=l(:label_date)%></label>
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"fl" ,:style=>"margin-left:7px;",:label=>""%>
<%= calendar_for('version_effective_date') %>
</li>
<div class="cl mb10"></div>
<li >
<label class="label02"><%=l(:field_sharing)%></label>
<%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>
</li>
<!--<li >-->
<!--<label class="label02"><%#=l(:field_sharing)%></label>-->
<!--<%#= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>-->
<!--</li>-->
</ul>
<% @version.custom_field_values.each do |value| %>

View File

@ -13,5 +13,5 @@
project_issues_path(version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>)
</p>
<% else %>
<p><%= l(:label_roadmap_no_issues) %></p>
<div class="flash error"><%= l(:label_roadmap_no_issues) %></div>
<% end %>

View File

@ -4,7 +4,7 @@
</div>
<div class="contextual" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= link_to_if_authorized(l(:button_edit_associated_wikipage,
<%#= link_to_if_authorized(l(:button_edit_associated_wikipage,
:page_title => @version.wiki_page_title.truncate(30, omission: '...')),
{:controller => 'wiki',
:action => 'edit',
@ -17,7 +17,7 @@
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
</div>
<h3 style="word-break: break-all;word-wrap: break-word;">
<h3 style="word-break: break-all;word-wrap: break-word;color: #64BDD9;">
<%= h(@version.name) %>
</h3>
@ -27,11 +27,11 @@
<div class="splitcontent">
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
<fieldset class="time_tracter f14"><legend><%= l(:label_time_tracking) %></legend>
<table>
<tr>
<th>
<p class="fl c_blue f14 fb"><%= l(:field_estimated_hours) %></p>
<p class="fl c_grey f12"><%= l(:field_estimated_hours) %></p>
</th>
<td class="total-hours">
<%= html_hours(l_hours(@version.estimated_hours)) %>
@ -40,7 +40,7 @@
<% if User.current.allowed_to?(:view_time_entries, @project) %>
<tr>
<th>
<p class="fr c_blue f14 fb"><%= l(:label_spent_time) %></p>
<p class="fr c_grey f12"><%= l(:label_spent_time) %></p>
</th>
<td class="total-hours">
<%= html_hours(l_hours(@version.spent_hours)) %>

View File

@ -37,7 +37,7 @@ zh:
label_password_lost: "忘记密码?"
button_login: 登录
# account_controller中判断用户名或密码输入有误的提示信息
notice_account_invalid_creditentials: "无效的用户名或密码"
notice_account_invalid_creditentials: "无效的用户名或密码,注意登录名区分大小写,谢谢!"
# account_controller中判断未激活的提示信息
notice_account_invalid_creditentials_new: "您还未到邮箱激活。如果您丢失帐户,电子邮件验证帮助我们的支持团队验证帐户的所有权,并允许您接收所有您要求的通知。"

View File

@ -690,7 +690,7 @@ zh:
label_sort_lowest: 置底
label_roadmap_due_in: "截止日期到 %{value}"
label_roadmap_overdue: "%{value} 延期"
label_roadmap_no_issues: 该版本没有问题
label_roadmap_no_issues: 该版本没有对应的缺陷,可以在“发布问题”的“目标版本”中设置!
label_user_search_type: 搜索类型
label_search_by_login: 登录名
label_search_by_name: 名字

View File

@ -399,14 +399,6 @@ RedmineApp::Application.routes.draw do
get 'feedback', :action => 'feedback', :as => 'project_feedback'
get 'watcherlist', :action=> 'watcherlist'
# 添加dts测试工具
get 'dts_dep', :action=> 'dts_dep'
get 'yun_dep', :action=> 'yun_dep'
get 'soft_knowledge', :action=> 'soft_knowledge'
get 'soft_file', :action=> 'soft_file'
get 'online_dev', :action=> 'online_dev'
get 'soft_service', :action=> 'soft_service'
get 'invite_members', :action=> 'invite_members'
get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
# get 'dts_repos', :aciton => 'dts_repos'

View File

@ -0,0 +1,9 @@
class ChangeResultDefault < ActiveRecord::Migration
def up
change_column :homework_tests,:result,:integer,:default => nil
end
def down
change_column :homework_tests,:result,:integer,:default => 0
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150730130816) do
ActiveRecord::Schema.define(:version => 20150801034945) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -632,9 +632,9 @@ ActiveRecord::Schema.define(:version => 20150730130816) do
t.text "input"
t.text "output"
t.integer "homework_common_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "result", :default => 0
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "result"
t.text "error_msg"
end

View File

@ -550,7 +550,7 @@ function add_programing_test(obj) {
"</li><li ><label class='fl f14 ml10'>&nbsp;输出:&nbsp;</label><input type='text' class='fl h26 w190 mb10' name='output[" + now +"]' />" +
"</li><li><a class='icon_add ml10' href='javascript:void(0);' title='添加测试' onclick='add_programing_test($(this).parent().parent())'></a>" +
"<a class='icon_remove' href='javascript:void(0);' title='删除测试' onclick='remove_programing_test($(this).parent().parent())'></a>" +
"<a class='blue_btn fl ml5 mt1' onclick='programing_test("+ now +")' id='test_send_" + now + "'>测试</a>" +
"<a class='blue_btn fl ml5 mt1 programing_test' onclick='programing_test("+ now +")' id='test_send_" + now + "'>测试</a>" +
"<input type='hidden' id='test_result_" + now +"' name='result[" + now +"]'/>" +
"</li><div class='cl'></div></div>");
}

View File

@ -775,4 +775,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
#about_newtalk{ display:none;}
/*version*/
.time_tracter{color: #64BDD9;padding: 5px;}