Index: app/helpers/queries_helper.rb =================================================================== --- app/helpers/queries_helper.rb (revision 1407) +++ app/helpers/queries_helper.rb (working copy) @@ -22,9 +22,9 @@ end def column_header(column) - column.sortable ? sort_header_tag(column.sortable, :caption => column.caption, - :default_order => column.default_order) : - content_tag('th', column.caption) + column.sortable ? sort_header_tag(column.sortable, :caption => column.caption, + :default_order => column.default_order) : + content_tag('th', column.caption) end def column_content(column, issue) @@ -40,10 +40,10 @@ else case column.name when :subject - h((@project.nil? || @project != issue.project) ? "#{issue.project.name} - " : '') + + ((@project.nil? || @project != issue.project) ? '' + h("[#{issue.project.name}] ") + '': '') + link_to(h(value), :controller => 'issues', :action => 'show', :id => issue) when :done_ratio - progress_bar(value, :width => '80px') + progress_bar(value) else h(value) end Index: app/helpers/sort_helper.rb =================================================================== --- app/helpers/sort_helper.rb (revision 1407) +++ app/helpers/sort_helper.rb (working copy) @@ -92,22 +92,26 @@ # - The optional caption explicitly specifies the displayed link text. # - A sort icon image is positioned to the right of the sort link. # - def sort_link(column, caption, default_order) + def sort_link(column, caption, default_order, project_id) key, order = session[@sort_name][:key], session[@sort_name][:order] - if key == column - if order.downcase == 'asc' - icon = 'sort_asc.png' - order = 'desc' - else - icon = 'sort_desc.png' - order = 'asc' - end + if order.downcase == 'asc' + icon = 'sort_asc.png' + order = 'desc' else + icon = 'sort_desc.png' + order = 'asc' + end + if key !~ /#{column}/ icon = nil order = default_order end + + if column == 'issues.subject' + project_id = params[:project_id] + column = 'projects.name,issues.subject' + end + caption = titleize(Inflector::humanize(column)) unless caption - sort_options = { :sort_key => column, :sort_order => order } # don't reuse params if filters are present url_options = params.has_key?(:set_filter) ? sort_options : params.merge(sort_options) @@ -142,7 +146,8 @@ caption = options.delete(:caption) || titleize(Inflector::humanize(column)) default_order = options.delete(:default_order) || 'asc' options[:title]= l(:label_sort_by, "\"#{caption}\"") unless options[:title] - content_tag('th', sort_link(column, caption, default_order), options) + project_id = options.delete(:project_id) || 'est' + content_tag('th', sort_link(column, caption, default_order, project_id), options) end private