From e3851e39cb97643c20e960e5e5019bf4584b714b Mon Sep 17 00:00:00 2001 From: bkfox Date: Wed, 17 May 2017 20:55:34 +0200 Subject: [PATCH] work on panels --- aircox/locale/fr/LC_MESSAGES/django.mo | Bin 5336 -> 5184 bytes aircox/locale/fr/LC_MESSAGES/django.po | 262 +++++++++++--------- aircox/models.py | 11 +- aircox/views.py | 3 +- aircox_cms/locale/fr/LC_MESSAGES/django.mo | Bin 17718 -> 17578 bytes aircox_cms/locale/fr/LC_MESSAGES/django.po | 217 +++++++++------- aircox_cms/models.py | 7 +- aircox_cms/static/wagtailadmin/css/core.css | 4 - aircox_cms/wagtail_hooks.py | 99 +++++++- 9 files changed, 383 insertions(+), 220 deletions(-) diff --git a/aircox/locale/fr/LC_MESSAGES/django.mo b/aircox/locale/fr/LC_MESSAGES/django.mo index 87b1fbc8f19a845c033188f7412a22d73321646f..bea74027c1a4a93637af52b5faa689bff03fc46f 100644 GIT binary patch delta 2012 zcmZA1duWw)9LMqRv*vE6xt&d?mTphx%FWj1a?a_NW?phyOB2HWk)!94J#x;*E{9E+ z9Ga0qkygXA3}KfBe5X+BZLT%IY_9#dVkLOoq~Rx@ALXSx8LRa z`#tAo(>F`gw`z*tGs+HPA@OOESrWTvaiC0>m=)tad;srbIsT0cu(;H$0_(98n~fcV2Y&zjOC5yYnl!o9BLX=N z_qvfwwjR}9FKPmP?*2ddj9}M=-*zW62*5=OK=LS@oQ|rYgmWV*odXPt>;@%GhK@s z$VSwFd)@gfxQO%J$k^;4YGAKp8=l0pQgn@qW_}Y{6T6EVz@MlFOCn}VunyJ08dQfn zQ8V6!dT$6d&~a3|N027$80z^`sCGU=P2`6N`BwuoT+mD^$dewd#txi|8tGPdeFFD; zX0N*QJC*t8?;**t`=|lf?0m=bu$R-tsQXEzD;q-%@X&1XuhhKB1+DQ>)BvVXyZZ!c zW*6M`uTTTMglgb2>iz5P{?G3IuQR6hsPt}^K!IE)(U+wOb{ znUtNxrFaHw@dj$Zf4K9z&LY-L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}?d#s`@(*e}hu!Fh7taG5U zmna}gv<`c8hoV0q{p~K5s?6f@nLsL7TAz8jcp#8EQ__&SQqq^{DBTrki~6x~&k0R9 zi77YX%($;{k#MHm*;y~*L?hhxoOr@bgrbqup|Zxtd{s{lO@+p%a?ibaFOqPg}&?QQGo&fF?LSJ0GAhux4v%b4d(c>e3oL}+r-kJE9SYbPF! zWZqsi5-7^1$NWUuF4QO>U8`A#_G`I*}4;=nrBHeyBMr0LE$UOeGU PNBwNtxRFRU?V0}pOQHFt diff --git a/aircox/locale/fr/LC_MESSAGES/django.po b/aircox/locale/fr/LC_MESSAGES/django.po index 54c2e25..f3016db 100755 --- a/aircox/locale/fr/LC_MESSAGES/django.po +++ b/aircox/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-01-08 22:44+0100\n" +"POT-Creation-Date: 2017-05-17 20:54+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,47 +18,47 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: aircox/admin.py:82 aircox/models.py:727 +#: admin.py:82 models.py:728 msgid "Schedule" msgstr "Horaire" -#: aircox/admin.py:111 aircox/models.py:497 +#: admin.py:111 models.py:490 msgid "end" msgstr "fin" -#: aircox/admin.py:152 +#: admin.py:153 msgid "Program" msgstr "Programme" -#: aircox/admin.py:156 +#: admin.py:157 msgid "Day" msgstr "Jour" -#: aircox/admin.py:160 +#: admin.py:161 msgid "Rerun" msgstr "Rediffusion" -#: aircox/models.py:105 +#: models.py:84 msgid "name" msgstr "nom" -#: aircox/models.py:137 +#: models.py:116 msgid "title" msgstr "titre" -#: aircox/models.py:141 +#: models.py:120 msgid "artist" msgstr "artiste" -#: aircox/models.py:145 +#: models.py:124 msgid "tags" msgstr "tags" -#: aircox/models.py:149 +#: models.py:128 msgid "information" msgstr "information" -#: aircox/models.py:152 +#: models.py:131 msgid "" "additional informations about this track, such as the version, if is it a " "remix, features, etc." @@ -66,258 +66,280 @@ msgstr "" "informations additionnelles à propos de ce morceau, telles que la version, " "s'ils'agit d'un remix, les fonctionnalités, etc" -#: aircox/models.py:157 +#: models.py:136 msgid "position in the playlist" msgstr "position dans la playlist" -#: aircox/models.py:160 +#: models.py:139 msgid "in seconds" msgstr "en secondes" -#: aircox/models.py:162 +#: models.py:141 msgid "position in the playlist is expressed in seconds" msgstr "position dans la playlist exprimée en secondes" -#: aircox/models.py:169 aircox/templates/aircox/controllers/stats.html:56 +#: models.py:148 templates/aircox/controllers/stats.html:59 msgid "Track" msgstr "Morceau" -#: aircox/models.py:170 +#: models.py:149 msgid "Tracks" msgstr "Morceaux" -#: aircox/models.py:186 +#: models.py:165 msgid "path" msgstr "chemin" -#: aircox/models.py:187 +#: models.py:166 msgid "path to the working directory" msgstr "chemin vers le repertoire courant" -#: aircox/models.py:379 aircox/models.py:1132 aircox/models.py:1217 +#: models.py:171 +#, fuzzy +#| msgid "station" +msgid "default station" +msgstr "station" + +#: models.py:173 +msgid "if checked, this station is used as the main one" +msgstr "" + +#: models.py:370 models.py:1181 models.py:1318 msgid "station" msgstr "station" -#: aircox/models.py:382 aircox/models.py:1144 +#: models.py:373 models.py:1193 msgid "active" msgstr "actif" -#: aircox/models.py:384 +#: models.py:375 msgid "if not checked this program is no longer active" msgstr "si selectionné, ce programme n'est plus actif" -#: aircox/models.py:387 +#: models.py:378 msgid "syncronise" msgstr "synchroniser" -#: aircox/models.py:389 +#: models.py:380 msgid "update later diffusions according to schedule changes" msgstr "" "mettre à jour les diffusions suivantes selon les changements de l'horaire" -#: aircox/models.py:483 aircox/models.py:528 +#: models.py:476 models.py:521 msgid "related program" msgstr "programme apparenté" -#: aircox/models.py:486 +#: models.py:479 msgid "delay" msgstr "délai" -#: aircox/models.py:488 -msgid "delay between two sound plays" -msgstr "délai entre deux diffusions de son" +#: models.py:481 +msgid "minimal delay between two sound plays" +msgstr "délai minimum entre deux sons" -#: aircox/models.py:491 +#: models.py:484 msgid "begin" msgstr "début" -#: aircox/models.py:493 aircox/models.py:499 +#: models.py:486 models.py:492 msgid "used to define a time range this stream isplayed" msgstr "" -"utilisé pour définir un intervalle de temps pendant laquelle ce stream est " -"joué" +"utilisé pour définir un intervalle de temps pendant lequel ce stream est joué" -#: aircox/models.py:530 aircox/models.py:1229 +#: models.py:524 models.py:1330 msgid "date" msgstr "date" -#: aircox/models.py:532 aircox/models.py:946 +#: models.py:525 +#, fuzzy +#| msgid "start of the diffusion" +msgid "date of the first diffusion" +msgstr "début de la diffusion" + +#: models.py:528 models.py:995 msgid "duration" msgstr "durée" -#: aircox/models.py:533 +#: models.py:529 msgid "regular duration" msgstr "durée normale" -#: aircox/models.py:536 +#: models.py:532 msgid "frequency" msgstr "fréquence" -#: aircox/models.py:539 +#: models.py:535 msgid "ponctual" msgstr "ponctuel" -#: aircox/models.py:540 +#: models.py:536 msgid "first week of the month" msgstr "première semaine du mois" -#: aircox/models.py:541 +#: models.py:537 msgid "second week of the month" msgstr "deuxième semaine du mois" -#: aircox/models.py:542 +#: models.py:538 msgid "third week of the month" msgstr "troisième semaine du mois" -#: aircox/models.py:543 +#: models.py:539 msgid "fourth week of the month" msgstr "quatrième semaine du mois" -#: aircox/models.py:544 +#: models.py:540 msgid "last week of the month" msgstr "dernière semaine du mois" -#: aircox/models.py:545 +#: models.py:541 msgid "first and third weeks of the month" msgstr "première et troisième semaines du mois" -#: aircox/models.py:546 +#: models.py:542 msgid "second and fourth weeks of the month" msgstr "deuxième et quatrième semaines du mois" -#: aircox/models.py:547 +#: models.py:543 msgid "every week" msgstr "toutes les semaines" -#: aircox/models.py:548 +#: models.py:544 msgid "one week on two" msgstr "une semaine sur deux" -#: aircox/models.py:554 aircox/models.py:814 -msgid "initial" -msgstr "début" +#: models.py:550 +msgid "initial schedule" +msgstr "horaire initial" -#: aircox/models.py:728 +#: models.py:729 msgid "Schedules" msgstr "Horaires" -#: aircox/models.py:805 aircox/models.py:916 +#: models.py:826 models.py:965 msgid "program" msgstr "programme" -#: aircox/models.py:809 aircox/models.py:927 aircox/models.py:1139 -#: aircox/models.py:1211 +#: models.py:830 models.py:976 models.py:1188 models.py:1312 msgid "type" msgstr "type" -#: aircox/models.py:816 +#: models.py:835 +msgid "initial diffusion" +msgstr "diffusion initiale" + +#: models.py:837 msgid "the diffusion is a rerun of this one" msgstr "la diffusion est une rediffusion de celle-ci" -#: aircox/models.py:825 +#: models.py:847 models.py:849 +msgid "conflicts" +msgstr "" + +#: models.py:852 msgid "start of the diffusion" msgstr "début de la diffusion" -#: aircox/models.py:826 +#: models.py:853 msgid "end of the diffusion" msgstr "fin de la diffusion" -#: aircox/models.py:895 aircox/views.py:198 +#: models.py:944 views.py:198 msgid "Diffusion" msgstr "Diffusion" -#: aircox/models.py:896 aircox/templates/aircox/controllers/monitor.html:151 +#: models.py:945 templates/aircox/controllers/monitor.html:151 msgid "Diffusions" msgstr "Diffusions" -#: aircox/models.py:899 +#: models.py:948 msgid "edit the diffusion's planification" msgstr "éditer la planification de la diffusion" -#: aircox/models.py:918 +#: models.py:967 msgid "program related to it" msgstr "programme apparenté à celui-ci" -#: aircox/models.py:922 +#: models.py:971 msgid "diffusion" msgstr "diffusion" -#: aircox/models.py:924 +#: models.py:973 msgid "initial diffusion related it" msgstr "diffusion initiale apparentée" -#: aircox/models.py:932 +#: models.py:981 msgid "file" msgstr "fichier" -#: aircox/models.py:941 +#: models.py:990 msgid "embed HTML code" msgstr "code HTML intégré" -#: aircox/models.py:943 +#: models.py:992 msgid "HTML code used to embed a sound from external plateform" msgstr "" "code HTML utilisé pour intégrer un son depuis une plateforme extérieure" -#: aircox/models.py:948 +#: models.py:997 msgid "duration of the sound" msgstr "durée du son" -#: aircox/models.py:951 +#: models.py:1000 msgid "modification time" msgstr "temps de la modification" -#: aircox/models.py:953 +#: models.py:1002 msgid "last modification date and time" msgstr "date et heure de la dernière modification" -#: aircox/models.py:956 +#: models.py:1005 msgid "good quality" msgstr "bonne qualité" -#: aircox/models.py:957 +#: models.py:1006 msgid "sound's quality is okay" msgstr "la qualité du son est okay" -#: aircox/models.py:961 +#: models.py:1010 msgid "public" msgstr "public" -#: aircox/models.py:963 +#: models.py:1012 msgid "the sound is accessible to the public" msgstr "ce son est accessible au public" -#: aircox/models.py:1023 +#: models.py:1072 msgid "unknown" msgstr "" -#: aircox/models.py:1099 +#: models.py:1148 msgid "Sound" msgstr "Son" -#: aircox/models.py:1100 +#: models.py:1149 msgid "Sounds" msgstr "Sons" -#: aircox/models.py:1135 +#: models.py:1184 #, fuzzy #| msgid "duration" msgid "direction" msgstr "durée" -#: aircox/models.py:1146 +#: models.py:1195 #, fuzzy #| msgid "this output is active" msgid "this port is active" msgstr "cette sortie est active" -#: aircox/models.py:1149 +#: models.py:1198 #, fuzzy #| msgid "output settings" msgid "port settings" msgstr "paramètres de sortie" -#: aircox/models.py:1150 +#: models.py:1199 #, fuzzy #| msgid "" #| "list of comma separated params available; this is put in the output " @@ -329,35 +351,37 @@ msgstr "" "liste des paramètres disponibles séparés par des virgules; placé dans la " "configuration de sortieen temps que code brut; plugin apparenté" -#: aircox/models.py:1218 -msgid "station on which the event occured" -msgstr "station sur laquelle l'événement a eu lieu" +#: models.py:1319 +#, fuzzy +#| msgid "regular duration" +msgid "related station" +msgstr "durée normale" -#: aircox/models.py:1223 +#: models.py:1324 msgid "source" msgstr "source" -#: aircox/models.py:1225 -msgid "source id that make it happen on the station" -msgstr "id de la source qui le fait arriver sur la station" +#: models.py:1326 +msgid "identifier of the source related to this log" +msgstr "" -#: aircox/models.py:1233 +#: models.py:1334 msgid "comment" msgstr "commentaire" -#: aircox/templates/aircox/controllers/monitor.html:6 +#: templates/aircox/controllers/monitor.html:6 msgid "Monitoring streamer" msgstr "" -#: aircox/templates/aircox/controllers/monitor.html:112 +#: templates/aircox/controllers/monitor.html:112 msgid "Monitor Streamer" msgstr "" -#: aircox/templates/aircox/controllers/monitor.html:115 +#: templates/aircox/controllers/monitor.html:115 msgid "refresh" msgstr "" -#: aircox/templates/aircox/controllers/monitor.html:129 +#: templates/aircox/controllers/monitor.html:129 #, fuzzy, python-format #| msgid "" #| "\n" @@ -373,47 +397,47 @@ msgstr "" " %(items_counts)s items, avec un total de %(tracks_count)s " "tracks\n" -#: aircox/templates/aircox/controllers/monitor.html:136 -#: aircox/templates/aircox/controllers/monitor.html:175 +#: templates/aircox/controllers/monitor.html:136 +#: templates/aircox/controllers/monitor.html:175 msgid "restart" msgstr "" -#: aircox/templates/aircox/controllers/monitor.html:138 -#: aircox/templates/aircox/controllers/monitor.html:177 +#: templates/aircox/controllers/monitor.html:138 +#: templates/aircox/controllers/monitor.html:177 msgid "skip" msgstr "passer" -#: aircox/templates/aircox/controllers/monitor.html:143 +#: templates/aircox/controllers/monitor.html:143 #, fuzzy #| msgid "source" msgid "Source" msgstr "source" -#: aircox/templates/aircox/controllers/monitor.html:144 +#: templates/aircox/controllers/monitor.html:144 msgid "File" msgstr "" -#: aircox/templates/aircox/controllers/monitor.html:145 +#: templates/aircox/controllers/monitor.html:145 msgid "Actions*" msgstr "" -#: aircox/templates/aircox/controllers/monitor.html:158 +#: templates/aircox/controllers/monitor.html:158 msgid "current" msgstr "" -#: aircox/templates/aircox/controllers/monitor.html:161 +#: templates/aircox/controllers/monitor.html:161 #, fuzzy #| msgid "diffusion" msgid "diffusions" msgstr "diffusion" -#: aircox/templates/aircox/controllers/monitor.html:163 +#: templates/aircox/controllers/monitor.html:163 #, fuzzy #| msgid "Stream" msgid "stream" msgstr "Stream" -#: aircox/templates/aircox/controllers/monitor.html:186 +#: templates/aircox/controllers/monitor.html:186 msgid "" "\n" " *: Due to some technical issues, it might take up to 30 seconds to " @@ -421,49 +445,49 @@ msgid "" " " msgstr "" -#: aircox/templates/aircox/controllers/stats.html:6 -#: aircox/templates/aircox/controllers/stats.html:11 +#: templates/aircox/controllers/stats.html:9 +#: templates/aircox/controllers/stats.html:14 msgid "Statistics of the stations" msgstr "Statistiques des stations" -#: aircox/templates/aircox/controllers/stats.html:16 +#: templates/aircox/controllers/stats.html:19 msgid "day" msgstr "jour" -#: aircox/templates/aircox/controllers/stats.html:18 +#: templates/aircox/controllers/stats.html:21 msgid "month" msgstr "mois" -#: aircox/templates/aircox/controllers/stats.html:20 +#: templates/aircox/controllers/stats.html:23 msgid "year" msgstr "année" -#: aircox/templates/aircox/controllers/stats.html:22 +#: templates/aircox/controllers/stats.html:25 msgid "Show" msgstr "" -#: aircox/templates/aircox/controllers/stats.html:36 +#: templates/aircox/controllers/stats.html:39 msgid "Date" msgstr "Date" -#: aircox/templates/aircox/controllers/stats.html:37 +#: templates/aircox/controllers/stats.html:40 msgid "Type" msgstr "Type" #. Translators "Header for statistics view" -#: aircox/templates/aircox/controllers/stats.html:39 +#: templates/aircox/controllers/stats.html:42 msgid "Diffusion or sound played" msgstr "Diffusion ou son joué" -#: aircox/templates/aircox/controllers/stats.html:40 +#: templates/aircox/controllers/stats.html:43 msgid "Tags" msgstr "Tags" -#: aircox/templates/aircox/controllers/stats.html:65 +#: templates/aircox/controllers/stats.html:68 msgid "Total" msgstr "Total" -#: aircox/templates/aircox/controllers/stats.html:69 +#: templates/aircox/controllers/stats.html:72 #, fuzzy, python-format #| msgid "" #| "\n" @@ -480,9 +504,15 @@ msgstr "" " %(items_counts)s items, avec un total de %(tracks_count)s " "tracks\n" -#: aircox/views.py:217 +#: views.py:216 msgid "Stream" msgstr "Stream" +#~ msgid "station on which the event occured" +#~ msgstr "station sur laquelle l'événement a eu lieu" + +#~ msgid "source id that make it happen on the station" +#~ msgstr "id de la source qui le fait arriver sur la station" + #~ msgid "update" #~ msgstr "mettre à jour" diff --git a/aircox/models.py b/aircox/models.py index 17ba1a5..529a622 100755 --- a/aircox/models.py +++ b/aircox/models.py @@ -478,7 +478,7 @@ class Stream(models.Model): delay = models.TimeField( _('delay'), blank = True, null = True, - help_text = _('delay between two sound plays') + help_text = _('minimal delay between two sound plays') ) begin = models.TimeField( _('begin'), @@ -520,7 +520,10 @@ class Schedule(models.Model): Program, verbose_name = _('related program'), ) - date = models.DateTimeField(_('date')) + date = models.DateTimeField( + _('date'), + help_text = _('date of the first diffusion') + ) duration = models.TimeField( _('duration'), help_text = _('regular duration'), @@ -544,7 +547,7 @@ class Schedule(models.Model): ) initial = models.ForeignKey( 'self', - verbose_name = _('initial'), + verbose_name = _('initial schedule'), blank = True, null = True, help_text = 'this schedule is a rerun of this one', ) @@ -829,7 +832,7 @@ class Diffusion(models.Model): ) initial = models.ForeignKey ( 'self', - verbose_name = _('initial'), + verbose_name = _('initial diffusion'), blank = True, null = True, help_text = _('the diffusion is a rerun of this one') ) diff --git a/aircox/views.py b/aircox/views.py index d5dd4f9..1e45e93 100755 --- a/aircox/views.py +++ b/aircox/views.py @@ -193,7 +193,7 @@ class StatisticsView(View,TemplateResponseMixin,LoginRequiredMixin): qs = None item = None if type(elm) == models.Diffusion: - qs = models.Track.objects.get_for(elm) + qs = models.Track.objects.get_for(object = elm) item = self.Item( type = _('Diffusion'), date = elm.date, @@ -204,7 +204,6 @@ class StatisticsView(View,TemplateResponseMixin,LoginRequiredMixin): item.add_tags(qs) stats.items.append(item) stats.count += len(item.tracks) - else: # type is Track (related object of a track is a sound) stream = elm.related.related diff --git a/aircox_cms/locale/fr/LC_MESSAGES/django.mo b/aircox_cms/locale/fr/LC_MESSAGES/django.mo index cacd85691f0b0d10fa9e3d0eeb9e34861160db50..9f36e6017028a4a284c2b2d0498b838b5f7cdc3e 100644 GIT binary patch delta 4639 zcmYk;c~DhV0LSt33R%SkaY5N+5ye125JUu1TuW0?%dJpIX;D(cki=&$kz2W>wo!_x zMH%KJlr$}u(lVlQENjZqX_~P~XWIX0{r=uPZ^k?R-sjwNmvinp=U!}H?`l}*a(@@* zx81N^Ad%#lzcIaB#>@&;tubdi8*>Mq!*uK#W=tTC#`ZW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k5Q zp&G2g7_3Ll$XOhP7f>@0&W_X+N25B_6V+fAYR?p4Z+rn0@eJzkkGVlXJq==qO~G8$ z+HFGJcps`m2as)H8n6hzM9tKrBb|neup9Mx80n(pr~$l~=R94nqON}feegWS(!RM! zp*wzxdVGBH*-)57G<78;gRCY8h^DuI=#kZ-QPUUiBgyJ{2XPWNkke!$x%*ICzaUyx z&l`NaNqUgyiALUWyiVarM+Mc{Uy%pNHL{A_eH^4RkJQ?ebyjV_{bZx9PsS&lvTn)l zB$r7vIZW;$MMTF+vd3F;J~Tr*o^c_i4I;1-aT{_f2R}P zA;C;<#rYq|K9nCL+H@0$Hf6_gmcm&MAL-e#a zlQraJ^0=<>=!x(l9Y-OBpWDhv{G~1DTZ^$DIb-XhhUissK^2a^4rUe(Aj8N{$;0F- z(Q%5DYWjP6tIo%Km}~3t_y}pR_49a}aaocJ}FLBdECnNCKLZDcm7CplyXSwhmt zUQ$jPwfw^=_!3^I-v2P!iBFL^WE?p`){?Cxg>)k?k=IBi`4QEjfSK#@h0I_%7*1#*m*79nX@^ zWV0%F9nr5)Id|8IEtCg0G)Ei^j4doKomE!io;$-`{#1#3-lC$?S%(frequency)s" -msgstr "%(day)s de %(start)s à %(end)s, %(frequency)s" +msgstr "" +"%(day)s de %(start)s à %(end)s, %(frequency)s" #: templates/aircox_cms/program_page.html:24 msgid "Rerun" @@ -927,19 +950,19 @@ msgstr "pause" msgid "loading..." msgstr "chargement..." -#: templates/aircox_cms/snippets/player.html:29 +#: templates/aircox_cms/snippets/player.html:32 msgid "add to the player" msgstr "ajouter au player" -#: templates/aircox_cms/snippets/player.html:30 +#: templates/aircox_cms/snippets/player.html:33 msgid "more informations" msgstr "plus d'informations" -#: templates/aircox_cms/snippets/player.html:31 +#: templates/aircox_cms/snippets/player.html:34 msgid "remove this sound" msgstr "enlever ce son" -#: templates/aircox_cms/snippets/player.html:46 +#: templates/aircox_cms/snippets/player.html:47 msgid "enable and disable single mode" msgstr "activer et désactiver le mode solo" @@ -947,28 +970,44 @@ msgstr "activer et désactiver le mode solo" msgid "add this sound to the playlist" msgstr "ajouter ce son à la playlist" -#: wagtail_hooks.py:37 +#: wagtail_hooks.py:86 msgid "Schedules" msgstr "Horaires" -#: wagtail_hooks.py:45 +#: wagtail_hooks.py:107 msgid "Streams" msgstr "Streams" -#: wagtail_hooks.py:52 +#: wagtail_hooks.py:121 +#, fuzzy +#| msgid "Streams" +msgid "Stream" +msgstr "Streams" + +#: wagtail_hooks.py:146 +#, fuzzy +#| msgid "Logs" +msgid "Log" +msgstr "Logs" + +#: wagtail_hooks.py:153 msgid "Advanced" msgstr "Avancé" -#: wagtail_hooks.py:60 +#: wagtail_hooks.py:173 msgid "Sounds" msgstr "Sons" -#: wagtail_hooks.py:151 +#: wagtail_hooks.py:331 msgid "Today's Diffusions" msgstr "Diffusions du jour" -#~ msgid "Published by" -#~ msgstr "Publié par" +#: wagtail_hooks.py:403 +msgid "Current Station" +msgstr "" + +#~ msgid "public" +#~ msgstr "public" #~ msgid "message to display when a post waits to be reviewed" #~ msgstr "message à afficher quand une publication attend d'être approuvée" diff --git a/aircox_cms/models.py b/aircox_cms/models.py index 7875c3b..07e9d2e 100755 --- a/aircox_cms/models.py +++ b/aircox_cms/models.py @@ -460,8 +460,11 @@ class ProgramPage(Publication): class Track(aircox.models.Track,Orderable): - diffusion = ParentalKey('DiffusionPage', - related_name='tracks') + diffusion = ParentalKey( + 'DiffusionPage', related_name='tracks', + null = True, blank = True, + on_delete = models.SET_NULL + ) sort_order_field = 'position' panels = [ diff --git a/aircox_cms/static/wagtailadmin/css/core.css b/aircox_cms/static/wagtailadmin/css/core.css index 92736a3..47d7d32 100644 --- a/aircox_cms/static/wagtailadmin/css/core.css +++ b/aircox_cms/static/wagtailadmin/css/core.css @@ -5001,10 +5001,6 @@ 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 2186895..07ef361 100755 --- a/aircox_cms/wagtail_hooks.py +++ b/aircox_cms/wagtail_hooks.py @@ -3,6 +3,7 @@ import json from django.utils import timezone as tz from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse +from django.forms import SelectMultiple, TextInput from django.contrib.staticfiles.templatetags.staticfiles import static from django.utils.html import format_html from django.utils.safestring import mark_safe @@ -10,15 +11,25 @@ from django.utils.safestring import mark_safe from wagtail.wagtailcore import hooks from wagtail.wagtailadmin.menu import MenuItem, Menu, SubmenuMenuItem from wagtail.wagtailcore.models import PageRevision - from wagtail.contrib.modeladmin.options import \ ModelAdmin, ModelAdminGroup, modeladmin_register +from wagtail.wagtailadmin.edit_handlers import FieldPanel, FieldRowPanel, \ + MultiFieldPanel, InlinePanel, PageChooserPanel, StreamFieldPanel import aircox.models import aircox_cms.models as models +class RelatedListWidget(SelectMultiple): + def __init__(self, *args, **kwargs): + self.readonly = True + super().__init__(*args, **kwargs) + + def get_context(self, name, value, attrs): + self.choices.queryset = self.choices.queryset.filter(pk__in = value) + return super().get_context(name, value, attrs) + # # ModelAdmin items # @@ -27,9 +38,18 @@ class ProgramAdmin(ModelAdmin): menu_label = _('Programs') menu_icon = 'pick' menu_order = 200 - list_display = ('name', 'active') + list_display = ('name', 'active', 'station') search_fields = ('name',) +aircox.models.Program.panels = [ + MultiFieldPanel([ + FieldPanel('name'), + FieldPanel('active'), + FieldPanel('sync'), + ], heading=_('Program')), +] + + class DiffusionAdmin(ModelAdmin): model = aircox.models.Diffusion menu_label = _('Diffusions') @@ -40,6 +60,27 @@ class DiffusionAdmin(ModelAdmin): readonly_fields = ('conflicts',) search_fields = ('program__name', 'start') +aircox.models.Diffusion.panels = [ + MultiFieldPanel([ + FieldPanel('program'), + FieldPanel('type'), + FieldRowPanel([ + FieldPanel('start'), + FieldPanel('end'), + ]), + FieldPanel('initial'), + FieldPanel( + 'conflicts', + widget = RelatedListWidget( + attrs = { + 'disabled': True, + } + ) + ), + ], heading=_('Diffusion')), +] + + class ScheduleAdmin(ModelAdmin): model = aircox.models.Schedule menu_label = _('Schedules') @@ -48,6 +89,19 @@ class ScheduleAdmin(ModelAdmin): list_display = ('program', 'frequency', 'duration', 'initial') list_filter = ('frequency', 'date', 'duration', 'program') +aircox.models.Schedule.panels = [ + MultiFieldPanel([ + FieldPanel('program'), + FieldPanel('frequency'), + FieldRowPanel([ + FieldPanel('date'), + FieldPanel('duration'), + ]), + FieldPanel('initial'), + ], heading=_('Schedule')), +] + + class StreamAdmin(ModelAdmin): model = aircox.models.Stream menu_label = _('Streams') @@ -56,10 +110,49 @@ class StreamAdmin(ModelAdmin): list_display = ('program', 'delay', 'begin', 'end') list_filter = ('program', 'delay', 'begin', 'end') +aircox.models.Stream.panels = [ + MultiFieldPanel([ + FieldPanel('program'), + FieldPanel('delay'), + FieldRowPanel([ + FieldPanel('begin'), + FieldPanel('end'), + ]), + ], heading=_('Stream')), +] + + +class LogAdmin(ModelAdmin): + model = aircox.models.Log + menu_label = _('Logs') + menu_icon = 'time' + menu_order = 300 + list_display = ['date', 'station', 'source', 'type', 'comment', 'related'] + list_filter = ['date', 'source', 'related_type'] + +aircox.models.Log.panels = [ + MultiFieldPanel([ + FieldPanel('date'), + FieldRowPanel([ + FieldPanel('station'), + FieldPanel('source'), + ]), + FieldPanel('type'), + FieldPanel('comment'), + FieldRowPanel([ + FieldPanel('related_type'), + FieldPanel('related_id') + ]), + ], heading = _('Log')), +] + + +# Missing: Port, Station, Track + class AdvancedAdminGroup(ModelAdminGroup): menu_label = _("Advanced") menu_icon = 'plus-inverse' - items = (ProgramAdmin, DiffusionAdmin, ScheduleAdmin, StreamAdmin) + items = (ProgramAdmin, DiffusionAdmin, ScheduleAdmin, StreamAdmin, LogAdmin) modeladmin_register(AdvancedAdminGroup)