2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

[print-view] fix button layout

This commit is contained in:
Prateeksha Singh 2018-07-13 13:15:30 +05:30
parent c7e9d3b545
commit f4d75f056c
2 changed files with 13 additions and 3 deletions

View File

@ -1,8 +1,11 @@
<template>
<div class="frappe-print-actions d-flex justify-content-between align-items-center p-3 border-bottom">
<h5 class="m-0">{{ title }}</h5>
<f-button primary @click="$emit('print')">{{ _('Print') }}</f-button>
<f-button secondary @click="$emit('view-form')">{{ _('View Form') }}</f-button>
<h5 class="m-0">Print {{ title }}</h5>
<div class="button-group">
<f-button secondary @click="$emit('view-form')">{{ _('View Form') }}</f-button>
<f-button primary @click="$emit('print')">{{ _('Print') }}</f-button>
</div>
</div>
</template>

View File

@ -2,6 +2,8 @@
<div class="print-view">
<print-actions
v-bind:title="name"
@view-form="viewForm"
@print="print"
></print-actions>
<div class="print-container">
<div class="print-template" v-html="printTemplate"></div>
@ -27,6 +29,11 @@ export default {
async created(vm) {
this.printTemplate = await getHTML(this.doctype, this.name);
},
methods: {
viewForm() {
this.$router.push(`/edit/${this.doctype}/${this.name}`);
},
}
}
</script>