diff pylons_app/controllers/graph.py @ 282:237470e64bb8

switched filters into webhelpers for easy of usage. Rewrite of html to use predefined templates from branches shortlog tags, for DRY usage. Added info messages about empty branches/tags etc.
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 13 Jun 2010 23:56:16 +0200
parents 3782a6d698af
children
line wrap: on
line diff
--- a/pylons_app/controllers/graph.py	Sun Jun 13 23:14:04 2010 +0200
+++ b/pylons_app/controllers/graph.py	Sun Jun 13 23:56:16 2010 +0200
@@ -25,9 +25,9 @@
 from mercurial.graphmod import revisions as graph_rev, colored, CHANGESET
 from mercurial.node import short
 from pylons import request, tmpl_context as c
+import pylons_app.lib.helpers as h
 from pylons_app.lib.auth import LoginRequired
 from pylons_app.lib.base import BaseController, render
-from pylons_app.lib.filters import age as _age, person
 from pylons_app.model.hg_model import HgModel
 from simplejson import dumps
 from webhelpers.paginate import Page
@@ -74,9 +74,9 @@
             if type != CHANGESET:
                 continue
             node = short(ctx.node())
-            age = _age(ctx.date())
+            age = h.age(ctx.date())
             desc = ctx.description()
-            user = person(ctx.user())
+            user = h.person(ctx.user())
             branch = ctx.branch()
             branch = branch, repo.repo.branchtags().get(branch) == ctx.node()
             data.append((node, vtx, edges, desc, user, age, branch, ctx.tags()))