From ff8c837fd9134d5e7108bed496a3b1b5d6b3a156 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 21 Dec 2023 13:46:15 -0500 Subject: [PATCH] Update views and templates to use render helper object --- app/templates/anime-cover.php | 20 ++++----- app/templates/manga-cover.php | 12 +++--- app/views/anime/add.php | 2 +- app/views/anime/cover.php | 12 +++--- app/views/anime/details.php | 28 ++++++------ app/views/anime/edit.php | 12 +++--- app/views/anime/list.php | 22 +++++----- app/views/character/details.php | 32 +++++++------- app/views/collection/add.php | 2 +- app/views/collection/cover-item.php | 8 ++-- app/views/collection/cover.php | 10 ++--- app/views/collection/edit.php | 8 ++-- app/views/collection/list-item.php | 8 ++-- app/views/collection/list.php | 13 +++--- app/views/footer.php | 2 +- app/views/header.php | 34 +++++++-------- app/views/history.php | 4 +- app/views/login.php | 4 +- app/views/main-menu.php | 66 ++++++++++++++--------------- app/views/manga/add.php | 2 +- app/views/manga/cover.php | 8 ++-- app/views/manga/details.php | 12 +++--- app/views/manga/edit.php | 12 +++--- app/views/manga/list.php | 14 +++--- app/views/message.php | 4 +- app/views/person/details.php | 18 ++++---- app/views/settings/_anilist.php | 10 ++--- app/views/settings/_field.php | 2 +- app/views/settings/_form.php | 2 +- app/views/settings/_subfield.php | 2 +- app/views/settings/settings.php | 4 +- app/views/setup-check.php | 2 +- app/views/user/details.php | 56 +++++++++++------------- 33 files changed, 218 insertions(+), 229 deletions(-) diff --git a/app/templates/anime-cover.php b/app/templates/anime-cover.php index 0965d29f..900faac3 100644 --- a/app/templates/anime-cover.php +++ b/app/templates/anime-cover.php @@ -4,13 +4,13 @@ data-anilist-id="" data-mal-id="" > - isAuthenticated()): ?> + isAuthenticated()): ?> - img($item['anime']['cover_image'], ['width' => 220, 'loading' => 'lazy']) ?> + h->img($item['anime']['cover_image'], ['width' => 220, 'loading' => 'lazy']) ?>
- +
@@ -50,7 +50,7 @@
- img("/public/images/{$link['meta']['image']}", [ + h->img("/public/images/{$link['meta']['image']}", [ 'class' => 'streaming-logo', 'width' => 20, 'height' => 20, @@ -58,7 +58,7 @@ ]); ?> - img("/public/images/{$link['meta']['image']}", [ + h->img("/public/images/{$link['meta']['image']}", [ 'class' => 'streaming-logo', 'width' => 20, 'height' => 20, @@ -70,11 +70,11 @@
- isAuthenticated()): ?> + isAuthenticated()): ?>
-
html($item['anime']['show_type']) ?>
-
html($item['airing']['status']) ?>
-
html($item['anime']['age_rating']) ?>
+
escape->html($item['anime']['show_type']) ?>
+
escape->html($item['airing']['status']) ?>
+
escape->html($item['anime']['age_rating']) ?>
\ No newline at end of file diff --git a/app/templates/manga-cover.php b/app/templates/manga-cover.php index 4b3f58ef..f1372c2e 100644 --- a/app/templates/manga-cover.php +++ b/app/templates/manga-cover.php @@ -1,25 +1,25 @@
- isAuthenticated()): ?> + isAuthenticated()): ?> - img($item['manga']['image'], ['width' => 220, 'loading' => 'lazy']) ?> + h->img($item['manga']['image'], ['width' => 220, 'loading' => 'lazy']) ?>
- isAuthenticated()): ?> + isAuthenticated()): ?>
urlFromRoute('edit', [ 'controller' => 'manga', 'id' => $item['id'], 'status' => $name diff --git a/app/views/anime/add.php b/app/views/anime/add.php index d378f00a..7d52f8ae 100644 --- a/app/views/anime/add.php +++ b/app/views/anime/add.php @@ -1,4 +1,4 @@ -isAuthenticated()): ?> +isAuthenticated()): ?>

Add Anime to your List

diff --git a/app/views/anime/cover.php b/app/views/anime/cover.php index 96cdf359..ca1e049a 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -1,6 +1,6 @@
-isAuthenticated()): ?> -Add Item +isAuthenticated()): ?> +Add Item

There's nothing here!

@@ -11,16 +11,16 @@ $items): ?>
-

html($name) ?>

+

escape->html($name) ?>

There's nothing here!

-

html($name) ?>

+

escape->html($name) ?>

- isAuthenticated()) continue; ?> - animeCover($item) ?> + isAuthenticated()) continue; ?> + component->animeCover($item) ?>
diff --git a/app/views/anime/details.php b/app/views/anime/details.php index 99e89f4f..754d78b7 100644 --- a/app/views/anime/details.php +++ b/app/views/anime/details.php @@ -4,9 +4,9 @@ use function Aviat\AnimeClient\friendlyTime; ?>
-
+