Commit graph

563 commits

Author SHA1 Message Date
Alex Cabal
59083baf8c Fix validation of existing artwork name when creating a new artwork 2025-01-24 09:37:13 -06:00
Alex Cabal
bddbfe3cfa Don't list authors more than once in sitemap 2025-01-22 09:54:05 -06:00
Mike Colagrosso
5b5c75b2c8 Remove apostrophes, don't preserve them
Searching by `UrlName`, now for both `Artwork` and `Artist`, is clearer.
Take care to remove the apostrophes outright, don't replace them with a
space because otherwise the letter after the apostrophe becomes its own
term to match.

Follow up to the fix for #461
2025-01-18 11:03:05 -06:00
Mike Colagrosso
bb7fe5d1ac Search artwork by UrlName
`Artwork::GetAllByFilter()` is already removing diacritics from search
terms, and `UrlName` stores the artist's name with diacritics removed by
calling `Formatter::MakeUrlSafe()`.

Keeping the search by `Name` because `Formatter::MakeUrlSafe()` makes
other changes to the name, too.

Fixes #461
2025-01-18 11:03:05 -06:00
Alex Cabal
db8d422133 Simplify validation logic 2025-01-15 16:16:45 -06:00
Mike Colagrosso
38f4e34a11 Match Contributor UrlName to Identifier
Fixes #459
2025-01-15 15:47:04 -06:00
Alex Cabal
e85d833bad When adding an artwork ebook URL, confirm that that ebook exists 2025-01-13 20:30:46 -06:00
Alex Cabal
284898a805 Replace ' with ’ in contributor names 2025-01-10 12:07:59 -06:00
Alex Cabal
c36d1ac3d3 Rename exception for consistency 2025-01-09 14:08:54 -06:00
Alex Cabal
94d62fdcdf Fix exception for duplicate ebook placeholder on save 2025-01-09 14:07:40 -06:00
Alex Cabal
d9fe3e9303 Fix error handling for duplicate ebook placeholders 2025-01-09 14:00:50 -06:00
Alex Cabal
affe29e83c Fix type issue 2025-01-08 19:33:43 -06:00
Alex Cabal
bc16b1fff8 Add endpoint to get reviewer for an in-progress project 2025-01-07 21:42:51 -06:00
Alex Cabal
87620287f1 Don't check max string length for ebook description 2025-01-07 10:12:04 -06:00
Alex Cabal
13eb02842a Tweak donation banner end date 2025-01-07 10:12:04 -06:00
Alex Cabal
343d92f7c9 Tweak drive ending times 2025-01-06 10:30:08 -06:00
Alex Cabal
7aa610168d Resolve Google Groups URL redirects 2025-01-03 18:46:46 -06:00
Alex Cabal
9b959e3eda Don't show year for updated dates in current year of project table 2025-01-03 13:43:59 -06:00
Mike Colagrosso
0e7bff5d82 Rewrite MultiTableSelect queries with ON
Instead of `USING(EbookId)`, it would be easier to handle
`MultiTableSelect` queries in `FromMultiTableRow()` if the queries used

`ON Projects.EbookId = Ebooks.Ebooks`

This is because `USING` will return only one `EbookId` column, but `ON`
will return all columns from both tables.
2025-01-02 09:57:45 -06:00
Alex Cabal
bcba5c2192 Remove now-redundant PD placeholders code 2025-01-01 10:05:59 -06:00
Mike Colagrosso
f0bfa7a43b Rewrite DeleteUnused() queries using new indices 2024-12-31 22:31:00 -06:00
Alex Cabal
9abae874f6 Fix sort order of collection placeholders with no sequence 2024-12-31 14:21:59 -06:00
Alex Cabal
b8c4de4b20 Change order of collection sorting 2024-12-31 10:32:57 -06:00
Alex Cabal
616b9677a9 Fix donation progress bar 2024-12-30 22:04:09 -06:00
Alex Cabal
53fe66a364 Initialize empty values for some image URLs 2024-12-29 15:10:41 -06:00
Alex Cabal
c43c4fa2dd Tweak wanted list appearance 2024-12-28 19:14:04 -06:00
Mike Colagrosso
2d5cba0aaa Rename function to Ebook::GetByIsWantedAndDifficulty() 2024-12-28 14:18:08 -06:00
Mike Colagrosso
e25993b208 Add parameter to MarkdownToHtml for inline HTML 2024-12-28 14:18:08 -06:00
Mike Colagrosso
5b605a00b7 Populate the wanted list from DB placeholders 2024-12-28 14:18:08 -06:00
Mike Colagrosso
0359119a11 Add Formatter::MarkdownToInlineHtml()
HTML without the surrounding `<p>` tags will be useful to show
placeholder notes to admins on the wanted ebooks page.

