Commit 7ce6a9e0 authored by maeda's avatar maeda

Use sorted instead of sort (#29406).

Patch by Pavel Rosický.


git-svn-id: https://svn.redmine.org/redmine/trunk@17685 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1b6d2bc3
......@@ -44,7 +44,7 @@ class FilesController < ApplicationController
end
def new
@versions = @project.versions.sort
@versions = @project.versions.sorted
end
def create
......
......@@ -176,7 +176,7 @@ class ProjectsController < ApplicationController
@version_status = params[:version_status] || 'open'
@version_name = params[:version_name]
@versions = @project.shared_versions.status(@version_status).like(@version_name)
@versions = @project.shared_versions.status(@version_status).like(@version_name).sorted
end
def edit
......
......@@ -21,11 +21,11 @@ class ReportsController < ApplicationController
def issue_report
@trackers = @project.rolled_up_trackers(false).visible
@versions = @project.shared_versions.sort
@versions = @project.shared_versions.sorted
@priorities = IssuePriority.all.reverse
@categories = @project.issue_categories
@assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort
@authors = @project.users.sort
@assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted
@authors = @project.users.sorted
@subprojects = @project.descendants.visible
with_subprojects = Setting.display_subprojects_issues?
@issues_by_tracker = Issue.by_tracker(@project, with_subprojects)
......@@ -49,7 +49,7 @@ class ReportsController < ApplicationController
@report_title = l(:field_tracker)
when "version"
@field = "fixed_version_id"
@rows = @project.shared_versions.sort
@rows = @project.shared_versions.sorted
@data = Issue.by_version(@project, with_subprojects)
@report_title = l(:field_version)
when "priority"
......@@ -64,12 +64,12 @@ class ReportsController < ApplicationController
@report_title = l(:field_category)
when "assigned_to"
@field = "assigned_to_id"
@rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort
@rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sorted
@data = Issue.by_assigned_to(@project, with_subprojects)
@report_title = l(:field_assigned_to)
when "author"
@field = "author_id"
@rows = @project.users.sort
@rows = @project.users.sorted
@data = Issue.by_author(@project, with_subprojects)
@report_title = l(:field_author)
when "subproject"
......
......@@ -32,7 +32,7 @@
<th style="width:15%"></th>
</tr></thead>
<tbody>
<% @versions.sort.each do |version| %>
<% @versions.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>
......
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