Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
huang 2015-04-16 11:07:55 +08:00
commit 284e4938f6
1 changed files with 39 additions and 2 deletions

View File

@ -1,3 +1,10 @@
<script>
function pro_st_show_ban()
{
$("#pro_st_edit_ban").toggle();
}
</script>
<% if @project.shared_versions.any? %> <% if @project.shared_versions.any? %>
<table class="pro_table"> <table class="pro_table">
<tbody> <tbody>
@ -44,12 +51,42 @@
<%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put, :class =>"c_orange fr" %> <%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put, :class =>"c_orange fr" %>
<% end %> <% end %>
<a href="javascript:viod(0)" class="pic_add fl mr5" onclick="pro_st_show_ban();"></a> <a href="javascript:viod(0)" class="pic_add fl mr5" onclick="pro_st_show_ban();"></a>
<%= link_to l(:label_version_new), new_project_version_path(@project, :back_url => ''), :class => 'c_blue fl' if User.current.allowed_to?(:manage_versions, @project) %> <%= link_to l(:label_version_new),"#", :class => 'c_blue fl',:onclick=>"pro_st_show_ban();" if User.current.allowed_to?(:manage_versions, @project) %>
<div class="cl"></div> <div class="cl"></div>
<%= form_for :version, :url => project_versions_path(@project),:html=>{:id=>"new_project_version_form"} do |f| %>
<div id="pro_st_edit_ban" class="pro_st_edit_ban"> <div id="pro_st_edit_ban" class="pro_st_edit_ban">
<ul>
<li >
<label class="label02"><span class="c_red">*</span>&nbsp;名称&nbsp;&nbsp;</label>
<%= f.text_field :name, :maxlength => 60, :required => true %>
</li>
<li >
<label class="label02">&nbsp;描述 &nbsp;&nbsp;</label>
<%= f.text_field :description, :maxlength => 60 %>
</li>
<li >
<label class="label02">&nbsp;状态&nbsp;&nbsp;</label>
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
</li>
<li >
<label class="label02">&nbsp;Wiki 页面&nbsp;&nbsp;</label>
<%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
</li>
<li >
<label class="label02">&nbsp;日期 &nbsp;&nbsp;</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">&nbsp;共享 &nbsp;&nbsp;</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">保存</a>
</ul>
</div> </div>
<% end %>