Browse Source

Add rereading info to manga list

Timothy J. Warren 1 year ago
parent
commit
e7ef11c423
3 changed files with 33 additions and 1 deletions
  1. 3
    1
      CHANGELOG.md
  2. 17
    0
      app/views/manga/cover.php
  3. 13
    0
      app/views/manga/list.php

+ 3
- 1
CHANGELOG.md View File

@@ -3,7 +3,9 @@
3 3
 ## Version 4
4 4
 * Updated to use Kitsu API after discontinuation of Hummingbird
5 5
 * Added streaming links to list entries from the Kitsu API
6
-* Added simple integration with MyAnimeList, so an update can cross-post to both Kitsu and MyAnimeList
6
+* Added simple integration with MyAnimeList, so an update can cross-post to both Kitsu and MyAnimeList (anime and manga)
7
+* Added console command to sync Kitsu and MyAnimeList data
8
+
7 9
 * Added character pages 
8 10
 
9 11
 ## Version 3

+ 17
- 0
app/views/manga/cover.php View File

@@ -36,6 +36,23 @@
36 36
 						<div class="row">
37 37
 							<div class="user_rating">Rating: <?= $item['user_rating'] ?> / 10</div>
38 38
 						</div>
39
+
40
+						<?php if ($item['rereading']): ?>
41
+						<div class="row">
42
+							<?php foreach(['rereading'] as $attr): ?>
43
+							<?php if($item[$attr]): ?>
44
+								<span class="item-<?= $attr ?>"><?= ucfirst($attr) ?></span>
45
+							<?php endif ?>
46
+							<?php endforeach ?>
47
+						</div>
48
+						<?php endif ?>
49
+
50
+						<?php if ($item['reread'] > 0): ?>
51
+						<div class="row">
52
+							<div>Reread <?= $item['reread'] ?> time(s)</div>
53
+						</div>
54
+						<?php endif ?>
55
+
39 56
 						<div class="row">
40 57
 							<div class="chapter_completion">
41 58
 								Chapters: <span class="chapters_read"><?= $item['chapters']['read'] ?></span> /

+ 13
- 0
app/views/manga/list.php View File

@@ -17,6 +17,7 @@
17 17
 				<th>Rating</th>
18 18
 				<th>Completed Chapters</th>
19 19
 				<th># of Volumes</th>
20
+				<th>Attributes</th>
20 21
 				<th>Type</th>
21 22
 				<th>Genres</th>
22 23
 			</tr>
@@ -40,6 +41,18 @@
40 41
 				<td><?= $item['user_rating'] ?> / 10</td>
41 42
 				<td><?= $item['chapters']['read'] ?> / <?= $item['chapters']['total'] ?></td>
42 43
 				<td><?= $item['volumes']['total'] ?></td>
44
+				<td>
45
+                    <ul>
46
+					<?php if ($item['reread'] > 0): ?>
47
+                        <li>Reread <?= $item['reread'] ?> time(s)</li>
48
+					<?php endif ?>
49
+					<?php foreach(['rereading'] as $attr): ?>
50
+						<?php if($item[$attr]): ?>
51
+                            <li><?= ucfirst($attr); ?></li>
52
+						<?php endif ?>
53
+					<?php endforeach ?>
54
+                    </ul>
55
+				</td>
43 56
 				<td><?= $item['manga']['type'] ?></td>
44 57
 				<td class="align_left">
45 58
 					<?= implode(', ', $item['manga']['genres']) ?>