162 lines
7.3 KiB
Plaintext
162 lines
7.3 KiB
Plaintext
<script>
|
||
function pro_st_show_ban1()
|
||
{
|
||
$("#pro_st_edit_ban1").toggle();
|
||
}
|
||
function pro_st_show_ban()
|
||
{
|
||
$("#pro_st_edit_ban").toggle();
|
||
}
|
||
</script>
|
||
<% if @project.shared_versions.any? %>
|
||
<table class="pro_table">
|
||
<tbody>
|
||
<tr class="pro_table_tit">
|
||
<td class="w150"><%= l(:label_version) %></td>
|
||
<td class="w90" > <%= l(:field_effective_date) %></td>
|
||
<td class="w150"><%= l(:field_description) %> </td>
|
||
<td class="w90"><%= l(:field_status) %></td>
|
||
<!--<td class="w90"><%#= l(:field_sharing) %></td>-->
|
||
<!--<td class="w150"><%#= l(:label_wiki_page) %></td>-->
|
||
<td class="w150"></td>
|
||
</tr>
|
||
<% for version in @project.shared_versions.sort %>
|
||
<tr class="<%= cycle 'pro_table_on', '' %>">
|
||
<td class="tl">
|
||
<a class="c_blue02"><%= 'shared' if version.project != @project %> <%= link_to_version version %></a>
|
||
</td>
|
||
<td class=""><%= format_date(version.effective_date) %></td>
|
||
<td class="tl" style="word-break:break-all;"><%=h version.description %></td>
|
||
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
||
<!--<td class="sharing"><%#=h format_version_sharing(version.sharing) %></td>-->
|
||
<!--<td class="tl" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="">-->
|
||
<%#= link_to_if_authorized(h(truncate(version.wiki_page_title,:length=>20)), {:controller => 'wiki',
|
||
# :action => 'show',
|
||
# :project_id => version.project,
|
||
:id => Wiki.titleize(version.wiki_page_title)},:class=>"c_blue02") || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
|
||
<!--</td>-->
|
||
<td >
|
||
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
|
||
<%= link_to l(:button_edit), edit_version_path(version), :class => 'c_purple' %></a>
|
||
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" ><%= delete_link_version version_path(version) %></a>
|
||
<% end %>
|
||
</td>
|
||
</tr>
|
||
<% end; reset_cycle %>
|
||
</tbody>
|
||
<% else %>
|
||
<p class="nodata">
|
||
<%= l(:label_no_data) %>
|
||
</p>
|
||
<% end %>
|
||
</table>
|
||
<% if @project.versions.any? %>
|
||
<%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put, :class =>"c_orange fr" %>
|
||
<% end %>
|
||
<a href="javascript:viod(0)" class="pic_add fl mr5" onclick="pro_st_show_ban();"></a>
|
||
<%= 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>
|
||
<%= 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">
|
||
<ul>
|
||
<li >
|
||
<label class="label02"><span class="c_red">*</span><%=l(:field_name)%>:</label>
|
||
<%= f.text_field :name, :maxlength => 60 %>
|
||
</li>
|
||
<li >
|
||
<label class="label02"><%=l(:label_version_description)%>:</label>
|
||
<%= f.text_field :description, :maxlength => 60 %>
|
||
</li>
|
||
<li >
|
||
<label class="label02"><%=l(:field_status)%>:</label>
|
||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
|
||
</li>
|
||
<!--<li >-->
|
||
<!--<label class="label02"><%#=l(:label_wiki_page)%>:</label>-->
|
||
<!--<%#= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>-->
|
||
<!--</li>-->
|
||
<li >
|
||
<label class="label02"><%=l(:field_deadline)%>:</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"><%#=l(:field_sharing)%>:</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"><%=l(:button_save)%></a>
|
||
</ul>
|
||
|
||
</div>
|
||
<% end %>
|
||
|
||
|
||
<% if @project.shared_versions.empty? %>
|
||
<div class="pro_new_prompt ml15 mr15 mb10"><p><%= l(:milestone_no_data) %></p></div>
|
||
<% end %>
|
||
<div class=" sy_new_tchbox clear " >
|
||
<a href="javascript:void(0);" class=" sy_btn_green mb10" onclick="pro_st_show_ban1();">新建里程碑</a>
|
||
<%= form_for :version, :url => project_versions_path(@project),:html=>{:id=>"new_project_version_form"} do |f| %>
|
||
<div id="pro_st_edit_ban1" style="display:none;">
|
||
<ul class="pro_newsetting_con mb15">
|
||
<li class="mb10 clear">
|
||
<label class="label02"><span class="c_red f12">*</span> <%= l(:field_name) %> : </label>
|
||
<%= f.text_field :name, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;" %>
|
||
</li>
|
||
<li class="mb10 clear">
|
||
<label class="fl"> <%= l(:label_version_description) %> : </label>
|
||
<%= f.text_field :description, :maxlength => 60, :class=>"w650 fl", :style=>"height:28px;"%>
|
||
</li>
|
||
<li class="mb10 clear">
|
||
<label class=" fl"> <%= l(:milestone_date_closed) %> : </label>
|
||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"issues_calendar_input fl", :placeholder=>"结束日期", :style=>"height:28px;" %>
|
||
<%= calendar_for('version_effective_date') %>
|
||
</li>
|
||
<li class="mb10 clear">
|
||
<label class="fl"> <%= l(:field_status) %> : </label>
|
||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]},{},{:style=>"height:28px"} %>
|
||
</li>
|
||
<div class="cl mb10"></div>
|
||
</ul>
|
||
<a href="javascript:void(0);" class="fr sy_btn_grey " onclick="pro_st_show_ban1();">取消</a><a href="javascript:void(0);" onclick="$('#new_project_version_form').submit();" class="fr sy_btn_blue mr5">保存</a>
|
||
</div>
|
||
<% end %>
|
||
</div>
|
||
|
||
<% if @project.shared_versions.any? %>
|
||
<div class=" clear ml15 mr15" >
|
||
<table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0">
|
||
<thead>
|
||
<tr>
|
||
<th>名称</th>
|
||
<th>结束日期</th>
|
||
<th>描述</th>
|
||
<th>状态</th>
|
||
<th >操作</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<% for version in @project.shared_versions.sort %>
|
||
<tr>
|
||
<th>
|
||
<a><%= 'shared' if version.project != @project %> <%= link_to_version version %></a>
|
||
</th>
|
||
<th><%= format_date(version.effective_date) %></th>
|
||
<th><%=h version.description %></th>
|
||
<th><%= l("version_status_#{version.status}") %></th>
|
||
<th>
|
||
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
|
||
<%= link_to l(:button_edit), edit_version_path(version), :class => 'sy_btn_blue mr5' %></a>
|
||
<a href="/versions/1" data-confirm="您确定要删除吗?" ><%= delete_link_version version_path(version), :class=>"sy_btn_grey mr5" %></a>
|
||
<% end %>
|
||
</th>
|
||
</tr>
|
||
<% end %>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<% end %>
|
||
|
||
|