From 4a429120716ceab0299d81021aa2eb245f1609c6 Mon Sep 17 00:00:00 2001
From: alex <alex@alexloehr.net>
Date: Tue, 03 Jun 2025 19:29:51 +0000
Subject: [PATCH] fixing paths
---
vue/src/pages/KursDetail.vue | 43 ++++++++++++++++++++++++++++++-------------
1 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/vue/src/pages/KursDetail.vue b/vue/src/pages/KursDetail.vue
index 1393176..a09d8c0 100644
--- a/vue/src/pages/KursDetail.vue
+++ b/vue/src/pages/KursDetail.vue
@@ -2,7 +2,8 @@
import {useRoute} from 'vue-router'
import {onMounted, reactive, ref} from "vue"
-import {getKurs, getKursItems, getKursTn} from "../lib/api.js"
+import {getKurs, getKursItems, getKursTn, iliasBase} from "../lib/api.js"
+import LinkExtern from "../components/LinkExtern.vue"
const route = useRoute()
const kursId = route.params.kursId
@@ -45,7 +46,12 @@
<div class="user" v-if="kurs">
<span>ref_id</span>
- <div>{{ kurs.ref_id }}</div>
+ <div>
+ <a :href="`${iliasBase}/goto.php?target=${kurs.type}_${kurs.ref_id}`" target="_blank">
+ {{ kurs.ref_id }}
+ <LinkExtern />
+ </a>
+ </div>
<span>obj_id</span>
<div>{{ kurs.obj_id }}</div>
@@ -64,17 +70,24 @@
</h2>
<table>
<thead>
- <th>parent_id</th>
- <th>ref_id</th>
- <th>obj_id</th>
- <th>title</th>
- <th>type</th>
+ <tr>
+ <th>parent_id</th>
+ <th>ref_id</th>
+ <th>obj_id</th>
+ <th>title</th>
+ <th>type</th>
+ </tr>
</thead>
<tbody>
<!-- TODO verlinken auf Ziel in ILAS | goto.php?target=crs_ID -->
<tr v-for="item in kursItems">
<td>{{ item.parent_id }}</td>
- <td>{{ item.ref_id }}</td>
+ <td>
+ <a :href="`${iliasBase}/goto.php?target=${item.type}_${item.ref_id}`" target="_blank">
+ {{ item.ref_id }}
+ <LinkExtern />
+ </a>
+ </td>
<td>{{ item.obj_id }}</td>
<td>{{ item.title }}</td>
<td>{{ item.type }}</td>
@@ -89,14 +102,18 @@
<div :style="{columns: kursTn?.length > 16 ? 3 : 1}">
<table>
<thead>
- <th>usr_id</th>
- <th>login</th>
- <th>firstname</th>
- <th>lastname</th>
+ <tr>
+ <th>usr_id</th>
+ <th>login</th>
+ <th>firstname</th>
+ <th>lastname</th>
+ </tr>
</thead>
<tbody>
<tr v-for="tn in kursTn">
- <td>{{ tn.usr_id }}</td>
+ <td>
+ <RouterLink :to="`/ui/user/${tn.usr_id}`">{{ tn.usr_id }}</RouterLink>
+ </td>
<td>{{ tn.login }}</td>
<td>{{ tn.firstname }}</td>
<td>{{ tn.lastname }}</td>
--
Gitblit v1.8.0