diff options
author | raylu <raylu@mixpanel.com> | 2011-07-25 01:18:08 -0700 |
---|---|---|
committer | raylu <raylu@mixpanel.com> | 2011-07-25 01:18:08 -0700 |
commit | f3b9ded2327c22e196b6b0b2d0a6953263013dec (patch) | |
tree | 665dfba08cdb1db12e704128eabd3416932450bf /views | |
parent | 56c76f14e3aa63448ec648529bba0f810b24151e (diff) | |
download | otakuhub-f3b9ded2327c22e196b6b0b2d0a6953263013dec.tar.xz |
fix up animelist add view
Diffstat (limited to 'views')
-rw-r--r-- | views/anime_list/add.html.php | 64 | ||||
-rw-r--r-- | views/anime_list/view.html.php | 7 | ||||
-rw-r--r-- | views/pages/home.html.php | 4 |
3 files changed, 30 insertions, 45 deletions
diff --git a/views/anime_list/add.html.php b/views/anime_list/add.html.php index de3da9c..bf98b67 100644 --- a/views/anime_list/add.html.php +++ b/views/anime_list/add.html.php @@ -1,51 +1,33 @@ -<?php $this->form->config(array('templates' => array( - 'error' => '<div class="notification error">{:content}</div>'))); ?> -<?php if (empty($anime)): ?> -<h2 class="ribbon full">Find an Anime:</h2> -<div class="triangle-ribbon"></div> -<br class="cl" /> -<?php else: ?> -<h2 class="ribbon full"><?= $anime->title ?></h2> +<?php +$this->form->config(array('templates' => array( + 'error' => '<div class="notification error">{:content}</div>'))); +$this->styles($this->html->style('jquery.tagsinput.css')); +$this->scripts($this->html->script('jquery.tagsinput.min.js')); +?> +<h2 class="ribbon"><?= $anime->title ?></h2> <div class="triangle-ribbon"></div> <br class="cl" /> -<?php endif; ?> -<script type="text/javascript"> - $(function() { - $('#tags').tagsInput(); - }); +<?php ob_start(); ?> +<script> + $(function() { + $('#tags').tagsInput(); + }); </script> +<?php $this->scripts(ob_get_clean()); ?> -<?php +<?php echo $this->form->create($entry); - - //Hidden because the user can't change these. - //These are stored in the anime list for faster lookup times, - //So we can avoid getting this data live for every anime. - if (isset($anime)) { - echo $this->form->hidden('series_animedb_id', array('value' => $anime->special_id)); - echo $this->form->hidden('series_title', array('value' => $anime->title)); - echo $this->form->hidden('series_type', array('value' => $anime->view_type)); - echo $this->form->hidden('series_episodes', array('value' => $anime->episode_count)); - } - - echo $this->form->field('my_watched_episodes', array('label' => 'Watched Episodes')); - echo "Start date"; - echo $this->form->field('my_start_date', array('label' => 'Start Date')); - echo $this->form->field('my_finish_date', array('label' => 'Finish Date')); - echo $this->form->field('my_score', array('label' => 'Score')); - echo $this->form->label('my_status', 'Status'); - echo $this->form->select('my_status', array('Plan to Watch' => 'Plan to Watch', - 'On-Hold' => 'On-Hold', - 'Completed' => 'Completed', - 'Watching' => 'Watching', - 'Dropped' => 'Dropped')); - echo $this->form->field('my_comments', array('label' => 'Comments')); - echo $this->form->field('my_times_watched', array('label' => 'Times Watched')); - echo $this->form->label('rewatch_value', 'Rewatch Value'); - echo $this->form->select('rewatch_value', array('High', 'Medium', 'Low', 'None'), array('value' => 0)); + echo $this->form->hidden('series_animedb_id', array('value' => $anime->special_id)); + echo $this->form->field('episodes', array('label' => 'Watched Episodes')); + echo $this->form->field('score', array('label' => 'Score')); + echo $this->form->label('status', 'Status'); + echo $this->form->select('status', array('Plan to Watch' => 'Plan to Watch', + 'On-Hold' => 'On-Hold', + 'Completed' => 'Completed', + 'Watching' => 'Watching', + 'Dropped' => 'Dropped')); echo $this->form->field('tags', array('type' => 'textarea', 'id' => 'tags')); - echo $this->form->checkbox('rewatching', array('label' =>'Rewatching?', 'value' => false)); echo $this->form->submit('Save!'); echo $this->form->end(); ?> diff --git a/views/anime_list/view.html.php b/views/anime_list/view.html.php index 4c552d8..6241fec 100644 --- a/views/anime_list/view.html.php +++ b/views/anime_list/view.html.php @@ -1,6 +1,9 @@ -<h2 class="ribbon full"><a style="color: #FFFFFF" href="/profile/view/<?= $user->username ?>"><?= $user->username ?>'s</a> AnimeList</h2> +<h2 class="ribbon full"> + <a href="/profile/view/<?= $user->username ?>"><?= $user->username ?>'s</a> Anime List +</h2> <div class="triangle-ribbon"></div> <br class="cl" /> + <table class="table"><tr> <td><?= $this->html->link("Completed", "#finished", array('class' => 'anchorLink')); ?> </td> <td><?= $this->html->link("Watching", "#watching", array('class' => 'anchorLink')); ?> </td> @@ -81,4 +84,4 @@ echo "</table>"; <br class="cl" /> <?php tableHelper($dropped, $this); ?> -<?php endif; ?>
\ No newline at end of file +<?php endif; ?> diff --git a/views/pages/home.html.php b/views/pages/home.html.php index 227a18b..7fcfefb 100644 --- a/views/pages/home.html.php +++ b/views/pages/home.html.php @@ -1,5 +1,5 @@ <?php -$this->styles($this->html->style("/css/home.css")); +$this->styles($this->html->style('home.css')); ?> <h1>The Otaku Social Network</h1> @@ -84,7 +84,7 @@ $this->styles($this->html->style("/css/home.css")); <br class="cl" /> <?php ob_start(); ?> -<script type="text/javascript"> +<script> $(document).ready(function() { $(".scrollable").scrollable(); }); |