diff --git a/pod/main/static/css/pod.css b/pod/main/static/css/pod.css index 1bea77564c..2146470ab1 100755 --- a/pod/main/static/css/pod.css +++ b/pod/main/static/css/pod.css @@ -97,6 +97,10 @@ --third-background-color: var(--pod-background-neutre1-bloc) !important; } +.progress, .progress-stacked{ + --bs-progress-bar-bg: var(--pod-primary); +} + :root[data-dyslexia="on"] { --bs-body-font-family: var(--pod-font-family-dyslexie); } diff --git a/pod/main/templates/admin/base_site.html b/pod/main/templates/admin/base_site.html index 07d85a24bb..be21e108bd 100644 --- a/pod/main/templates/admin/base_site.html +++ b/pod/main/templates/admin/base_site.html @@ -26,6 +26,7 @@ // Set the body data-theme attribute to match the local storage item document.documentElement.dataset.theme = currentTheme?currentTheme:"light"; document.documentElement.dataset.bsTheme = currentTheme?currentTheme:"light"; + document.documentElement.dataset.colorScheme = currentTheme?currentTheme:"light"; {% endif %} diff --git a/pod/main/templates/base.html b/pod/main/templates/base.html index fbbe9fc608..00bd5b27bc 100644 --- a/pod/main/templates/base.html +++ b/pod/main/templates/base.html @@ -226,6 +226,7 @@

{{page_title|capfirst}}

// Set the body data-theme attribute to match the local storage item document.documentElement.dataset.theme = currentTheme?currentTheme:"light"; document.documentElement.dataset.bsTheme = currentTheme?currentTheme:"light"; + document.documentElement.dataset.colorScheme = currentTheme?currentTheme:"light"; // If the current theme is dark, check the theme toggle if (currentTheme === "dark") { themeToggle.checked = true; @@ -236,10 +237,12 @@

{{page_title|capfirst}}

