diff --git a/templates/coal/graph.tmpl b/templates/coal/graph.tmpl --- a/templates/coal/graph.tmpl +++ b/templates/coal/graph.tmpl @@ -70,8 +70,7 @@ graph.edge = function(x0, y0, x1, y1, co var revlink = '
  • '; revlink += '_DESC'; -revlink += '_TAGS'; -revlink += '_DATE ago, by _USER
  • '; +revlink += '_TAGS_DATE ago, by _USER'; graph.vertex = function(x, y, color, parity, cur) { @@ -90,8 +89,27 @@ graph.vertex = function(x, y, color, par item = item.replace(/_DESC/, cur[3]); item = item.replace(/_USER/, cur[4]); item = item.replace(/_DATE/, cur[5]); - item = item.replace(/_TAGS/, cur[7].join('  ')); + + var tagspan = ''; + if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { + tagspan = ''; + if (cur[6][1]) { + tagspan += ''; + tagspan += cur[6][0] + ' '; + } else if (!cur[6][1] && cur[6][0] != 'default') { + tagspan += ''; + tagspan += cur[6][0] + ' '; + } + if (cur[7].length) { + for (var t in cur[7]) { + var tag = cur[7][t]; + tagspan += '' + tag + ' '; + } + } + tagspan += ''; + } + item = item.replace(/_TAGS/, tagspan); return [bg, item]; } diff --git a/templates/monoblue/graph.tmpl b/templates/monoblue/graph.tmpl --- a/templates/monoblue/graph.tmpl +++ b/templates/monoblue/graph.tmpl @@ -59,7 +59,7 @@ var revlink = '
  • '; revlink += '_DESC'; - revlink += '_DATE ago, by _USER
  • '; + revlink += '_TAGS_DATE ago, by _USER'; graph.vertex = function(x, y, color, parity, cur) { @@ -79,6 +79,26 @@ item = item.replace(/_USER/, cur[4]); item = item.replace(/_DATE/, cur[5]); + var tagspan = ''; + if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { + tagspan = ''; + if (cur[6][1]) { + tagspan += ''; + tagspan += cur[6][0] + ' '; + } else if (!cur[6][1] && cur[6][0] != 'default') { + tagspan += ''; + tagspan += cur[6][0] + ' '; + } + if (cur[7].length) { + for (var t in cur[7]) { + var tag = cur[7][t]; + tagspan += '' + tag + ' '; + } + } + tagspan += ''; + } + + item = item.replace(/_TAGS/, tagspan); return [bg, item]; } diff --git a/templates/static/style-coal.css b/templates/static/style-coal.css --- a/templates/static/style-coal.css +++ b/templates/static/style-coal.css @@ -119,6 +119,10 @@ a { text-decoration:none; } vertical-align: baseline; } +ul#graphnodes .branchhead { + font-size: 75%; +} + .branchname { color: #000; font-size: 60%; diff --git a/templates/static/style-paper.css b/templates/static/style-paper.css --- a/templates/static/style-paper.css +++ b/templates/static/style-paper.css @@ -110,6 +110,10 @@ a { text-decoration:none; } vertical-align: baseline; } +ul#graphnodes .branchhead { + font-size: 75%; +} + .branchname { color: #000; font-size: 60%;