• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

修訂8c1bf6fd87aa2f9bd3531f45d4a27241d5e1fbba (tree)
時間2012-05-30 06:42:25
作者Dave Brondsema <dbrondsema@geek...>
CommiterDave Brondsema

Log Message

remove old unused code

Change Summary

差異

--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -42,37 +42,13 @@ class W:
4242 audit = aw.AuditLog()
4343 page_list=ffw.PageList()
4444
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+
6946
7047 class AdminApp(Application):
7148 '''This is the admin app. It is pretty much required for
7249 a functioning allura project.
7350 '''
7451 __version__ = version.__version__
75- widget=AdminWidgets
7652 installable=False
7753 _installable_tools = None
7854 tool_label = 'admin'
--- a/Allura/allura/ext/admin/templates/widgets/tool_status.html
+++ /dev/null
@@ -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>
--- a/Allura/allura/ext/admin/templates/widgets/users.html
+++ /dev/null
@@ -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>