Integrate better monocle in COPS
--HG-- extra : rebase_source : 9132076c5553d0a2a7c550e7f3523b922e52b693
This commit is contained in:
parent
62941ccb4b
commit
1d2e37d259
|
@ -72,10 +72,13 @@ class JSONRenderer
|
||||||
$out ["datas"] = array ();
|
$out ["datas"] = array ();
|
||||||
$dataKindle = $book->GetMostInterestingDataToSendToKindle ();
|
$dataKindle = $book->GetMostInterestingDataToSendToKindle ();
|
||||||
foreach ($book->getDatas() as $data) {
|
foreach ($book->getDatas() as $data) {
|
||||||
$tab = array ("id" => $data->id, "format" => $data->format, "url" => $data->getHtmlLink (), "mail" => 0);
|
$tab = array ("id" => $data->id, "format" => $data->format, "url" => $data->getHtmlLink (), "mail" => 0, "readerUrl" => "");
|
||||||
if (!empty ($config['cops_mail_configuration']) && !is_null ($dataKindle) && $data->id == $dataKindle->id) {
|
if (!empty ($config['cops_mail_configuration']) && !is_null ($dataKindle) && $data->id == $dataKindle->id) {
|
||||||
$tab ["mail"] = 1;
|
$tab ["mail"] = 1;
|
||||||
}
|
}
|
||||||
|
if ($data->format == "EPUB") {
|
||||||
|
$tab ["readerUrl"] = "epubreader.php?data={$data->id}&db=0"; //TODO fix the database
|
||||||
|
}
|
||||||
array_push ($out ["datas"], $tab);
|
array_push ($out ["datas"], $tab);
|
||||||
}
|
}
|
||||||
$out ["authors"] = array ();
|
$out ["authors"] = array ();
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
{{? data.mail == 1}}
|
{{? data.mail == 1}}
|
||||||
<a id="mailButton" title="Mail" href="empty.php" onclick="sendToMailAddress (this, {{=data.id}}); return false;"><i class="icon-envelope icon-large"></i></a>
|
<a id="mailButton" title="Mail" href="empty.php" onclick="sendToMailAddress (this, {{=data.id}}); return false;"><i class="icon-envelope icon-large"></i></a>
|
||||||
{{?}}
|
{{?}}
|
||||||
|
{{? data.readerUrl != ""}}
|
||||||
|
<a title="Reader" href="{{=data.readerUrl}}" target="blank"><i class="icon-eye-open icon-large"></i></a>
|
||||||
|
{{?}}
|
||||||
<br />
|
<br />
|
||||||
{{~}}
|
{{~}}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
</h2>
|
</h2>
|
||||||
<a class="fancydetail" href="{{=str_format (it.c.url.detailUrl, entry.book.id, it.databaseId)}}">
|
<a class="fancydetail" href="{{=str_format (it.c.url.detailUrl, entry.book.id, it.databaseId)}}">
|
||||||
<div class="fullclickpopup">
|
<div class="fullclickpopup">
|
||||||
<h2><span class="st"><a href="{{=entry.book.readerUrl}}" target="blank">{{=htmlspecialchars (entry.title)}}</a></span>
|
<h2><span class="st">{{=htmlspecialchars (entry.title)}}</span>
|
||||||
{{? entry.book.pubDate != ""}}<span class="sp">({{=entry.book.pubDate}})</span>{{?}}
|
{{? entry.book.pubDate != ""}}<span class="sp">({{=entry.book.pubDate}})</span>{{?}}
|
||||||
{{? entry.book.rating != ""}}<span class="sr">{{=entry.book.rating}}</span>{{?}}
|
{{? entry.book.rating != ""}}<span class="sr">{{=entry.book.rating}}</span>{{?}}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
Loading…
Reference in a new issue