Commit graph

102 commits

Author SHA1 Message Date
Alex Cabal
afab78af46 PHPStan corrections 2025-05-07 22:02:27 -05:00
Alex Cabal
97c2fbeb61 Catch file too large error in artworks 2025-05-04 22:33:52 -05:00
Alex Cabal
7da87bf9e2 Use enums for HTTP methods in search forms 2025-03-31 12:05:32 -05:00
Alex Cabal
dc84ff3fa9 Style tweaks 2025-03-10 14:38:54 -05:00
Mike Colagrosso
af956b2714
Replace EbookUrl with EbookId in Artworks (#482)
* Replace `EbookUrl` with `EbookId` in `Artworks`

* Add a `FullUrl` member to `Ebook`

Add documentation about when to use it versus Url.

The full URL is also being used as an ID in RSS feeds, so use `FullUrl` there.

* Store an `EbookId` in `Artworks`
2025-03-10 14:33:20 -05:00
Alex Cabal
4446b6d161 Add breadcrumb to new artwork form 2025-03-07 13:40:37 -06:00
Alex Cabal
34fd71e55a Tweak wording on delete artist page and add some more breadcrumbs 2025-03-07 10:37:56 -06:00
Alex Cabal
124e8343fc Completely type hint template functions and switch to named arguments 2025-03-04 20:32:20 -06:00
Alex Cabal
9d1b66d19e Update PHPStan and Safe PHP, and review codebase for further type correctness 2025-02-25 22:41:18 -06:00
Mike Colagrosso
e25993b208 Add parameter to MarkdownToHtml for inline HTML 2024-12-28 14:18:08 -06:00
Alex Cabal
7df973bea2 Fix wrong catch block in artwork upload 2024-12-26 17:09:38 -06:00
Alex Cabal
e51cc4395e Tweak some styling 2024-12-18 15:58:50 -06:00
Alex Cabal
806939ca49 Replace Template::Emit...() functions with more generic function 2024-12-18 13:14:16 -06:00
Alex Cabal
59a2d30d23 Remove @required attributes from hidden forms 2024-12-14 19:28:30 -06:00
Mike Colagrosso
1ab95df084 Add placeholders for ebooks 2024-12-13 11:46:36 -06:00
Alex Cabal
95d1b9e02e Code formatting 2024-12-13 09:07:27 -06:00
Mike Colagrosso
cae8271ecb Set ReviewerUserId only if Status changed
For non-admin reviewers (i.e., without `CanReviewOwnArtwork`), the `PATCH` form
has a hidden element with the artwork's current `Status`. If the reviewer
updates the `EbookUrl` and not `Status`, then don't record the reviewer's
`ReviewerUserId` because they didn't review or change the `Status`.

Side note: Sending the `PATCH` form an invalid `Status` will result in a
validation error, but that validation error was hard to read because it was the
wrong exception type. This commit adds a new `InvalidArtworkStatusException` to
fix that.

Fixes #433
2024-12-13 09:06:57 -06:00
Alex Cabal
8ad3291a35 Add admin form to view and edit users 2024-11-23 14:30:11 -06:00
Alex Cabal
11d9d0f44a Tweak a session variable name and update comments 2024-11-20 16:42:24 -06:00
Alex Cabal
3050ab7219 Use HTTP code enums instead of ints 2024-11-20 14:52:05 -06:00
Alex Cabal
05ac7884e9 Convert artwork filters to enums 2024-11-15 23:11:01 -06:00
Alex Cabal
8546039b97 Comment formatting 2024-11-15 21:40:56 -06:00
Alex Cabal
b7b63a4be5 Refactor functions out of Library 2024-11-10 23:05:31 -06:00
Alex Cabal
1449148989 Switch logged in user to static typed variable instead of in $GLOBALS 2024-11-10 23:05:31 -06:00
Alex Cabal
acb30b897c Add PropertyFromHttp trait and update codebase to use new pattern 2024-11-10 22:23:43 -06:00
Alex Cabal
be5574eaec Move enums into their own namespace 2024-11-08 16:34:21 -06:00
Alex Cabal
f97539f399 Redirect an artwork if it's found under an artist's alternate name. 2024-11-03 15:15:07 -06:00
Alex Cabal
545f82a672 Tweak wording on artwork submission page 2024-09-12 21:58:44 -05:00
Alex Cabal
09a91a998e Update framework standards 2024-09-12 21:45:28 -05:00
Alex Cabal
487bf7b1df Improve artwork DB form 2024-07-25 12:44:12 -05:00
Alex Cabal
0be1df204e Tweak artwork header for logged in users 2024-07-25 12:39:32 -05:00
Alex Cabal
135e4ac70c Move @autocomplete attributes to <form> parent 2024-07-19 11:20:37 -05:00
Mike Colagrosso
ad9bdde32d Use array shapes in PHPDoc for FilterArtwork 2024-07-06 15:02:47 -05:00
Alex Cabal
c51fe594bf Fix artwork validation logic 2024-06-03 13:14:37 -05:00
Alex Cabal
b2e6499865 Tweak some variable names for consistency 2024-05-25 22:17:09 -05:00
Alex Cabal
4574b55cac Fix some exception logic 2024-05-24 22:57:58 -05:00
Alex Cabal
fcca4fc417 Make session variable names follow boolean patterns 2024-05-24 20:51:30 -05:00
Alex Cabal
98f45ea4e0 Add the HttpInput::File() and HttpInput::Date() method 2024-05-24 20:48:28 -05:00
Alex Cabal
dfb43e0fa4 Add more type hints 2024-05-16 12:47:01 -05:00
Alex Cabal
a9eab552ab Flesh out some PHPDocs, and consistently name enums 2024-05-14 15:40:56 -05:00
Alex Cabal
acb6b2949f Use static class names instead of strings when getting objects from the DB 2024-05-13 14:49:28 -05:00
Alex Cabal
110c091a7b Define some constants to make HTTP input code less wordy 2024-05-12 12:29:30 -05:00
Alex Cabal
ee7c8343dd Convert some constants to enums 2024-05-11 21:51:06 -05:00
Alex Cabal
8cc661015c Add enum for view type and fix some type hints 2024-05-08 11:22:28 -05:00
Alex Cabal
7c8463d297 Add <link rel="canonical"> to some pages 2024-05-08 11:01:18 -05:00
Alex Cabal
00619080a8 Add icons to form elements across site, and remove some CSS classes in favor of :has() 2024-04-15 20:36:56 -05:00
Alex Cabal
3561cc1e3b Remove obsolete info message in artwork edit form 2024-04-14 22:34:15 -05:00
Alex Cabal
8e63a6c06b Don't overwrite artwork status when editing an artwork 2024-02-11 14:05:51 -06:00
Mike Colagrosso
94dce1009a Refactor Library::FilterArtwork and artworks/index.php to accept ArtworkSort 2024-01-30 11:10:05 -06:00
Mike Colagrosso
004a4a27c3 Convert SORT_COVER_ constants to an enum 2024-01-30 11:10:05 -06:00