if (e.target.checked) { document.documentElement.dataset.theme = "dark"; document.documentElement.dataset.bsTheme = "dark"; + document.documentElement.dataset.colorScheme = "dark"; localStorage.setItem("theme", "dark"); } else { document.documentElement.dataset.theme = "light"; document.documentElement.dataset.bsTheme = "light"; + document.documentElement.dataset.colorScheme = "light"; localStorage.setItem("theme", "light"); } } diff --git a/pod/playlist/tests/test_forms.py b/pod/playlist/tests/test_forms.py index ede342614c..8934afe75a 100644 --- a/pod/playlist/tests/test_forms.py +++ b/pod/playlist/tests/test_forms.py @@ -24,9 +24,7 @@ class PlaylistFormTest(TestCase): @override_settings(USE_PLAYLIST=True) def test_valid_data_for_public_playlist(self): - """ - Test the form with valid data for a public playlist. - """ + """Test the form with valid data for a public playlist.""" form = PlaylistForm( data={ "name": "Test Playlist", @@ -42,9 +40,7 @@ def test_valid_data_for_public_playlist(self): @override_settings(USE_PLAYLIST=True) def test_valid_data_for_private_playlist(self): - """ - Test the form with valid data for a private playlist. - """ + """Test the form with valid data for a private playlist.""" form = PlaylistForm( data={ "name": "Test Playlist", @@ -60,9 +56,7 @@ def test_valid_data_for_private_playlist(self): @override_settings(USE_PLAYLIST=True) def test_valid_data_for_protected_playlist(self): - """ - Test the form with valid data for a protected playlist. - """ + """Test the form with valid data for a protected playlist.""" form = PlaylistForm( data={ "name": "Test Playlist", @@ -78,9 +72,7 @@ def test_valid_data_for_protected_playlist(self): @override_settings(USE_PLAYLIST=True) def test_invalid_data_for_protected_playlist(self): - """ - Test the form with invalid data for a protected playlist. - """ + """Test the form with invalid data for a protected playlist.""" form = PlaylistForm( data={ "name": "Test Playlist", @@ -96,9 +88,7 @@ def test_invalid_data_for_protected_playlist(self): @override_settings(USE_PLAYLIST=True) def test_name_validation_for_public_playlist(self): - """ - Test if the name validation works correctly for a public playlist. - """ + """Test if the name validation works correctly for a public playlist.""" valid_form = PlaylistForm( data={ "name": "Valid Name", @@ -121,9 +111,7 @@ def test_name_validation_for_public_playlist(self): @override_settings(USE_PLAYLIST=True) def test_name_validation_for_private_playlist(self): - """ - Test if the name validation works correctly for a private playlist. - """ + """Test if the name validation works correctly for a private playlist.""" valid_form = PlaylistForm( data={ "name": "Valid Name", @@ -146,9 +134,7 @@ def test_name_validation_for_private_playlist(self): @override_settings(USE_PLAYLIST=True) def test_name_validation_for_protected_playlist(self): - """ - Test if the name validation works correctly for a protected playlist. - """ + """Test if the name validation works correctly for a protected playlist.""" valid_form = PlaylistForm( data={ "name": "Valid Name", @@ -173,9 +159,7 @@ def test_name_validation_for_protected_playlist(self): @override_settings(USE_PLAYLIST=True) def test_blank_data_for_public_playlist(self): - """ - Test the form with blank data for a public playlist. - """ + """Test the form with blank data for a public playlist.""" form = PlaylistForm(data={}) self.assertFalse(form.is_valid()) self.assertLessEqual(1, len(form.errors)) @@ -192,18 +176,14 @@ class PlaylistRemoveFormTest(TestCase): @override_settings(USE_PLAYLIST=True) def test_valid_data(self): - """ - Test the form with valid data. - """ + """Test the form with valid data.""" form = PlaylistRemoveForm(data={"agree": True}) self.assertTrue(form.is_valid()) print(" ---> test_valid_data ok") @override_settings(USE_PLAYLIST=True) def test_agree_required(self): - """ - Test the form with agree field not selected and not provided. - """ + """Test the form with agree field not selected and not provided.""" agree_not_selected_form = PlaylistRemoveForm(data={"agree": False}) agree_not_provided_form = PlaylistRemoveForm(data={}) self.assertFalse(agree_not_selected_form.is_valid()) @@ -220,9 +200,7 @@ def test_agree_required(self): @override_settings(USE_PLAYLIST=True) def test_blank_data(self): - """ - Test the form with empty data. - """ + """Test the form with empty data.""" form = PlaylistRemoveForm(data={}) self.assertFalse(form.is_valid()) self.assertEqual(len(form.errors), 1) @@ -240,18 +218,14 @@ class PlaylistPasswordFormTests(TestCase): @override_settings(USE_PLAYLIST=True) def test_valid_data(self): - """ - Test the form with valid data. - """ + """Test the form with valid data.""" form = PlaylistPasswordForm(data={"password": PWD}) self.assertTrue(form.is_valid()) print(" ---> test_valid_data ok") @override_settings(USE_PLAYLIST=True) def test_password_required(self): - """ - Test the form with password field empty and not provided. - """ + """Test the form with password field empty and not provided.""" password_not_provided_form = PlaylistPasswordForm(data={}) empty_password_form = PlaylistPasswordForm(data={"password": ""}) self.assertFalse(password_not_provided_form.is_valid()) @@ -268,9 +242,7 @@ def test_password_required(self): @override_settings(USE_PLAYLIST=True) def test_blank_data(self): - """ - Test the form with empty data. - """ + """Test the form with empty data.""" form = PlaylistPasswordForm(data={}) self.assertFalse(form.is_valid()) self.assertEqual(len(form.errors), 1) diff --git a/pod/recorder/studio_urls.py b/pod/recorder/studio_urls.py index c4ad87317d..88a7ce0095 100644 --- a/pod/recorder/studio_urls.py +++ b/pod/recorder/studio_urls.py @@ -1,9 +1,10 @@ +"""Opencast Studio urls for Esup-Pod Integration.""" from django.conf.urls import url -from .views import studio_pod, studio_static, settings_toml, info_me_json +from .views import studio_pod, studio_static, studio_root_file from .views import ingest_createMediaPackage, ingest_addDCCatalog from .views import ingest_addAttachment, ingest_addTrack from .views import ingest_addCatalog, ingest_ingest -from .views import presenter_post +from .views import presenter_post, settings_toml, info_me_json app_name = "recorder" urlpatterns = [ @@ -32,6 +33,11 @@ studio_static, name="studio_static", ), + url( + r"^(?P[a-zA-Z0-9\.]*)$", + studio_root_file, + name="studio_root_file", + ), url( r"^ingest/createMediaPackage$", ingest_createMediaPackage, diff --git a/pod/recorder/templates/recorder/opencast-studio.html b/pod/recorder/templates/recorder/opencast-studio.html index f6c1d5fb62..537b9f34a1 100644 --- a/pod/recorder/templates/recorder/opencast-studio.html +++ b/pod/recorder/templates/recorder/opencast-studio.html @@ -5,6 +5,7 @@ {% block page_extra_head %}