Added book description
the build failed Details

This commit is contained in:
kolaente 2017-11-28 16:03:25 +01:00
parent 2744214185
commit 50b368320a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
7 changed files with 20 additions and 3 deletions

View File

@ -86,6 +86,10 @@
// Build the list object
this.bookList = [
{
header: this.translate('books').description,
content: this.book.Description.replace(/\n/g, '<br>')
},
{
header: this.translate('books').gridColumns.isbn,
content: this.book.Isbn
@ -98,6 +102,10 @@
header: this.translate('books').gridColumns.price,
content: this.book.Price
},
{
header: this.translate('books').gridColumns.quantity,
content: this.book.Quantity
},
{
header: this.translate('books').gridColumns.status,
content: this.book.Status

View File

@ -5,6 +5,10 @@
<label v-lang.books.gridColumns.title></label>
<input name="title" :placeholder="langBooks.gridColumns.title" type="text" v-model="book.Title" required v-focus>
</div>
<div class="field">
<label v-lang.books.description></label>
<textarea name="description" :placeholder="langBooks.description" rows="3" v-model="book.Description"></textarea>
</div>
<div class="three fields">
<div class="field">
<label v-lang.books.gridColumns.isbn></label>
@ -48,7 +52,7 @@
</div>
<div class="field">
<label>Authors</label>
<label v-lang.books.gridColumns.authors></label>
<multiselect
v-model="book.Authors"
track-by="ID"
@ -70,7 +74,7 @@
</template>
<div class="field">
<a class="ui green icon button" @click="addAddAuthor()"><i class="plus icon"></i> <span v-lang.author.newAuthor></span></a>
<a class="ui green icon button" @click="addAddAuthor()"><i class="plus icon"></i> <span v-lang.authors.newAuthor></span></a>
</div>
<div class="inline fields">
@ -101,6 +105,7 @@
edit: false,
book: {
Title: '',
Description: '',
Isbn: '',
Year: (new Date()).getFullYear(),
Price: 0,

View File

@ -27,7 +27,7 @@
</template>
<!-- Otherwise show its content -->
<template v-else>
{{ info.content }}
<span v-html="info.content"></span>
</template>
</div>
</div>

View File

@ -37,6 +37,7 @@ export default {
},
books: {
title: 'Bücherübersicht',
description: 'Beschreibung',
add: 'Buch hinzufügen',
deleteHeader: 'Buch löschen',
deleteMsg: 'Bist du sicher dass du dieses Buch löschen willst? <b>Das kann nicht Rückgängig gemacht werden!</b>',

View File

@ -37,6 +37,7 @@ export default {
},
books: {
title: 'Books overview',
description: 'Description',
add: 'Add a book',
deleteHeader: 'Delete this book',
deleteMsg: 'Are you sure you want to delete this book? <b>This cannot be undone!</b>',

View File

@ -37,6 +37,7 @@ export default {
},
books: {
title: 'Liste des livres',
description: 'Description',
add: 'Ajouter un livre',
deleteHeader: 'Supprimer le livre',
deleteMsg: 'Est-ce que vous êtes sur que vous voulez supprimer cette livre? <b>Cette operation est irréversible !</b>',

View File

@ -8,6 +8,7 @@ import (
type Book struct {
ID int64 `xorm:"int(11) autoincr not null unique pk"`
Title string `xorm:"varchar(250) not null"`
Description string `xorm:"varchar(750)"`
Isbn string `xorm:"varchar(30)"`
Year int64 `xorm:"int(11)"`
Price float64 `xorm:"double"`