Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into matra-22057
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbeeznest committed Dec 31, 2024
2 parents 3b34dc1 + ee97671 commit 47b034c
Show file tree
Hide file tree
Showing 59 changed files with 1,459 additions and 1,105 deletions.
237 changes: 163 additions & 74 deletions README.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions assets/vue/composables/language.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export function useLanguage() {
const defaultLanguage = { originalName: "English", isocode: "en" }

/**
* @type {{originalName: string, isocode: string}[]}
*/
const languageList = window.languages || [defaultLanguage]

/**
* @param {string} isoCode
* @returns {{originalName: string, isocode: string}|undefined}
*/
function findByIsoCode(isoCode) {
return languageList.find((language) => isoCode === language.isocode)
}

return {
defaultLanguage,
languageList,
findByIsoCode,
}
}
18 changes: 9 additions & 9 deletions assets/vue/router/account.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export default {
path: '/account',
path: "/account",
meta: { requiresAuth: true },
name: 'account',
component: () => import('../components/course/Layout.vue'),
name: "account",
component: () => import("../components/course/Layout.vue"),
children: [
{
name: 'AccountHome',
path: 'home',
component: () => import('../views/account/Home.vue'),
meta: {requiresAuth: true},
name: "AccountHome",
path: "home",
component: () => import("../views/account/Home.vue"),
meta: { requiresAuth: true },
},
]
};
],
}
39 changes: 19 additions & 20 deletions assets/vue/router/admin.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
export default {
path: '/admin',
name: 'admin',
meta: { requiresAuth: true, showBreadcrumb: true },
component: () => import('../components/admin/AdminLayout.vue'),
children: [
{
path: '',
name: 'AdminIndex',
meta: { requiresAdmin: true, requiresSessionAdmin: true, showBreadcrumb: false },
component: () => import('../views/admin/AdminIndex.vue'),
},
{
name: 'AdminConfigurationColors',
path: 'configuration/colors',
meta: { requiresAdmin: true, requiresSessionAdmin: true, showBreadcrumb: true },
component: () => import('../views/admin/AdminConfigureColors.vue'),
}
],
};

