diff --git a/pod/locale/fr/LC_MESSAGES/django.mo b/pod/locale/fr/LC_MESSAGES/django.mo index a42b0be0a6..e17f63bc1b 100644 Binary files a/pod/locale/fr/LC_MESSAGES/django.mo and b/pod/locale/fr/LC_MESSAGES/django.mo differ diff --git a/pod/locale/fr/LC_MESSAGES/django.po b/pod/locale/fr/LC_MESSAGES/django.po index 95ed14e578..e09a598279 100644 --- a/pod/locale/fr/LC_MESSAGES/django.po +++ b/pod/locale/fr/LC_MESSAGES/django.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Pod\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-17 14:28+0000\n" +"POT-Creation-Date: 2024-11-27 12:02+0100\n" "PO-Revision-Date: \n" "Last-Translator: obado \n" "Language-Team: Pod Team cotech-esup-pod@esup-portail.org\n" @@ -4703,7 +4703,7 @@ msgstr "Obtenir la taille du fichier" msgid "Get the file name" msgstr "Obtenir le nom du fichier" -#: pod/main/models.py +#: pod/main/models.py pod/video/models.py msgid "order" msgstr "ordre" @@ -9128,6 +9128,10 @@ msgstr "Date de l’évènement" msgid "The channel where you want your content to appear." msgstr "La chaîne où vous voulez que votre contenu apparaisse." +#: pod/video/models.py +msgid "Order videos in channels or themes." +msgstr "Ordonner les vidéos dans les chaines ou les thèmes." + #: pod/video/models.py msgid "Overview" msgstr "Vue d’ensemble" diff --git a/pod/locale/fr/LC_MESSAGES/djangojs.po b/pod/locale/fr/LC_MESSAGES/djangojs.po index 9017c4195a..458326e710 100644 --- a/pod/locale/fr/LC_MESSAGES/djangojs.po +++ b/pod/locale/fr/LC_MESSAGES/djangojs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Esup-Pod\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-17 14:28+0000\n" +"POT-Creation-Date: 2024-11-27 12:02+0100\n" "PO-Revision-Date: \n" "Last-Translator: obado \n" "Language-Team: \n" diff --git a/pod/locale/nl/LC_MESSAGES/django.po b/pod/locale/nl/LC_MESSAGES/django.po index 90aecd9d23..02d4a85449 100644 --- a/pod/locale/nl/LC_MESSAGES/django.po +++ b/pod/locale/nl/LC_MESSAGES/django.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Pod\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-17 14:28+0000\n" +"POT-Creation-Date: 2024-11-27 12:02+0100\n" "PO-Revision-Date: 2024-07-04 17:54+0200\n" "Last-Translator: obado \n" "Language-Team: \n" @@ -2771,15 +2771,15 @@ msgstr "" #: pod/import_video/views.py #, python-format msgid "" -"This video “%(name)s” was uploaded to Pod; its origin is %(type)s: %(url)s

%(desc)s" +"This video “%(name)s” was uploaded to Pod; its origin is %(type)s: %(url)s

%(desc)s" msgstr "" #: pod/import_video/views.py #, python-format msgid "" -"This video “%(name)s” was uploaded to Pod; its origin is Youtube: %(url)s" +"This video “%(name)s” was uploaded to Pod; its origin is Youtube: %(url)s" msgstr "" #: pod/import_video/views.py @@ -4457,7 +4457,7 @@ msgstr "" msgid "Get the file name" msgstr "" -#: pod/main/models.py +#: pod/main/models.py pod/video/models.py msgid "order" msgstr "" @@ -6145,8 +6145,8 @@ msgstr "" msgid "" "\n" "

Hello,

\n" -"

%(owner)s invites you to the meeting " -"%(meeting_title)s.

\n" +"

%(owner)s invites you to the meeting " +"%(meeting_title)s.

\n" "

here the link to join the meeting:\n" " %(join_link)s

\n" "

You need this password to enter: %(password)sHello,

\n" -"

%(owner)s invites you to the meeting " -"%(meeting_title)s.

\n" +"

%(owner)s invites you to the meeting " +"%(meeting_title)s.

\n" "

Start date: %(start_date_time)s

\n" "

End date: %(end_date)s

\n" "

here the link to join the meeting:\n" @@ -7736,8 +7736,8 @@ msgstr "" #: pod/video/templates/videos/video-element.html msgid "" "To view this video please enable JavaScript, and consider upgrading to a web " -"browser that supports HTML5 video" +"browser that supports HTML5 video" msgstr "" #: pod/recorder/templates/recorder/link_record.html @@ -8503,6 +8503,10 @@ msgstr "" msgid "The channel where you want your content to appear." msgstr "" +#: pod/video/models.py +msgid "Order videos in channels or themes." +msgstr "" + #: pod/video/models.py msgid "Overview" msgstr "" diff --git a/pod/locale/nl/LC_MESSAGES/djangojs.po b/pod/locale/nl/LC_MESSAGES/djangojs.po index bb77ebe460..206c8637b4 100644 --- a/pod/locale/nl/LC_MESSAGES/djangojs.po +++ b/pod/locale/nl/LC_MESSAGES/djangojs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Esup-Pod\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-17 14:28+0000\n" +"POT-Creation-Date: 2024-11-27 12:02+0100\n" "PO-Revision-Date: 2024-06-04 16:20+0200\n" "Last-Translator: obado \n" "Language-Team: \n" diff --git a/pod/video/forms.py b/pod/video/forms.py index dba831730e..3bc613f457 100644 --- a/pod/video/forms.py +++ b/pod/video/forms.py @@ -688,7 +688,7 @@ class VideoForm(forms.ModelForm): { "legend": _("Advanced options"), "classes": "", - "fields": ["allow_downloading", "is_360", "disable_comment"], + "fields": ["allow_downloading", "is_360", "disable_comment", "order"], }, ), ) diff --git a/pod/video/models.py b/pod/video/models.py index e7164ed774..89b59f7860 100644 --- a/pod/video/models.py +++ b/pod/video/models.py @@ -833,6 +833,13 @@ class Video(models.Model): blank=True, null=True, ) + order = models.PositiveSmallIntegerField( + _('order'), + help_text=_("Order videos in channels or themes."), + default=1, + blank=True, + null=True, + ) thumbnail = models.ForeignKey( CustomImageModel, on_delete=models.SET_NULL, diff --git a/pod/video/utils.py b/pod/video/utils.py index 619313b930..efe465047b 100644 --- a/pod/video/utils.py +++ b/pod/video/utils.py @@ -228,6 +228,7 @@ def sort_videos_list(videos_list: list, sort_field: str, sort_direction: str = " "type", "viewcount", "rank", + "order", }: if sort_field in {"title", "title_fr", "title_en"}: sort_field = Lower(sort_field) diff --git a/pod/video/views.py b/pod/video/views.py index 93580e111f..190c03150e 100644 --- a/pod/video/views.py +++ b/pod/video/views.py @@ -359,6 +359,7 @@ def paginator(videos_list, page): def channel(request, slug_c, slug_t=None): channel = get_object_or_404(Channel, slug=slug_c, site=get_current_site(request)) videos_list = get_available_videos().filter(channel=channel) + videos_list = sort_videos_list(videos_list, "order", "on") channel.video_count = videos_list.count() theme = None