Add a permalink to book (the little linkish thingy)
fix the image zoom in the book detail Add book title to the book detail clean the code a little (more to do)
This commit is contained in:
parent
c094e1564c
commit
0ba361e434
3
base.php
3
base.php
|
@ -413,7 +413,8 @@ class PageBookDetail extends Page
|
|||
{
|
||||
public function InitializeContent ()
|
||||
{
|
||||
$this->title = "Book";
|
||||
$book = Book::getBookById ($this->idGet);
|
||||
$this->title = $book->title;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
13
book.php
13
book.php
|
@ -89,6 +89,19 @@ class Book extends Base {
|
|||
return self::ALL_BOOKS_ID.":letter:".$startingLetter;
|
||||
}
|
||||
|
||||
public function getUri () {
|
||||
return "?page=".parent::PAGE_BOOK_DETAIL."&id=$this->id";
|
||||
}
|
||||
|
||||
public function getDetailUrl () {
|
||||
global $config;
|
||||
if ($config['cops_use_fancyapps'] == 0) {
|
||||
return 'index.php' . $this->getUri ();
|
||||
} else {
|
||||
return 'bookdetail.php?id=' . $this->id;
|
||||
}
|
||||
}
|
||||
|
||||
public function getTitle () {
|
||||
return $this->title;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ $book->getLinkArray ();
|
|||
<?php
|
||||
if ($book->hasCover) {
|
||||
?>
|
||||
<img src="fetch.php?id=<?php echo $book->id ?>&height=150" alt="cover" />
|
||||
<a href="fetch.php?id=<?php echo $book->id ?>"><img src="fetch.php?id=<?php echo $book->id ?>&height=150" alt="cover" /></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@ -38,7 +38,7 @@ $book->getLinkArray ();
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="entryTitle"><?php echo htmlspecialchars ($book->title) ?></div>
|
||||
<div class="entryTitle"><a rel="bookmark" href="<?php echo 'index.php' . $book->getUri () ?>"><img src="<?php echo getUrlWithVersion("images/Link.png") ?>" alt="permalink" /></a><?php echo htmlspecialchars ($book->title) ?></div>
|
||||
<div class="entrySection">
|
||||
<span><?php echo localize("authors.title") ?></span>
|
||||
<div class="buttonEffect pad6">
|
||||
|
|
|
@ -92,7 +92,10 @@
|
|||
$book->getUpdatedEpub ($idData);
|
||||
return;
|
||||
}
|
||||
|
||||
header('Content-Disposition: attachment; filename="' . basename ($file) . '"');
|
||||
if ($type == "jpg") {
|
||||
header('Content-Disposition: filename="' . basename ($file) . '"');
|
||||
} else {
|
||||
header('Content-Disposition: attachment; filename="' . basename ($file) . '"');
|
||||
}
|
||||
header ($config['cops_x_accel_redirect'] . ": " . $config['calibre_internal_directory'] . $file);
|
||||
?>
|
BIN
images/Link.png
Normal file
BIN
images/Link.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 720 B |
|
@ -234,7 +234,7 @@
|
|||
?>
|
||||
</div>
|
||||
<div class="bookdetail">
|
||||
<a class="navigation" href="<?php if ($config['cops_use_fancyapps'] == 0) { echo 'index.php?page=13&id=' . $entry->book->id; } else { echo 'bookdetail.php?id=' . $entry->book->id; } ?>" />
|
||||
<a class="navigation" href="<?php echo $entry->book->getDetailUrl () ?>" />
|
||||
<div class="entryTitle st"><?php echo htmlspecialchars ($entry->title) ?> <span class="sp">(<?php echo date ('Y', $entry->book->pubdate) ?>)</span> <span class="sr"><?php echo $entry->book->getRating () ?></span></div>
|
||||
<div class="entryContent sa"><?php echo localize("authors.title") . " : " . htmlspecialchars ($entry->book->getAuthorsName ()) ?></div>
|
||||
<div class="entryContent"><?php echo localize("tags.title") . " : " . htmlspecialchars ($entry->book->getTagsName ()) ?></div>
|
||||
|
|
Loading…
Reference in a new issue