From 07a891377ddafc2c6314797475cf0e553a29df0b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Lucas?=
Date: Sat, 15 Jun 2013 18:54:07 +0200
Subject: [PATCH] Almost finish everything for bookdetail. re #73
Todo : Handle max-size correctly (only if inside a fancybox)
---
book.php | 2 ++
getJSON.php | 5 ++++-
templates/default/bookdetail.html | 15 +++++++++++++++
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/book.php b/book.php
index 11ab661..38d4413 100644
--- a/book.php
+++ b/book.php
@@ -131,6 +131,7 @@ class Book extends Base {
"detailUrl" => $this->getDetailUrl (),
"rating" => $this->getRating (),
"pubDate" => $this->getPubDate (),
+ "languagesName" => $this->getLanguages (),
"authorsName" => $this->getAuthorsName (),
"tagsName" => $this->getTagsName (),
"seriesName" => $sn,
@@ -144,6 +145,7 @@ class Book extends Base {
$out ["detailurl"] = $this->getDetailUrl (true);
$out ["coverurl"] = Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", NULL)->hrefXhtml ();
$out ["thumbnailurl"] = Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", NULL, NULL, 150)->hrefXhtml ();
+ $out ["content"] = $this->getComment (false);
$out ["datas"] = array ();
foreach ($this->getDatas() as $data) {
array_push ($out ["datas"], array ("format" => $data->format, "url" => $data->getHtmlLink ()));
diff --git a/getJSON.php b/getJSON.php
index e40113d..0294c4c 100644
--- a/getJSON.php
+++ b/getJSON.php
@@ -64,7 +64,10 @@
"nextAlt" => localize ("paging.next.alternate"),
"searchAlt" => localize ("search.alternate"),
"homeAlt" => localize ("home.alternate"),
- "permalinkAlt" => localize ("permalink.alternate"));
+ "permalinkAlt" => localize ("permalink.alternate"),
+ "pubdateTitle" => localize("pubdate.title"),
+ "languagesTitle" => localize("language.title"),
+ "contentTitle" => localize("content.summary"));
$out ["containsBook"] = 0;
if ($currentPage->containsBook ()) {
diff --git a/templates/default/bookdetail.html b/templates/default/bookdetail.html
index 5efa948..07c9870 100644
--- a/templates/default/bookdetail.html
+++ b/templates/default/bookdetail.html
@@ -31,4 +31,19 @@
{{=htmlEscape (it.book.seriesCompleteName)}}
{{?}}
+ {{? it.book.pubDate != ""}}
+ {{=it.i18n.pubdateTitle}}:
{{=it.book.pubDate}}
+
+ {{?}}
+ {{? it.book.languagesName != ""}}
+ {{=it.i18n.languagesTitle}}:
{{=it.book.languagesName}}
+
+ {{?}}
+ {{? it.book.content != ""}}
+
+ {{=it.i18n.contentTitle}}
+ {{=it.book.content}}
+ {{?}}
\ No newline at end of file