Project

General

Profile

Defect #2071 » patch_for_2071_against_r4961.diff

Jan from Planio www.plan.io, 2011-02-28 12:39

View differences:

app/models/issue.rb
530 530
  # Returns a string of css classes that apply to the issue
531 531
  def css_classes
532 532
    s = "issue status-#{status.position} priority-#{priority.position}"
533
    if IssuePriority.count == 2
534
      if priority.position == 2
535
        s << ' priority-high'
536
      end
537
    elsif IssuePriority.count == 3
538
      if priority.position == 1
539
        s << ' priority-low'
540
      elsif priority.position == 3
541
        s << ' priority-high'
542
      end
543
    elsif IssuePriority.count == 4
544
      if priority.position == 1
545
        s << ' priority-low'
546
      elsif priority.position == 3
547
        s << ' priority-high'
548
      elsif priority.position == 4
549
        s << ' priority-urgent'
550
      end
551
    elsif IssuePriority.count > 4
552
      max_pos = IssuePriority.maximum(:position)
553
      if priority.position == 1
554
        s << ' priority-low'
555
      elsif priority.position == max_pos - 2
556
        s << ' priority-high'
557
      elsif priority.position == max_pos - 1
558
        s << ' priority-urgent'
559
      elsif priority.position == max_pos
560
        s << ' priority-immediate'
561
      end
562
    end      
533 563
    s << ' closed' if closed?
534 564
    s << ' overdue' if overdue?
535 565
    s << ' created-by-me' if User.current.logged? && author_id == User.current.id
public/themes/alternate/stylesheets/application.css
28 28
/* Issues grid styles by priorities (provided by Wynn Netherland) */
29 29
table.list tr.issue a { color: #666; }
30 30

  
31
tr.odd.priority-5, table.list tbody tr.odd.priority-5:hover { color: #900; font-weight: bold; }
32
tr.odd.priority-5 { background: #ffc4c4; }
33
tr.even.priority-5, table.list tbody tr.even.priority-5:hover { color: #900; font-weight: bold; }
34
tr.even.priority-5 { background: #ffd4d4; }
35
tr.priority-5 a, tr.priority-5:hover a { color: #900; }
36
tr.odd.priority-5 td, tr.even.priority-5 td { border-color: #ffb4b4; }
31
tr.odd.priority-immediate, table.list tbody tr.odd.priority-immediate:hover { color: #900; font-weight: bold; }
32
tr.odd.priority-immediate { background: #ffc4c4; }
33
tr.even.priority-immediate, table.list tbody tr.even.priority-immediate:hover { color: #900; font-weight: bold; }
34
tr.even.priority-immediate { background: #ffd4d4; }
35
tr.priority-immediate a, tr.priority-immediate:hover a { color: #900; }
36
tr.odd.priority-immediate td, tr.even.priority-immediate td { border-color: #ffb4b4; }
37 37

  
38
tr.odd.priority-4, table.list tbody tr.odd.priority-4:hover { color: #900; }
39
tr.odd.priority-4 { background: #ffc4c4; }
40
tr.even.priority-4, table.list tbody tr.even.priority-4:hover { color: #900; }
41
tr.even.priority-4 { background: #ffd4d4; }
42
tr.priority-4 a { color: #900; }
43
tr.odd.priority-4 td, tr.even.priority-4 td { border-color: #ffb4b4; }
38
tr.odd.priority-urgent, table.list tbody tr.odd.priority-urgent:hover { color: #900; }
39
tr.odd.priority-urgent { background: #ffc4c4; }
40
tr.even.priority-urgent, table.list tbody tr.even.priority-urgent:hover { color: #900; }
41
tr.even.priority-urgent { background: #ffd4d4; }
42
tr.priority-urgent a { color: #900; }
43
tr.odd.priority-urgent td, tr.even.priority-urgent td { border-color: #ffb4b4; }
44 44

  
45
tr.odd.priority-3, table.list tbody tr.odd.priority-3:hover { color: #900; }
46
tr.odd.priority-3 { background: #fee; }
47
tr.even.priority-3, table.list tbody tr.even.priority-3:hover { color: #900; }
48
tr.even.priority-3 { background: #fff2f2; }
49
tr.priority-3 a { color: #900; }
50
tr.odd.priority-3 td, tr.even.priority-3 td { border-color: #fcc; }
45
tr.odd.priority-high, table.list tbody tr.odd.priority-high:hover { color: #900; }
46
tr.odd.priority-high { background: #fee; }
47
tr.even.priority-high, table.list tbody tr.even.priority-high:hover { color: #900; }
48
tr.even.priority-high { background: #fff2f2; }
49
tr.priority-high a { color: #900; }
50
tr.odd.priority-high td, tr.even.priority-high td { border-color: #fcc; }
51 51

  
52
tr.odd.priority-1, table.list tbody tr.odd.priority-1:hover { color: #559; }
53
tr.odd.priority-1 { background: #eaf7ff; }
54
tr.even.priority-1, table.list tbody tr.even.priority-1:hover { color: #559; }
55
tr.even.priority-1 { background: #f2faff; }
56
tr.priority-1 a { color: #559; }
57
tr.odd.priority-1 td, tr.even.priority-1 td { border-color: #add7f3; }
52
tr.odd.priority-low, table.list tbody tr.odd.priority-low:hover { color: #559; }
53
tr.odd.priority-low { background: #eaf7ff; }
54
tr.even.priority-low, table.list tbody tr.even.priority-low:hover { color: #559; }
55
tr.even.priority-low { background: #f2faff; }
56
tr.priority-low a { color: #559; }
57
tr.odd.priority-low td, tr.even.priority-low td { border-color: #add7f3; }
58 58

  
59 59
/* Buttons */
60 60
input[type="button"], input[type="submit"], input[type="reset"] { background-color: #f2f2f2; color: #222222; border: 1px outset #cccccc; }
(2-2/2)