brotherton-erpnext/erpnext/public/js/education/lms/components/CourseCard.vue

53 lines
1.5 KiB
Vue
Raw Normal View History

2018-11-01 11:49:53 +00:00
<template>
<div class="card mt-3" data-list="getting-started">
<div class='card-body'>
<div class="row">
<div class="course-details col-xs-8 col-sm-9 col-md-10">
<h5 class="card-title">{{ course.course_name }}</h5>
<span class="course-list text-muted" id="getting-started">
2018-12-17 08:26:27 +00:00
Topics
2018-11-01 11:49:53 +00:00
<ul class="mb-0 mt-1">
2019-02-26 11:17:54 +00:00
<li v-for="topic in course.topics" :key="topic.name">
2018-12-17 08:26:27 +00:00
<div><span style="padding-right: 0.4em"></span>{{ topic.topic_name }}</div>
2018-11-21 09:51:57 +00:00
</li>
2018-11-01 11:49:53 +00:00
</ul>
</span>
</div>
2018-11-12 07:20:54 +00:00
<div class='course-buttons text-center col-xs-4 col-sm-3 col-md-2'>
2018-12-17 08:26:27 +00:00
<a-button
:type="'primary'"
2018-11-12 07:20:54 +00:00
size="sm btn-block"
2018-12-17 08:26:27 +00:00
:route="courseRoute"
2018-11-09 06:17:09 +00:00
>
2018-12-17 08:26:27 +00:00
View Course
2018-11-09 06:17:09 +00:00
</a-button>
2018-11-01 11:49:53 +00:00
</div>
</div>
</div>
</div>
</template>
<script>
2018-11-12 07:20:54 +00:00
import AButton from './Button.vue';
2018-11-02 15:21:24 +00:00
2018-11-01 11:49:53 +00:00
export default {
2018-11-22 10:03:30 +00:00
props: ['course', 'program_name'],
2018-11-13 11:54:07 +00:00
name: "CourseCard",
2018-11-02 15:21:24 +00:00
components: {
2018-11-09 06:17:09 +00:00
AButton
},
computed: {
2018-12-17 08:26:27 +00:00
courseRoute() {
return `${this.program_name}/${this.course.name}`
},
2018-11-01 11:49:53 +00:00
}
};
</script>
<style scoped>
@media only screen and (max-width: 576px) {
2018-11-21 09:51:57 +00:00
.course-buttons {
margin-top: 1em;
}
}
2018-11-01 11:49:53 +00:00
</style>