Examples of generating block-level and inline HTML:

https://github.com/erusev/parsedown/wiki/Tutorial:-Get-Started
2024-12-28 14:18:08 -06:00
Alex Cabal
617d27ec92 Tweak comment 2024-12-27 21:21:57 -06:00
Mike Colagrosso
d6dd10be9c Clean up unused Tags, LocSubjects, and Collections
On `Ebook::Save()` and `Ebook::Delete()`, remove any unreferenced `Tag`,
`LocSubject`, and `Collection` records. These are analogous to these lines in
`Ebook::Create()`:

```
$this->CreateTags();
$this->CreateLocSubjects();
$this->CreateCollections();
```

`EbookPlaceholder`s can't have `Tags` or `LocSubjects` at the moment, but other
mistakes in production that are later corrected could leave unused `Tags` and
`LocSubjects`.

Context: https://github.com/standardebooks/web/pull/447#issuecomment-2555734692
2024-12-26 12:10:13 -06:00
Alex Cabal
d94c057e20 Don't send a new project email if the manager, reviewer, and producer are all the same 2024-12-23 12:10:49 -06:00
Alex Cabal
ac56d2d896 Don't allow the manager or reviewer to be the same as the ebook producer 2024-12-22 19:52:31 -06:00
Alex Cabal
ad4b5423db Don't send admin email for returning Patrons 2024-12-21 21:19:07 -06:00
Alex Cabal
b4003b30e2 Improve project sorting by title 2024-12-19 22:55:55 -06:00
Alex Cabal
8e8cbb0c5e Move delete form and more multi select fixes 2024-12-19 14:40:38 -06:00
Alex Cabal
93b8008c7e Add missing MultiTableSelect code 2024-12-19 14:25:48 -06:00
Mike Colagrosso
d0d79d637c Add form to delete placeholders 2024-12-19 14:21:25 -06:00
Alex Cabal
98e09f414e Allow creating new ebook placeholders when creating a new project 2024-12-18 22:23:57 -06:00
Alex Cabal
4596aeb007 Allow projects to auto-assign managers and reviewers 2024-12-18 20:57:21 -06:00
Alex Cabal
378555d131 Show improved project details on placeholder page 2024-12-18 15:54:06 -06:00
Alex Cabal
7a6a743295 Some type check fixes 2024-12-18 15:03:44 -06:00
Alex Cabal
a46ff8e137 Fix Github URL validation in projects 2024-12-18 14:58:04 -06:00
Alex Cabal
a1da50fc1a Sort projects by ebook title 2024-12-18 14:28:07 -06:00
Alex Cabal
b2191d1219 Allow editing of projects 2024-12-18 14:20:28 -06:00
Alex Cabal
806939ca49 Replace Template::Emit...() functions with more generic function 2024-12-18 13:14:16 -06:00
Mike Colagrosso
f449c024ea Add /edit endpoint to update placeholders 2024-12-18 12:58:18 -06:00
Alex Cabal
28b7384769 Set ebook placeholders to not be in progress when a project is marked as abandoned 2024-12-16 23:54:40 -06:00
Alex Cabal
7a3c7ad503 Allow VCS URLs to be null in projects 2024-12-16 21:48:01 -06:00