From 245e837ae3058d14f69b2c641380f0339aa1a270 Mon Sep 17 00:00:00 2001 From: bkfox Date: Tue, 28 Mar 2017 17:46:11 +0200 Subject: [PATCH] update cron script -- mode is now auto --- aircox_cms/sections.py | 7 +++++++ aircox_cms/static/aircox_cms/css/layout.css | 5 ++++- aircox_cms/static/aircox_cms/js/player.js | 2 -- .../templates/aircox_cms/sections/section_player.html | 4 +--- aircox_cms/templates/aircox_cms/snippets/date_list.html | 2 ++ scripts/cron_diffusions | 6 ++++-- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/aircox_cms/sections.py b/aircox_cms/sections.py index 550e910..84e0c78 100755 --- a/aircox_cms/sections.py +++ b/aircox_cms/sections.py @@ -401,6 +401,12 @@ class DatedListBase(models.Model): help_text = _('if selected, show dates navigation per weeks instead ' 'of show days equally around the current date') ) + hide_icons = models.BooleanField( + _('hide icons'), + default = False, + help_text = _('if selected, images of publications will not be ' + 'displayed in the list') + ) class Meta: abstract = True @@ -409,6 +415,7 @@ class DatedListBase(models.Model): MultiFieldPanel([ FieldPanel('nav_days'), FieldPanel('nav_per_week'), + FieldPanel('hide_icons'), ], heading=_('Navigation')), ] diff --git a/aircox_cms/static/aircox_cms/css/layout.css b/aircox_cms/static/aircox_cms/css/layout.css index eadd5ce..ae363ba 100755 --- a/aircox_cms/static/aircox_cms/css/layout.css +++ b/aircox_cms/static/aircox_cms/css/layout.css @@ -82,7 +82,6 @@ ul { margin: 0.2em 1em; } - body > .top { position: fixed; z-index: 10000000; @@ -137,6 +136,10 @@ body > .header { } +body section ul { + padding: 0em; +} + /** content: list & items **/ .list { width: 100%; diff --git a/aircox_cms/static/aircox_cms/js/player.js b/aircox_cms/static/aircox_cms/js/player.js index 0851db4..556e885 100755 --- a/aircox_cms/static/aircox_cms/js/player.js +++ b/aircox_cms/static/aircox_cms/js/player.js @@ -249,8 +249,6 @@ function Player(id, on_air_url, show_cover) { this.init_events(); this.load(); - - this.update_on_air(); } Player.prototype = { diff --git a/aircox_cms/templates/aircox_cms/sections/section_player.html b/aircox_cms/templates/aircox_cms/sections/section_player.html index cc720dd..bf0da40 100755 --- a/aircox_cms/templates/aircox_cms/sections/section_player.html +++ b/aircox_cms/templates/aircox_cms/sections/section_player.html @@ -19,9 +19,7 @@ var sound = player.playlist.add( ); sound.item.className += ' live'; player.playlist.select(sound, false); - +player.update_on_air(); {% endblock %} - - diff --git a/aircox_cms/templates/aircox_cms/snippets/date_list.html b/aircox_cms/templates/aircox_cms/snippets/date_list.html index ff82167..c3e4724 100755 --- a/aircox_cms/templates/aircox_cms/snippets/date_list.html +++ b/aircox_cms/templates/aircox_cms/snippets/date_list.html @@ -36,10 +36,12 @@ {# you might like to hide it by default -- this more for sections #}

{{ day|date:'l d F' }}

{% with item_date_format="H:i" %} + {% with list_no_cover=self.hide_icons %} {% for item in list %} {% include "aircox_cms/snippets/date_list_item.html" %} {% endfor %} {% endwith %} + {% endwith %} {% endfor %} diff --git a/scripts/cron_diffusions b/scripts/cron_diffusions index 3a31cc1..606d557 100755 --- a/scripts/cron_diffusions +++ b/scripts/cron_diffusions @@ -3,7 +3,9 @@ # aircox daily tasks: # - diffusions monitoring for the current month export PATH="/srv/apps/aircox/venv/bin" -/srv/apps/aircox/manage.py diffusions_monitor --update --clean --check +cd /srv/app/aircox/ +scripts/launch_in_venv ./manage.py diffusions_monitor --update --clean --check --mode auto # - diffusions monitoring for the next month -/srv/apps/aircox/manage.py diffusions_monitor --update --next-month +scripts/launch_in_venv ./manage.py diffusions_monitor --update --next-month --mode auto +cd -