Project

General

Profile

Actions

Feature #3372

closed

add 'closed' html class to closed issues in search results

Added by Andrew Rudenko almost 15 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Text formatting
Target version:
-
Start date:
2009-05-16
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

search results display closed issues with a regular style. It would be great if those issues that are closed would also have the class "closed" to make ability to be styled with line-through.

It could be done by adding following into the existing code (it is as I have implemented in my own instance):

+++ app/views/search/index.rhtml        (working copy)
@@ -26,7 +26,7 @@
     <h3><%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)</h3>
     <dl id="search-results">
       <% @results.each do |e| %>
-        <dt class="<%= e.event_type %>"><%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(e.event_title, 255), @tokens), e.event_url %></dt>
+        <dt class="<%= e.event_type %> <%= 'closed' if e.event_type.eql?('issue') && e.closed? %>"><%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(e.event_title, 255), @tokens), e.event_url %></dt>
         <dd><span class="description"><%= highlight_tokens(e.event_description, @tokens) %></span>
         <span class="author"><%= format_time(e.event_datetime) %></span></dd>
       <% end %>

also .css should contain the proper style. I have following below:
dt.closed a { text-decoration: line-through; }

Actions #1

Updated by Jean-Philippe Lang almost 15 years ago

  • Status changed from New to Closed

Feature was added in r2256.

Actions #2

Updated by Andrew Rudenko almost 15 years ago

Sorry for sent duplicated issue,
but I uses redmine code from 0.8-stable branch r2719 and there is no code provided in r2256.

Actions #3

Updated by Andrew Rudenko almost 15 years ago

  • Status changed from Closed to Reopened
  • Assignee set to Jean-Philippe Lang

issue.rb in r2256 has following code:
http://www.redmine.org/projects/redmine/repository/revisions/2256/diff/trunk/app/models/issue.rb
43 :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}}, 44 :type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') }

issue.rb from 0.8-stable branch are at r2761 and has missed line 44 from r2256:
http://www.redmine.org/projects/redmine/repository/revisions/2761/entry/tags/0.8.4/app/models/issue.rb

also there is no fix in application.css from 0.8-stable (http://www.redmine.org/projects/redmine/repository/revisions/2651/entry/branches/0.8-stable/public/stylesheets/application.css)

the fix from r2256 for application.css was following:
http://www.redmine.org/projects/redmine/repository/revisions/2256/diff/trunk/public/stylesheets/application.css

Actions #4

Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from Reopened to Closed
  • Resolution set to Fixed
Actions

Also available in: Atom PDF