brotherton-erpnext/erpnext/public/js/education/web-academy/components/AcademyProgramCard.vue

44 lines
1.2 KiB
Vue
Raw Normal View History

2018-10-30 12:55:49 +00:00
<template>
<div class='card-deck mt-5'>
<div class="card">
2018-11-01 11:49:21 +00:00
<img :src="program.hero_image" style='height: 150px; width: auto'>
2018-10-30 12:55:49 +00:00
<div class='card-body'>
<router-link :to="'/Program/' + program.name">
2018-11-01 11:49:21 +00:00
<h5 class='card-title'>{{ program.program_name }}</h5>
2018-10-30 12:55:49 +00:00
</router-link>
<div v-html="program.description"></div>
</div>
<div class='card-footer text-right'>
<!-- <a class='video-btn btn btn-secondary btn-sm' data-toggle="modal" data-src=" insert jinja stuff here " data-target="#myModal">Watch Intro</a>&nbsp;&nbsp; -->
<a class='btn btn-secondary btn-sm' href="/enroll?course=user">Enroll Now</a>
</div>
</div>
</div>
</template>
<script>
export default {
2018-11-01 11:49:21 +00:00
props: ['program_code'],
2018-10-30 12:55:49 +00:00
name: "AcademyProgramCard",
data() {
return {
program: ''
};
},
mounted() {
frappe.call({
method: "erpnext.www.academy.get_program_details",
args: {
2018-11-01 11:49:21 +00:00
program_name: this.program_code
2018-10-30 12:55:49 +00:00
}
}).then(r => {
this.program = r.message
})
},
};
2018-11-01 11:49:21 +00:00
</script>
<style lang="css" scoped>
a {
text-decoration: none;
}
</style>