summaryrefslogtreecommitdiffstats
path: root/views/Anime_list
diff options
context:
space:
mode:
Diffstat (limited to 'views/Anime_list')
-rw-r--r--views/Anime_list/add.html.php33
-rw-r--r--views/Anime_list/index.html3
-rw-r--r--views/Anime_list/index.html.php74
-rw-r--r--views/Anime_list/view.html.php84
4 files changed, 194 insertions, 0 deletions
diff --git a/views/Anime_list/add.html.php b/views/Anime_list/add.html.php
new file mode 100644
index 0000000..5e9699a
--- /dev/null
+++ b/views/Anime_list/add.html.php
@@ -0,0 +1,33 @@
+<?php if (empty($anime)): ?>
+<p> Anime not found </p>
+<?php else: ?>
+<h1><?= $anime->series_title ?></h1>
+<?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>
+ */
+
+ 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->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->submit('Save!');
+?>
+<?php endif; ?> \ No newline at end of file
diff --git a/views/Anime_list/index.html b/views/Anime_list/index.html
new file mode 100644
index 0000000..ad9911a
--- /dev/null
+++ b/views/Anime_list/index.html
@@ -0,0 +1,3 @@
+<h1><?= $user->username ?>'s AnimeList</h1>
+
+<?= print_r($watching); ?> \ No newline at end of file
diff --git a/views/Anime_list/index.html.php b/views/Anime_list/index.html.php
new file mode 100644
index 0000000..abe931b
--- /dev/null
+++ b/views/Anime_list/index.html.php
@@ -0,0 +1,74 @@
+<h1><?= $user->username ?>'s AnimeList</h1>
+<hr/>
+<table><tr><?= $this->html->link("Completed", "/animelist/view/$user->username/completed"); ?> </tr></table>
+
+<?php if (isset($watching)): ?>
+<h2 class="ribbon">Watching</h2><button value="Add" style="float:right">
+<tr><th>Entry #</th><th>Anime Title</th><th>Score</th><th>Type</th><th>Progress</th></tr>
+<?php $i = 1; ?>
+<?php foreach ($watching as $anime): ?>
+ <tr>
+ <td><?= $i ?></td>
+ <td><?= $anime->series_title ?></td>
+ <td><?= ($anime->my_score != 0) ? $anime->my_score : "-"; ?></td>
+ <td><?= $anime->series_type ?></td>
+ <td><?= $anime->my_watched_episodes ?>/<?= ($anime->series_episodes != 0) ? $anime->series_episodes : "-"; ?></td>
+ </tr>
+<?php $i += 1; ?>
+<?php endforeach; ?>
+</table>
+<?php endif; ?>
+
+<?php if (isset($planning)): ?>
+<h2 class="ribbon">Plans to Watch</h2>
+<table>
+<tr><th>Entry #</th><th>Anime Title</th><th>Score</th><th>Type</th><th>Progress</th></tr>
+<?php $i = 1; ?>
+<?php foreach ($planning as $anime): ?>
+ <tr>
+ <td><?= $i ?></td>
+ <td><?= $anime->series_title ?></td>
+ <td><?= ($anime->my_score != 0) ? $anime->my_score : "-"; ?></td>
+ <td><?= $anime->series_type ?></td>
+ <td><?= $anime->my_watched_episodes ?>/<?= ($anime->series_episodes != 0) ? $anime->series_episodes : "-"; ?></td>
+ </tr>
+<?php $i += 1; ?>
+<?php endforeach; ?>
+</table>
+<?php endif; ?>
+
+<?php if(isset($paused)): ?>
+<h2 class="ribbon">Paused</h2>
+<table>
+<tr><th>Entry #</th><th>Anime Title</th><th>Score</th><th>Type</th><th>Progress</th></tr>
+<?php $i = 1; ?>
+<?php foreach ($paused as $anime): ?>
+ <tr>
+ <td><?= $i ?></td>
+ <td><?= $anime->series_title ?></td>
+ <td><?= ($anime->my_score != 0) ? $anime->my_score : "-"; ?></td>
+ <td><?= $anime->series_type ?></td>
+ <td><?= $anime->my_watched_episodes ?>/<?= ($anime->series_episodes != 0) ? $anime->series_episodes : "-"; ?></td>
+ </tr>
+<?php $i += 1; ?>
+<?php endforeach; ?>
+</table>
+<?php endif; ?>
+
+<?php if (isset($dropped)): ?>
+<h2 class="ribbon">Dropped</h2>
+<table>
+<tr><th>Entry #</th><th>Anime Title</th><th>Score</th><th>Type</th><th>Progress</th></tr>
+<?php $i = 1; ?>
+<?php foreach ($dropped as $anime): ?>
+ <tr>
+ <td><?= $i ?></td>
+ <td><?= $anime->series_title ?></td>
+ <td><?= ($anime->my_score != 0) ? $anime->my_score : "-"; ?></td>
+ <td><?= $anime->series_type ?></td>
+ <td><?= $anime->my_watched_episodes ?>/<?= ($anime->series_episodes != 0) ? $anime->series_episodes : "-"; ?></td>
+ </tr>
+<?php $i += 1; ?>
+<?php endforeach; ?>
+</table>
+<?php endif; ?> \ No newline at end of file
diff --git a/views/Anime_list/view.html.php b/views/Anime_list/view.html.php
new file mode 100644
index 0000000..2dec697
--- /dev/null
+++ b/views/Anime_list/view.html.php
@@ -0,0 +1,84 @@
+<h2 class="ribbon full"><a style="color: #FFFFFF" href="/profile/view/<?= $user->username ?>"><?= $user->username ?>'s</a> AnimeList</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>
+<td><?= $this->html->link("Plans to Watch", "#planning", array('class' => 'anchorLink')); ?> </td>
+<td><?= $this->html->link("On-Hold", "#paused", array('class' => 'anchorLink')); ?> </td>
+<td><?= $this->html->link("Dropped", "#dropped", array('class' => 'anchorLink')); ?> </td>
+</tr>
+</table>
+<?php function tableHelper($input, &$t) {
+echo '<table class="table">';
+echo "<tr><th>Entry #</th><th>Anime Title</th><th>Score</th><th>Type</th><th>Progress</th></tr>";
+$i = 1;
+foreach ($input as $anime) {
+ echo '<tr>';
+ echo "<td> $i </td>";
+ echo "<td> <a href=\"/anime/view/$anime->series_animedb_id/\">$anime->series_title </a></td>";
+ echo "<td>";
+ echo ($anime->my_score != 0) ? $anime->my_score : "-";
+ echo "</td>";
+ echo "<td> $anime->series_type </td>";
+ echo "<td>";
+ echo $anime->my_watched_episodes;
+ echo "/";
+ echo ($anime->series_episodes != 0) ? $anime->series_episodes : "-";
+ echo "</td>";
+ echo "</tr>";
+$i += 1;
+}
+echo "</table>";
+}
+?>
+
+<div class="two_col container_12">
+<div class="grid_10">
+<?php if (isset($watching)): ?>
+<a name="watching" id="watching"><h2 class="ribbon">Watching</h2></a>
+<div class="triangle-ribbon"></div>
+<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>
+</div>
+</div>
+
+
+<?php tableHelper($watching, $this); ?>
+<?php endif; ?>
+
+<?php if (isset($finished)): ?>
+ <a name="finished" id="finished"><h2 class="ribbon">Finished Animes</h2></a>
+ <div class="triangle-ribbon"></div>
+ <br class="cl" />
+ <?php tableHelper($finished, $this); ?>
+<?php endif; ?>
+
+
+<?php if (isset($planning)): ?>
+<a name="planning" id="planning"><h2 class="ribbon">Plans to Watch</h2></a>
+<div class="triangle-ribbon"></div>
+<br class="cl" />
+
+<?php tableHelper($planning, $this); ?>
+<?php endif; ?>
+
+<?php if(isset($paused)): ?>
+<a name="paused" id="paused"><h2 class="ribbon">Paused</h2></a>
+<div class="triangle-ribbon"></div>
+<br class="cl" />
+
+<?php tableHelper($paused, $this); ?>
+<?php endif; ?>
+
+<?php if (isset($dropped)): ?>
+
+
+<a name="dropped" id="dropped"><h2 class="ribbon">Dropped</h2></a>
+<div class="triangle-ribbon"></div>
+<br class="cl" />
+
+<?php tableHelper($dropped, $this); ?>
+<?php endif; ?> \ No newline at end of file