equal
deleted
inserted
replaced
1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
1 # copyright 2003-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
3 # |
3 # |
4 # This file is part of CubicWeb. |
4 # This file is part of CubicWeb. |
5 # |
5 # |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
15 # |
15 # |
16 # You should have received a copy of the GNU Lesser General Public License along |
16 # You should have received a copy of the GNU Lesser General Public License along |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
18 """management and error screens""" |
18 """management and error screens""" |
19 |
19 |
20 __docformat__ = "restructuredtext en" |
|
21 from cubicweb import _ |
20 from cubicweb import _ |
22 |
21 |
23 from time import strftime, localtime |
22 from time import strftime, localtime |
24 |
23 |
25 from six import text_type |
24 from six import text_type |
27 from logilab.mtconverter import xml_escape |
26 from logilab.mtconverter import xml_escape |
28 |
27 |
29 from cubicweb.predicates import none_rset, match_user_groups |
28 from cubicweb.predicates import none_rset, match_user_groups |
30 from cubicweb.view import StartupView |
29 from cubicweb.view import StartupView |
31 from cubicweb.web.views import actions, tabs |
30 from cubicweb.web.views import actions, tabs |
|
31 |
32 |
32 |
33 def dict_to_html(w, dict): |
33 def dict_to_html(w, dict): |
34 # XHTML doesn't allow emtpy <ul> nodes |
34 # XHTML doesn't allow emtpy <ul> nodes |
35 if dict: |
35 if dict: |
36 w(u'<ul>') |
36 w(u'<ul>') |
40 w(u'</ul>') |
40 w(u'</ul>') |
41 |
41 |
42 |
42 |
43 class SiteInfoAction(actions.ManagersAction): |
43 class SiteInfoAction(actions.ManagersAction): |
44 __regid__ = 'siteinfo' |
44 __regid__ = 'siteinfo' |
45 __select__ = match_user_groups('users','managers') |
45 __select__ = match_user_groups('users', 'managers') |
46 title = _('Site information') |
46 title = _('Site information') |
47 category = 'manage' |
47 category = 'manage' |
48 order = 1000 |
48 order = 1000 |
49 |
49 |
50 |
50 |