Merge branch 'dev_shixun_project' of https://git.trustie.net/jacknudt/trustieforge into dev_shixun_project
This commit is contained in:
commit
6d55409a85
|
@ -2,42 +2,134 @@
|
|||
<%= import_ke(enable_at: true,init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<!--实训任务列表开始-->
|
||||
<div class="myissues_con mb10">
|
||||
<% if @shixun.parent_id.nil? || User.current.admin? %>
|
||||
<a href="<%= new_shixun_challenge_path(@shixun) %>" class="btn btn-green fr mb10">新建</a>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="pro_new_prompt mb10">
|
||||
<p>完成任务后,请点击“提交评测”按钮,若通过系统测试,将为你发送下一个任务,祝你早日通关,加油!</p>
|
||||
<div class="task-pm-content">
|
||||
<div class="task-pm-box mt20">
|
||||
<div class="panel-header ">
|
||||
<h3>简介</h3>
|
||||
</div>
|
||||
<div class="task-paner-con break_full_word">
|
||||
<p>
|
||||
<%= h @shixun.description.html_safe %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="task-pm-box mt20">
|
||||
<div class="panel-header clearfix">
|
||||
<h3 class="fl mt5">全部任务</h3><span class="btn-cir btn-cir-grey ml5 mt8 fl"><%= @challenges.count %></span>
|
||||
<a href="<%= new_shixun_challenge_path(@shixun) %>" class=" task-btn task-btn-green fr">新建阶段</a>
|
||||
</div>
|
||||
<div class="panel-list">
|
||||
<div class=" clearfix panel-inner">
|
||||
<h4 class="fl panel-inner-title "><i class="fa fa-dot-circle-o font-18 color-green mr5"></i><span class="color-red">第1关</span> Python基础入门</h4>
|
||||
<p class="fr ">
|
||||
<a href="#" title="上移" ><i class="fa fa-long-arrow-up color-grey font-16 mr5 " ></i></a>
|
||||
<a href="#" title="下移" ><i class="fa fa-long-arrow-down color-grey font-16 mr5 " ></i></a>
|
||||
<a href="#" title="编辑" ><i class="fa fa-pencil-square-o color-grey font-16 mr5 " ></i></a>
|
||||
<a href="#" title="删除" ><i class="fa fa-trash-o color-grey font-16 mr5 " ></i></a>
|
||||
<a href="#" title="排名" ><i class="fa fa-signal color-grey font-16 mr5 " ></i></a>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p class="ml15 mt15 color-grey">
|
||||
<span class=" mr10">正在挑战:129</span>
|
||||
<span class=" mr10">完成挑战:1.6万</span>
|
||||
<span class=" mr10">最佳表现:98分</span>
|
||||
<span class=" mr10">测评次数:3次</span>
|
||||
<span class=" mr10">平均表现:80分 </span>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @challenges.empty? %>
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
<% else %>
|
||||
<div class="issues_con_list" >
|
||||
<div >
|
||||
<table class="issues-table" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><p class="text-left">所有<span class="issues_nav_tag ml5" style=" font-weight: normal;"><%= @chanlleges_count %></span></p></th>
|
||||
<th class="w50"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="issue_list">
|
||||
<%= render :partial => 'content_list', :locals => {:challenges => @challenges} %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:left;">
|
||||
<div style="width:auto; display:inline-block;">
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-list">
|
||||
<div class=" clearfix panel-inner">
|
||||
<div class="fl">
|
||||
<h4 class=" panel-inner-title "><i class="fa fa-dot-circle-o font-18 color-green mr5"></i><span class="color-red">第2关</span> 用Python语言写程序</h4>
|
||||
<p class="ml15 mt15 color-grey">
|
||||
<span class=" mr10">正在挑战:129</span>
|
||||
<span class=" mr10">完成挑战:1.6万</span>
|
||||
<span class=" mr10">最佳表现:98分</span>
|
||||
<span class=" mr10">测评次数:3次</span>
|
||||
<span class=" mr10">平均表现:80分 </span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="panel-list">
|
||||
<div class=" clearfix panel-inner">
|
||||
<div class="fl">
|
||||
<h4 class=" panel-inner-title "><i class="fa fa-dot-circle-o font-18 color-green mr5"></i><span class="color-red">第3关</span> Python的字符串使用</h4>
|
||||
<p class="ml15 mt15 color-grey">
|
||||
<span class=" mr10">正在挑战:129</span>
|
||||
<span class=" mr10">完成挑战:1.6万</span>
|
||||
<span class=" mr10">最佳表现:98分</span>
|
||||
<span class=" mr10">测评次数:3次</span>
|
||||
<span class=" mr10">平均表现:80分 </span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-list">
|
||||
<div class=" clearfix panel-inner">
|
||||
<div class="fl">
|
||||
<h4 class=" panel-inner-title "><i class="fa fa-dot-circle-o font-18 color-green mr5"></i><span class="color-red">第4关</span>关 Python的简单结构</h4>
|
||||
<p class="ml15 mt15 color-grey">
|
||||
<span class=" mr10">正在挑战:129</span>
|
||||
<span class=" mr10">完成挑战:1.6万</span>
|
||||
<span class=" mr10">最佳表现:98分</span>
|
||||
<span class=" mr10">测评次数:3次</span>
|
||||
<span class=" mr10">平均表现:80分 </span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--实训任务结束-->
|
||||
|
||||
<% if false %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: true,init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<!--实训任务列表开始-->
|
||||
<div class="myissues_con mb10">
|
||||
<% if @shixun.parent_id.nil? || User.current.admin? %>
|
||||
<a href="<%= new_shixun_challenge_path(@shixun) %>" class="btn btn-green fr mb10">新建</a>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="pro_new_prompt mb10">
|
||||
<p>完成任务后,请点击“提交评测”按钮,若通过系统测试,将为你发送下一个任务,祝你早日通关,加油!</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @challenges.empty? %>
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
<% else %>
|
||||
<div class="issues_con_list" >
|
||||
<div >
|
||||
<table class="issues-table" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><p class="text-left">所有<span class="issues_nav_tag ml5" style=" font-weight: normal;"><%= @chanlleges_count %></span></p></th>
|
||||
<th class="w50"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="issue_list">
|
||||
<%= render :partial => 'content_list', :locals => {:challenges => @challenges} %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:left;">
|
||||
<div style="width:auto; display:inline-block;">
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<!--实训任务结束-->
|
||||
<% end %>
|
|
@ -2,6 +2,117 @@
|
|||
<%= import_ke(enable_at: true, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<div class="task-pm-content mb20">
|
||||
<div class="task-pm-box mt20">
|
||||
<div class="panel-header clearfix">
|
||||
<h3 class="fl mt5">新建阶段</h3>
|
||||
</div>
|
||||
<div class=" panel-form ">
|
||||
<ul>
|
||||
<%= labelled_form_for @challenge, :url => shixun_challenges_path(@shixun) do |f| %>
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl"><span class="c_red mr5">*</span>名称:</label>
|
||||
<input type="text" class="panel-form-width-690 panel-form-height-30 fl" placeholder="请输入当前任务的名称(此信息将提前泄露给学员)" />
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl">预备知识:</label>
|
||||
<textarea class="panel-form-width-690 panel-form-height-150 fl task-textarea-pd" placeholder="请输入完成当前任务依赖的知识点或者其它相关信息,指导学员完成任务"></textarea>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl"><span class="c_red mr5">*</span>过关任务:</label>
|
||||
<textarea class="panel-form-width-690 panel-form-height-150 fl task-textarea-pd"></textarea>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl">样例设置:</label>
|
||||
<ul class="fl task-bg-grey ">
|
||||
<li class="clearfix">
|
||||
<p class="clearfix">
|
||||
<span class="color-green fb fl">样例1</span>
|
||||
<span class="color-grey fr" style="font-size:12px;">温馨提示:输入样例供学员参考。</span>
|
||||
</p>
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" placeholder="样例输入" />
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 " placeholder="样例输出" />
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<p class="clearfix">
|
||||
<span class="color-green fb fl">样例2</span>
|
||||
<a href="#" title="增加"><i class="fa fa-plus-circle color-grey font-16 ml10 fl mt12"></i></a>
|
||||
<a href="#" title="删除"><i class="fa fa-times-circle color-grey font-16 ml10 fl mt12"></i></a>
|
||||
</p>
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" placeholder="样例输入" />
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 " placeholder="样例输出" />
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl">测试集设置:</label>
|
||||
<ul class="fl task-bg-grey ">
|
||||
<li class="clearfix">
|
||||
<p class="clearfix">
|
||||
<span class="color-green fb fl">测试1</span>
|
||||
<span class="color-grey fr" style="font-size:12px;">温馨提示:在学员"提交评测"时进行自动检测。</span>
|
||||
</p>
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" placeholder="测试输入" />
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 " placeholder="测试输出" />
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<p class="clearfix">
|
||||
<span class="color-green fb fl">测试2</span>
|
||||
<a href="#" title="增加"><i class="fa fa-plus-circle color-grey font-16 ml10 fl mt12"></i></a>
|
||||
<a href="#" title="删除"><i class="fa fa-times-circle color-grey font-16 ml10 fl mt12"></i></a>
|
||||
</p>
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 mb10" placeholder="测试输入" />
|
||||
<input type="text" class="panel-form-width-670 panel-form-height-30 " placeholder="测试输出" />
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl"> 知识/技能点:</label>
|
||||
<div class="fl task-bd-grey">
|
||||
<div class="task-tag tag-grey mb10 mr10 fl">
|
||||
<button data-dismiss="alert" class="close fr mt3 ml5" type="button">×</button>
|
||||
使用交互模式的 Python3 解释器
|
||||
</div>
|
||||
<div class="task-tag tag-grey mb10 mr10 fl">
|
||||
<button data-dismiss="alert" class="close fr mt3 ml5" type="button">×</button>
|
||||
简单使用 vim 编写脚本文件并执行这个脚本文件
|
||||
</div>
|
||||
<div class="task-tag tag-grey mb10 mr10 fl">
|
||||
<button data-dismiss="alert" class="close fr mt3 ml5" type="button">×</button>
|
||||
Python 语法:缩进
|
||||
</div>
|
||||
<div class="task-tag tag-grey mb10 mr10 fl">
|
||||
<button data-dismiss="alert" class="close fr mt3 ml5" type="button">×</button>
|
||||
规范代码风格和注释
|
||||
</div>
|
||||
<div class="task-tag tag-grey mb10 mr10 fl">
|
||||
<button data-dismiss="alert" class="close fr mt3 ml5" type="button">×</button>
|
||||
<input type="text" class=" task-tag-input" placeholder="请输入完成本任务得到的技能(1个)" />
|
||||
</div>
|
||||
<button class="close fl mt3 " type="button">+</button>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl"> 参考答案:</label>
|
||||
<textarea class="panel-form-width-690 panel-form-height-150 fl task-textarea-pd"></textarea>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class=" panel-form-label fl"><span class="c_red mr5">*</span>分值设定:</label>
|
||||
<input type="text" class=" panel-form-height-30 fl " placeholder="25" style="padding:5px;" />
|
||||
<span class="fl ml5">分</span>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="#" class=" task-btn task-btn-green fr mr10">保存</a>
|
||||
<a href="#" class=" task-btn fr mr10">取消</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if false %>
|
||||
<!--新建缺陷开始-->
|
||||
<div class="pro_new_con mb10">
|
||||
<div class="pro-task-new-con clear">
|
||||
|
@ -15,6 +126,5 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -9,21 +9,16 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel', 'css/font-awesome' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common', 'css/taskstyle', 'css/structure','scm','css/public', 'css/project','css/popup','repository','css/gantt', 'css/calendar', 'css/moduel', 'css/font-awesome' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<%= @shixun %>
|
||||
<!--add by huang-->
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer mb10"> <%= render :partial => User.current.logged? ? 'layouts/logined_header' : 'layouts/unlogin_header' %></div>
|
||||
<div class="cl"></div>
|
||||
<div class="navContainer"> <%= render :partial => User.current.logged? ? 'layouts/logined_header' : 'layouts/unlogin_header' %></div>
|
||||
|
||||
<div id="Container">
|
||||
<div id="content" class="sy_contanier" style=" width:1000px; margin:0 auto;">
|
||||
<%= render :partial => 'shixuns/shixun_top' %>
|
||||
</div>
|
||||
<%= render :partial => 'shixuns/shixun_top' %>
|
||||
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
|
|
|
@ -1,63 +1,24 @@
|
|||
<%# training_tasks_count = @shixun.training_tasks.count %>
|
||||
<% project_acts = 99999 %>
|
||||
<% update_visiti_count @shixun %>
|
||||
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @shixun %>
|
||||
|
||||
<div class="pro_new_top clear mb10">
|
||||
<div class="fl pro_new_name ml15 clear">
|
||||
<% unless @shixun.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
|
||||
<%=link_to "#{@shixun.owner.try(:show_name)+ (@shixun.parent_id.nil? ? "导师" : "")}<span class='ml5 mr5'>/</span>".html_safe, user_path(@shixun.owner), :class => "pro_new_username" %>
|
||||
<%=link_to @shixun.name, shixun_path(@shixun), :class => "pro_new_username break_word" %>
|
||||
<div class="task-header">
|
||||
<div class="task-header-info">
|
||||
<h2>
|
||||
<a href="<%= user_path(@shixun.owner) %>"><%= @shixun.owner.try(:show_name) %>导师</a>
|
||||
<span class="ml5 mr5">/ </span><a href="<%= shixun_path(@shixun.parent) %>"><%= @shixun.name %></a>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<% if allow_shixun_exec(@shixun) %>
|
||||
<div class="fr clear mr15">
|
||||
<ul>
|
||||
<span id="join_in_project_applied">
|
||||
<li class="mr5 fl">
|
||||
<%= link_to "开始实训", shixun_monitor_shixun_path(@shixun), :class => "sy_btn_green fr", :remote => true %>
|
||||
</li>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% unless @shixun.parent_id %>
|
||||
<div class="fl pro_new_name ml15 clear mt5">
|
||||
<span class="vl_fork fl mr5 mt2">forked from</span> <%=link_to "#{@shixun.parent.try(:owner).try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@shixun.parent.try(:owner)), :class => "pro_new_username_fork fl", :target => "_blank" %>
|
||||
<%=link_to @shixun.parent.try(:name), shixun_path(@shixun.parent), :class => "pro_new_username_fork fl", :target => "_blank" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
<div class="pro_new_topnav mt8">
|
||||
<ul>
|
||||
<!--实训任务-->
|
||||
<li id="project_menu_011">
|
||||
<%= link_to 1 > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k 99999}</span>".html_safe : "#{l(:project_module_training_tasks)}", shixun_challenges_url(@shixun), :class => "pro_new_proname", :title => "#{99999}" %>
|
||||
</li>
|
||||
|
||||
<!--版本库-->
|
||||
<% unless @shixun.repository.nil? %>
|
||||
<li id="project_menu_05">
|
||||
<%= link_to (1 > 0 ? "#{l(:project_module_repository)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k 99999}</span>".html_safe : "#{l(:project_module_repository)}"),
|
||||
({:controller => 'repositories', :action => 'shixun_show', :id => @shixun, :repository_id => shixun_repository(@shixun).try(:identifier)}),
|
||||
:class => "pro_new_proname", :title => "#{99999}" %></li>
|
||||
<% end %>
|
||||
<li id="project_menu_010">
|
||||
<%= link_to "#{l(:button_configure)}", settings_shixun_path(@shixun), :class => "pro_new_proname" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--新版项目头部结束-->
|
||||
<script>
|
||||
$(function(){
|
||||
|
||||
$("#project_menu_0<%= @shixun_menu_type %>").addClass('pro_new_topnav_active');
|
||||
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
<div class="task-header-nav">
|
||||
<ul class="task-header-navs clearfix">
|
||||
<li><a href="<%= shixun_challenges_url(@shixun) %>" class="active">实训</a></li>
|
||||
<li>
|
||||
<%= link_to l(:project_module_repository),
|
||||
({:controller => 'repositories',
|
||||
:action => 'shixun_show',
|
||||
:id => @shixun,
|
||||
:repository_id => shixun_repository(@shixun).try(:identifier)})
|
||||
%>
|
||||
</li>
|
||||
<li><a href="<%= settings_shixun_path(@shixun) %>">配置</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/************新版公共****************/
|
||||
a:link,a:visited{text-decoration:none;color:#898989;}
|
||||
a:hover {color:#29bd8b;}
|
||||
body{ font-size:14px; line-height:2.0;}
|
||||
/*万能清除浮动*/
|
||||
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
|
||||
.clearfix{clear:both;zoom:1}
|
||||
|
@ -138,14 +139,15 @@ a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:245px; margin-top
|
|||
.panel-form{ width:800px; margin:0 100px; padding:30px 0; line-height: 40px; }
|
||||
.panel-form li{ margin-bottom:20px; font-size: 14px; color:#666;}
|
||||
.panel-form-label{ display:inline-block; width:90px; text-align:right; }
|
||||
.panel-form input,.panel-form textarea{ border:1px solid #e2e2e2;color:#666;}
|
||||
.panel-form input,.panel-form textarea{ border:1px solid #e2e2e2;color:#666;line-height: 40px;}
|
||||
.panel-form-width-690{ width: 690px; padding:5px;}
|
||||
.panel-form-width-670{ width: 670px; padding:5px;}
|
||||
.panel-form-height-150{ height: 150px;}
|
||||
.panel-form-height-30{height: 30px;}
|
||||
.task-bg-grey{ background:#f3f3f3; width:680px; padding:0 10px; border:1px solid #f3f3f3;}
|
||||
.task-bd-grey{width:680px; padding:10 0px;}
|
||||
input.task-tag-input{ border:none; background: none; height:30px; padding:0 5px; color:#888;}
|
||||
|
||||
input.task-tag-input{ border:none; background: none; height:30px; padding:0 5px; color:#888; line-height: 30px;}
|
||||
textarea.task-textarea-pd{ padding-bottom: 0px; padding-top:0px;}
|
||||
.task-setting-tab{ height:600px;}
|
||||
.task-pd15-box{ padding:15px;}
|
||||
.task-pd15-box{ padding:15px;}
|
||||
.mb20{margin-bottom: 20px;}
|
Loading…
Reference in New Issue