From 26fc100d1d84c55dee179049ccbf1b7c49b91564 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms Date: Fri, 14 Nov 2025 16:30:13 +0100 Subject: add vue component for sortable toggle elements and use it in some places --- resources/assets/stylesheets/scss/admin.scss | 5 - resources/assets/stylesheets/scss/tables.scss | 10 +- resources/vue/apps/AdminCourses.vue | 67 ++++++------ resources/vue/components/SortableToggleElement.vue | 120 +++++++++++++++++++++ resources/vue/components/my-courses/TableView.vue | 26 +++-- 5 files changed, 175 insertions(+), 53 deletions(-) create mode 100644 resources/vue/components/SortableToggleElement.vue diff --git a/resources/assets/stylesheets/scss/admin.scss b/resources/assets/stylesheets/scss/admin.scss index af9aa5e..63866ad 100644 --- a/resources/assets/stylesheets/scss/admin.scss +++ b/resources/assets/stylesheets/scss/admin.scss @@ -149,11 +149,6 @@ fieldset.attribute_table { display: block; } - th .course-completion { - @include icon(before, radiobutton-checked); - color: var(--color--highlight); - } - td .course-completion { @include icon(before, span-empty); color: var(--color--warning); diff --git a/resources/assets/stylesheets/scss/tables.scss b/resources/assets/stylesheets/scss/tables.scss index b2bc8c9..44740cb 100644 --- a/resources/assets/stylesheets/scss/tables.scss +++ b/resources/assets/stylesheets/scss/tables.scss @@ -269,11 +269,17 @@ tr.sortable { } } - th.sortasc { + th.sortasc:not(:has(button.as-link)) { @include icon('after', 'arr_1up', $size: $icon-size-inline, $align: top, $padding: 2px); } + th.sortdesc:not(:has(button.as-link)) { + @include icon('after', 'arr_1down', $size: $icon-size-inline, $align: top, $padding: 2px); + } - th.sortdesc { + th.sortasc button.as-link { + @include icon('after', 'arr_1up', $size: $icon-size-inline, $align: top, $padding: 2px); + } + th.sortdesc button.as-link { @include icon('after', 'arr_1down', $size: $icon-size-inline, $align: top, $padding: 2px); } diff --git a/resources/vue/apps/AdminCourses.vue b/resources/vue/apps/AdminCourses.vue index 41d84c2..c7c48e4 100644 --- a/resources/vue/apps/AdminCourses.vue +++ b/resources/vue/apps/AdminCourses.vue @@ -22,27 +22,23 @@ - - - {{ $gettext('Bearbeitungsstatus') }} - - - - - {{ fields[activeField] }} - - - + + + + + {{ fields[activeField] }} + {{ $gettext('Aktion') }} @@ -115,9 +111,11 @@ diff --git a/resources/vue/components/SortableToggleElement.vue b/resources/vue/components/SortableToggleElement.vue new file mode 100644 index 0000000..5024dab --- /dev/null +++ b/resources/vue/components/SortableToggleElement.vue @@ -0,0 +1,120 @@ + + + diff --git a/resources/vue/components/my-courses/TableView.vue b/resources/vue/components/my-courses/TableView.vue index f8ffa85..ab4951f 100644 --- a/resources/vue/components/my-courses/TableView.vue +++ b/resources/vue/components/my-courses/TableView.vue @@ -18,16 +18,20 @@ - - - {{ $gettext('Nr.') }} - - - - - {{ $gettext('Name') }} - - + + {{ $gettext('Nr.') }} + + + {{ $gettext('Name') }} + {{ $gettext('Inhalt') }} @@ -88,6 +92,7 @@