diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-03-12 10:45:18 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-03-12 10:45:18 +0100 |
commit | 4c3071db2a009e41af87bfada2fcb27ffc70d474 (patch) | |
tree | df68fe781f3d3cadc6088d39f7078e15fe6a3dce /chimere/actions.py | |
parent | a5bd515c200f91d1e17b535726b2689a9eefaa08 (diff) | |
download | Chimère-4c3071db2a009e41af87bfada2fcb27ffc70d474.tar.bz2 Chimère-4c3071db2a009e41af87bfada2fcb27ffc70d474.zip |
Manage options "show directory" and "show inside popup" in db
Diffstat (limited to 'chimere/actions.py')
-rw-r--r-- | chimere/actions.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chimere/actions.py b/chimere/actions.py index 1425e14..f965e9b 100644 --- a/chimere/actions.py +++ b/chimere/actions.py @@ -53,10 +53,6 @@ default_actions = [ Action('edit-polygon', 'chimere:editpolygon', _('Add a new polygon'))), )] -if hasattr(settings, 'CHIMERE_DIRECTORY') and settings.CHIMERE_DIRECTORY: - default_actions.append((Action('categories', 'chimere:category-directory', - _('Directory')), [])) - if settings.CHIMERE_FEEDS: default_actions.append((Action('rss', 'chimere:feeds-form', _('RSS feeds')), [])) @@ -77,6 +73,12 @@ def actions(area_name=''): q = Area.objects.filter(default=True) if q.count(): area = q.all()[0] + if area.show_directory: + acts.insert( + len(acts) - 3, + (Action('categories', 'chimere:category-directory', + _('Directory')), []) + ) real_acts = [] for act, childs in acts: |