diff --git a/aircox_cms/static/wagtailadmin/css/core.css b/aircox_cms/static/wagtailadmin/css/core.css
index 47d7d32..92736a3 100644
--- a/aircox_cms/static/wagtailadmin/css/core.css
+++ b/aircox_cms/static/wagtailadmin/css/core.css
@@ -5001,6 +5001,10 @@ body.ready .nav-main a {
background: #262626;
}
+.nav-submenu h1 {
+ color: #a2a2a2;
+}
+
.nav-submenu h2 {
display: none;
}
diff --git a/aircox_cms/wagtail_hooks.py b/aircox_cms/wagtail_hooks.py
index 5bb0bdb..2186895 100755
--- a/aircox_cms/wagtail_hooks.py
+++ b/aircox_cms/wagtail_hooks.py
@@ -163,6 +163,30 @@ class GenericMenu(Menu):
return super().render_html(request)
+class GroupMenuItem(MenuItem):
+ """
+ Display a list of items based on given list of items
+ """
+ def __init__(self, label, *args, **kwargs):
+ super().__init__(label, None, *args, **kwargs)
+
+ def get_queryset(self):
+ pass
+
+ def make_item(self, item):
+ pass
+
+ def render_html(self, request):
+ self.request = request
+ self.station = self.request and self.request.aircox.station
+
+ title = '
{}
'.format(self.label)
+ qs = [
+ self.make_item(item).render_html(request)
+ for item in self.get_queryset()
+ ]
+ return title + '\n'.join(qs)
+
#
# Today's diffusions menu
@@ -261,31 +285,6 @@ def register_programs_menu_item():
# Submenu hides themselves if there are no children
#
#
-class GroupMenuItem(MenuItem):
- """
- Display a list of items based on given list of items
- """
- def __init__(self, label, *args, **kwargs):
- super().__init__(label, None, *args, **kwargs)
-
- def get_queryset(self):
- pass
-
- def make_item(self, item):
- pass
-
- def render_html(self, request):
- self.request = request
- self.station = self.request and self.request.aircox.station
-
- title = '{}
'.format(self.label)
- qs = [
- self.make_item(item).render_html(request)
- for item in self.get_queryset()
- ]
- return title + '\n'.join(qs)
-
-
class SelectStationMenuItem(GroupMenuItem):
"""
Menu to display today's diffusions
@@ -297,7 +296,7 @@ class SelectStationMenuItem(GroupMenuItem):
return MenuItem(
station.name,
reverse('wagtailadmin_home') + '?aircox.station=' + str(station.pk),
- classnames = 'icon ' + ('icon-success'
+ classnames = 'icon ' + ('icon-success menu-active'
if station == self.station else
'icon-cross'
if not station.active else
diff --git a/notes.md b/notes.md
index 3351ac3..6399281 100755
--- a/notes.md
+++ b/notes.md
@@ -2,8 +2,8 @@ This file is used as a reminder, can be used as crappy documentation too.
# for the 1.0
-- sounds:
- - detect id3 tags
+- logs:
+ - do not add track if between two consecutive diffusions
- run tests:
- streamer: dealer & streams hours (to localtime)
x diffusions: update & check algorithms
@@ -15,7 +15,7 @@ This file is used as a reminder, can be used as crappy documentation too.
\--> rewrite streamer for client-server controller
\--> move liquidsoap control on commands/streamer.py
- cms:
- - button to select the current station
+ x button to select the current station
# conventions