2009-12-08 17:19:38 +03:00
|
|
|
<% if @project.shared_versions.any? %>
|
2009-11-08 16:03:41 +03:00
|
|
|
<table class="list versions">
|
2010-05-09 15:19:15 +04:00
|
|
|
<thead><tr>
|
2007-09-14 15:34:08 +04:00
|
|
|
<th><%= l(:label_version) %></th>
|
|
|
|
<th><%= l(:field_effective_date) %></th>
|
|
|
|
<th><%= l(:field_description) %></th>
|
2009-11-08 16:03:41 +03:00
|
|
|
<th><%= l(:field_status) %></th>
|
2009-12-06 13:28:20 +03:00
|
|
|
<th><%= l(:field_sharing) %></th>
|
2007-09-14 15:34:08 +04:00
|
|
|
<th><%= l(:label_wiki_page) unless @project.wiki.nil? %></th>
|
|
|
|
<th style="width:15%"></th>
|
2010-05-09 15:19:15 +04:00
|
|
|
</tr></thead>
|
2007-09-14 15:34:08 +04:00
|
|
|
<tbody>
|
2009-12-08 17:19:38 +03:00
|
|
|
<% for version in @project.shared_versions.sort %>
|
|
|
|
<tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
|
|
|
|
<td class="name"><%= link_to_version version %></td>
|
|
|
|
<td class="date"><%= format_date(version.effective_date) %></td>
|
|
|
|
<td class="description"><%=h version.description %></td>
|
|
|
|
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
|
|
|
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
|
2009-10-25 16:28:36 +03:00
|
|
|
<td><%= link_to(h(version.wiki_page_title), :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %></td>
|
2009-11-08 16:03:41 +03:00
|
|
|
<td class="buttons">
|
2009-12-08 17:19:38 +03:00
|
|
|
<% if version.project == @project %>
|
|
|
|
<%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
|
|
|
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
|
|
|
<% end %>
|
2009-11-08 16:03:41 +03:00
|
|
|
</td>
|
2007-09-14 15:34:08 +04:00
|
|
|
</tr>
|
|
|
|
<% end; reset_cycle %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2007-09-22 17:17:49 +04:00
|
|
|
<% else %>
|
|
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
|
|
<% end %>
|
|
|
|
|
2009-11-09 21:53:12 +03:00
|
|
|
<div class="contextual">
|
|
|
|
<% if @project.versions.any? %>
|
2010-01-01 19:49:43 +03:00
|
|
|
<%= link_to l(:label_close_versions), {:controller => 'versions', :action => 'close_completed', :project_id => @project}, :method => :post %>
|
2009-11-09 21:53:12 +03:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2010-03-06 21:25:01 +03:00
|
|
|
<p><%= link_to_if_authorized l(:label_version_new), :controller => 'versions', :action => 'new', :project_id => @project %></p>
|