合作伙伴图片 及项目管理脚本录入界面

This commit is contained in:
Linda 2017-02-19 15:28:57 +08:00
parent 82c6799953
commit 89dc320027
7 changed files with 2689 additions and 2737 deletions

View File

@ -40,6 +40,9 @@
<li>
<a href="http://www.xtu.edu.cn/" target="_blank"><img src="images/footer_logo/p-xtu.png" width="210" height="40" alt="湘潭大学"></a>
</li>
<li>
<a href="http://www.copu.org.cn/" target="_blank"><img src="images/footer_logo/p-zgkyrj.png" width="210" height="40" alt="中国开源软件推进联盟"></a>
</li>
</ul>
<div class="cl"></div>
</div>

View File

@ -1,41 +1,41 @@
<ul class="pro_newsetting_con ml30 mb15">
<h2 class="pro_newsetting_title">请选择此项目可以使用的模块:</h2>
<%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<li class="clear">
<%= check_box_tag('enabled_module_names[]', m, @project.module_enabled?(m), :class=>"fl mt8", :id => 'project_module_'+m.to_s ).html_safe -%>
<p class="fl ml5"><%= l_or_humanize(m, :prefix => "project_module_").html_safe %></p>
</li>
<% end %>
<li class="clear ">
<p class="fl ml5"><%= check_all_links('modules-form').html_safe %></p>
</li>
<% end %>
<li class="clear">
<a href="javascript:void(0);" class="sy_btn_blue mr15 fr" onclick="$('#modules-form').submit()"> <%= l(:button_save) %></a>
</li>
</ul>
<script>
$(function(){
if($("#project_module_issue_tracking").is(":checked")){
$("#project_module_training_tasks").attr('disabled', 'disabled')
}else if($("#project_module_training_tasks").is(":checked")){
$("#project_module_issue_tracking").attr('disabled', 'disabled');
}
$("#project_module_issue_tracking").on('click', function(){
if($("#project_module_issue_tracking").is(":checked")) {
$("#project_module_training_tasks").attr('disabled', 'disabled');
}else{
$("#project_module_training_tasks").removeAttr('disabled');
}
});
$("#project_module_training_tasks").on('click', function(){
if($("#project_module_training_tasks").is(":checked")){
$("#project_module_issue_tracking").attr('disabled', 'disabled');
}else {
$("#project_module_issue_tracking").removeAttr('disabled');
}
});
});
<ul class="pro_newsetting_con ml30 mb15">
<h2 class="pro_newsetting_title">请选择此项目可以使用的模块:</h2>
<%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<li class="clear">
<%= check_box_tag('enabled_module_names[]', m, @project.module_enabled?(m), :class=>"fl mt8", :id => 'project_module_'+m.to_s ).html_safe -%>
<p class="fl ml5"><%= l_or_humanize(m, :prefix => "project_module_").html_safe %></p>
</li>
<% end %>
<li class="clear ">
<p class="fl ml5"><%= check_all_links('modules-form').html_safe %></p>
</li>
<% end %>
<li class="clear">
<a href="javascript:void(0);" class="sy_btn_blue mr15 fr" onclick="$('#modules-form').submit()"> <%= l(:button_save) %></a>
</li>
</ul>
<script>
$(function(){
if($("#project_module_issue_tracking").is(":checked")){
$("#project_module_training_tasks").attr('disabled', 'disabled')
}else if($("#project_module_training_tasks").is(":checked")){
$("#project_module_issue_tracking").attr('disabled', 'disabled');
}
$("#project_module_issue_tracking").on('click', function(){
if($("#project_module_issue_tracking").is(":checked")) {
$("#project_module_training_tasks").attr('disabled', 'disabled');
}else{
$("#project_module_training_tasks").removeAttr('disabled');
}
});
$("#project_module_training_tasks").on('click', function(){
if($("#project_module_training_tasks").is(":checked")){
$("#project_module_issue_tracking").attr('disabled', 'disabled');
}else {
$("#project_module_issue_tracking").removeAttr('disabled');
}
});
});
</script>

View File

@ -1,15 +1,26 @@
<h3>请输入脚本</h3>
<p><%= link_to "开启实训", training_project_execute_project_path(@project) %></p>
<textarea id="pull_request_comment" name="pull_request_comment" class="pullreques_reply_textarea" style="padding-left: 0px;"></textarea>
<textarea>
node()
{
stage "first"
def args = "command=fileExists"
def response = httpRequest acceptType: 'APPLICATION_JSON_UTF8', consoleLogResponseBody: true, contentType: 'APPLICATION_FORM', httpMode: 'POST', requestBody: args, url: "http://localhost:8080/jenkins-exec/pipeline/call?taskId=${taskId}"
println('Status: '+response.status)
println('Response: '+response.content)
}
<div class="alert alert-orange ml15 mr15 mb10"><p>提示文字</p></div>
<div class=" sy_new_tchbox clear ">
<a href="#" class="fr sy_btn_green mb10">开启实训</a>
<div class="cl"></div>
<div class="clear">
<textarea style="width:746px; height:300px;border: 1px solid #c8c8c8; padding:5px;margin-bottom: 5px;" placeholder="请输入脚本"></textarea>
<a href="javascript:void(0)" class="fr btn btn-grey">取消</a>
<a href="javascript:void(0)" class="fr btn btn-blue mr5">确定</a>
</div>
</div>
<h3>请输入脚本</h3>
<p><%= link_to "开启实训", training_project_execute_project_path(@project) %></p>
<textarea id="pull_request_comment" name="pull_request_comment" class="pullreques_reply_textarea" style="padding-left: 0px;"></textarea>
<textarea>
node()
{
stage "first"
def args = "command=fileExists"
def response = httpRequest acceptType: 'APPLICATION_JSON_UTF8', consoleLogResponseBody: true, contentType: 'APPLICATION_FORM', httpMode: 'POST', requestBody: args, url: "http://localhost:8080/jenkins-exec/pipeline/call?taskId=${taskId}"
println('Status: '+response.status)
println('Response: '+response.content)
}
</textarea>

View File

@ -1,5 +1,5 @@
class AddScriptToProject < ActiveRecord::Migration
def change
add_column :projects, :script, :text
end
end
class AddScriptToProject < ActiveRecord::Migration
def change
add_column :projects, :script, :text
end
end

View File

@ -1,5 +1,5 @@
class AddPositonToTrainingTask < ActiveRecord::Migration
def change
add_column :training_tasks, :position, :integer, :limit => 1
end
end
class AddPositonToTrainingTask < ActiveRecord::Migration
def change
add_column :training_tasks, :position, :integer, :limit => 1
end
end

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB