Commit 814c0970 authored by maeda's avatar maeda

Mark default version in versions tab from project settings (#27799).

Patch by Marius BALTEANU.


git-svn-id: https://svn.redmine.org/redmine/trunk@17467 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 3e2930d2
......@@ -16,6 +16,7 @@
<table class="list versions">
<thead><tr>
<th><%= l(:label_version) %></th>
<th><%= l(:field_default_version) %></th>
<th><%= l(:field_effective_date) %></th>
<th><%= l(:field_description) %></th>
<th><%= l(:field_status) %></th>
......@@ -27,6 +28,7 @@
<% @versions.sort.each do |version| %>
<tr class="version <%=h version.status %> <%= 'shared' if version.project != @project %>">
<td class="name <%= 'icon icon-shared' if version.project != @project %>"><%= link_to_version version %></td>
<td class="tick"><%= checked_image(version.id == @project.default_version_id) %></td>
<td class="date"><%= format_date(version.effective_date) %></td>
<td class="description"><%= version.description %></td>
<td class="status"><%= l("version_status_#{version.status}") %></td>
......
......@@ -641,6 +641,27 @@ class ProjectsControllerTest < Redmine::ControllerTest
assert_select 'a#tab-versions[href=?]', '/projects/ecookbook/settings/versions?version_name=.1&version_status='
end
def test_settings_should_show_default_version_in_versions_tab
project = Project.find(1)
project.default_version_id = 3
project.save!
@request.session[:user_id] = 2
get :settings, :params => {
:id => 'ecookbook',
:tab => 'versions',
}
assert_response :success
assert_select 'table.versions tbody' do
# asserts that only one version is marked as default
assert_select 'td.tick span.icon-checked', 1
# asserts which version is marked as default
assert_select 'tr:first-child td.tick span.icon-checked', 1
end
end
def test_settings_should_show_locked_members
user = User.generate!
member = User.add_to_project(user, Project.find(1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment