Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
875 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php if ($auth->is_authenticated()): ?> | ||
<main> | ||
<h2>Add Anime to your List</h2> | ||
<form action="<?= $action_url ?>" method="post"> | ||
<section> | ||
<label for="search">Search for anime by name: <input type="search" id="search" /></label> | ||
<section id="series_list" class="media-wrap"> | ||
</section> | ||
</section> | ||
<br /> | ||
<table class="form"> | ||
<tbody> | ||
<tr> | ||
<td><label for="status">Watching Status</label></td> | ||
<td> | ||
<select name="status" id="status"> | ||
<?php foreach($status_list as $status_key => $status_title): ?> | ||
<option value="<?= $status_key ?>"><?= $status_title ?></option> | ||
<?php endforeach ?> | ||
</select> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> </td> | ||
<td> | ||
<button type="submit">Save</button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</form> | ||
</main> | ||
<template id="show_list"> | ||
<article class="media"> | ||
<div class="name"><label><input type="radio" name="id" value="{{:slug}}" /> <span>{{:title}}<br />{{:alternate_title}}</span></label></div> | ||
<img src="{{:cover_image}}" alt="{{:title}}" /> | ||
</article> | ||
</template> | ||
<script src="<?= $urlGenerator->asset_url('js.php?g=anime_collection') ?>"></script> | ||
<?php endif ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,89 @@ | ||
<body> | ||
<?php include 'nav.php' ?> | ||
<?php if ($auth->is_authenticated()): ?> | ||
<main> | ||
<h2>Edit Anime List Item</h2> | ||
<form action="<?= $action ?>" method="post"> | ||
<table class="form"> | ||
<thead> | ||
<tr> | ||
<th> | ||
<h3><?= $escape->html($item['anime']['title']) ?></h3> | ||
<?php if($item['anime']['alternate_title'] != ""): ?> | ||
<h4><?= $escape->html($item['anime']['alternate_title']) ?></h4> | ||
<?php endif ?> | ||
</th> | ||
<th> | ||
<article class="media"> | ||
<?= $helper->img($item['anime']['image']); ?> | ||
</article> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td><label for="private">Is Private?</label></td> | ||
<td> | ||
<input type="checkbox" name="private" id="private" | ||
<?php if($item['private']): ?>checked="checked"<?php endif ?> | ||
/> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><label for="watching_status">Watching Status</label></td> | ||
<td> | ||
<select name="watching_status" id="watching_status"> | ||
<?php foreach($statuses as $status_key => $status_title): ?> | ||
<option <?php if($item['watching_status'] === $status_key): ?>selected="selected"<?php endif ?> | ||
value="<?= $status_key ?>"><?= $status_title ?></option> | ||
<?php endforeach ?> | ||
</select> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><label for="series_rating">Rating</label></td> | ||
<td> | ||
<input type="number" min="0" max="10" maxlength="2" name="user_rating" id="series_rating" value="<?= $item['user_rating'] ?>" id="series_rating" size="2" /> / 10 | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><label for="episodes_watched">Episodes Watched</label></td> | ||
<td> | ||
<input type="number" min="0" size="4" maxlength="4" value="<?= $item['episodes']['watched'] ?>" name="episodes_watched" id="episodes_watched" /> | ||
<?php if($item['episodes']['total'] > 0): ?> | ||
/ <?= $item['episodes']['total'] ?> | ||
<?php endif ?> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><label for="rewatching_flag">Rewatching?</label></td> | ||
<td> | ||
<input type="checkbox" name="rewatching" id="rewatching_flag" | ||
<?php if($item['rewatching'] === TRUE): ?>checked="checked"<?php endif ?> | ||
/> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><label for="rewatched">Rewatch Count</label></td> | ||
<td> | ||
<input type="number" min="0" id="rewatched" name="rewatched" value="<?= $item['rewatched'] ?>" /> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td><label for="notes">Notes</label></td> | ||
<td> | ||
<textarea name="notes" id="notes"><?= $escape->html($item['notes']) ?></textarea> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> </td> | ||
<td> | ||
<input type="hidden" value="<?= $item['anime']['slug'] ?>" name="id" /> | ||
<input type="hidden" value="true" name="edit" /> | ||
<button type="submit">Submit</button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</form> | ||
</main> | ||
</body> | ||
</html> | ||
<script src="<?= $urlGenerator->asset_url('js.php?g=edit') ?>"></script> | ||
<?php endif ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.