Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
7 changed files with 55 additions and 45 deletions
Showing only changes of commit 24ea198dad - Show all commits

View File

@ -2,7 +2,7 @@
<main>
<h2>Edit Anime List Item</h2>
<form action="<?= $action ?>" method="post">
<table class="form">
<table class="invisible form">
<thead>
<tr>
<th>
@ -11,14 +11,16 @@
<h4><?= $escape->html($title) ?></h4>
<?php endforeach ?>
</th>
<th>
<article class="media">
<?= $helper->img($urlGenerator->assetUrl('images/anime', "{$item['anime']['id']}.jpg")) ?>
</article>
</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="9">
<article class="media">
<?= $helper->img($urlGenerator->assetUrl('images/anime', "{$item['anime']['id']}.jpg")) ?>
</article>
</td>
</tr>
<tr>
<td><label for="private">Is Private?</label></td>
<td>

View File

@ -16,12 +16,14 @@
<tbody>
<tr>
<td rowspan="4" class="align_center">
<article class="media">
<?= $helper->img($urlGenerator->assetUrl("images/anime/{$item['hummingbird_id']}.jpg")); ?>
</article>
</td>
</tr>
<tr>
<td class="align_right"><label for="media_id">Media</label></td>
<td class="align_left" width="100%">
<td class="align_left">
<select name="media_id" id="media_id">
<?php foreach($media_items as $id => $name): ?>
<option <?= $item['media_id'] == $id ? 'selected="selected"' : '' ?> value="<?= $id ?>"><?= $name ?></option>

View File

@ -73,8 +73,8 @@
Chapters: <span class="chapters_read"><?= $item['chapters']['read'] ?></span> /
<span class="chapter_count"><?= $item['chapters']['total'] ?></span>
</div>
</div>
<div class="row">
<?php /* </div>
<div class="row"> */ ?>
<div class="volume_completion">
Volumes: <span class="volume_count"><?= $item['volumes']['total'] ?></span>
</div>

View File

@ -4,64 +4,70 @@
Edit Manga List Item
</h2>
<form action="<?= $action ?>" method="post">
<table class="form">
<thead>
<table class="invisible form">
<thead>
<tr>
<th>
<h3><?= $escape->html($item['manga']['title']) ?></h3>
<?php foreach ($item['manga']['titles'] as $title): ?>
<h4><?= $escape->html($title) ?></h4>
<?php endforeach ?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="9">
<article class="media">
<?= $helper->img($urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg")); ?>
</article>
</th>
<th class="align_left">
<h3><?= $escape->html($item['manga']['title']) ?></h3>
<?php foreach($item['manga']['titles'] as $title): ?>
<h4><?= $escape->html($title) ?></h4>
<?php endforeach ?>
</th>
</td>
</tr>
</thead>
<tbody>
<tr>
<td><label for="status">Reading Status</label></td>
<td>
<select name="status" id="status">
<?php foreach($status_list as $val => $status): ?>
<option <?php if($item['reading_status'] === $val): ?>selected="selected"<?php endif ?>
value="<?= $val ?>"><?= $status ?></option>
<?php endforeach ?>
<?php foreach ($status_list as $val => $status): ?>
<option <?php if ($item['reading_status'] === $val): ?>selected="selected"<?php endif ?>
value="<?= $val ?>"><?= $status ?></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="new_rating" value="<?= $item['user_rating'] ?>" id="series_rating" size="2" /> / 10
<input type="number" min="0" max="10" maxlength="2" name="new_rating"
value="<?= $item['user_rating'] ?>" id="series_rating" size="2"/> / 10
</td>
</tr>
<tr>
<td><label for="chapters_read">Chapters Read</label></td>
<td>
<input type="number" min="0" name="chapters_read" id="chapters_read" value="<?= $item['chapters']['read'] ?>" /> / <?= $item['chapters']['total'] ?>
<input type="number" min="0" name="chapters_read" id="chapters_read"
value="<?= $item['chapters']['read'] ?>"/> / <?= $item['chapters']['total'] ?>
</td>
</tr>
<tr>
<td><label for="volumes_read">Volumes Read</label></td>
<td>
<?php /*<input type="number" disabled="disabled" min="0" name="volumes_read" id="volumes_read" value="" /> */ ?> - / <?= $item['volumes']['total'] ?>
<?php /*<input type="number" disabled="disabled" min="0" name="volumes_read" id="volumes_read" value="" /> */ ?>
- / <?= $item['volumes']['total'] ?>
</td>
</tr>
<tr>
<td><label for="rereading_flag">Rereading?</label></td>
<td>
<input type="checkbox" name="rereading" id="rereading_flag"
<?php if($item['rereading'] === TRUE): ?>checked="checked"<?php endif ?>
<?php if ($item['rereading'] === TRUE): ?>checked="checked"<?php endif ?>
/>
</td>
</tr>
<tr>
<td><label for="reread_count">Reread Count</label></td>
<td>
<input type="number" min="0" id="reread_count" name="reread_count" value="<?= $item['reread'] ?>" />
<input type="number" min="0" id="reread_count" name="reread_count"
value="<?= $item['reread'] ?>"/>
</td>
</tr>
<tr>
@ -73,16 +79,16 @@
<tr>
<td>&nbsp;</td>
<td>
<input type="hidden" value="<?= $item['id'] ?>" name="id" />
<input type="hidden" value="<?= $item['mal_id'] ?>" name="mal_id" />
<input type="hidden" value="<?= $item['manga']['slug'] ?>" name="manga_id" />
<input type="hidden" value="<?= $item['user_rating'] ?>" name="old_rating" />
<input type="hidden" value="true" name="edit" />
<input type="hidden" value="<?= $item['id'] ?>" name="id"/>
<input type="hidden" value="<?= $item['mal_id'] ?>" name="mal_id"/>
<input type="hidden" value="<?= $item['manga']['slug'] ?>" name="manga_id"/>
<input type="hidden" value="<?= $item['user_rating'] ?>" name="old_rating"/>
<input type="hidden" value="true" name="edit"/>
<button type="submit">Submit</button>
</td>
</tr>
</tbody>
</table>
</tbody>
</table>
</form>
<fieldset>
<legend>Danger Zone</legend>
@ -92,8 +98,8 @@
<tr>
<td>&nbsp;</td>
<td>
<input type="hidden" value="<?= $item['id'] ?>" name="id" />
<input type="hidden" value="<?= $item['mal_id'] ?>" name="mal_id" />
<input type="hidden" value="<?= $item['id'] ?>" name="id"/>
<input type="hidden" value="<?= $item['mal_id'] ?>" name="mal_id"/>
<button type="submit" class="danger">Delete Entry</button>
</td>
</tr>

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@ button {
}
table {
min-width: 85%;
/* min-width: 85%; */
margin: 0 auto;
}
@ -279,7 +279,7 @@ a:hover, a:active {
}
.form {
width: 100%;
/* width: 100%; */
}
.form thead th, .form thead tr {
@ -295,7 +295,7 @@ a:hover, a:active {
.form tr > td:nth-child(even) {
text-align: left;
width: 70%;
/* width: 70%; */
}
.invisible tbody > tr:nth-child(odd) {
@ -566,7 +566,7 @@ a:hover, a:active {
}
.manga .media {
border: 1px solid #ddd;
/* border: 1px solid #ddd; */
height: 310px;
margin: 0.25em;
}
@ -578,7 +578,7 @@ a:hover, a:active {
top: calc(50% - 22.4px);
left: 43.5px;
left: calc(50% - 66.5px);
z-index: 50;
z-index: 40;
}
.manga .media > .edit_buttons button {

View File

@ -247,7 +247,7 @@ final class Kitsu {
$isSubset = mb_substr_count($existing, $title) > 0;
$diff = levenshtein(mb_strtolower($existing), mb_strtolower($title));
if ($diff <= 4 || $isSubset || mb_strlen($title) > 40 || mb_strlen($existing) > 40)
if ($diff <= 4 || $isSubset || mb_strlen($title) > 45 || mb_strlen($existing) > 50)
{
return FALSE;
}