diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/Anime_list/add.html.php | 41 | ||||
-rw-r--r-- | views/Anime_list/view.html.php | 2 | ||||
-rw-r--r-- | views/anime_list/addsearch.html.php | 21 |
3 files changed, 46 insertions, 18 deletions
diff --git a/views/Anime_list/add.html.php b/views/Anime_list/add.html.php index 5e9699a..c5e2fea 100644 --- a/views/Anime_list/add.html.php +++ b/views/Anime_list/add.html.php @@ -1,33 +1,40 @@ <?php if (empty($anime)): ?> -<p> Anime not found </p> +<h2 class="ribbon full">Find an Anime:</h2> +<div class="triangle-ribbon"></div> +<br class="clear" /> <?php else: ?> -<h1><?= $anime->series_title ?></h1> +<h2 class="ribbon full"><?= $anime->title ?></h2> +<div class="triangle-ribbon"></div> +<br class="clear" /> +<?php endif; ?> <?php echo $this->form->create($entry); - echo $this->form->hidden('series_animedb_id', array('value' => $anime->special_id)); - /* - <series_title><![CDATA[.hack//Sign]]></series_title> - <series_type>TV</series_type> - <series_episodes>26</series_episodes> - */ + + //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 $this->form->field('my_start_date', array('label' => 'Start Date')); echo $this->form->field('my_finish_date', array('label' => 'Finish Date')); - //Make this Ajax in the future, but it will have to be removed - //If we partner with CR or otherwise - //echo $this->form->field('my_fansub_group', ); echo $this->form->field('my_score', array('label' => 'Score')); - //echo $this->form->field() // <my_dvd></my_dvd> - //<my_storage></my_storage> echo $this->form->label('my_status', 'Status'); - echo $this->form->select('my_status', array('Plan to Watch', 'On-Hold', 'Completed', 'Watching'), array('value' => 0)); //<my_status>Plan to Watch</my_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->field('tags', array('type' => 'textarea')); - echo $this->form->field('rewatching', array('value' => false)); + echo $this->form->checkbox('rewatching', array('label' =>'Rewatching?', 'value' => false)); echo $this->form->submit('Save!'); -?> -<?php endif; ?>
\ No newline at end of file +?>
\ No newline at end of file diff --git a/views/Anime_list/view.html.php b/views/Anime_list/view.html.php index 2dec697..4c552d8 100644 --- a/views/Anime_list/view.html.php +++ b/views/Anime_list/view.html.php @@ -41,7 +41,7 @@ echo "</table>"; <br class="cl" /> </div> <div class="grid_2"> -<button class="large" style="margin-left:40px; margin-top:10px"><a href="/animelist/add?iframe=true&height=100%&width=100%">Add</a></button> +<button class="large" style="margin-left:40px; margin-top:10px"><a href="/animelist/addsearch">Add</a></button> </div> </div> diff --git a/views/anime_list/addsearch.html.php b/views/anime_list/addsearch.html.php new file mode 100644 index 0000000..eb5cbe1 --- /dev/null +++ b/views/anime_list/addsearch.html.php @@ -0,0 +1,21 @@ + +<?= $this->form->create(null, array('method' => 'get')); ?> + <?= $this->form->text('Search', array('value' => 'Search for...')); ?> + <?= $this->form->submit('Go', array('class' => 'button')); ?> +<?= $this->form->end(); ?> +<?php if (isset($content)): ?> + <table class="table"> + <tr><th>Entry #</th><th>Name</th><th>Type</th><th>Episodes</th><th>Score</th><th>Add</th></tr> + <?php $i = 1; foreach($content as $result): ?> + <tr> + <td># <?= $i ?></td> + <td><?= $result->title ?></td> + <td><?= $result->view_type ?></td> + <td><?= $result->episode_count ?></td> + <td><?= $result->mal_score ?></td> + <td><button class="green"><a href="/animelist/add/<?= $result->special_id ?>">Add</a></button></td> + <?php $i++; ?> + </tr> + <?php endforeach; ?> + </table> +<?php endif; ?>
\ No newline at end of file |