path: "/admin",
name: "admin",
meta: { requiresAuth: true, showBreadcrumb: true },
component: () => import("../components/admin/AdminLayout.vue"),
children: [
{
path: "",
name: "AdminIndex",
meta: { requiresAdmin: true, requiresSessionAdmin: true, showBreadcrumb: false },
component: () => import("../views/admin/AdminIndex.vue"),
},
{
name: "AdminConfigurationColors",
path: "configuration/colors",
meta: { requiresAdmin: true, requiresSessionAdmin: true, showBreadcrumb: true },
component: () => import("../views/admin/AdminConfigureColors.vue"),
},
],
}
2 changes: 1 addition & 1 deletion assets/vue/router/assignments.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ export default {
props: true,
},
],
};
}
10 changes: 5 additions & 5 deletions assets/vue/router/cataloguecourses.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default {
path: '/catalogue/courses',
name: 'CatalogueCourses',
meta: { requiresAdmin: true, requiresSessionAdmin: true },
component: () => import('../views/course/CatalogueCourses.vue')
};
path: "/catalogue/courses",
name: "CatalogueCourses",
meta: { requiresAdmin: true, requiresSessionAdmin: true },
component: () => import("../views/course/CatalogueCourses.vue"),
}
10 changes: 5 additions & 5 deletions assets/vue/router/cataloguesessions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default {
path: '/catalogue/sessions',
name: 'CatalogueSessions',
meta: { requiresAdmin: true, requiresSessionAdmin: true },
component: () => import('../views/course/CatalogueSessions.vue')
};
path: "/catalogue/sessions",
name: "CatalogueSessions",
meta: { requiresAdmin: true, requiresSessionAdmin: true },
component: () => import("../views/course/CatalogueSessions.vue"),
}
34 changes: 17 additions & 17 deletions assets/vue/router/ccalendarevent.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
export default {
path: '/resources/ccalendarevent',
path: "/resources/ccalendarevent",
meta: { requiresAuth: true },
name: 'ccalendarevent',
redirect: { name: 'CCalendarEventList' },
component: () => import('../components/ccalendarevent/CCalendarEventLayout.vue'),
name: "ccalendarevent",
redirect: { name: "CCalendarEventList" },
component: () => import("../components/ccalendarevent/CCalendarEventLayout.vue"),
children: [
{
name: 'CCalendarEventShow',
path: 'show',
component: () => import('../views/ccalendarevent/CCalendarEventShow.vue')
name: "CCalendarEventShow",
path: "show",
component: () => import("../views/ccalendarevent/CCalendarEventShow.vue"),
},
{
name: 'CCalendarEventCreate',
path: 'new',
component: () => import('../views/ccalendarevent/CCalendarEventCreate.vue')
name: "CCalendarEventCreate",
path: "new",
component: () => import("../views/ccalendarevent/CCalendarEventCreate.vue"),
},
{
name: 'CCalendarEventList',
path: '',
component: () => import('../views/ccalendarevent/CCalendarEventList.vue'),
props: (route) => ({ type: route.query.type })
}
]
};
name: "CCalendarEventList",
path: "",
component: () => import("../views/ccalendarevent/CCalendarEventList.vue"),
props: (route) => ({ type: route.query.type }),
},
],
}
38 changes: 19 additions & 19 deletions assets/vue/router/course.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
export default {
path: '/resources/courses',
path: "/resources/courses",
meta: { requiresAuth: true },
name: 'courses',
component: () => import('../components/course/Layout.vue'),
redirect: { name: 'CourseList' },
name: "courses",
component: () => import("../components/course/Layout.vue"),
redirect: { name: "CourseList" },
children: [
{
name: 'CourseList',
path: '',
component: () => import('../views/course/List.vue')
name: "CourseList",
path: "",
component: () => import("../views/course/List.vue"),
},
{
name: 'CourseCreate',
path: 'new',
component: () => import('../views/course/Create.vue')
name: "CourseCreate",
path: "new",
component: () => import("../views/course/Create.vue"),
},
{
name: 'CourseUpdate',
path: ':id/edit',
component: () => import('../views/course/Update.vue')
name: "CourseUpdate",
path: ":id/edit",
component: () => import("../views/course/Update.vue"),
},
{
name: 'CourseShow',
path: ':id',
component: () => import('../views/course/Show.vue')
}
]
};
name: "CourseShow",
path: ":id",
component: () => import("../views/course/Show.vue"),
},
],
}
38 changes: 19 additions & 19 deletions assets/vue/router/coursecategory.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
export default {
path: '/resources/course_categories',
path: "/resources/course_categories",
meta: { requiresAuth: true },
name: 'course_categories',
component: () => import('../components/coursecategory/Layout.vue'),
redirect: { name: 'CourseCategoryList' },
name: "course_categories",
component: () => import("../components/coursecategory/Layout.vue"),
redirect: { name: "CourseCategoryList" },
children: [
{
name: 'CourseCategoryList',
path: '',
component: () => import('../views/coursecategory/List.vue')
name: "CourseCategoryList",
path: "",
component: () => import("../views/coursecategory/List.vue"),
},
{
name: 'CourseCategoryCreate',
path: 'new',
component: () => import('../views/coursecategory/Create.vue')
name: "CourseCategoryCreate",
path: "new",
component: () => import("../views/coursecategory/Create.vue"),
},
{
name: 'CourseCategoryUpdate',
path: ':id/edit',
component: () => import('../views/coursecategory/Update.vue')
name: "CourseCategoryUpdate",
path: ":id/edit",
component: () => import("../views/coursecategory/Update.vue"),
},
{
name: 'CourseCategoryShow',
path: ':id',
component: () => import('../views/coursecategory/Show.vue')
}
]
};
name: "CourseCategoryShow",
path: ":id",
component: () => import("../views/coursecategory/Show.vue"),
},
],
}
32 changes: 16 additions & 16 deletions assets/vue/router/ctoolintro.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
export default {
path: '/resources/ctoolintro/',
path: "/resources/ctoolintro/",
meta: { requiresAuth: true, showBreadcrumb: true },
name: 'ctoolintro',
component: () => import('../components/ctoolintro/Layout.vue'),
redirect: { name: 'ToolIntroList' },
name: "ctoolintro",
component: () => import("../components/ctoolintro/Layout.vue"),
redirect: { name: "ToolIntroList" },
children: [
{
name: 'ToolIntroCreate',
path: 'new/:courseTool',
component: () => import('../views/ctoolintro/Create.vue')
name: "ToolIntroCreate",
path: "new/:courseTool",
component: () => import("../views/ctoolintro/Create.vue"),
},
{
name: 'ToolIntroUpdate',
name: "ToolIntroUpdate",
//path: ':id/edit',
path: 'edit',
component: () => import('../views/ctoolintro/Update.vue')
path: "edit",
component: () => import("../views/ctoolintro/Update.vue"),
},
{
name: 'ToolIntroShow',
path: '',
component: () => import('../views/ctoolintro/Show.vue')
}
]
};
name: "ToolIntroShow",
path: "",
component: () => import("../views/ctoolintro/Show.vue"),
},
],
}
66 changes: 33 additions & 33 deletions assets/vue/router/documents.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
export default {
path: '/resources/document/:node/',
path: "/resources/document/:node/",
meta: { requiresAuth: true, showBreadcrumb: true },
name: 'documents',
component: () => import('../components/layout/SimpleRouterViewLayout.vue'),
redirect: { name: 'DocumentsList' },
name: "documents",
component: () => import("../components/layout/SimpleRouterViewLayout.vue"),
redirect: { name: "DocumentsList" },
children: [
{
name: 'DocumentsList',
path: '',
component: () => import('../views/documents/DocumentsList.vue')
name: "DocumentsList",
path: "",
component: () => import("../views/documents/DocumentsList.vue"),
},
{
name: 'DocumentsCreate',
path: 'new',
component: () => import('../views/documents/Create.vue')
name: "DocumentsCreate",
path: "new",
component: () => import("../views/documents/Create.vue"),
},
{
name: 'DocumentsCreateFile',
path: 'create',
component: () => import('../views/documents/CreateFile.vue')
name: "DocumentsCreateFile",
path: "create",
component: () => import("../views/documents/CreateFile.vue"),
},
{
name: 'DocumentsUploadFile',
path: 'upload',
component: () => import('../views/documents/DocumentsUpload.vue')
name: "DocumentsUploadFile",
path: "upload",
component: () => import("../views/documents/DocumentsUpload.vue"),
},
{
name: 'DocumentsUpdate',
name: "DocumentsUpdate",
//path: ':id/edit',
path: 'edit',
component: () => import('../views/documents/Update.vue')
path: "edit",
component: () => import("../views/documents/Update.vue"),
},
{
name: 'DocumentsUpdateFile',
name: "DocumentsUpdateFile",
//path: ':id/edit',
path: 'edit_file',
component: () => import('../views/documents/UpdateFile.vue')
path: "edit_file",
component: () => import("../views/documents/UpdateFile.vue"),
},
{
name: 'DocumentsShow',
path: 'show',
component: () => import('../views/documents/DocumentShow.vue')
name: "DocumentsShow",
path: "show",
component: () => import("../views/documents/DocumentShow.vue"),
},
{
name: 'DocumentForHtmlEditor',
path: 'manager',
component: () => import('../views/documents/DocumentForHtmlEditor.vue'),
name: "DocumentForHtmlEditor",
path: "manager",
component: () => import("../views/documents/DocumentForHtmlEditor.vue"),
meta: {
layout: 'Empty',
showBreadcrumb: false
}
layout: "Empty",
showBreadcrumb: false,
},
},
]
};
],
}
Loading

0 comments on commit 47b034c

Please sign in to comment.