Commit c3aa218c40d858dd23903048ca678e6e0eabbad2

Authored by Nathan Broadbent
1 parent 6c95e407
Exists in master and in 1 other branch production

Added issue link column to errs index, if any issue links are present.

app/views/errs/_table.html.haml
  1 +- any_issue_links = errs.any?{|e| e.issue_link.present? }
1 2 %table.errs
2 3 %thead
3 4 %tr
... ... @@ -6,6 +7,8 @@
6 7 %th Latest
7 8 %th Deploy
8 9 %th Count
  10 + - if any_issue_links
  11 + %th Issue
9 12 %th Resolve
10 13 %tbody
11 14 - errs.each do |err|
... ... @@ -22,9 +25,14 @@
22 25 %td.latest #{time_ago_in_words(last_notice_at err)} ago
23 26 %td.deploy= err.app.last_deploy_at ? err.app.last_deploy_at.to_s(:micro) : 'n/a'
24 27 %td.count= link_to err.notices_count, app_err_path(err.app, err)
  28 + - if any_issue_links
  29 + %td.issue_link
  30 + - if err.issue_link.present?
  31 + = link_to image_tag("#{err.app.issue_tracker.class::Label}_goto.png"), err.issue_link, :target => "_blank"
25 32 %td.resolve= link_to image_tag("thumbs-up.png"), resolve_app_err_path(err.app, err), :title => "Resolve", :method => :put, :confirm => err_confirm, :class => 'resolve' if err.unresolved?
26 33 - if errs.none?
27 34 %tr
28 35 %td{:colspan => 6}
29 36 %em No errs here
30 37 = will_paginate @errs, :previous_label => '« Previous', :next_label => 'Next »'
  38 +
... ...
public/stylesheets/application.css
... ... @@ -582,13 +582,14 @@ td.deploy {
582 582 td.latest {
583 583 white-space: nowrap;
584 584 }
585   -td.count {
  585 +td.count, td.issue_link {
586 586 text-align: center;
587 587 }
588 588  
589 589 .count a {
590 590 display: inline-block;
591 591 padding: 0.1em 0.7em;
  592 + margin-top: 3px;
592 593 color: #fff;
593 594 background: #cc0033 url(images/error-badge-bg.png) 0 bottom repeat-x;
594 595 border: 1px solid #900;
... ...