diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb index a9881a44a4..5cc8f62267 100644 --- a/app/views/projects/settings/_versions.html.erb +++ b/app/views/projects/settings/_versions.html.erb @@ -26,149 +26,152 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <% if @project.shared_versions.any? %> -
-
- - - - - - - - - - - - - -
-
-
- - <%= Version.model_name.human %> - +
+ + <%= l(:label_available_project_versions) %> + +
+
+ + + + + + + + + + + + + + - + - + - + - + - + - + - - - - - <% for version in @project.shared_versions.sort %> - - - - - - - - - + + + + + + <% for version in @project.shared_versions.sort %> + + + + + + + + + - <% end %> - -
+
+
+ + <%= Version.model_name.human %> + +
- -
-
-
- - <%= Version.human_attribute_name(:start_date) %> - +
+
+
+ + <%= Version.human_attribute_name(:start_date) %> + +
- -
-
-
- - <%= Version.human_attribute_name(:effective_date) %> - +
+
+
+ + <%= Version.human_attribute_name(:effective_date) %> + +
- -
-
-
- - <%= Version.human_attribute_name(:description) %> - +
+
+
+ + <%= Version.human_attribute_name(:description) %> + +
- -
-
-
- - <%= Version.human_attribute_name(:status) %> - +
+
+
+ + <%= Version.human_attribute_name(:status) %> + +
- -
-
-
- - <%= Version.human_attribute_name(:sharing) %> - +
+
+
+ + <%= Version.human_attribute_name(:sharing) %> + +
- -
-
-
- - <%= WikiPage.model_name.human %> - +
+
+
+ + <%= WikiPage.model_name.human %> + +
- -
<%= link_to_version version %><%= format_date(version.start_date) %><%= format_date(version.effective_date) %><%=h version.description %><%= l("version_status_#{version.status}") %><%= link_to_if_authorized(h(version.wiki_page_title), - { :controller => '/wiki', - :action => 'show', - :project_id => version.project, - :id => Wiki.titleize(version.wiki_page_title) }) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %> - <% 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 => :delete, - :class => 'icon icon-delete' %> - <% elsif @project.enabled_modules.collect(&:name).include?("backlogs") %> - <%= link_to_if_authorized l(:button_edit), - { :controller => '/versions', :action => 'edit', :id => version, :project_id => @project.id }, - :class => 'icon icon-edit' %> - <% end %> -
+ <%= link_to_version version %> + <%= format_date(version.start_date) %><%= format_date(version.effective_date) %><%=h version.description %><%= l("version_status_#{version.status}") %> + <%= link_to_if_authorized( h(version.wiki_page_title), + { controller: '/wiki', + action: 'show', + project_id: version.project, + id: Wiki.titleize(version.wiki_page_title) }) || + h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %> + + <% 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 }, + data: { confirm: l(:text_are_you_sure) }, + method: :delete, + class: 'icon icon-delete' %> + <% elsif @project.enabled_modules.collect(&:name).include?("backlogs") %> + <%= link_to_if_authorized l(:button_edit), + { :controller => '/versions', :action => 'edit', :id => version, :project_id => @project.id }, + :class => 'icon icon-edit' %> + <% end %> +
-
+ <% end %> + +
+
+
- -
- <%= link_to_if_authorized({:controller => '/versions', :action => 'new', :project_id => @project}, class: 'button -alt-highlight') do %> + <% if @project.versions.any? %> +
+ <%= link_to_if_authorized({ controller: '/versions', action: 'new', project_id: @project }, + class: 'button -alt-highlight') do %> <%= l(:label_version_new) %> <% end %> -
-<% else %> -
-
-

- - <%= l(:label_nothing_display) %> -

-
-

<%= l(:label_no_data) %>

-
-
-<% end %> + <% end %> + <% else %> + <%= no_results_box(action_url: new_project_version_path(@project), display_action: authorize_for('versions', 'new')) %> + <% end %> + -
<% if @project.versions.any? %> - <%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put %> +
+ <%= link_to l(:label_close_versions), + close_completed_project_versions_path(@project), + method: :put %> +
<% end %> -
-