TPM实训index页面

This commit is contained in:
daiao 2017-03-14 14:39:05 +08:00
parent 38ff90a8bf
commit 0b82b3e994
5 changed files with 303 additions and 254 deletions

View File

@ -2,6 +2,97 @@
<%= import_ke(enable_at: true,init_activity: true) %> <%= import_ke(enable_at: true,init_activity: true) %>
<% end %> <% end %>
<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="#" 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>
</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>
</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"> <div class="myissues_con mb10">
<% if @shixun.parent_id.nil? || User.current.admin? %> <% if @shixun.parent_id.nil? || User.current.admin? %>
@ -41,3 +132,4 @@
<% end %> <% end %>
</div> </div>
<!--实训任务结束--> <!--实训任务结束-->
<% end %>

View File

@ -9,21 +9,16 @@
<%= favicon %> <%= favicon %>
<%= javascript_heads %> <%= javascript_heads %>
<%= heads_for_theme %> <%= 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 %> <%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags --> <!-- page specific tags -->
<%= yield :header_tags -%> <%= yield :header_tags -%>
</head> </head>
<%= @shixun %>
<!--add by huang--> <!--add by huang-->
<body onload="prettyPrint();"> <body onload="prettyPrint();">
<div class="navContainer mb10"> <%= render :partial => User.current.logged? ? 'layouts/logined_header' : 'layouts/unlogin_header' %></div> <div class="navContainer"> <%= render :partial => User.current.logged? ? 'layouts/logined_header' : 'layouts/unlogin_header' %></div>
<div class="cl"></div>
<div id="Container">
<div id="content" class="sy_contanier" style=" width:1000px; margin:0 auto;">
<%= render :partial => 'shixuns/shixun_top' %> <%= render :partial => 'shixuns/shixun_top' %>
</div>
<%= render_flash_messages %> <%= render_flash_messages %>
<%= yield %> <%= yield %>

View File

@ -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="task-header">
<div class="fl pro_new_name ml15 clear"> <div class="task-header-info">
<% unless @shixun.is_public? %><span class="icons_newpro_lock fl "></span><% end %> <h2>
<%=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" %> <a href="<%= user_path(@shixun.owner) %>"><%= @shixun.owner.try(:show_name) %>导师</a>
<%=link_to @shixun.name, shixun_path(@shixun), :class => "pro_new_username break_word" %> <span class="ml5 mr5">/ </span><a href="<%= shixun_path(@shixun.parent) %>"><%= @shixun.name %></a>
</h2>
</div> </div>
</div>
<% if allow_shixun_exec(@shixun) %> <div class="task-header-nav">
<div class="fr clear mr15"> <ul class="task-header-navs clearfix">
<ul> <li><a href="<%= shixun_challenges_url(@shixun) %>" class="active">实训</a></li>
<span id="join_in_project_applied"> <li>
<li class="mr5 fl"> <%= link_to l(:project_module_repository),
<%= link_to "开始实训", shixun_monitor_shixun_path(@shixun), :class => "sy_btn_green fr", :remote => true %> ({:controller => 'repositories',
:action => 'shixun_show',
:id => @shixun,
:repository_id => shixun_repository(@shixun).try(:identifier)})
%>
</li> </li>
</span> <li><a href="<%= settings_shixun_path(@shixun) %>">配置</a></li>
</ul> </ul>
</div> </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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -1,6 +1,7 @@
/************新版公共****************/ /************新版公共****************/
a:link,a:visited{text-decoration:none;color:#898989;} a:link,a:visited{text-decoration:none;color:#898989;}
a:hover {color:#29bd8b;} 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:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
.clearfix{clear:both;zoom:1} .clearfix{clear:both;zoom:1}
@ -124,7 +125,7 @@ a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:245px; margin-top
.task-popup-content{ padding:15px;} .task-popup-content{ padding:15px;}
.task-popup-submit{ margin:15px auto; width: 200px;} .task-popup-submit{ margin:15px auto; width: 200px;}
/* TPM */ /* TPM */
.task-header{ width: 100%; background:url("../images/task/task-bg-header.png") 0 0 repeat-x; height: 100px;} .task-header{ width: 100%; background:url("/images/task/task-bg-header.png") 0 0 repeat-x; height: 100px;}
.task-header-info{ width: 1000px; margin: 0 auto; color:#fff; padding:30px 0;} .task-header-info{ width: 1000px; margin: 0 auto; color:#fff; padding:30px 0;}
.task-header-info h2 a,.task-header-info h2{ font-weight: normal;color:#fff;} .task-header-info h2 a,.task-header-info h2{ font-weight: normal;color:#fff;}
.task-header-nav{ width: 100%; height:50px; background:#282c37;} .task-header-nav{ width: 100%; height:50px; background:#282c37;}
@ -138,14 +139,14 @@ 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{ width:800px; margin:0 100px; padding:30px 0; line-height: 40px; }
.panel-form li{ margin-bottom:20px; font-size: 14px; color:#666;} .panel-form li{ margin-bottom:20px; font-size: 14px; color:#666;}
.panel-form-label{ display:inline-block; width:90px; text-align:right; } .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-690{ width: 690px; padding:5px;}
.panel-form-width-670{ width: 670px; padding:5px;} .panel-form-width-670{ width: 670px; padding:5px;}
.panel-form-height-150{ height: 150px;} .panel-form-height-150{ height: 150px;}
.panel-form-height-30{height: 30px;} .panel-form-height-30{height: 30px;}
.task-bg-grey{ background:#f3f3f3; width:680px; padding:0 10px; border:1px solid #f3f3f3;} .task-bg-grey{ background:#f3f3f3; width:680px; padding:0 10px; border:1px solid #f3f3f3;}
.task-bd-grey{width:680px; padding:10 0px;} .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-setting-tab{ height:600px;}
.task-pd15-box{ padding:15px;} .task-pd15-box{ padding:15px;}