REST Service for POPCORN - ILIAS
alex
2025-10-23 96afe9253474a7d542f3e5a467276993b7dc43ce
vue/src/pages/Kurse.vue
@@ -16,65 +16,79 @@
/////////////////////////////////////////////////////////////////////////
async function init (offset = 0) {
   const data = await getKurse()
   console.log(data)
   kurse.value = data
async function init(offset = 0) {
  const data = await getKurse()
  console.log(data)
  kurse.value = data
}
function go (offset) {
   console.log("go", offset)
   return init(offset)
function go(offset) {
  console.log("go", offset)
  return init(offset)
}
</script>
<template>
   <div>
  <div>
      <h1>
         ILIAS Kurse
         <small>({{kurse?.length}})</small>
      </h1>
      <p v-if="error">{{ error }}</p>
    <h1>
      ILIAS Kurse
      <small>({{ kurse?.length }})</small>
    </h1>
    <p v-if="error">{{ error }}</p>
      <div class="kurse">
    <div class="kurse">
         <table class="w100p" v-if="kurse">
            <thead>
               <tr>
                  <th>usr_id</th>
                  <th>obj_id</th>
                  <th>title</th>
                  <th>description</th>
                  <th>type</th>
                  <th>offline</th>
               </tr>
            </thead>
            <tbody>
               <tr v-for="kurs in kurse">
                  <td>
                     <RouterLink :to="`${routerBase}/ui/kurs/${kurs.ref_id}`">
                        {{ kurs.ref_id }}
                     </RouterLink>
                  </td>
                  <td>{{ kurs.obj_id }}</td>
                  <td>{{ kurs.title }}</td>
                  <td>{{ kurs.description }}</td>
                  <td>{{ kurs.type }}</td>
                  <td>{{ kurs.offline }}</td>
               </tr>
            </tbody>
         </table>
      </div>
      <table class="w100p" v-if="kurse">
        <thead>
        <tr>
          <th>usr_id</th>
          <th>obj_id</th>
          <th>title</th>
          <th>description</th>
          <th>type</th>
          <th>offline</th>
        </tr>
        </thead>
        <tbody>
        <tr v-for="kurs in kurse">
          <td>
            <RouterLink :to="`${routerBase}/ui/kurs/${kurs.ref_id}`">
              {{ kurs.ref_id }}
            </RouterLink>
          </td>
          <td>{{ kurs.obj_id }}</td>
          <td>{{ kurs.title }}</td>
          <td>{{ kurs.description }}</td>
          <td>{{ kurs.type }}</td>
          <td>
            <div :class="{red:kurs.offline===1,green:kurs.offline===0}">
              {{ kurs.offline }}
            </div>
          </td>
        </tr>
        </tbody>
      </table>
    </div>
      <!--      <pre>{{ kurse }}</pre>-->
    <!--      <pre>{{ kurse }}</pre>-->
   </div>
  </div>
</template>
<style scoped>
<style scoped lang="stylus">
//
//.red
//  max-width 2ch
//  text-align center;
//  background-color red;
//  color white
//  font-weight bold
//
//.green
//  color green
</style>