From 467a1f8635ca93a48024fb80b4b44b4f979a2505 Mon Sep 17 00:00:00 2001 From: raylu Date: Sun, 17 Jul 2011 18:35:17 -0700 Subject: minor style fixes --- views/anime/index.html.php | 2 +- views/anime/view.html.php | 56 ++++++++++++++++++++++++---------------------- 2 files changed, 30 insertions(+), 28 deletions(-) (limited to 'views/anime') diff --git a/views/anime/index.html.php b/views/anime/index.html.php index 270ed76..6b1adc0 100644 --- a/views/anime/index.html.php +++ b/views/anime/index.html.php @@ -1,5 +1,5 @@ styles($this->html->style('anime')); +$this->styles($this->html->style('table')); $this->styles($this->html->style('pagination')); ?> diff --git a/views/anime/view.html.php b/views/anime/view.html.php index 11ac437..ce291c5 100644 --- a/views/anime/view.html.php +++ b/views/anime/view.html.php @@ -63,33 +63,35 @@ for ($i = 0; $i < count($anime->genres); $i++) {

-
-

-Cast ↓ -

- -cast); $i++): ?> - 0) echo ' class="char"' ?>> - - - cast[$i]->people)): ?> - cast[$i]->people as $actor): ?> - - - - - - - - -
- cast[$i]->character ?> -
name ?>language ?>
-
- -
+cast) > 1): // why is this 1? ?> +
+

+ Cast ↓ +

+ + cast); $i++): ?> + 0) echo ' class="char"' ?>> + + + cast[$i]->people)): ?> + cast[$i]->people as $actor): ?> + + + + + + + + +
+ cast[$i]->character ?> +
name ?>language ?>
+
+ +
+
-- cgit v1.2.3 From 2bd2b4951627ae78631cc292979c84fdff677ba0 Mon Sep 17 00:00:00 2001 From: raylu Date: Sun, 17 Jul 2011 19:10:15 -0700 Subject: move 'related' html out of anime controller --- controllers/AnimeController.php | 12 +++++------- views/anime/view.html.php | 8 +++++++- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'views/anime') diff --git a/controllers/AnimeController.php b/controllers/AnimeController.php index 3a40cee..4bdacac 100644 --- a/controllers/AnimeController.php +++ b/controllers/AnimeController.php @@ -19,15 +19,13 @@ class AnimeController extends \lithium\action\Controller { if (is_numeric($id)) { $data = Anime::search($id, null, 'special_id'); - $related = $data['anime']->related; - $str = ''; - for ($i = 0; $i < count($related); $i++) + $related = Array(); + foreach ($data['anime']->related as $rid) { - if ($i > 0) $str .= ', '; - $ra = Anime::search($related[$i], null, 'special_id'); - $str .= '' . $ra['anime']->title . ''; + $ra = Anime::search($rid, null, 'special_id'); + $related[$ra['anime']->title] = $rid; } - $data['related'] = $str; + $data['related'] = $related; return $data; } else diff --git a/views/anime/view.html.php b/views/anime/view.html.php index ce291c5..f51e863 100644 --- a/views/anime/view.html.php +++ b/views/anime/view.html.php @@ -48,7 +48,13 @@ for ($i = 0; $i < count($anime->genres); $i++) { } ?>
Duration: episode_duration ?>
Rating: rated ?>
-Related: +Related: 0) $str .= ','; + $str .= ' ' . $keys[$i] . ''; +} ?>

-- cgit v1.2.3 From bb06d45da99d1a551979f6f694a5bed4d02673c4 Mon Sep 17 00:00:00 2001 From: raylu Date: Sun, 24 Jul 2011 20:35:59 -0700 Subject: add 'add' button on anime view page logged out users will be redirected anyway --- views/anime/view.html.php | 23 ++++++++++++++--------- webroot/css/view.css | 4 ++-- 2 files changed, 16 insertions(+), 11 deletions(-) (limited to 'views/anime') diff --git a/views/anime/view.html.php b/views/anime/view.html.php index f51e863..11a1f75 100644 --- a/views/anime/view.html.php +++ b/views/anime/view.html.php @@ -56,18 +56,10 @@ for ($i = 0; $i < count($keys); $i++) { $str .= ' ' . $keys[$i] . ''; } ?>

- - cast) > 1): // why is this 1? ?>
@@ -99,6 +91,19 @@ for ($i = 0; $i < count($keys); $i++) {
+ + + +

Synopsis

diff --git a/webroot/css/view.css b/webroot/css/view.css index d5734a1..5d5db7d 100644 --- a/webroot/css/view.css +++ b/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); -- cgit v1.2.3