2018-11-01 11:50:04 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2018-11-02 05:59:02 +00:00
|
|
|
<ContentTitle :title="contentData.title" :author="contentData.author" :publishDate="contentData.publish_date">
|
|
|
|
<slot></slot>
|
|
|
|
</ContentTitle>
|
2018-11-01 11:50:04 +00:00
|
|
|
<section class="article-content-section">
|
|
|
|
<div class='container'>
|
2018-11-01 14:21:33 +00:00
|
|
|
<div class="content" v-html="contentData.content"></div>
|
2018-11-01 11:50:04 +00:00
|
|
|
<div class="text-right">
|
|
|
|
</div>
|
|
|
|
<div class="mt-3 text-right">
|
|
|
|
<a class="text-muted" href="/report"><i class="octicon octicon-issue-opened" title="Report"></i> Report a
|
|
|
|
Mistake</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
2018-11-02 05:59:02 +00:00
|
|
|
import ContentTitle from './ContentTitle.vue'
|
2018-11-01 11:50:04 +00:00
|
|
|
export default {
|
|
|
|
props: ['content', 'type'],
|
|
|
|
name: 'ContentArticle',
|
|
|
|
data() {
|
|
|
|
return {
|
2018-11-01 14:21:33 +00:00
|
|
|
contentData: ''
|
2018-11-01 11:50:04 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
frappe.call({
|
|
|
|
method: "erpnext.www.academy.get_content",
|
|
|
|
args: {
|
|
|
|
content_name: this.content,
|
|
|
|
content_type: this.type
|
|
|
|
}
|
|
|
|
}).then(r => {
|
2018-11-01 14:21:33 +00:00
|
|
|
this.contentData = r.message
|
2018-11-01 11:50:04 +00:00
|
|
|
});
|
2018-11-02 05:59:02 +00:00
|
|
|
},
|
|
|
|
components: {
|
|
|
|
ContentTitle
|
2018-11-01 11:50:04 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|