homepage_widget: details + courses table

This commit is contained in:
2022-01-28 18:22:33 +01:00
parent 00ac6aa1b9
commit b83ad77fd8
3 changed files with 20 additions and 4 deletions

View File

@@ -3,9 +3,20 @@
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span>
<tab-table v-else>
<template v-slot:thead>
<th scope="col">id</th>
<th scope="col"></th>
</template>
<template v-slot:tbody>
<tr></tr>
<tr v-for="(c, i) in accompanyingCourses.results" :key="`course-${i}`">
<td>
{{ c.id}}
</td>
<td>
<a class="btn btn-sm btn-show" :href="getUrl(c)">
{{ $t('show_entity', { entity: $t('the_course') }) }}
</a>
</td>
</tr>
</template>
</tab-table>
</template>
@@ -32,8 +43,13 @@ export default {
} else {
return this.accompanyingCourses.count === 0;
}
}
},
},
methods: {
getUrl(c) {
return `/fr/parcours/${c.id}`
}
}
}
</script>