allura
修訂 | 8c1bf6fd87aa2f9bd3531f45d4a27241d5e1fbba (tree) |
---|---|
時間 | 2012-05-30 06:42:25 |
作者 | Dave Brondsema <dbrondsema@geek...> |
Commiter | Dave Brondsema |
remove old unused code
@@ -42,37 +42,13 @@ class W: | ||
42 | 42 | audit = aw.AuditLog() |
43 | 43 | page_list=ffw.PageList() |
44 | 44 | |
45 | -class AdminWidgets(WidgetController): | |
46 | - widgets=['users', 'tool_status'] | |
47 | - | |
48 | - def __init__(self, app): pass | |
49 | - | |
50 | - @expose('jinja:allura.ext.admin:templates/widgets/users.html') | |
51 | - def users(self): | |
52 | - return dict(project_users=c.project.users()) | |
53 | - | |
54 | - @expose('jinja:allura.ext.admin:templates/widgets/tool_status.html') | |
55 | - def tool_status(self): | |
56 | - 'Display # of Shortlinks for each (mounted) tool' | |
57 | - links = defaultdict(list) | |
58 | - for ac in c.project.app_configs: | |
59 | - mp = ac.options.mount_point | |
60 | - q = M.Shortlink.query.find(dict( | |
61 | - project_id=c.project._id, | |
62 | - app_config_id = ac._id)) | |
63 | - ct = q.count() | |
64 | - if 0 < ct < 10: | |
65 | - links[mp] = q.all() | |
66 | - elif ct: | |
67 | - links[mp] = [ None ] * ct | |
68 | - return dict(links=links) | |
45 | + | |
69 | 46 | |
70 | 47 | class AdminApp(Application): |
71 | 48 | '''This is the admin app. It is pretty much required for |
72 | 49 | a functioning allura project. |
73 | 50 | ''' |
74 | 51 | __version__ = version.__version__ |
75 | - widget=AdminWidgets | |
76 | 52 | installable=False |
77 | 53 | _installable_tools = None |
78 | 54 | tool_label = 'admin' |
@@ -1,19 +0,0 @@ | ||
1 | -<div class="portlet"> | |
2 | - <h4>Tool Status</h4> | |
3 | - <dl> | |
4 | - {% for mp, alinks in links.iteritems() %} | |
5 | - <dt>{{mp}}</dt> | |
6 | - <dd> | |
7 | - {% if alinks|length < 5 %} | |
8 | - <ul> | |
9 | - {% for al in alinks %} | |
10 | - <li><a href="{{al.url}}">[{{mp}}:{{al.link}}]</a></li> | |
11 | - {% endfor %} | |
12 | - </ul> | |
13 | - {% else %} | |
14 | - {{alinks|length}} artifacts | |
15 | - {% endif %} | |
16 | - </dd> | |
17 | - {% endfor %} | |
18 | - </dl> | |
19 | -</div> |
@@ -1,9 +0,0 @@ | ||
1 | -<div class="portlet"> | |
2 | - <h4>Project Users</h4> | |
3 | - <ul> | |
4 | - {% for user in project_users %} | |
5 | - <li> | |
6 | - <a href="{{user.url()}}profile/">{{user.display_name}}</a></li> | |
7 | - {% endfor %} | |
8 | - </ul> | |
9 | -</div> |