Skip to content

Commit 7a9d363

Browse files
committed
Merge branch 'master' of github.com:chamilo/chamilo-lms
2 parents 4e54cae + f2893b7 commit 7a9d363

44 files changed

Lines changed: 5541 additions & 1667 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/css/app.scss

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -997,22 +997,6 @@ img.course-tool__icon {
997997
}
998998
}
999999

1000-
.course-card {
1001-
height: 100%;
1002-
display: flex;
1003-
flex-direction: column;
1004-
}
1005-
1006-
.course-card :deep(.p-card-body) {
1007-
flex: 1 1 auto;
1008-
display: flex;
1009-
flex-direction: column;
1010-
}
1011-
1012-
.course-card :deep(.p-card-footer) {
1013-
margin-top: auto;
1014-
}
1015-
10161000
@layer components {
10171001
.form-group:focus-within,
10181002
.field:focus-within,

assets/css/scss/organisms/_cards.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
.p-card {
2-
@apply rounded-lg bg-white shadow-lg;
2+
@apply rounded-lg bg-white drop-shadow-lg;
33

44
.p-card-body {
5-
@apply flex flex-col space-y-4 p-4;
5+
@apply h-full flex flex-col space-y-4 p-4 border-b border-r border-l border-b-support-1 border-r-support-1 border-l-support-1 rounded-b-lg rounded-r-lg rounded-l-lg;
66
}
77

88
.p-card-header {
99
img {
10-
@apply rounded-t-lg;
10+
@apply rounded-t-lg aspect-video;
1111
}
1212
}
1313

assets/css/scss/organisms/_course_card.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@apply bg-gray-15;
44

55
&__title {
6-
@apply text-gray-90 text-body-1 font-semibold space-y-2;
6+
@apply text-gray-90 text-body-1 font-semibold space-y-2 flex items-center gap-2;
77

88
.session {
99
&__title {

assets/vue/components/Login.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@
9595
</form>
9696

9797
<LoginOAuth2Buttons />
98+
<div class="mt-3">
99+
<CategoryLinks category="menu_links" />
100+
</div>
98101
</div>
99102
</template>
100103

@@ -125,6 +128,7 @@ import { useLogin } from "../composables/auth/login"
125128
import LoginOAuth2Buttons from "./login/LoginOAuth2Buttons.vue"
126129
import { usePlatformConfig } from "../store/platformConfig"
127130
import { useRouter } from "vue-router"
131+
import CategoryLinks from "./page/CategoryLinks.vue"
128132
129133
const { t } = useI18n()
130134
const router = useRouter()

assets/vue/components/admin/AdminBlock.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
method="get"
2424
>
2525
<BaseInputGroup
26+
:id="inputId"
27+
:button-id="buttonId"
2628
:button-label="t('Search')"
2729
:input-placeholder="t('Keyword')"
2830
button-icon="search"
@@ -99,6 +101,15 @@ const props = defineProps({
99101
items: { type: Array, required: true, default: () => [] },
100102
})
101103
104+
// computed IDs for search input and button derived from the title
105+
const inputId = computed(() => {
106+
const raw = (props.title || "").toString().trim()
107+
const normalized = raw.replace(/\s+/g, "_").toLowerCase()
108+
return (normalized || "search") + "_search"
109+
})
110+
111+
const buttonId = computed(() => `${inputId.value}_button`)
112+
102113
const visibleItems = computed(() =>
103114
props.items
104115
.map((item) => {

assets/vue/components/basecomponents/BaseButton.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
:title="tooltip || (onlyIcon ? label : undefined)"
1515
:type="isSubmit ? 'submit' : 'button'"
1616
:name="name"
17+
:id="id"
1718
class="cursor-pointer"
1819
@click="$emit('click', $event)"
1920
/>
@@ -76,6 +77,11 @@ const props = defineProps({
7677
required: false,
7778
default: undefined,
7879
},
80+
id: {
81+
type: String,
82+
required: false,
83+
default: undefined,
84+
},
7985
})
8086
8187
defineEmits(["click"])

assets/vue/components/basecomponents/BaseInputGroup.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<template>
22
<div class="p-inputgroup">
33
<InputText
4+
:id="id"
45
:name="inputName"
56
:placeholder="inputPlaceholder"
67
type="text"
78
/>
89
<BaseButton
910
:icon="buttonIcon"
1011
:label="buttonLabel"
12+
:id="buttonId"
1113
is-submit
1214
type="primary"
1315
@click="$emit('button-click', $event)"
@@ -36,6 +38,16 @@ defineProps({
3638
type: String,
3739
required: true,
3840
},
41+
id: {
42+
type: String,
43+
required: false,
44+
default: undefined,
45+
},
46+
buttonId: {
47+
type: String,
48+
required: false,
49+
default: undefined,
50+
},
3951
})
4052
4153
defineEmits(["button-click"])

assets/vue/components/course/AdminCourseCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<Card class="course-card rounded-2xl overflow-hidden bg-white shadow-sm">
33
<template #header>
4-
<div class="relative aspect-[16/9] w-full overflow-hidden bg-gray-100">
4+
<div class="relative aspect-video w-full overflow-hidden bg-gray-100">
55
<img
66
:alt="course.title || 'Course illustration'"
77
:src="imageUrl"

assets/vue/components/course/AdvancedCourseFilters.vue

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@
212212
<!-- TEXT / INTEGER / FLOAT / DURATION -->
213213
<div v-else>
214214
<label class="block text-sm font-medium mb-1">{{ f.title }}</label>
215-
<InputText v-model="model.extra[f.variable]" :id="`extra-${f.variable}`" />
215+
<InputText
216+
v-model="model.extra[f.variable]"
217+
:id="`extra-${f.variable}`"
218+
/>
216219
</div>
217220
</template>
218221

@@ -328,15 +331,33 @@ function clear() {
328331
}
329332
330333
function apply() {
331-
const payload = {}
332-
if (model.title?.trim()) payload.title = model.title.trim()
334+
const payload = {
335+
title: "",
336+
extraFields: [],
337+
extraFieldValues: [],
338+
}
339+
340+
payload.title = model.title.trim()
341+
342+
for (let [key, value] of Object.entries(model.extra)) {
343+
const fieldInfo = props.fields.find((f) => f.variable === key)
344+
345+
if (!fieldInfo) {
346+
continue
347+
}
348+
349+
if (isCheckbox(fieldInfo)) {
350+
if (value === true) {
351+
value = "1"
352+
} else {
353+
key = undefined
354+
value = undefined
355+
}
356+
}
333357
334-
Object.entries(model.extra).forEach(([k, v]) => {
335-
if (v === null || v === undefined) return
336-
if (Array.isArray(v) && v.length === 0) return
337-
if (typeof v === "string" && v.trim() === "") return
338-
payload[`extra_${k}`] = v
339-
})
358+
payload.extraFields.push(key)
359+
payload.extraFieldValues.push(value)
360+
}
340361
341362
emit("apply", payload)
342363
}

assets/vue/components/course/CourseCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<Card class="course-card">
33
<template #header>
4-
<div class="relative aspect-[16/9] w-full overflow-hidden rounded-t-2xl bg-gray-100">
4+
<div class="relative aspect-video w-full overflow-hidden rounded-t-2xl bg-gray-100">
55
<img
66
v-if="isLocked"
77
:alt="course.title || 'Course illustration'"
@@ -27,7 +27,7 @@
2727
</div>
2828
</template>
2929
<template #title>
30-
<div class="course-card__title flex items-center gap-2">
30+
<div class="course-card__title">
3131
<div v-if="isLocked">
3232
<div
3333
v-if="session"

0 commit comments

Comments
 (0)