equal
deleted
inserted
replaced
23 |
23 |
24 from logilab.mtconverter import xml_escape |
24 from logilab.mtconverter import xml_escape |
25 |
25 |
26 from cubicweb.selectors import none_rset, match_user_groups |
26 from cubicweb.selectors import none_rset, match_user_groups |
27 from cubicweb.view import StartupView |
27 from cubicweb.view import StartupView |
|
28 from cubicweb.web.views import actions |
28 |
29 |
29 def dict_to_html(w, dict): |
30 def dict_to_html(w, dict): |
30 # XHTML doesn't allow emtpy <ul> nodes |
31 # XHTML doesn't allow emtpy <ul> nodes |
31 if dict: |
32 if dict: |
32 w(u'<ul>') |
33 w(u'<ul>') |
35 xml_escape(str(key)), xml_escape(repr(dict[key])))) |
36 xml_escape(str(key)), xml_escape(repr(dict[key])))) |
36 w(u'</ul>') |
37 w(u'</ul>') |
37 |
38 |
38 |
39 |
39 |
40 |
|
41 class SiteInfoAction(actions.ManagersAction): |
|
42 __regid__ = 'siteinfo' |
|
43 __select__ = match_user_groups('users','managers') |
|
44 title = _('info') |
|
45 order = 30 |
|
46 |
|
47 |
40 class ProcessInformationView(StartupView): |
48 class ProcessInformationView(StartupView): |
41 """display various web server /repository information""" |
49 """display various web server /repository information""" |
42 __regid__ = 'info' |
50 __regid__ = 'info' |
43 __select__ = none_rset() & match_user_groups('managers') |
51 __select__ = none_rset() & match_user_groups('managers', 'users') |
44 |
52 |
45 title = _('server information') |
53 title = _('server information') |
46 cache_max_age = 0 |
54 cache_max_age = 0 |
47 |
55 |
48 def call(self, **kwargs): |
56 def call(self, **kwargs): |