Do you wish to register an account?
Browse Source

Adjust layout of edit pages

tags/v4.0.0^2
Timothy Warren 1 year ago
parent
commit
24ea198dad
7 changed files with 54 additions and 44 deletions
  1. +7
    -5
      app/views/anime/edit.php
  2. +3
    -1
      app/views/collection/edit.php
  3. +2
    -2
      app/views/manga/cover.php
  4. +35
    -29
      app/views/manga/edit.php
  5. +1
    -1
      public/css/app.min.css
  6. +5
    -5
      public/css/base.css
  7. +1
    -1
      src/API/Kitsu.php

+ 7
- 5
app/views/anime/edit.php 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>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="9">
<article class="media">
<?= $helper->img($urlGenerator->assetUrl('images/anime', "{$item['anime']['id']}.jpg")) ?>
</article>
</th>
</td>
</tr>
</thead>
<tbody>
<tr>
<td><label for="private">Is Private?</label></td>
<td>


+ 3
- 1
app/views/collection/edit.php 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>


+ 2
- 2
app/views/manga/cover.php 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>


+ 35
- 29
app/views/manga/edit.php 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>


+ 1
- 1
public/css/app.min.css
File diff suppressed because it is too large
View File


+ 5
- 5
public/css/base.css 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 {


+ 1
- 1
src/API/Kitsu.php 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;
}


Loading…
Cancel
Save