فهرست منبع

add 'add' button on anime view page

logged out users will be redirected anyway
raylu 14 سال پیش
والد
کامیت
bb06d45da9
2فایلهای تغییر یافته به همراه16 افزوده شده و 11 حذف شده
  1. 14 9
      views/anime/view.html.php
  2. 2 2
      webroot/css/view.css

+ 14 - 9
views/anime/view.html.php

@@ -56,18 +56,10 @@ for ($i = 0; $i < count($keys); $i++) {
 	$str .= ' <a href="/anime/view/' . $related[$keys[$i]] . '">' . $keys[$i] . '</a>';
 } ?><?= $str ?>
 </p>
-</section>
 
-<aside id="malstats">
-<h2>MAL Stats</h2>
 <p>
-<b>Score:</b> <?= $anime->mal_score ?><br>
-<b>Votes:</b> <?= $anime->mal_score_voted ?><br>
-<b>Ranked:</b> <?= $anime->mal_rank ?><br>
-<b>Popularity:</b> <?= $anime->mal_popularity ?><br>
-<b>Members:</b> <?= $anime->mal_score ?>
+<a href="/animelist/add/<?= $anime->special_id ?>" id="add">Add</a>
 </p>
-</aside>
 
 <?php if (count($anime->cast) > 1): // why is this 1? ?>
 	<section id="cast">
@@ -99,6 +91,19 @@ for ($i = 0; $i < count($keys); $i++) {
 	</section>
 <?php endif; ?>
 
+</section>
+
+<aside id="malstats">
+<h2>MAL Stats</h2>
+<p>
+<b>Score:</b> <?= $anime->mal_score ?><br>
+<b>Votes:</b> <?= $anime->mal_score_voted ?><br>
+<b>Ranked:</b> <?= $anime->mal_rank ?><br>
+<b>Popularity:</b> <?= $anime->mal_popularity ?><br>
+<b>Members:</b> <?= $anime->mal_score ?>
+</p>
+</aside>
+
 <br class="cl">
 
 <h2 class="ribbon">Synopsis</h2>

+ 2 - 2
webroot/css/view.css

@@ -15,7 +15,7 @@ section#cast {
 	float: left;
 	width: 620px;
 }
-section#cast a {
+section#cast a, #add {
 	padding: 4px 7px;
 	border: 1px solid #aaa;
 	-moz-border-radius: 3px;
@@ -28,7 +28,7 @@ section#cast a {
 	color: #111;
 	outline: none;
 }
-section#cast a:hover {
+section#cast a:hover, #add:hover {
 	background: #eee;
 	background: -moz-linear-gradient(top, #eee, #ccc);
 	background: -webkit-linear-gradient(top, #eee, #ccc);