Advertisement
Joubu

Display different colors on the dependency graph

Sep 9th, 2016
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. From f9e03f02f5907064bbcde3a874d34c4a19f06089 Mon Sep 17 00:00:00 2001
  2. From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
  3. Date: Fri, 9 Sep 2016 09:32:16 +0100
  4. Subject: [PATCH 1/1] Display different colors on the dependency graph
  5.  
  6. ---
  7. showdependencygraph.cgi | 14 +++++++++++++-
  8. template/en/default/bug/dependency-graph.html.tmpl | 6 +++++-
  9. 2 files changed, 18 insertions(+), 2 deletions(-)
  10.  
  11. diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi
  12. index 7b2d2f5..eb51e11 100755
  13. --- a/showdependencygraph.cgi
  14. +++ b/showdependencygraph.cgi
  15. @@ -215,7 +215,19 @@ foreach my $k (@bug_ids) {
  16. }
  17.  
  18. if (is_open_state($stat)) {
  19. - push(@params, "color=green");
  20. + if ($stat eq 'Needs Signoff') {
  21. + push(@params, "color=orange");
  22. + } elsif ($stat eq 'Signed off') {
  23. + push(@params, "color=yellow");
  24. + } elsif ($stat eq 'Passed QA') {
  25. + push(@params, "color=blue");
  26. + } elsif ($stat eq 'Failed QA' or $stat eq 'Does not apply') {
  27. + push(@params, "color=red");
  28. + } elsif ($stat eq 'In Discussion') {
  29. + push(@params, "color=brown");
  30. + } else {
  31. + push(@params, "color=green");
  32. + }
  33. }
  34.  
  35. if (@params) {
  36. diff --git a/template/en/default/bug/dependency-graph.html.tmpl b/template/en/default/bug/dependency-graph.html.tmpl
  37. index 69afa2d..80bff68 100644
  38. --- a/template/en/default/bug/dependency-graph.html.tmpl
  39. +++ b/template/en/default/bug/dependency-graph.html.tmpl
  40. @@ -35,7 +35,11 @@
  41. [% image_map %]
  42.  
  43. <p>
  44. - Green circles represent open [% terms.bugs %].
  45. + Orange circles represent <span style="color:orange">Needs Signoff</span> [% terms.bugs %].
  46. + Yellow circles represent <span style="color:yellow">Signed Off</span> [% terms.bugs %].
  47. + Blue circles represent <span style="color:blue">Passed QA</span> [% terms.bugs %].
  48. + Red circles represent <span style="color:red">Failed QA or Does not apply</span> [% terms.bugs %].
  49. + Brown circles represent <span style="color:brown">In discussion</span> [% terms.bugs %].
  50. </p>
  51.  
  52. [% IF image_map %]
  53. --
  54. 2.1.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement