work on panels

This commit is contained in:
bkfox 2017-05-17 20:55:34 +02:00
parent 298cb5636b
commit e3851e39cb
9 changed files with 383 additions and 220 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,47 +18,47 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\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" msgid "Schedule"
msgstr "Horaire" msgstr "Horaire"
#: aircox/admin.py:111 aircox/models.py:497 #: admin.py:111 models.py:490
msgid "end" msgid "end"
msgstr "fin" msgstr "fin"
#: aircox/admin.py:152 #: admin.py:153
msgid "Program" msgid "Program"
msgstr "Programme" msgstr "Programme"
#: aircox/admin.py:156 #: admin.py:157
msgid "Day" msgid "Day"
msgstr "Jour" msgstr "Jour"
#: aircox/admin.py:160 #: admin.py:161
msgid "Rerun" msgid "Rerun"
msgstr "Rediffusion" msgstr "Rediffusion"
#: aircox/models.py:105 #: models.py:84
msgid "name" msgid "name"
msgstr "nom" msgstr "nom"
#: aircox/models.py:137 #: models.py:116
msgid "title" msgid "title"
msgstr "titre" msgstr "titre"
#: aircox/models.py:141 #: models.py:120
msgid "artist" msgid "artist"
msgstr "artiste" msgstr "artiste"
#: aircox/models.py:145 #: models.py:124
msgid "tags" msgid "tags"
msgstr "tags" msgstr "tags"
#: aircox/models.py:149 #: models.py:128
msgid "information" msgid "information"
msgstr "information" msgstr "information"
#: aircox/models.py:152 #: models.py:131
msgid "" msgid ""
"additional informations about this track, such as the version, if is it a " "additional informations about this track, such as the version, if is it a "
"remix, features, etc." "remix, features, etc."
@ -66,258 +66,280 @@ msgstr ""
"informations additionnelles à propos de ce morceau, telles que la version, " "informations additionnelles à propos de ce morceau, telles que la version, "
"s'ils'agit d'un remix, les fonctionnalités, etc" "s'ils'agit d'un remix, les fonctionnalités, etc"
#: aircox/models.py:157 #: models.py:136
msgid "position in the playlist" msgid "position in the playlist"
msgstr "position dans la playlist" msgstr "position dans la playlist"
#: aircox/models.py:160 #: models.py:139
msgid "in seconds" msgid "in seconds"
msgstr "en secondes" msgstr "en secondes"
#: aircox/models.py:162 #: models.py:141
msgid "position in the playlist is expressed in seconds" msgid "position in the playlist is expressed in seconds"
msgstr "position dans la playlist exprimée en secondes" 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" msgid "Track"
msgstr "Morceau" msgstr "Morceau"
#: aircox/models.py:170 #: models.py:149
msgid "Tracks" msgid "Tracks"
msgstr "Morceaux" msgstr "Morceaux"
#: aircox/models.py:186 #: models.py:165
msgid "path" msgid "path"
msgstr "chemin" msgstr "chemin"
#: aircox/models.py:187 #: models.py:166
msgid "path to the working directory" msgid "path to the working directory"
msgstr "chemin vers le repertoire courant" 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" msgid "station"
msgstr "station" msgstr "station"
#: aircox/models.py:382 aircox/models.py:1144 #: models.py:373 models.py:1193
msgid "active" msgid "active"
msgstr "actif" msgstr "actif"
#: aircox/models.py:384 #: models.py:375
msgid "if not checked this program is no longer active" msgid "if not checked this program is no longer active"
msgstr "si selectionné, ce programme n'est plus actif" msgstr "si selectionné, ce programme n'est plus actif"
#: aircox/models.py:387 #: models.py:378
msgid "syncronise" msgid "syncronise"
msgstr "synchroniser" msgstr "synchroniser"
#: aircox/models.py:389 #: models.py:380
msgid "update later diffusions according to schedule changes" msgid "update later diffusions according to schedule changes"
msgstr "" msgstr ""
"mettre à jour les diffusions suivantes selon les changements de l'horaire" "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" msgid "related program"
msgstr "programme apparenté" msgstr "programme apparenté"
#: aircox/models.py:486 #: models.py:479
msgid "delay" msgid "delay"
msgstr "délai" msgstr "délai"
#: aircox/models.py:488 #: models.py:481
msgid "delay between two sound plays" msgid "minimal delay between two sound plays"
msgstr "délai entre deux diffusions de son" msgstr "délai minimum entre deux sons"
#: aircox/models.py:491 #: models.py:484
msgid "begin" msgid "begin"
msgstr "début" 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" msgid "used to define a time range this stream isplayed"
msgstr "" msgstr ""
"utilisé pour définir un intervalle de temps pendant laquelle ce stream est " "utilisé pour définir un intervalle de temps pendant lequel ce stream est joué"
"joué"
#: aircox/models.py:530 aircox/models.py:1229 #: models.py:524 models.py:1330
msgid "date" msgid "date"
msgstr "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" msgid "duration"
msgstr "durée" msgstr "durée"
#: aircox/models.py:533 #: models.py:529
msgid "regular duration" msgid "regular duration"
msgstr "durée normale" msgstr "durée normale"
#: aircox/models.py:536 #: models.py:532
msgid "frequency" msgid "frequency"
msgstr "fréquence" msgstr "fréquence"
#: aircox/models.py:539 #: models.py:535
msgid "ponctual" msgid "ponctual"
msgstr "ponctuel" msgstr "ponctuel"
#: aircox/models.py:540 #: models.py:536
msgid "first week of the month" msgid "first week of the month"
msgstr "première semaine du mois" msgstr "première semaine du mois"
#: aircox/models.py:541 #: models.py:537
msgid "second week of the month" msgid "second week of the month"
msgstr "deuxième semaine du mois" msgstr "deuxième semaine du mois"
#: aircox/models.py:542 #: models.py:538
msgid "third week of the month" msgid "third week of the month"
msgstr "troisième semaine du mois" msgstr "troisième semaine du mois"
#: aircox/models.py:543 #: models.py:539
msgid "fourth week of the month" msgid "fourth week of the month"
msgstr "quatrième semaine du mois" msgstr "quatrième semaine du mois"
#: aircox/models.py:544 #: models.py:540
msgid "last week of the month" msgid "last week of the month"
msgstr "dernière semaine du mois" msgstr "dernière semaine du mois"
#: aircox/models.py:545 #: models.py:541
msgid "first and third weeks of the month" msgid "first and third weeks of the month"
msgstr "première et troisième semaines du mois" msgstr "première et troisième semaines du mois"
#: aircox/models.py:546 #: models.py:542
msgid "second and fourth weeks of the month" msgid "second and fourth weeks of the month"
msgstr "deuxième et quatrième semaines du mois" msgstr "deuxième et quatrième semaines du mois"
#: aircox/models.py:547 #: models.py:543
msgid "every week" msgid "every week"
msgstr "toutes les semaines" msgstr "toutes les semaines"
#: aircox/models.py:548 #: models.py:544
msgid "one week on two" msgid "one week on two"
msgstr "une semaine sur deux" msgstr "une semaine sur deux"
#: aircox/models.py:554 aircox/models.py:814 #: models.py:550
msgid "initial" msgid "initial schedule"
msgstr "début" msgstr "horaire initial"
#: aircox/models.py:728 #: models.py:729
msgid "Schedules" msgid "Schedules"
msgstr "Horaires" msgstr "Horaires"
#: aircox/models.py:805 aircox/models.py:916 #: models.py:826 models.py:965
msgid "program" msgid "program"
msgstr "programme" msgstr "programme"
#: aircox/models.py:809 aircox/models.py:927 aircox/models.py:1139 #: models.py:830 models.py:976 models.py:1188 models.py:1312
#: aircox/models.py:1211
msgid "type" msgid "type"
msgstr "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" msgid "the diffusion is a rerun of this one"
msgstr "la diffusion est une rediffusion de celle-ci" 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" msgid "start of the diffusion"
msgstr "début de la diffusion" msgstr "début de la diffusion"
#: aircox/models.py:826 #: models.py:853
msgid "end of the diffusion" msgid "end of the diffusion"
msgstr "fin de la diffusion" msgstr "fin de la diffusion"
#: aircox/models.py:895 aircox/views.py:198 #: models.py:944 views.py:198
msgid "Diffusion" msgid "Diffusion"
msgstr "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" msgid "Diffusions"
msgstr "Diffusions" msgstr "Diffusions"
#: aircox/models.py:899 #: models.py:948
msgid "edit the diffusion's planification" msgid "edit the diffusion's planification"
msgstr "éditer la planification de la diffusion" msgstr "éditer la planification de la diffusion"
#: aircox/models.py:918 #: models.py:967
msgid "program related to it" msgid "program related to it"
msgstr "programme apparenté à celui-ci" msgstr "programme apparenté à celui-ci"
#: aircox/models.py:922 #: models.py:971
msgid "diffusion" msgid "diffusion"
msgstr "diffusion" msgstr "diffusion"
#: aircox/models.py:924 #: models.py:973
msgid "initial diffusion related it" msgid "initial diffusion related it"
msgstr "diffusion initiale apparentée" msgstr "diffusion initiale apparentée"
#: aircox/models.py:932 #: models.py:981
msgid "file" msgid "file"
msgstr "fichier" msgstr "fichier"
#: aircox/models.py:941 #: models.py:990
msgid "embed HTML code" msgid "embed HTML code"
msgstr "code HTML intégré" msgstr "code HTML intégré"
#: aircox/models.py:943 #: models.py:992
msgid "HTML code used to embed a sound from external plateform" msgid "HTML code used to embed a sound from external plateform"
msgstr "" msgstr ""
"code HTML utilisé pour intégrer un son depuis une plateforme extérieure" "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" msgid "duration of the sound"
msgstr "durée du son" msgstr "durée du son"
#: aircox/models.py:951 #: models.py:1000
msgid "modification time" msgid "modification time"
msgstr "temps de la modification" msgstr "temps de la modification"
#: aircox/models.py:953 #: models.py:1002
msgid "last modification date and time" msgid "last modification date and time"
msgstr "date et heure de la dernière modification" msgstr "date et heure de la dernière modification"
#: aircox/models.py:956 #: models.py:1005
msgid "good quality" msgid "good quality"
msgstr "bonne qualité" msgstr "bonne qualité"
#: aircox/models.py:957 #: models.py:1006
msgid "sound's quality is okay" msgid "sound's quality is okay"
msgstr "la qualité du son est okay" msgstr "la qualité du son est okay"
#: aircox/models.py:961 #: models.py:1010
msgid "public" msgid "public"
msgstr "public" msgstr "public"
#: aircox/models.py:963 #: models.py:1012
msgid "the sound is accessible to the public" msgid "the sound is accessible to the public"
msgstr "ce son est accessible au public" msgstr "ce son est accessible au public"
#: aircox/models.py:1023 #: models.py:1072
msgid "unknown" msgid "unknown"
msgstr "" msgstr ""
#: aircox/models.py:1099 #: models.py:1148
msgid "Sound" msgid "Sound"
msgstr "Son" msgstr "Son"
#: aircox/models.py:1100 #: models.py:1149
msgid "Sounds" msgid "Sounds"
msgstr "Sons" msgstr "Sons"
#: aircox/models.py:1135 #: models.py:1184
#, fuzzy #, fuzzy
#| msgid "duration" #| msgid "duration"
msgid "direction" msgid "direction"
msgstr "durée" msgstr "durée"
#: aircox/models.py:1146 #: models.py:1195
#, fuzzy #, fuzzy
#| msgid "this output is active" #| msgid "this output is active"
msgid "this port is active" msgid "this port is active"
msgstr "cette sortie est active" msgstr "cette sortie est active"
#: aircox/models.py:1149 #: models.py:1198
#, fuzzy #, fuzzy
#| msgid "output settings" #| msgid "output settings"
msgid "port settings" msgid "port settings"
msgstr "paramètres de sortie" msgstr "paramètres de sortie"
#: aircox/models.py:1150 #: models.py:1199
#, fuzzy #, fuzzy
#| msgid "" #| msgid ""
#| "list of comma separated params available; this is put in the output " #| "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 " "liste des paramètres disponibles séparés par des virgules; placé dans la "
"configuration de sortieen temps que code brut; plugin apparenté" "configuration de sortieen temps que code brut; plugin apparenté"
#: aircox/models.py:1218 #: models.py:1319
msgid "station on which the event occured" #, fuzzy
msgstr "station sur laquelle l'événement a eu lieu" #| msgid "regular duration"
msgid "related station"
msgstr "durée normale"
#: aircox/models.py:1223 #: models.py:1324
msgid "source" msgid "source"
msgstr "source" msgstr "source"
#: aircox/models.py:1225 #: models.py:1326
msgid "source id that make it happen on the station" msgid "identifier of the source related to this log"
msgstr "id de la source qui le fait arriver sur la station" msgstr ""
#: aircox/models.py:1233 #: models.py:1334
msgid "comment" msgid "comment"
msgstr "commentaire" msgstr "commentaire"
#: aircox/templates/aircox/controllers/monitor.html:6 #: templates/aircox/controllers/monitor.html:6
msgid "Monitoring streamer" msgid "Monitoring streamer"
msgstr "" msgstr ""
#: aircox/templates/aircox/controllers/monitor.html:112 #: templates/aircox/controllers/monitor.html:112
msgid "Monitor Streamer" msgid "Monitor Streamer"
msgstr "" msgstr ""
#: aircox/templates/aircox/controllers/monitor.html:115 #: templates/aircox/controllers/monitor.html:115
msgid "refresh" msgid "refresh"
msgstr "" msgstr ""
#: aircox/templates/aircox/controllers/monitor.html:129 #: templates/aircox/controllers/monitor.html:129
#, fuzzy, python-format #, fuzzy, python-format
#| msgid "" #| msgid ""
#| "\n" #| "\n"
@ -373,47 +397,47 @@ msgstr ""
" %(items_counts)s items, avec un total de %(tracks_count)s " " %(items_counts)s items, avec un total de %(tracks_count)s "
"tracks\n" "tracks\n"
#: aircox/templates/aircox/controllers/monitor.html:136 #: templates/aircox/controllers/monitor.html:136
#: aircox/templates/aircox/controllers/monitor.html:175 #: templates/aircox/controllers/monitor.html:175
msgid "restart" msgid "restart"
msgstr "" msgstr ""
#: aircox/templates/aircox/controllers/monitor.html:138 #: templates/aircox/controllers/monitor.html:138
#: aircox/templates/aircox/controllers/monitor.html:177 #: templates/aircox/controllers/monitor.html:177
msgid "skip" msgid "skip"
msgstr "passer" msgstr "passer"
#: aircox/templates/aircox/controllers/monitor.html:143 #: templates/aircox/controllers/monitor.html:143
#, fuzzy #, fuzzy
#| msgid "source" #| msgid "source"
msgid "Source" msgid "Source"
msgstr "source" msgstr "source"
#: aircox/templates/aircox/controllers/monitor.html:144 #: templates/aircox/controllers/monitor.html:144
msgid "File" msgid "File"
msgstr "" msgstr ""
#: aircox/templates/aircox/controllers/monitor.html:145 #: templates/aircox/controllers/monitor.html:145
msgid "Actions*" msgid "Actions*"
msgstr "" msgstr ""
#: aircox/templates/aircox/controllers/monitor.html:158 #: templates/aircox/controllers/monitor.html:158
msgid "current" msgid "current"
msgstr "" msgstr ""
#: aircox/templates/aircox/controllers/monitor.html:161 #: templates/aircox/controllers/monitor.html:161
#, fuzzy #, fuzzy
#| msgid "diffusion" #| msgid "diffusion"
msgid "diffusions" msgid "diffusions"
msgstr "diffusion" msgstr "diffusion"
#: aircox/templates/aircox/controllers/monitor.html:163 #: templates/aircox/controllers/monitor.html:163
#, fuzzy #, fuzzy
#| msgid "Stream" #| msgid "Stream"
msgid "stream" msgid "stream"
msgstr "Stream" msgstr "Stream"
#: aircox/templates/aircox/controllers/monitor.html:186 #: templates/aircox/controllers/monitor.html:186
msgid "" msgid ""
"\n" "\n"
" *: Due to some technical issues, it might take up to 30 seconds to " " *: Due to some technical issues, it might take up to 30 seconds to "
@ -421,49 +445,49 @@ msgid ""
" " " "
msgstr "" msgstr ""
#: aircox/templates/aircox/controllers/stats.html:6 #: templates/aircox/controllers/stats.html:9
#: aircox/templates/aircox/controllers/stats.html:11 #: templates/aircox/controllers/stats.html:14
msgid "Statistics of the stations" msgid "Statistics of the stations"
msgstr "Statistiques des stations" msgstr "Statistiques des stations"
#: aircox/templates/aircox/controllers/stats.html:16 #: templates/aircox/controllers/stats.html:19
msgid "day" msgid "day"
msgstr "jour" msgstr "jour"
#: aircox/templates/aircox/controllers/stats.html:18 #: templates/aircox/controllers/stats.html:21
msgid "month" msgid "month"
msgstr "mois" msgstr "mois"
#: aircox/templates/aircox/controllers/stats.html:20 #: templates/aircox/controllers/stats.html:23
msgid "year" msgid "year"
msgstr "année" msgstr "année"
#: aircox/templates/aircox/controllers/stats.html:22 #: templates/aircox/controllers/stats.html:25
msgid "Show" msgid "Show"
msgstr "" msgstr ""
#: aircox/templates/aircox/controllers/stats.html:36 #: templates/aircox/controllers/stats.html:39
msgid "Date" msgid "Date"
msgstr "Date" msgstr "Date"
#: aircox/templates/aircox/controllers/stats.html:37 #: templates/aircox/controllers/stats.html:40
msgid "Type" msgid "Type"
msgstr "Type" msgstr "Type"
#. Translators "Header for statistics view" #. Translators "Header for statistics view"
#: aircox/templates/aircox/controllers/stats.html:39 #: templates/aircox/controllers/stats.html:42
msgid "Diffusion or sound played" msgid "Diffusion or sound played"
msgstr "Diffusion ou son joué" msgstr "Diffusion ou son joué"
#: aircox/templates/aircox/controllers/stats.html:40 #: templates/aircox/controllers/stats.html:43
msgid "Tags" msgid "Tags"
msgstr "Tags" msgstr "Tags"
#: aircox/templates/aircox/controllers/stats.html:65 #: templates/aircox/controllers/stats.html:68
msgid "Total" msgid "Total"
msgstr "Total" msgstr "Total"
#: aircox/templates/aircox/controllers/stats.html:69 #: templates/aircox/controllers/stats.html:72
#, fuzzy, python-format #, fuzzy, python-format
#| msgid "" #| msgid ""
#| "\n" #| "\n"
@ -480,9 +504,15 @@ msgstr ""
" %(items_counts)s items, avec un total de %(tracks_count)s " " %(items_counts)s items, avec un total de %(tracks_count)s "
"tracks\n" "tracks\n"
#: aircox/views.py:217 #: views.py:216
msgid "Stream" msgid "Stream"
msgstr "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" #~ msgid "update"
#~ msgstr "mettre à jour" #~ msgstr "mettre à jour"

View File

@ -478,7 +478,7 @@ class Stream(models.Model):
delay = models.TimeField( delay = models.TimeField(
_('delay'), _('delay'),
blank = True, null = True, blank = True, null = True,
help_text = _('delay between two sound plays') help_text = _('minimal delay between two sound plays')
) )
begin = models.TimeField( begin = models.TimeField(
_('begin'), _('begin'),
@ -520,7 +520,10 @@ class Schedule(models.Model):
Program, Program,
verbose_name = _('related program'), verbose_name = _('related program'),
) )
date = models.DateTimeField(_('date')) date = models.DateTimeField(
_('date'),
help_text = _('date of the first diffusion')
)
duration = models.TimeField( duration = models.TimeField(
_('duration'), _('duration'),
help_text = _('regular duration'), help_text = _('regular duration'),
@ -544,7 +547,7 @@ class Schedule(models.Model):
) )
initial = models.ForeignKey( initial = models.ForeignKey(
'self', 'self',
verbose_name = _('initial'), verbose_name = _('initial schedule'),
blank = True, null = True, blank = True, null = True,
help_text = 'this schedule is a rerun of this one', help_text = 'this schedule is a rerun of this one',
) )
@ -829,7 +832,7 @@ class Diffusion(models.Model):
) )
initial = models.ForeignKey ( initial = models.ForeignKey (
'self', 'self',
verbose_name = _('initial'), verbose_name = _('initial diffusion'),
blank = True, null = True, blank = True, null = True,
help_text = _('the diffusion is a rerun of this one') help_text = _('the diffusion is a rerun of this one')
) )

View File

@ -193,7 +193,7 @@ class StatisticsView(View,TemplateResponseMixin,LoginRequiredMixin):
qs = None qs = None
item = None item = None
if type(elm) == models.Diffusion: if type(elm) == models.Diffusion:
qs = models.Track.objects.get_for(elm) qs = models.Track.objects.get_for(object = elm)
item = self.Item( item = self.Item(
type = _('Diffusion'), type = _('Diffusion'),
date = elm.date, date = elm.date,
@ -204,7 +204,6 @@ class StatisticsView(View,TemplateResponseMixin,LoginRequiredMixin):
item.add_tags(qs) item.add_tags(qs)
stats.items.append(item) stats.items.append(item)
stats.count += len(item.tracks) stats.count += len(item.tracks)
else: else:
# type is Track (related object of a track is a sound) # type is Track (related object of a track is a sound)
stream = elm.related.related stream = elm.related.related

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Aircox 0.1\n" "Project-Id-Version: Aircox 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-31 18:23+0200\n" "POT-Creation-Date: 2017-05-17 20:54+0200\n"
"PO-Revision-Date: 2016-10-10 16:00+02\n" "PO-Revision-Date: 2016-10-10 16:00+02\n"
"Last-Translator: Aarys\n" "Last-Translator: Aarys\n"
"Language-Team: Aircox's translators team\n" "Language-Team: Aircox's translators team\n"
@ -62,7 +62,7 @@ msgstr "favicon"
msgid "small logo for the website displayed in the browser" msgid "small logo for the website displayed in the browser"
msgstr "petit logo pour le site affiché dans le navigateur" msgstr "petit logo pour le site affiché dans le navigateur"
#: models.py:59 models.py:279 #: models.py:59 models.py:284
msgid "tags" msgid "tags"
msgstr "tags" msgstr "tags"
@ -175,6 +175,7 @@ msgid "Promotion"
msgstr "promotion" msgstr "promotion"
#: models.py:154 templates/aircox_cms/snippets/comments.html:6 #: models.py:154 templates/aircox_cms/snippets/comments.html:6
#: wagtail_hooks.py:162
msgid "Comments" msgid "Comments"
msgstr "Commentaires" msgstr "Commentaires"
@ -186,193 +187,210 @@ msgstr "Programmes et contrôles"
msgid "website settings" msgid "website settings"
msgstr "paramètres du site internet" msgstr "paramètres du site internet"
#: models.py:174 #: models.py:172
msgid "public" #, fuzzy
msgstr "public" #| msgid "Publication"
msgid "publication"
msgstr "Publication"
#: models.py:178 #: models.py:175
#, fuzzy
#| msgid "Published by"
msgid "published"
msgstr "Publié par"
#: models.py:179
msgid "author" msgid "author"
msgstr "auteur" msgstr "auteur"
#: models.py:182 models.py:397 #: models.py:183 models.py:401
msgid "email" msgid "email"
msgstr "email" msgstr "email"
#: models.py:186 #: models.py:187
msgid "website" msgid "website"
msgstr "site internet" msgstr "site internet"
#: models.py:190 models.py:238 #: models.py:191 models.py:243
msgid "date" msgid "date"
msgstr "date" msgstr "date"
#: models.py:194 #: models.py:195 models.py:199
msgid "comment" msgid "comment"
msgstr "commentaire" msgstr "commentaire"
#: models.py:200
#, fuzzy
#| msgid "comment"
msgid "comments"
msgstr "commentaire"
#. Translators: text shown in the comments list (in admin) #. Translators: text shown in the comments list (in admin)
#: models.py:199 #: models.py:204
#, python-brace-format #, python-brace-format
msgid "{date}, {author}: {content}..." msgid "{date}, {author}: {content}..."
msgstr "{date}, {author}: {content}..." msgstr "{date}, {author}: {content}..."
#: models.py:244 #: models.py:249
msgid "publish as program" msgid "publish as program"
msgstr "publier en tant que programme" msgstr "publier en tant que programme"
#: models.py:247 #: models.py:252
msgid "use this program as the author of the publication" msgid "use this program as the author of the publication"
msgstr "utiliser ce programme en tant qu'auteur de la publication" msgstr "utiliser ce programme en tant qu'auteur de la publication"
#: models.py:250 #: models.py:255
msgid "focus" msgid "focus"
msgstr "focus" msgstr "focus"
#: models.py:252 #: models.py:257
msgid "the publication is highlighted;" msgid "the publication is highlighted;"
msgstr "la publication est mise en avant;" msgstr "la publication est mise en avant;"
#: models.py:255 models.py:257 #: models.py:260 models.py:262
msgid "allow comments" msgid "allow comments"
msgstr "autoriser les commentaires" msgstr "autoriser les commentaires"
#: models.py:261 models.py:609 models.py:634 #: models.py:266 models.py:632 models.py:657
msgid "body" msgid "body"
msgstr "corps du texte" msgstr "corps du texte"
#: models.py:263 #: models.py:268
msgid "the publication itself" msgid "the publication itself"
msgstr "le contenu de la publication elle-même" msgstr "le contenu de la publication elle-même"
#: models.py:267 #: models.py:272
msgid "cover" msgid "cover"
msgstr "couverture" msgstr "couverture"
#: models.py:271 #: models.py:276
msgid "image to use as cover of the publication" msgid "image to use as cover of the publication"
msgstr "image à utiliser comme couverture de la publication" msgstr "image à utiliser comme couverture de la publication"
#: models.py:274 #: models.py:279
msgid "headline" msgid "headline"
msgstr "entête" msgstr "entête"
#: models.py:276 #: models.py:281
msgid "headline of the publication" #, fuzzy
#| msgid "headline of the publication"
msgid "headline of the publication, use it as an introduction"
msgstr "entête de la publication" msgstr "entête de la publication"
#: models.py:286 models.py:287 #: models.py:290 models.py:291
msgid "Publication" msgid "Publication"
msgstr "Publication" msgstr "Publication"
#: models.py:295 models.py:301 models.py:618 models.py:646 #: models.py:299 models.py:305 models.py:518 models.py:641 models.py:669
msgid "Content" msgid "Content"
msgstr "Contenu" msgstr "Contenu"
#: models.py:302 sections.py:773 #: models.py:306 models.py:519 sections.py:773
msgid "Links" msgid "Links"
msgstr "Liens" msgstr "Liens"
#: models.py:389 #: models.py:393
msgid "program" msgid "program"
msgstr "programme" msgstr "programme"
#: models.py:400 #: models.py:404
msgid "email is public" msgid "email is public"
msgstr "l'email est public" msgstr "l'email est public"
#: models.py:402 #: models.py:406
msgid "the email addess is accessible to the public" msgid "the email addess is accessible to the public"
msgstr "l'adresse email est accessible au public" msgstr "l'adresse email est accessible au public"
#: models.py:406 #: models.py:410 wagtail_hooks.py:49
msgid "Program" msgid "Program"
msgstr "Programme" msgstr "Programme"
#: models.py:407 signals.py:85 signals.py:97 wagtail_hooks.py:20 #: models.py:411 signals.py:85 signals.py:97 wagtail_hooks.py:38
#: wagtail_hooks.py:184 #: wagtail_hooks.py:370
msgid "Programs" msgid "Programs"
msgstr "Programmes" msgstr "Programmes"
#: models.py:476 #: models.py:489
msgid "diffusion" msgid "diffusion"
msgstr "diffusion" msgstr "diffusion"
#: models.py:488 #: models.py:501
msgid "publish archive" msgid "publish archive"
msgstr "publier l'archive" msgstr "publier l'archive"
#: models.py:490 #: models.py:503
msgid "publish the podcast of the complete diffusion" msgid "publish the podcast of the complete diffusion"
msgstr "publier le podcast de la diffusion complète" msgstr "publier le podcast de la diffusion complète"
#: models.py:494 #: models.py:507 templates/aircox_cms/snippets/list_item.html:37
#: wagtail_hooks.py:80
msgid "Diffusion" msgid "Diffusion"
msgstr "Diffusion" msgstr "Diffusion"
#: models.py:495 wagtail_hooks.py:28 #: models.py:508 wagtail_hooks.py:55
msgid "Diffusions" msgid "Diffusions"
msgstr "Diffusions" msgstr "Diffusions"
#: models.py:498 #: models.py:511
msgid "Tracks" msgid "Tracks"
msgstr "Pistes" msgstr "Pistes"
#: models.py:538 #: models.py:554
#, python-format #, python-format
msgid "Rerun of %(date)s" msgid "Rerun of %(date)s"
msgstr "Rediffusion de %(date)s" msgstr "Rediffusion du %(date)s"
#: models.py:542 #: models.py:558
msgid "Cancelled" msgid "Cancelled"
msgstr "Annulé" msgstr "Annulé"
#: models.py:611 models.py:636 #: models.py:634 models.py:659
msgid "add an extra description for this list" msgid "add an extra description for this list"
msgstr "ajouter une description supplémentaire pour cette liste" msgstr "ajouter une description supplémentaire pour cette liste"
#: models.py:622 #: models.py:645
msgid "Dynamic List Page" msgid "Dynamic List Page"
msgstr "Page avec liste dynamique" msgstr "Page avec liste dynamique"
#: models.py:623 #: models.py:646
msgid "Dynamic List Pages" msgid "Dynamic List Pages"
msgstr "Pages avec liste dynamique" msgstr "Pages avec liste dynamique"
#: models.py:681 sections.py:866 #: models.py:704 models.py:765 sections.py:866 sections.py:925
msgid "station" msgid "station"
msgstr "station" msgstr "station"
#: models.py:684 sections.py:869 #: models.py:705 models.py:766 sections.py:926
msgid "(required) the station on which the logs happened" msgid "(required) related station"
msgstr "(obliatoire) la station sur laquelle les logs se sont produits" msgstr ""
#: models.py:687 #: models.py:708
msgid "maximum age" msgid "maximum age"
msgstr "âge maximum" msgstr "âge maximum"
#: models.py:689 #: models.py:710
msgid "maximum days in the past allowed to be shown. 0 means no limit" msgid "maximum days in the past allowed to be shown. 0 means no limit"
msgstr "" msgstr ""
"nombre de jours maximum dans le passé autorisés à être affichés. 0 signifie " "nombre de jours maximum dans le passé autorisés à être affichés. 0 signifie "
"qu'il n'y a pas de limite" "qu'il n'y a pas de limite"
#: models.py:693 #: models.py:714
msgid "reverse list" msgid "reverse list"
msgstr "" msgstr ""
#: models.py:695 #: models.py:716
msgid "print logs in ascending order by date" msgid "print logs in ascending order by date"
msgstr "afficher les logs de manière ascendante par date" msgstr "afficher les logs de manière ascendante par date"
#: models.py:699 models.py:700 #: models.py:720 models.py:721 wagtail_hooks.py:127
msgid "Logs" msgid "Logs"
msgstr "Logs" msgstr "Logs"
#: models.py:707 #: models.py:728 models.py:772
msgid "Configuration" msgid "Configuration"
msgstr "Configuration" msgstr "Configuration"
#: models.py:744 models.py:745 signals.py:71 #: models.py:776 models.py:777 signals.py:71
msgid "Timetable" msgid "Timetable"
msgstr "Grille horaire" msgstr "Grille horaire"
@ -454,8 +472,7 @@ msgstr "selectionne les sœurs de la page apparentée"
#: sections.py:206 #: sections.py:206
msgid "if checked, related publications are siblings instead of the children." msgid "if checked, related publications are siblings instead of the children."
msgstr "" msgstr ""
"si coché, les publications apparentées sont les sœurs au lieu des " "si coché, les publications apparentées sont les sœurs au lieu des enfants."
"enfants."
#: sections.py:211 #: sections.py:211
msgid "ascending order" msgid "ascending order"
@ -503,7 +520,7 @@ msgstr "cacher les icones"
msgid "if selected, images of publications will not be displayed in the list" msgid "if selected, images of publications will not be displayed in the list"
msgstr "si sélectionné, la liste n'affiche pas les images des publications" msgstr "si sélectionné, la liste n'affiche pas les images des publications"
#: sections.py:420 sections.py:940 #: sections.py:420 sections.py:945
msgid "Navigation" msgid "Navigation"
msgstr "Navigation" msgstr "Navigation"
@ -659,6 +676,10 @@ msgstr ""
msgid "Rendering" msgid "Rendering"
msgstr "Rendu" msgstr "Rendu"
#: sections.py:869
msgid "(required) the station on which the logs happened"
msgstr "(obliatoire) la station sur laquelle les logs se sont produits"
#: sections.py:874 #: sections.py:874
msgid "number of items to display in the list (max 100)" msgid "number of items to display in the list (max 100)"
msgstr "nombre d'objets à afficher dans la liste (max 100)" msgstr "nombre d'objets à afficher dans la liste (max 100)"
@ -679,68 +700,68 @@ msgstr "Section: Grille horaire"
msgid "Sections: Timetable" msgid "Sections: Timetable"
msgstr "Sections: Grilles horaire" msgstr "Sections: Grilles horaire"
#: sections.py:925 #: sections.py:930
msgid "timetable page" msgid "timetable page"
msgstr "Page de Grille horaire" msgstr "Page de Grille horaire"
#: sections.py:927 #: sections.py:932
msgid "select a timetable page used to show complete timetable" msgid "select a timetable page used to show complete timetable"
msgstr "" msgstr ""
"sélectionner une page de grille horaire pour afficher l'horaire complet" "sélectionner une page de grille horaire pour afficher l'horaire complet"
#: sections.py:930 #: sections.py:935
msgid "show date navigation" msgid "show date navigation"
msgstr "afficher les dates de navigation" msgstr "afficher les dates de navigation"
#: sections.py:932 #: sections.py:937
msgid "if checked, navigation dates will be shown" msgid "if checked, navigation dates will be shown"
msgstr "si coché, les dates de navigation sont affichées" msgstr "si coché, les dates de navigation sont affichées"
#: sections.py:965 #: sections.py:970
msgid "Section: publication's info" msgid "Section: publication's info"
msgstr "Section: info de la publication" msgstr "Section: info de la publication"
#: sections.py:966 #: sections.py:971
msgid "Sections: publication's info" msgid "Sections: publication's info"
msgstr "Sections: info de la publication" msgstr "Sections: info de la publication"
#: sections.py:971 #: sections.py:976
msgid "default text" msgid "default text"
msgstr "texte par défaut" msgstr "texte par défaut"
#: sections.py:973 #: sections.py:978
msgid "search" msgid "search"
msgstr "recherche" msgstr "recherche"
#: sections.py:974 #: sections.py:979
msgid "text to display when the search field is empty" msgid "text to display when the search field is empty"
msgstr "texte à afficher quand le champ de recherche est vide" msgstr "texte à afficher quand le champ de recherche est vide"
#: sections.py:978 #: sections.py:983
msgid "Section: search field" msgid "Section: search field"
msgstr "Section: champ de recherche" msgstr "Section: champ de recherche"
#: sections.py:979 #: sections.py:984
msgid "Sections: search field" msgid "Sections: search field"
msgstr "Sections: champ de recherche" msgstr "Sections: champ de recherche"
#: sections.py:995 #: sections.py:1000
msgid "live title" msgid "live title"
msgstr "titre du direct" msgstr "titre du direct"
#: sections.py:997 #: sections.py:1002
msgid "text to display when it plays live" msgid "text to display when it plays live"
msgstr "texte à afficher quand le direct est activé" msgstr "texte à afficher quand le direct est activé"
#: sections.py:1000 #: sections.py:1005
msgid "audio streams" msgid "audio streams"
msgstr "streams audio" msgstr "streams audio"
#: sections.py:1001 #: sections.py:1006
msgid "one audio stream per line" msgid "one audio stream per line"
msgstr "un stream audio par ligne" msgstr "un stream audio par ligne"
#: sections.py:1005 #: sections.py:1010
msgid "Section: Player" msgid "Section: Player"
msgstr "Section: Player" msgstr "Section: Player"
@ -790,11 +811,11 @@ msgstr "{program.name} est un programme sur {station.name}"
msgid "Playlist" msgid "Playlist"
msgstr "Playlist" msgstr "Playlist"
#: templates/aircox_cms/diffusion_page.html:22 #: templates/aircox_cms/diffusion_page.html:23
msgid "Dates of diffusion" msgid "Dates of diffusion"
msgstr "Dates de diffusion" msgstr "Dates de diffusion"
#: templates/aircox_cms/diffusion_page.html:36 #: templates/aircox_cms/diffusion_page.html:38
msgid "Podcasts" msgid "Podcasts"
msgstr "Podcasts" msgstr "Podcasts"
@ -832,14 +853,16 @@ msgstr "Lieu"
msgid "Price" msgid "Price"
msgstr "Prix" msgstr "Prix"
#: templates/aircox_cms/program_page.html:12 #: templates/aircox_cms/program_page.html:12 wagtail_hooks.py:101
msgid "Schedule" msgid "Schedule"
msgstr "Horaire" msgstr "Horaire"
#: templates/aircox_cms/program_page.html:18 #: templates/aircox_cms/program_page.html:18
#, python-format
msgid "" msgid ""
"%(day)s at %(start)s until %(end)s, <span class=\"info\">%(frequency)s</span>" "%(day)s at %(start)s until %(end)s, <span class=\"info\">%(frequency)s</span>"
msgstr "%(day)s de %(start)s à %(end)s, <span class=\"info\">%(frequency)s</span>" msgstr ""
"%(day)s de %(start)s à %(end)s, <span class=\"info\">%(frequency)s</span>"
#: templates/aircox_cms/program_page.html:24 #: templates/aircox_cms/program_page.html:24
msgid "Rerun" msgid "Rerun"
@ -927,19 +950,19 @@ msgstr "pause"
msgid "loading..." msgid "loading..."
msgstr "chargement..." msgstr "chargement..."
#: templates/aircox_cms/snippets/player.html:29 #: templates/aircox_cms/snippets/player.html:32
msgid "add to the player" msgid "add to the player"
msgstr "ajouter au player" msgstr "ajouter au player"
#: templates/aircox_cms/snippets/player.html:30 #: templates/aircox_cms/snippets/player.html:33
msgid "more informations" msgid "more informations"
msgstr "plus d'informations" msgstr "plus d'informations"
#: templates/aircox_cms/snippets/player.html:31 #: templates/aircox_cms/snippets/player.html:34
msgid "remove this sound" msgid "remove this sound"
msgstr "enlever ce son" msgstr "enlever ce son"
#: templates/aircox_cms/snippets/player.html:46 #: templates/aircox_cms/snippets/player.html:47
msgid "enable and disable single mode" msgid "enable and disable single mode"
msgstr "activer et désactiver le mode solo" 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" msgid "add this sound to the playlist"
msgstr "ajouter ce son à la playlist" msgstr "ajouter ce son à la playlist"
#: wagtail_hooks.py:37 #: wagtail_hooks.py:86
msgid "Schedules" msgid "Schedules"
msgstr "Horaires" msgstr "Horaires"
#: wagtail_hooks.py:45 #: wagtail_hooks.py:107
msgid "Streams" msgid "Streams"
msgstr "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" msgid "Advanced"
msgstr "Avancé" msgstr "Avancé"
#: wagtail_hooks.py:60 #: wagtail_hooks.py:173
msgid "Sounds" msgid "Sounds"
msgstr "Sons" msgstr "Sons"
#: wagtail_hooks.py:151 #: wagtail_hooks.py:331
msgid "Today's Diffusions" msgid "Today's Diffusions"
msgstr "Diffusions du jour" msgstr "Diffusions du jour"
#~ msgid "Published by" #: wagtail_hooks.py:403
#~ msgstr "Publié par" msgid "Current Station"
msgstr ""
#~ msgid "public"
#~ msgstr "public"
#~ msgid "message to display when a post waits to be reviewed" #~ msgid "message to display when a post waits to be reviewed"
#~ msgstr "message à afficher quand une publication attend d'être approuvée" #~ msgstr "message à afficher quand une publication attend d'être approuvée"

View File

@ -460,8 +460,11 @@ class ProgramPage(Publication):
class Track(aircox.models.Track,Orderable): class Track(aircox.models.Track,Orderable):
diffusion = ParentalKey('DiffusionPage', diffusion = ParentalKey(
related_name='tracks') 'DiffusionPage', related_name='tracks',
null = True, blank = True,
on_delete = models.SET_NULL
)
sort_order_field = 'position' sort_order_field = 'position'
panels = [ panels = [

View File

@ -5001,10 +5001,6 @@ body.ready .nav-main a {
background: #262626; background: #262626;
} }
.nav-submenu h1 {
color: #a2a2a2;
}
.nav-submenu h2 { .nav-submenu h2 {
display: none; display: none;
} }

View File

@ -3,6 +3,7 @@ import json
from django.utils import timezone as tz from django.utils import timezone as tz
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.forms import SelectMultiple, TextInput
from django.contrib.staticfiles.templatetags.staticfiles import static from django.contrib.staticfiles.templatetags.staticfiles import static
from django.utils.html import format_html from django.utils.html import format_html
from django.utils.safestring import mark_safe 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.wagtailcore import hooks
from wagtail.wagtailadmin.menu import MenuItem, Menu, SubmenuMenuItem from wagtail.wagtailadmin.menu import MenuItem, Menu, SubmenuMenuItem
from wagtail.wagtailcore.models import PageRevision from wagtail.wagtailcore.models import PageRevision
from wagtail.contrib.modeladmin.options import \ from wagtail.contrib.modeladmin.options import \
ModelAdmin, ModelAdminGroup, modeladmin_register ModelAdmin, ModelAdminGroup, modeladmin_register
from wagtail.wagtailadmin.edit_handlers import FieldPanel, FieldRowPanel, \
MultiFieldPanel, InlinePanel, PageChooserPanel, StreamFieldPanel
import aircox.models import aircox.models
import aircox_cms.models as 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 # ModelAdmin items
# #
@ -27,9 +38,18 @@ class ProgramAdmin(ModelAdmin):
menu_label = _('Programs') menu_label = _('Programs')
menu_icon = 'pick' menu_icon = 'pick'
menu_order = 200 menu_order = 200
list_display = ('name', 'active') list_display = ('name', 'active', 'station')
search_fields = ('name',) search_fields = ('name',)
aircox.models.Program.panels = [
MultiFieldPanel([
FieldPanel('name'),
FieldPanel('active'),
FieldPanel('sync'),
], heading=_('Program')),
]
class DiffusionAdmin(ModelAdmin): class DiffusionAdmin(ModelAdmin):
model = aircox.models.Diffusion model = aircox.models.Diffusion
menu_label = _('Diffusions') menu_label = _('Diffusions')
@ -40,6 +60,27 @@ class DiffusionAdmin(ModelAdmin):
readonly_fields = ('conflicts',) readonly_fields = ('conflicts',)
search_fields = ('program__name', 'start') 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): class ScheduleAdmin(ModelAdmin):
model = aircox.models.Schedule model = aircox.models.Schedule
menu_label = _('Schedules') menu_label = _('Schedules')
@ -48,6 +89,19 @@ class ScheduleAdmin(ModelAdmin):
list_display = ('program', 'frequency', 'duration', 'initial') list_display = ('program', 'frequency', 'duration', 'initial')
list_filter = ('frequency', 'date', 'duration', 'program') 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): class StreamAdmin(ModelAdmin):
model = aircox.models.Stream model = aircox.models.Stream
menu_label = _('Streams') menu_label = _('Streams')
@ -56,10 +110,49 @@ class StreamAdmin(ModelAdmin):
list_display = ('program', 'delay', 'begin', 'end') list_display = ('program', 'delay', 'begin', 'end')
list_filter = ('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): class AdvancedAdminGroup(ModelAdminGroup):
menu_label = _("Advanced") menu_label = _("Advanced")
menu_icon = 'plus-inverse' menu_icon = 'plus-inverse'
items = (ProgramAdmin, DiffusionAdmin, ScheduleAdmin, StreamAdmin) items = (ProgramAdmin, DiffusionAdmin, ScheduleAdmin, StreamAdmin, LogAdmin)
modeladmin_register(AdvancedAdminGroup) modeladmin_register(AdvancedAdminGroup)