forked from rc/aircox
localisation
This commit is contained in:
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -174,16 +174,14 @@ class BaseList(models.Model):
|
||||
choices = [ (int(y), _(x.replace('_', ' ')))
|
||||
for x,y in DateFilter.__members__.items() ],
|
||||
blank = True, null = True,
|
||||
help_text = _(
|
||||
'select pages whose date follows the given constraint'
|
||||
)
|
||||
help_text = _('filter pages on their date')
|
||||
)
|
||||
model = models.ForeignKey(
|
||||
ContentType,
|
||||
verbose_name = _('filter on page type'),
|
||||
blank = True, null = True,
|
||||
on_delete=models.SET_NULL,
|
||||
help_text = _('if set, select only elements that are of this type'),
|
||||
help_text = _('keep only elements of this type'),
|
||||
limit_choices_to = related_pages_filter,
|
||||
)
|
||||
related = models.ForeignKey(
|
||||
|
@ -567,14 +567,15 @@ class SectionPlaylist(Section):
|
||||
_('user playlist'),
|
||||
default = False,
|
||||
help_text = _(
|
||||
'if set, this playlist is to be editable by the user'
|
||||
'this is a user playlist, it can be edited and saved by the '
|
||||
'users (the modifications will NOT be registered on the server)'
|
||||
)
|
||||
)
|
||||
single_mode = models.BooleanField(
|
||||
_('single_mode'),
|
||||
default = False,
|
||||
read_all = models.BooleanField(
|
||||
_('read all'),
|
||||
default = True,
|
||||
help_text = _(
|
||||
'enable single mode by default on this playlist'
|
||||
'by default at the end of the sound play the next one'
|
||||
)
|
||||
)
|
||||
|
||||
@ -583,7 +584,7 @@ class SectionPlaylist(Section):
|
||||
template_name = 'aircox_cms/sections/playlist.html'
|
||||
panels = Section.panels + [
|
||||
FieldPanel('user_playlist'),
|
||||
FieldPanel('single_mode'),
|
||||
FieldPanel('read_all'),
|
||||
]
|
||||
|
||||
def __init__(self, *args, sounds = None, tracks = None, page = None, **kwargs):
|
||||
@ -605,6 +606,7 @@ class SectionPlaylist(Section):
|
||||
'is_default': self.user_playlist,
|
||||
'modifiable': self.user_playlist,
|
||||
'storage_key': self.user_playlist and str(self.pk),
|
||||
'read_all': self.read_all,
|
||||
'tracks': self.tracks
|
||||
})
|
||||
if not self.user_playlist and not self.tracks:
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
{% with start_hour=schedule.time.hour start_minute=schedule.time.minute %}
|
||||
{% with duration_hour=schedule.duration.hour duration_minute=schedule.duration.minute %}
|
||||
<li aria-label="{% blocktrans trimmed %}Diffusion on {{ day }} at {{ start_hour }} hours {{ start_minute }}, on the {{ frequency }}, and last for {{ duration_hour }} hours and {{ duration_minute }} minutes {% endblocktrans %}">
|
||||
<li aria-label="{% blocktrans trimmed %}Diffusion on {{ day }} at {{ start_hour }} hours {{ start_minute }}, {{ frequency }}, and last for {{ duration_hour }} hours and {{ duration_minute }} minutes {% endblocktrans %}">
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
|
||||
|
@ -34,8 +34,8 @@
|
||||
{% if is_default %}
|
||||
default: true,
|
||||
{% endif %}
|
||||
{% if single_mode %}
|
||||
single_mode: true,
|
||||
{% if read_all %}
|
||||
read_all: true,
|
||||
{% endif %}
|
||||
{% if modifiable %}
|
||||
modifiable: true,
|
||||
|
Reference in New Issue
Block a user