Skip to content

Commit

Permalink
[DONE] Update : Displaying channels via AJAX (EsupPortail#910)
Browse files Browse the repository at this point in the history
* Add requests to get the channel lists in JSON format

* Add requests to get the channel lists in JSON format

* Add JS functions to make AJAX request to get channel lists

* Use the AJAX request to load the channels when the user ask to view it only

* Remove channel constants in the context_processors

* Add infine loader for the default channels

* Replace 'concert' by 'convert' in the function name

* Fix the theme list in the channel page

* Add list group for the theme list in the navbar

* Add the setAttributesWithTab function

* Move the headband to the right

* Hide the channel tabs when HIDE_CHANNEL_TAB is true

* Update test units

* Add infinite loader for channels in channel tabs

* Add unit tests

* Fix flake8 & add JS doc

* Add the translations

* Fix duplicate display of channels in navbar

* Add loading element when the channel list loading isn't done

* Add themes loader & CHANNELS_PER_BATCH settings & fix unit tests

* Fix translation for 'Channels'

* Fix translation

* Move styling in pod.css

* Fix flake8

* remove unused code in base.html, update get_list to only show children if wanted, move js code to video_edit from main, update channel to shwo theme and view to send all channels and theme in video edit

* remove duplicate code - improve bdd request

* fix unit test and bug if no channels in video form

---------

Co-authored-by: Ptitloup <[email protected]>
  • Loading branch information
2 people authored and vsabatie committed Nov 23, 2023
1 parent 6020a6d commit 54c30fe
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 103 deletions.
186 changes: 174 additions & 12 deletions pod/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ msgstr ""
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
"POT-Creation-Date: 2023-08-30 12:33+0200\n"
=======
"POT-Creation-Date: 2023-07-05 15:50+0200\n"
Expand Down Expand Up @@ -210,6 +211,8 @@ msgstr ""
=======
=======
>>>>>>> c8fb6985 ([DONE] live Extron SMP (#873))
=======
>>>>>>> b598d4c1 ([DONE] Update : Displaying channels via AJAX (#910))
"POT-Creation-Date: 2023-10-31 11:26+0000\n"
=======
"POT-Creation-Date: 2023-07-13 16:48+0200\n"
Expand All @@ -218,12 +221,23 @@ msgstr ""
>>>>>>> 23b50507 (ajout)
=======
=======
=======
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))
"POT-Creation-Date: 2023-07-13 16:48+0200\n"
=======
"POT-Creation-Date: 2023-07-05 15:50+0200\n"
>>>>>>> 21046607 ([DONE] live Extron SMP (#873))
<<<<<<< HEAD
>>>>>>> c7c7882c ([DONE] live Extron SMP (#873))
<<<<<<< HEAD
>>>>>>> c8fb6985 ([DONE] live Extron SMP (#873))
=======
=======
=======
"POT-Creation-Date: 2023-08-14 13:00+0000\n"
>>>>>>> 96067166 ([DONE] Update : Displaying channels via AJAX (#910))
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))
>>>>>>> b598d4c1 ([DONE] Update : Displaying channels via AJAX (#910))
"PO-Revision-Date: \n"
"Last-Translator: obado <[email protected]>\n"
"Language-Team: Pod Team [email protected]\n"
Expand Down Expand Up @@ -2207,12 +2221,17 @@ msgstr ""
msgid "Subtitle and/or caption file(s) must be in “.vtt” format."
msgstr ""
<<<<<<< HEAD
<<<<<<< HEAD
"Les fichiers de sous-titres et/ou de légendes doivent être au format « ."
"vtt »."
=======
"Les fichiers de sous-titres et/ou de légendes doivent être au format \"."
"vtt\"."
>>>>>>> 8eeb87fe (ajout)
=======
"Les fichiers de sous-titres et/ou de légendes doivent être au format \".vtt"
"\"."
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))

#: pod/completion/templates/video_completion.html
msgid "You can use"
Expand Down Expand Up @@ -2748,10 +2767,18 @@ msgstr ""
=======
"Les champs \"Début\" et \"Fin\" doivent contenir des valeurs en secondes. "
"Lancez la lecture de la vidéo, mettez sur pause et cliquez sur \"Récupérer "
<<<<<<< HEAD
"le temps depuis le lecteur\" pour renseigner automatiquement le champ "
"\"Début\". Vous pouvez le faire également pour remplir le champ \"Fin\"."
>>>>>>> 8eeb87fe (ajout)
<<<<<<< HEAD
>>>>>>> 23b50507 (ajout)
=======
=======
"le temps depuis le lecteur\" pour renseigner automatiquement le champ \"Début"
"\". Vous pouvez le faire également pour remplir le champ \"Fin\"."
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))
>>>>>>> b598d4c1 ([DONE] Update : Displaying channels via AJAX (#910))

#: pod/enrichment/templates/enrichment/edit_enrichment.html
msgid "You cannot overlap enrichments."
Expand Down Expand Up @@ -3305,6 +3332,7 @@ msgstr ""
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
"Cette vidéo a été téléversée sur Pod ; son origine est %(type)s : <a "
=======
"Cette vidéo a été téléversée sur Pod; son origine est %(type)s : <a "
Expand Down Expand Up @@ -3392,13 +3420,22 @@ msgstr ""
"\"%(url)s\" target=\"_blank\">%(url)s</a>"
>>>>>>> c35f7ee1 ([DONE] Bugfix of 3.4.0 (#983))
=======
=======
>>>>>>> b598d4c1 ([DONE] Update : Displaying channels via AJAX (#910))
"Cette vidéo a été téléversée sur Pod ; son origine est %(type)s : <a href="
"\"%(url)s\" target=\"_blank\">%(url)s</a>"
=======
"Cette vidéo a été téléversée sur Pod; son origine est %(type)s : <a "
"href=\"%(url)s\" target=\"_blank\">%(url)s</a>"
>>>>>>> 8eeb87fe (ajout)
<<<<<<< HEAD
>>>>>>> 23b50507 (ajout)
=======
=======
"Cette vidéo a été téléversée sur Pod; son origine est %(type)s : <a href="
"\"%(url)s\" target=\"_blank\">%(url)s</a>"
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))
>>>>>>> b598d4c1 ([DONE] Update : Displaying channels via AJAX (#910))

#: pod/import_video/views.py pod/meeting/views.py
msgid "Try changing the record type or address for this recording."
Expand All @@ -3410,12 +3447,17 @@ msgstr ""
#, python-format
msgid ""
<<<<<<< HEAD
<<<<<<< HEAD
"This video '%(name)s' was uploaded to Pod; its origin is Youtube: <a href="
"\"%(url)s\" target=\"_blank\">%(url)s</a>"
=======
"This video '%(name)s' was uploaded to Pod; its origin is Youtube : <a "
"href=\"%(url)s\" target=\"_blank\">%(url)s</a>"
>>>>>>> 8eeb87fe (ajout)
=======
"This video '%(name)s' was uploaded to Pod; its origin is Youtube : <a href="
"\"%(url)s\" target=\"_blank\">%(url)s</a>"
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))
msgstr ""
<<<<<<< HEAD
<<<<<<< HEAD
Expand Down Expand Up @@ -5888,6 +5930,7 @@ msgstr "Déconnexion"
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> ee58a741 ([DONE] Update : Playlist (#857))
=======
Expand All @@ -5898,6 +5941,8 @@ msgstr "Déconnexion"
>>>>>>> 605f7669 ([DONE] Update : Playlist (#857))
=======
>>>>>>> ee58a741 ([DONE] Update : Playlist (#857))
=======
>>>>>>> b598d4c1 ([DONE] Update : Displaying channels via AJAX (#910))
#: pod/main/templates/navbar.html
msgid "Your statistics"
msgstr "Vos statistiques"
Expand Down Expand Up @@ -5990,6 +6035,8 @@ msgstr "Nombre de listes de lecture :"
msgid "Channel list"
msgstr "Liste des chaînes"

=======
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))
#: pod/main/templates/navbar_collapse.html
msgid "Types of videos"
msgstr "Types de vidéos"
Expand Down Expand Up @@ -6859,16 +6906,16 @@ msgid ""
msgstr ""
"\n"
" <p>Bonjour,\n"
" <p>%(owner)s vous invite à une réunion récurrente "
"<b>%(meeting_title)s</b>.</p>\n"
" <p>%(owner)s vous invite à une réunion récurrente <b>"
"%(meeting_title)s</b>.</p>\n"
" <p>Date de début : %(start_date_time)s </p>\n"
" <p>Récurrent jusqu’à la date : %(end_date)s </p>\n"
" <p>La réunion se tiendra tou(te)s les %(frequency)s %(recurrence)s </"
"p>\n"
" <p>Voici le lien pour rejoindre la réunion :\n"
" <a href=\"%(join_link)s\">%(join_link)s</a></p>\n"
" <p>Vous avez besoin de ce mot de passe pour entrer : "
"<b>%(password)s</b> </p>\n"
" <p>Vous avez besoin de ce mot de passe pour entrer : <b>"
"%(password)s</b> </p>\n"
" <p>Cordialement</p>\n"
" "

Expand All @@ -6894,8 +6941,8 @@ msgstr ""
" <p>Date de fin : %(end_date)s </p>\n"
" <p>Voici le lien pour rejoindre la réunion :\n"
" <a href=\"%(join_link)s\">%(join_link)s</a></p>\n"
" <p>Vous avez besoin de ce mot de passe pour entrer : "
"<b>%(password)s</b> </p>\n"
" <p>Vous avez besoin de ce mot de passe pour entrer : <b>"
"%(password)s</b> </p>\n"
" <p>Cordialement</p>\n"
" "

Expand Down Expand Up @@ -8042,6 +8089,9 @@ msgid ""
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> b598d4c1 ([DONE] Update : Displaying channels via AJAX (#910))
"You haven't got any playlist yet, please use the \"Add a playlist\" button "
"to add one."
=======
Expand Down Expand Up @@ -8090,7 +8140,14 @@ msgid ""
"You have not created any playlists yet, please use the \"Add a new "
"playlist\" button to add one."
>>>>>>> 8eeb87fe (ajout)
<<<<<<< HEAD
>>>>>>> 23b50507 (ajout)
=======
=======
"You have not created any playlists yet, please use the \"Add a new playlist"
"\" button to add one."
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))
>>>>>>> b598d4c1 ([DONE] Update : Displaying channels via AJAX (#910))
msgstr ""
"Vous n’avez pas encore créé de liste de lecture, veuillez cliquer sur le "
"bouton « Ajouter une nouvelle liste de lecture » pour en ajouter une."
Expand Down Expand Up @@ -8375,9 +8432,90 @@ msgstr "Favoris"
msgid "This field is required."
msgstr "Ce champ est requis."

<<<<<<< HEAD
#: pod/playlist/tests/test_forms.py
msgid "You cannot create a playlist named \"Favorites\""
msgstr "Vous ne pouvez créer une liste de lecture nommé \"Favoris\""
=======
#: pod/playlist/templates/playlist/player_controls.html
msgid "Repeat the playlist"
msgstr "Répéter la liste de lecture"

#: pod/playlist/templates/playlist/player_controls.html
msgid "Switch to next video automatically"
msgstr "Passer automatiquement à la prochaine vidéo"

#: pod/playlist/templates/playlist/playlist_element_list.html
msgid "List of videos"
msgstr "Liste des vidéos"

#: pod/playlist/templates/playlist/playlist_element_list.html
msgid "Thumbnail"
msgstr "Vignette"

#: pod/playlist/templates/playlist/playlist_element_list.html
msgid "Video thumbnail"
msgstr "Vignette de la vidéo"

#: pod/playlist/templates/playlist/playlist_element_list.html
msgid "Move up"
msgstr "Déplacer vers le haut"

#: pod/playlist/templates/playlist/playlist_element_list.html
msgid "Move down"
msgstr "Déplacer vers le bas"

#: pod/playlist/templates/playlist/playlist_element_list.html
msgid "Save position"
msgstr "Enregistrer les positions"

#: pod/playlist/templates/playlist/playlist_list.html
msgid "This playlist is visible to all users."
msgstr "Cette liste de lecture est visible à d’autres utilisateurs."

#: pod/playlist/templates/playlist/playlist_list.html
msgid "This playlist is only visible by you."
msgstr "Vous seul pouvez voir cette liste de lecture."

#: pod/playlist/templates/playlist/playlist_list.html
#: pod/playlist/templates/playlist/playlist_video_list.html
#: pod/video/templates/channel/channel.html
#, python-format
msgid "%(counter)s video"
msgid_plural "%(counter)s videos"
msgstr[0] "%(counter)s vidéo"
msgstr[1] "%(counter)s vidéos"

#: pod/playlist/templates/playlist/playlist_list.html
msgid "Launch"
msgstr "Lancer"

#: pod/playlist/templates/playlist/playlist_list.html
msgid "Sorry, no playlist found"
msgstr "Désolé, aucune liste de lecture trouvée"

#: pod/playlist/templates/playlist/playlist_video_card.html
#: pod/video/templates/videos/card.html
msgid "This content is password protected."
msgstr "Ce contenu est protégé par un mot de passe."

#: pod/playlist/templates/playlist/playlist_video_card.html
#: pod/video/templates/videos/card.html
msgid "This content is chaptered."
msgstr "Ce contenu est chapitré."

#: pod/playlist/templates/playlist/playlist_video_card.html
#: pod/video/templates/videos/card.html
#: pod/video/templates/videos/category_modal_card.html
msgid "Video content."
msgstr "Contenu vidéo."

#: pod/playlist/templates/playlist/playlist_video_card.html
#: pod/video/templates/videos/card.html
#: pod/video/templates/videos/category_modal_card.html
msgid "Audio content."
msgstr "Contenu audio."
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))

#: pod/playlist/views.py
msgid "The playlist has been deleted."
Expand Down Expand Up @@ -9003,8 +9141,8 @@ msgstr "Prévisualisation d’enregistrement"
#: pod/video/templates/videos/video-element.html
msgid ""
"To view this video please enable JavaScript, and consider upgrading to a web "
"browser that <a href=\"https://videojs.com/html5-video-support/\" "
"target=\"_blank\">supports HTML5 video</a>"
"browser that <a href=\"https://videojs.com/html5-video-support/\" target="
"\"_blank\">supports HTML5 video</a>"
msgstr ""
"Pour visionner cette vidéo, veuillez activer JavaScript et envisager de "
"passer à un navigateur Web qui <a href=\"https://videojs.com/html5-video-"
Expand Down Expand Up @@ -9090,11 +9228,17 @@ msgstr ""
=======
"Bonjour, <p>un nouvel enregistrement a été ajouté sur la plateforme "
"%(title_site)s à partir de l’enregistreur \"%(recorder)s\".<br>Pour "
<<<<<<< HEAD
"l’ajouter, cliquez sur le lien ci dessous.</p><a "
"href=\"%(link_url)s\">%(link_url)s</a><br><i>Si le lien n’est pas actif, il "
"faut le copier-coller dans la barre d’adresse de votre navigateur.</"
"i><p><p>Cordialement</p>"
>>>>>>> 8eeb87fe (ajout)
=======
"l’ajouter, cliquez sur le lien ci dessous.</p><a href=\"%(link_url)s\">"
"%(link_url)s</a><br><i>Si le lien n’est pas actif, il faut le copier-coller "
"dans la barre d’adresse de votre navigateur.</i><p><p>Cordialement</p>"
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))

#: pod/recorder/views.py
msgid "New recording added."
Expand Down Expand Up @@ -9442,8 +9586,8 @@ msgid ""
"%(url)s</a></p>\n"
msgstr ""
"vous pouvez changer la date de suppression en éditant votre vidéo :</p>\n"
"<p><a href=\"%(scheme)s:%(url)s\" rel=\"noopener\" "
"target=\"_blank\">%(scheme)s:%(url)s</a></p>\n"
"<p><a href=\"%(scheme)s:%(url)s\" rel=\"noopener\" target=\"_blank\">"
"%(scheme)s:%(url)s</a></p>\n"
"\n"

#: pod/video/management/commands/check_obsolete_videos.py
Expand Down Expand Up @@ -10272,8 +10416,8 @@ msgid ""
"This video is chaptered. Click the chapter button <span class=\"vjs-icon-"
"chapters\"></span> on the video player to view them."
msgstr ""
"Cette vidéo est chapitrée. Cliquez sur le bouton de chapitre <span "
"class=\"vjs-icon-chapters\"></span> sur le lecteur vidéo pour les voir."
"Cette vidéo est chapitrée. Cliquez sur le bouton de chapitre <span class="
"\"vjs-icon-chapters\"></span> sur le lecteur vidéo pour les voir."

#: pod/video/templates/videos/video-all-info.html
msgid "Other versions"
Expand Down Expand Up @@ -11409,8 +11553,26 @@ msgstr "xAPI Esup-Pod"
>>>>>>> 84406de6 ([DONE] RGAA 03.02 (#951))
=======

<<<<<<< HEAD
#~ msgid "Toggle navigation"
#~ msgstr "Basculer le menu"
=======
#~ msgid "%(counter)s Channel"
#~ msgid_plural "%(counter)s Channels"
#~ msgstr[0] "%(counter)s Chaîne"
#~ msgstr[1] "%(counter)s Chaînes"

#~ msgid "%(counter)s Theme"
#~ msgid_plural "%(counter)s Themes"
#~ msgstr[0] "%(counter)s Thème"
#~ msgstr[1] "%(counter)s Thèmes"

#~ msgid "No channels found"
#~ msgstr "Aucune chaîne trouvée"

#~ msgid "Error in %s: "
#~ msgstr "Erreur sur %s : "
>>>>>>> 5c90037b ([DONE] Update : Displaying channels via AJAX (#910))

#~ msgid "The password is / will be encrypted."
#~ msgstr "Le mot de passe est / sera encrypté."
Expand Down
Loading

0 comments on commit 54c30fe

Please sign in to comment.