实训项目配置界面
This commit is contained in:
parent
4fd2f2d671
commit
9db0698808
|
@ -1,36 +1,26 @@
|
|||
<div class="task-setting-tab">
|
||||
<div class="panel-form ">
|
||||
<ul>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl">测试脚本:</label>
|
||||
<textarea class="panel-form-width-690 panel-form-height-150 fl"></textarea>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="#" class="task-btn task-btn-green fr mr10">保存</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% if false%>
|
||||
<div id="training_project_exec_tip">
|
||||
<%= render :partial => "shixuns/settings_challenges_result_tip" %>
|
||||
</div>
|
||||
|
||||
<div class=" sy_new_tchbox clear ">
|
||||
<div class="task-setting-tab">
|
||||
<div id="training_project_filter_tip">
|
||||
<%= render :partial => "shixuns/settings_challenges_action_tip" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="clear">
|
||||
<div class="panel-form">
|
||||
<ul>
|
||||
<%= form_tag(url_for(:controller => 'shixuns', :action => 'add_script', :id => @shixun), :method => "post", :remote => true, :id => "project_script_form") do %>
|
||||
<textarea id="shixun_script" name="shixun_script" style="width:746px; height:300px;border: 1px solid #c8c8c8; padding:5px;margin-bottom: 5px;" placeholder="请输入脚本"><%= @shixun.script %></textarea>
|
||||
<span id ="shixun_script_tip" class="c_red" style="display: none">内容不能为空</span>
|
||||
<a href="javascript:void(0)" class="fr btn btn-grey">取消</a>
|
||||
<a href="javascript:void(0)" class="fr btn btn-blue mr5" onclick="project_script_commit()">确定</a>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl">测试脚本:</label>
|
||||
<textarea id="shixun_script" name="shixun_script" class="panel-form-width-690 panel-form-height-150 fl" placeholder="请输入脚本"><%= @shixun.script %></textarea>
|
||||
<span id ="shixun_script_tip" class="c_red ml85" style="display: none">内容不能为空</span>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0)" class="task-btn task-btn-green fr mr10" onclick="project_script_commit()">保存</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
function regex_pr_comment()
|
||||
{
|
||||
|
|
|
@ -3,11 +3,15 @@
|
|||
<button data-dismiss="alert" class="task-close fr" type="button" onclick="close_waring_frame();">×</button>
|
||||
温馨提示:每个项目只能创建一个版本库。
|
||||
</div>
|
||||
<%= error_messages_for 'project' %>
|
||||
<% if @repository.nil? %>
|
||||
<div class=" sy_new_tchbox clear" style="margin-left:0; margin-right:0;" >
|
||||
<%= labelled_form_for :repository, @repository, :url => shixun_repositories_path(@shixun), :html => {:method => "post", :autocomplete => 'off'} do |f| %>
|
||||
<ul class="pro_newsetting_con mb15" >
|
||||
<li class="mb10 clear">
|
||||
<label class=" fl" style="line-height:40px;"><span class="c_red f12">*</span> 版本库名称 : </label>
|
||||
<input type="text" class="panel-form-width-690 panel-form-height-30 fl" style="width:830px;">
|
||||
<%= f.text_field :identifier, :no_label => true, :class => "panel-form-width-690 panel-form-height-30 fl", :style => "width:830px;", :id => "shixun_identifier" %>
|
||||
<span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<label class=" fl" style="width:100px;"> </label>
|
||||
|
@ -16,9 +20,11 @@
|
|||
3.一旦保存,标识无法修改</p>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="#" class=" task-btn task-btn-green fr">保存</a>
|
||||
<a href="#" class=" task-btn fr mr10">取消</a>
|
||||
<a href="javascript:void(0)" onclick="project_repository_commit();" class=" task-btn task-btn-green fr">保存</a>
|
||||
<a href="javascript:void(0)" onclick="cancel_for_create();" class=" task-btn fr mr10">取消</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<table class="sy_new_table" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -29,62 +35,15 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>sasa Test</th>
|
||||
<th>Gitlab</th>
|
||||
<th>https://git.trustie.net/hushasha/sasatest.git</th>
|
||||
<th><%= @repository.identifier %></th>
|
||||
<th>Git</th>
|
||||
<th><%=h @repos_url %></th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if false %>
|
||||
<div class="pro_new_prompt ml15 mr15 mb10"><p>温馨提示:每个项目只能创建一个版本库</p></div>
|
||||
<%= error_messages_for 'project' %>
|
||||
<% if @repository.nil? %>
|
||||
<div class="sy_new_tchbox clear">
|
||||
<%= labelled_form_for :repository, @repository, :url => shixun_repositories_path(@shixun), :html => {:method => "post", :autocomplete => 'off'} do |f| %>
|
||||
<ul class="pro_newsetting_con mb15">
|
||||
<li>
|
||||
<label class=" fl"><span class="c_red f12">*</span> 版本库名称 : </label>
|
||||
<%= f.text_field :identifier, :no_label => true, :class => "w650 fl", :style => "height: 28px;", :id => "shixun_identifier" %>
|
||||
<span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<label class=" fl"> </label>
|
||||
<p class=" fl c_grey pro_new_grey">
|
||||
1.长度必须在1到254个字符之间<br/>
|
||||
2.仅限使用小写字母(a-z)、数字、破折号(-)和下划线(_)<br>
|
||||
3.一旦保存,标识无法修改<br>
|
||||
4.版本库名不能是纯数字
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="javascript:void(0)" onclick="cancel_for_create();" class="fr sy_btn_grey"><%=l(:button_cancel)%></a>
|
||||
<a href="javascript:void(0)" onclick="project_repository_commit();" class="fr sy_btn_blue mr5"><%=l(:lable_project_rep_create) %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class=" clear ml15 mr15" >
|
||||
<table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w130 pl10 pr10 hidden fl">版本库名</th>
|
||||
<th class="w90 pr10 hidden fl">管理系统</th>
|
||||
<th class="w490 hidden fl">库路径</th>
|
||||
<th class="w46 hidden fl"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="w130 pl10 pr10 hidden fl"><%= @repository.identifier %></th>
|
||||
<th class="w90 pr10 hidden fl">Git</th>
|
||||
<th class="w490 hidden fl"><%=h @repos_url %></th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<script>
|
||||
function pro_st_show_ku()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue