~qajenkinsbot/qa-dashboard/production

« back to all changes in this revision

Viewing changes to common/templatetags/dashboard_extras.py

  • Committer: Joe Talbott
  • Date: 2013-05-14 01:17:05 UTC
  • mto: (1.1.411 qa-dashboard)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: joe.talbott@canonical.com-20130514011705-bcakz536ejsursu6
smokeng - Add smoke rewrite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
register.filter('not_zero_color', not_zero_color)
57
57
 
58
58
 
 
59
def bug_list_numbers(bugs, prefix=""):
 
60
    html = ""
 
61
 
 
62
    bug_numbers = []
 
63
    for bug in bugs:
 
64
        if bug not in bug_numbers:
 
65
            bug_numbers.append(bug)
 
66
 
 
67
            html = " ".join([
 
68
                html,
 
69
                '<a href="https://bugs.launchpad.net/bugs/{}/">{}LP:#{}</a>'.format(bug, prefix, bug)
 
70
            ])
 
71
 
 
72
    return html
 
73
register.filter('bug_list_numbers', bug_list_numbers)
 
74
 
 
75
 
59
76
def bug_list(bugs, prefix=""):
60
77
    html = ""
61
78