diff --git a/app/assets/javascripts/lectures.coffee b/app/assets/javascripts/lectures.coffee index 6e8d60759..3f588c467 100644 --- a/app/assets/javascripts/lectures.coffee +++ b/app/assets/javascripts/lectures.coffee @@ -9,6 +9,17 @@ disableExceptOrganizational = -> $('[data-bs-toggle="collapse"]').prop('disabled', true).removeClass('clickable') return +# Load example data (erdbeere) for structures +loadExampleStructures = -> + structuresBody = $('#erdbeereStructuresBody') + lectureId = structuresBody.data('lecture') + loading = structuresBody.data('loading') + structuresBody.empty().append(loading) + $.ajax Routes.edit_structures_path(lectureId), + type: 'GET' + dataType: 'script' + return + $(document).on 'turbolinks:load', -> initBootstrapPopovers() # if any input is given to the lecture form (for people in lecture), @@ -282,14 +293,7 @@ $(document).on 'turbolinks:load', -> largeDisplay() return - $('#erdbeere_structures_heading').on 'click', -> - lectureId = $(this).data('lecture') - loading = $(this).data('loading') - $('#erdbeereStructuresBody').empty().append(loading) - $.ajax Routes.edit_structures_path(lectureId), - type: 'GET' - dataType: 'script' - return + loadExampleStructures() $lectureStructures = $('#lectureStructuresInfo') if $lectureStructures.length > 0 diff --git a/app/assets/stylesheets/lectures.scss b/app/assets/stylesheets/lectures.scss index 6e31dd03d..64735889e 100644 --- a/app/assets/stylesheets/lectures.scss +++ b/app/assets/stylesheets/lectures.scss @@ -73,4 +73,35 @@ &:hover { color: white !important; } +} + +#lecture-nav-pills { + background-color: white; + justify-content: center; + padding-top: 1em; + padding-bottom: 1em; + + box-shadow: 0px 2px 7px 0rem rgba(130,26,59,0.2); + border: #821A3B solid 1px; + border-radius: 0.4em; + margin-bottom: 1.5em; +} + +.lecture-nav-pill-button { + --bs-nav-link-color: #821A3B; + --bs-nav-link-hover-color: #8d1c40; + --bs-nav-pills-link-active-bg: #821A3B; + + &:focus-visible { + box-shadow: 0 0 0 0.25rem rgba(130, 26, 59, 0.25); + } +} + + +.lecture-pane { + background-color: white; + padding: 1.5em 1em; + box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); + border: gray 1px solid; + border-radius: 0.4em; } \ No newline at end of file diff --git a/app/views/lectures/edit/_announcements.html.erb b/app/views/lectures/edit/_announcements.html.erb index 5d14d926e..63261f27f 100644 --- a/app/views/lectures/edit/_announcements.html.erb +++ b/app/views/lectures/edit/_announcements.html.erb @@ -1,44 +1,15 @@ -
+
+
+
-
+
<% if current_user.admin || lecture.course.edited_by?(current_user) %>
<%= link_to t('buttons.parent_course'),
edit_course_path(lecture.course),
diff --git a/app/views/lectures/edit/_imported_media.html.erb b/app/views/lectures/edit/_imported_media.html.erb
index 03e1cccb3..228b07672 100644
--- a/app/views/lectures/edit/_imported_media.html.erb
+++ b/app/views/lectures/edit/_imported_media.html.erb
@@ -1,53 +1,24 @@
-
-
-
-
-
-
-
- <%= render partial: 'lectures/import/imported_media',
- locals: { media: lecture.imported_media,
- lecture: lecture } %>
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+ <%= render partial: 'lectures/import/imported_media',
+ locals: { media: lecture.imported_media,
+ lecture: lecture } %>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/lectures/edit/_organizational_concept.html.erb b/app/views/lectures/edit/_organizational_concept.html.erb
index ef5875a98..759597fc6 100644
--- a/app/views/lectures/edit/_organizational_concept.html.erb
+++ b/app/views/lectures/edit/_organizational_concept.html.erb
@@ -1,85 +1,58 @@
-
-
-
<%= lecture.sort_localized %> @@ -12,14 +12,14 @@ <%= lecture.title_with_teacher_no_type %> <%= link_to '', lecture_path(lecture), - class: 'fas fa-eye text-dark mt-3', + class: 'fas fa-eye text-dark d-contents', data: { toggle: 'tooltip', placement: 'bottom' }, title: t('buttons.show'), style: 'text-decoration: none;' %>
- <%= render partial: 'media/catalog/search_form', - locals: { purpose: 'import' } %> -
+ <%= render partial: 'media/catalog/search_form', + locals: { purpose: 'import' } %> +