Révision 80784d04
Ajouté par Frédéric Péters il y a plus de 5 ans
auquotidien/modules/admin.py | ||
---|---|---|
85 | 85 |
form.add(SingleSelectWidget, 'forms', title = _('Admin role for forms'), |
86 | 86 |
value = permissions_cfg.get('forms', None), |
87 | 87 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
88 |
form.add(SingleSelectWidget, 'events', title = _('Admin role for events'), |
|
89 |
value = permissions_cfg.get('events', None), |
|
90 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
91 |
form.add(SingleSelectWidget, 'links', title = _('Admin role for links'), |
|
92 |
value = permissions_cfg.get('links', None), |
|
93 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
94 |
form.add(SingleSelectWidget, 'announces', title = _('Admin role for announces'), |
|
95 |
value = permissions_cfg.get('announces', None), |
|
96 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
97 |
form.add(SingleSelectWidget, 'payments', title = _('Admin role for payments'), |
|
98 |
value = permissions_cfg.get('payments', None), |
|
99 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
100 |
form.add(SingleSelectWidget, 'strongbox', title = _('Admin role for strongbox'), |
|
101 |
value = permissions_cfg.get('strongbox', None), |
|
102 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
88 |
if get_publisher().has_site_option('auquotidien-events'): |
|
89 |
form.add(SingleSelectWidget, 'events', title = _('Admin role for events'), |
|
90 |
value = permissions_cfg.get('events', None), |
|
91 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
92 |
if get_publisher().has_site_option('auquotidien-links'): |
|
93 |
form.add(SingleSelectWidget, 'links', title = _('Admin role for links'), |
|
94 |
value = permissions_cfg.get('links', None), |
|
95 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
96 |
if get_publisher().has_site_option('auquotidien-announces'): |
|
97 |
form.add(SingleSelectWidget, 'announces', title = _('Admin role for announces'), |
|
98 |
value = permissions_cfg.get('announces', None), |
|
99 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
100 |
if get_publisher().has_site_option('auquotidien-payments'): |
|
101 |
form.add(SingleSelectWidget, 'payments', title = _('Admin role for payments'), |
|
102 |
value = permissions_cfg.get('payments', None), |
|
103 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
104 |
if get_publisher().has_site_option('auquotidien-strongbox'): |
|
105 |
form.add(SingleSelectWidget, 'strongbox', title = _('Admin role for strongbox'), |
|
106 |
value = permissions_cfg.get('strongbox', None), |
|
107 |
options = [(None, _('Nobody'), None)] + get_user_roles()) |
|
103 | 108 |
form.add_submit('submit', _('Submit')) |
104 | 109 |
form.add_submit('cancel', _('Cancel')) |
105 | 110 |
|
... | ... | |
256 | 261 |
|
257 | 262 |
class SettingsDirectory(wcs.admin.settings.SettingsDirectory): |
258 | 263 |
def _q_index(self): |
264 |
if not (get_publisher().has_site_option('auquotidien-announces') or |
|
265 |
get_publisher().has_site_option('auquotidien-links') or |
|
266 |
get_publisher().has_site_option('auquotidien-events') or |
|
267 |
get_publisher().has_site_option('auquotidien-payments') or |
|
268 |
get_publisher().has_site_option('auquotidien-strongvox')): |
|
269 |
return super(SettingsDirectory, self)._q_index() |
|
259 | 270 |
r = TemplateIO(html=True) |
260 | 271 |
r += htmltext(super(SettingsDirectory, self)._q_index()) |
261 | 272 |
r += htmltext('<div class="splitcontent-right">') |
262 | 273 |
r += htmltext('<div class="bo-block">') |
263 | 274 |
r += htmltext('<h2>%s</h2>') % _('Extra Options') |
264 | 275 |
r += htmltext('<ul>') |
265 |
r += htmltext('<li><a href="aq/announces">%s</a></li>') % _('Announces Options') |
|
276 |
if get_publisher().has_site_option('auquotidien-announces'): |
|
277 |
r += htmltext('<li><a href="aq/announces">%s</a></li>') % _('Announces Options') |
|
266 | 278 |
r += htmltext('<li><a href="aq/permissions">%s</a></li>') % _('Permissions') |
267 |
r += htmltext('<li><a href="aq/event_keywords">%s</a></li>') % _('Event Keywords') |
|
268 |
r += htmltext('<li><a href="aq/announce_themes">%s</a></li>') % _('Announce Themes') |
|
279 |
if get_publisher().has_site_option('auquotidien-events'): |
|
280 |
r += htmltext('<li><a href="aq/event_keywords">%s</a></li>') % _('Event Keywords') |
|
281 |
if get_publisher().has_site_option('auquotidien-announces'): |
|
282 |
r += htmltext('<li><a href="aq/announce_themes">%s</a></li>') % _('Announce Themes') |
|
269 | 283 |
if get_publisher().has_site_option('strongbox'): |
270 | 284 |
r += htmltext('<li><a href="aq/strongbox">%s</a></li>') % _('Strongbox Support') |
271 | 285 |
if get_publisher().has_site_option('clicrdv'): |
Formats disponibles : Unified diff
do not expose legacy features (#28512)