Skip to content

Commit

Permalink
[DONE] Fix some bugs for 3.4.0 (EsupPortail#947)
Browse files Browse the repository at this point in the history
* Add breadcrumb link for Home

* Fix sort direction when less than 2 videos

* Fix playlist migration

* Add password encryption for protected videos

* Fix flake8

* Improve password input

* Fix unittest

* Fix video notes

* Fix JS error for import video page

* Fix playlist player refresh

* Title improvements and aria-hidden for <i>

* Fix playlist sort redirection, dark mode contrasts

* Fix playlist migration

* Improve QoC

* Fix flake8

* Add missing translations

* Add missing translations

* Improve migration functions

* Remove useless import
  • Loading branch information
AymericJak authored and vsabatie committed Nov 22, 2023
1 parent c9130bd commit 8f679ad
Show file tree
Hide file tree
Showing 39 changed files with 244 additions and 109 deletions.
2 changes: 1 addition & 1 deletion pod/chapter/templates/video_chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{% endif %}
</div>
<span class="float-end">
<a href="{% url 'video:video' slug=video.slug %}" title="{% blocktrans with video_title=video.title %}Back to the video “{{ video_title }}”{% endblocktrans %}" class="btn btn btn-secondary btn-sm">
<a href="{% url 'video:video' slug=video.slug %}" title="{% blocktrans with video_title=video.title %}Back to the video “{{ video_title }}”{% endblocktrans %}" class="btn btn btn-secondary btn-sm" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-film" aria-hidden="true"></i>&nbsp;{% trans "Back to the video"%}
</a>
</span>
Expand Down
6 changes: 4 additions & 2 deletions pod/cut/templates/video_cut.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@
<div id="info_video">
<div>
<span class="float-end">
<button type="button" class="btn btn-primary btn-sm m-2" data-bs-toggle="modal" data-bs-target="#ConfirmationModal"><i class="bi bi-scissors"></i>&nbsp;{% trans 'Cut' %}</button>
<a href="{% url 'video:video' slug=video.slug %}" title="{% blocktrans with video_title=video.title %}Back to the video “{{ video_title }}”{% endblocktrans %}" class="btn btn-secondary btn-sm">
<button type="button" class="btn btn-primary btn-sm m-2" data-bs-toggle="modal" data-bs-target="#ConfirmationModal">
<i class="bi bi-scissors" aria-hidden="true"></i>&nbsp;{% trans 'Cut' %}
</button>
<a href="{% url 'video:video' slug=video.slug %}" title="{% blocktrans with video_title=video.title %}Back to the video “{{ video_title }}”{% endblocktrans %}" class="btn btn-secondary btn-sm" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-film" aria-hidden="true"></i>&nbsp;{% trans 'Back to the video' %}
</a>
</span>
Expand Down
12 changes: 7 additions & 5 deletions pod/import_video/templates/import_video/add_or_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,14 @@ <h2 class="card-header card-title pod-card__title h4">{% trans "Terms of Service
parents[parents.length-1].style.display = 'none';
}
};
window.addEventListener('load', function(event) {
is_restricted_elt = document.getElementById("id_is_restricted");
is_restricted_elt.addEventListener('clicked',function (event) {
is_restricted_elt = document.getElementById("id_is_restricted");
if (is_restricted_elt !== null) {
window.addEventListener('load', function(event) {
is_restricted_elt.addEventListener('clicked',function (event) {
restrict_access_to_groups();
});
restrict_access_to_groups();
});
restrict_access_to_groups();
});
}
</script>
{% endblock more_script %}
6 changes: 3 additions & 3 deletions pod/live/templates/live/event-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,19 @@ <h2 class="modal-title h5" id="shareLabel">
<dd class="col-sm-9 mb-0">
<ul class="list-inline mb-0 social_links">
<li class="list-inline-item">
<a target="_blank" href="https://www.facebook.com/sharer.php?u={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} Facebook">
<a target="_blank" href="https://www.facebook.com/sharer.php?u={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} Facebook" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-facebook" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on Facebook' %}</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://twitter.com/share?url={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} X (Twitter)">
<a target="_blank" href="https://twitter.com/share?url={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} X (Twitter)" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-twitter" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on X (Twitter)' %}</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} LinkedIn">
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{request.build_absolute_uri|urlencode}}" class="btn pod-btn pod-btn-social m-1" title="{% trans 'Share on' %} LinkedIn" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-linkedin" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on LinkedIn' %}</span>
</a>
Expand Down
2 changes: 1 addition & 1 deletion pod/live/templates/live/event_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h2 class="h4 card-header card-title pl-2"><i class="bi bi-gear" aria-hidden="tr
{% if event.owner == request.user or request.user.is_superuser %}
<a href="{% url 'live:event_edit' slug=form.instance.slug %}" title="{% trans 'Edit the event' %}"
class="btn pod-btn-social p-1 m-0 ms-1">
<i class="bi bi-pencil" aria-hidden="true"></i>
<i class="bi bi-pencil-square" aria-hidden="true"></i>
</a>
{% endif %}
<a href="{% url 'live:event_delete' slug=form.instance.slug %}"
Expand Down
29 changes: 24 additions & 5 deletions pod/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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 @@ -58,8 +59,11 @@ msgstr ""
=======
"POT-Creation-Date: 2023-09-19 12:22+0000\n"
>>>>>>> c3c05541 ([DONE] fix recuring date in edit meeting (#946))
=======
"POT-Creation-Date: 2023-09-21 12:16+0000\n"
>>>>>>> 1a2953ef ([DONE] Fix some bugs for 3.4.0 (#947))
"PO-Revision-Date: \n"
"Last-Translator: ptitloup <nicolas.can@univ-lille.fr>\n"
"Last-Translator: AymericJak <aymeric.jakobowski@univ-lille.fr>\n"
"Language-Team: Pod Team [email protected]\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -1287,6 +1291,7 @@ msgstr ""
#: pod/recorder/models.py pod/video/models.py
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
#: pod/video/templates/videos/video_breadcrumbs.html
#: pod/video_encode_transcript/models.py
=======
Expand All @@ -1296,6 +1301,11 @@ msgstr ""
#: pod/video/templates/videos/video_breadcrumbs.html
#: pod/video_encode_transcript/models.py
>>>>>>> 43dd9c9b ([DONE] Update : Playlist (corrections) (#923))
=======
#: pod/video/templates/channel/channel.html
#: pod/video/templates/videos/video_breadcrumbs.html
#: pod/video/templates/videos/videos.html pod/video_encode_transcript/models.py
>>>>>>> 1a2953ef ([DONE] Fix some bugs for 3.4.0 (#947))
msgid "Video"
msgstr "Vidéo"

Expand Down Expand Up @@ -7732,6 +7742,10 @@ msgstr ""
msgid "Date of event"
msgstr "Date de l’évènement"

#: pod/video/models.py
msgid "The password is / will be encrypted."
msgstr "Le mot de passe est / sera encrypté."

#: pod/video/models.py
msgid "Overview"
msgstr "Vue d’ensemble"
Expand Down Expand Up @@ -7889,13 +7903,18 @@ msgstr "Statistiques de vues"

#: pod/video/templates/channel/channel.html
#: pod/video/templates/videos/videos.html
msgid "subscribe to the video feed"
msgstr "souscrire au flux vidéo"
msgid "Subscribe to the video feed"
msgstr "Souscrire au flux vidéo"

#: pod/video/templates/channel/channel.html
#: pod/video/templates/videos/videos.html
msgid "Subscribe to the audio feed"
msgstr "Souscrire au flux audio"

#: pod/video/templates/channel/channel.html
#: pod/video/templates/videos/videos.html
msgid "subscribe to the audio feed"
msgstr "souscrire au flux audio"
msgid "Audio"
msgstr "Audio"

#: pod/video/templates/channel/channel.html
#: pod/video/templates/channel/my_channels.html
Expand Down
Binary file modified pod/locale/fr/LC_MESSAGES/djangojs.mo
Binary file not shown.
10 changes: 7 additions & 3 deletions pod/locale/fr/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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 @@ -54,8 +55,11 @@ msgstr ""
=======
"POT-Creation-Date: 2023-09-19 12:22+0000\n"
>>>>>>> c3c05541 ([DONE] fix recuring date in edit meeting (#946))
=======
"POT-Creation-Date: 2023-09-21 12:16+0000\n"
>>>>>>> 1a2953ef ([DONE] Fix some bugs for 3.4.0 (#947))
"PO-Revision-Date: \n"
"Last-Translator: obado <bado@unice.fr>\n"
"Last-Translator: AymericJak <aymeric.jakobowski@univ-lille.fr>\n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -517,8 +521,8 @@ msgid "Add your picture"
msgstr "Ajouter votre image"

#: pod/main/static/js/main.js
msgid "text copied"
msgstr "texte copié"
msgid "Text copied"
msgstr "Texte copié"

#: pod/main/static/js/main.js
msgid "Errors appear in the form, please correct them"
Expand Down
23 changes: 21 additions & 2 deletions pod/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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 @@ -58,6 +59,9 @@ msgstr ""
=======
"POT-Creation-Date: 2023-09-19 12:22+0000\n"
>>>>>>> c3c05541 ([DONE] fix recuring date in edit meeting (#946))
=======
"POT-Creation-Date: 2023-09-21 12:16+0000\n"
>>>>>>> 1a2953ef ([DONE] Fix some bugs for 3.4.0 (#947))
"PO-Revision-Date: 2023-06-08 14:37+0200\n"
"Last-Translator: obado <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -1222,6 +1226,7 @@ msgstr ""
#: pod/recorder/models.py pod/video/models.py
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
#: pod/video/templates/videos/video_breadcrumbs.html
#: pod/video_encode_transcript/models.py
=======
Expand All @@ -1231,6 +1236,11 @@ msgstr ""
#: pod/video/templates/videos/video_breadcrumbs.html
#: pod/video_encode_transcript/models.py
>>>>>>> 43dd9c9b ([DONE] Update : Playlist (corrections) (#923))
=======
#: pod/video/templates/channel/channel.html
#: pod/video/templates/videos/video_breadcrumbs.html
#: pod/video/templates/videos/videos.html pod/video_encode_transcript/models.py
>>>>>>> 1a2953ef ([DONE] Fix some bugs for 3.4.0 (#947))
msgid "Video"
msgstr ""

Expand Down Expand Up @@ -7200,6 +7210,10 @@ msgstr ""
msgid "Date of event"
msgstr ""

#: pod/video/models.py
msgid "The password is / will be encrypted."
msgstr ""

#: pod/video/models.py
msgid "Overview"
msgstr ""
Expand Down Expand Up @@ -7354,12 +7368,17 @@ msgstr ""

#: pod/video/templates/channel/channel.html
#: pod/video/templates/videos/videos.html
msgid "subscribe to the video feed"
msgid "Subscribe to the video feed"
msgstr ""

#: pod/video/templates/channel/channel.html
#: pod/video/templates/videos/videos.html
msgid "Subscribe to the audio feed"
msgstr ""

#: pod/video/templates/channel/channel.html
#: pod/video/templates/videos/videos.html
msgid "subscribe to the audio feed"
msgid "Audio"
msgstr ""

#: pod/video/templates/channel/channel.html
Expand Down
6 changes: 5 additions & 1 deletion pod/locale/nl/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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 @@ -54,6 +55,9 @@ msgstr ""
=======
"POT-Creation-Date: 2023-09-19 12:22+0000\n"
>>>>>>> c3c05541 ([DONE] fix recuring date in edit meeting (#946))
=======
"POT-Creation-Date: 2023-09-21 12:16+0000\n"
>>>>>>> 1a2953ef ([DONE] Fix some bugs for 3.4.0 (#947))
"PO-Revision-Date: 2023-02-08 15:22+0100\n"
"Last-Translator: obado <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -496,7 +500,7 @@ msgid "Add your picture"
msgstr ""

#: pod/main/static/js/main.js
msgid "text copied"
msgid "Text copied"
msgstr ""

#: pod/main/static/js/main.js
Expand Down
11 changes: 7 additions & 4 deletions pod/main/static/css/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,14 @@
}*/

/* switch logoPod color on dark theme */
[data-theme="dark"] .pod-navbar__brand img{
[data-theme="dark"] .pod-navbar__brand img {
filter: invert(100%) saturate(2908%) hue-rotate(27deg) brightness(121%) contrast(99%);
}

[data-theme="dark"] .vjs-logo-button {
filter: brightness(0) invert(1);
}

[data-theme="dark"] :not(.alert)>.btn-close {
filter: invert(100%);
}
Expand Down Expand Up @@ -171,10 +175,9 @@
color: #A8AFB5;
}

[data-theme="dark"] .btn-outline-primary{
background-color: #000;
[data-theme="dark"] .btn-outline-primary {
--bs-btn-hover-bg: var(--pod-primary-darken-dark);
color: var(--pod-primary-lighten-dark);
color: var(--pod-font-color);
}

[data-theme="dark"] .btn-outline-primary>svg {
Expand Down
2 changes: 1 addition & 1 deletion pod/main/static/css/pod.css
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ table .alert.alert-danger.btn.pod-btn-social {
}

.vjs-logo-button {
filter: invert(100%)
filter: invert(100%);
}

.vjs-logo-button:hover,
Expand Down
2 changes: 1 addition & 1 deletion pod/main/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ if (btnpartageprive) {
var copyText = document.getElementById("txtpartageprive");
copyText.select();
document.execCommand("copy");
showalert(gettext("text copied"), "alert-info");
showalert(gettext("Text copied"), "alert-info");
});
}

Expand Down
6 changes: 3 additions & 3 deletions pod/main/templates/aside.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ <h2 class="card-title pod-card__title h4">
<i class="bi bi-share" aria-hidden="true"></i>&nbsp;{% trans 'Share' %}
</h2>
<p class="card-text text-center social_links">
<a target="_blank" href="https://www.facebook.com/sharer.php?u={{request.build_absolute_uri|urlencode}}" class="btn btn-outline-primary m-1" title="{% trans 'Share on' %} Facebook">
<a target="_blank" href="https://www.facebook.com/sharer.php?u={{request.build_absolute_uri|urlencode}}" class="btn btn-outline-primary m-1" title="{% trans 'Share on' %} Facebook" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-facebook" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on Facebook' %}</span>
</a>
<a target="_blank" href="https://twitter.com/share?url={{request.build_absolute_uri|urlencode}}" class="btn btn-outline-primary m-1" title="{% trans 'Share on' %} X (Twitter)">
<a target="_blank" href="https://twitter.com/share?url={{request.build_absolute_uri|urlencode}}" class="btn btn-outline-primary m-1" title="{% trans 'Share on' %} X (Twitter)" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-twitter" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on X (Twitter)' %}</span>
</a>
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{request.build_absolute_uri|urlencode}}" class="btn btn-outline-primary m-1" title="{% trans 'Share on' %} LinkedIn">
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{request.build_absolute_uri|urlencode}}" class="btn btn-outline-primary m-1" title="{% trans 'Share on' %} LinkedIn" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="bi bi-linkedin" aria-hidden="true"></i>
<span class="visually-hidden">{% trans 'Share on LinkedIn' %}</span>
</a>
Expand Down
14 changes: 11 additions & 3 deletions pod/main/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,17 @@
<nav aria-label="{% trans 'Breadcrumb' %}" class="breadcrumb d-flex justify-content-between pb-2" id="mainbreadcrumb">
<ol class="breadcrumb p-0 mb-0">
{% block breadcrumbs %}
<li class="breadcrumb-item {% if request.path == '/' %}active" aria-current="page{% endif %}">
{% trans 'Home' %}
</li>
{% if request.path == '/' %}
<li class="breadcrumb-item active" aria-current="page">
{% trans 'Home' %}
</li>
{% else %}
<li class="breadcrumb-item">
<a href="/" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ TITLE_SITE }} - {% trans 'Home' %}">
{% trans 'Home' %}
</a>
</li>
{% endif %}
{% endblock breadcrumbs %}
</ol>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion pod/main/templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
aria-controls="pod-navbar__menu" title="{% trans 'Toggle navigation' %}">
<i class="bi bi-list" aria-hidden="true"></i>
</button>
<a class="navbar-brand pod-navbar__brand me-0 me-sm-1" href="/" title="{{ TITLE_SITE }} - {% trans 'Home' %}" {% if request.path == '/' %}aria-current="page"{% endif %}>
<a class="navbar-brand pod-navbar__brand me-0 me-sm-1" href="/" title="{{ TITLE_SITE }} - {% trans 'Home' %}" {% if request.path == '/' %}aria-current="page"{% endif %} data-bs-toggle="tooltip" data-bs-placement="bottom">
<img src="{% static LOGO_SITE %}" height="25" alt="" loading="lazy"><strong>{{ TITLE_SITE }}</strong>
</a>
<!-- off canvas -->
Expand Down
2 changes: 1 addition & 1 deletion pod/meeting/templates/meeting/internal_recordings.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<i class="bi bi-file-earmark-play"></i>
</a>
{% endif %}
{% if record.videoUrl != "" %}
{% if record.videoUrl != "" %}
<a class="btn btn-primary pod-btn-primary btn-sm" href="{{ record.videoUrl }}" target="_blank" title="{% trans 'Display the recording in video format'%}" data-bs-toggle="tooltip" data-bs-placement="top">
<i class="bi bi-camera-video"></i>
</a>
Expand Down
Loading

0 comments on commit 8f679ad

Please sign in to comment.