Commit Graph

40 Commits

Author SHA1 Message Date
barnold 179be1f700 De-hardcode the book count. 2022-10-12 19:09:06 +01:00
barnold 24fbcf708b Put the about-page under the book controller. 2022-09-29 13:18:03 +01:00
barnold 4c6d5bf321 Start getting rid of login-logout. Home page shows books. 2022-09-29 12:37:03 +01:00
barnold 501736f901 Change handling of beyond-last-page...
Redirect to the last page instead of to 404.
2022-09-29 11:15:40 +01:00
barnold 5cc21a2e7a Take the rpp preference out of auth...
and put it in the layout. The form response now redirects back to the current
page. Catch: if on the last page and you increase rpp, it redirects beyond
the last page and therefore 404s.
2022-09-29 10:59:37 +01:00
barnold 07fdc53c95 More checks against invalid input. 2022-09-22 17:33:27 +01:00
barnold ff61ab78a9 Add minimum book count as authors search criterion. 2022-09-22 13:27:01 +01:00
barnold 3ef9852367 Add "author like" as book search criterion. 2022-09-22 11:39:00 +01:00
barnold e74686dd34 Delete the session on logout...
else the rows-per-page preference lingers on.
2022-09-20 14:20:27 +01:00
barnold 92a01126a4 More parameter checking and a custom not-found page. 2022-09-20 11:33:08 +01:00
barnold d70f5d3a6d Add some robustness against bogus parameters. 2022-09-20 10:15:59 +01:00
barnold f2418a1e59 Author page shows paged list of author's books. 2022-09-19 17:57:27 +01:00
barnold e2748bd642 Begin paged list of books on author page. 2022-09-19 17:42:28 +01:00
barnold 2ac594269d Make rows-per-page a user preference. 2022-09-19 11:50:01 +01:00
barnold 6ea53c5657 More on rows-per-page...
Added helpers and updated MyModel with a view to making rows-per-page
a user preference.
2022-09-19 10:04:57 +01:00
barnold 3dc4410342 Rename some things for clarity. 2022-09-18 17:31:01 +01:00
barnold a1aeb653bf Begin a view-author page. 2022-09-18 17:17:30 +01:00
barnold 106c859e64 Switched to url_with for page navigation...
since it inherits query parameters for me, simplifying things.
Thanks to kraih[m] on #mojo for help.
2022-09-18 14:46:57 +01:00
barnold f4c2fa85a9 Add author page. 2022-09-18 14:09:17 +01:00
barnold 56f8a40e14 Get book-specific code out of the page-navigation things...
with a view to reusing in an author page later.
2022-09-18 13:48:13 +01:00
barnold a172325e4c Search + paging partially working. 2022-09-18 12:18:15 +01:00
barnold 143dcc9bdc Can page to first, prev, next, last. 2022-09-17 16:05:45 +01:00
barnold bd3d4c5584 More on paging...
Moved the book page out of auth.  Can now advance through pages.
2022-09-17 15:27:01 +01:00
barnold e87ec1c05b Make a start on paging. 2022-09-17 15:06:11 +01:00
barnold 7c42f38daa Try putting db access into a model. 2022-09-15 13:48:38 +01:00
barnold 32302755f3 Add a simple database query plus test. 2022-09-15 11:52:31 +01:00
barnold 2184cb2931 Remove the more experimental pages. 2022-09-15 09:05:57 +01:00
barnold bce8bbeb1c Add an About page. 2022-09-15 08:52:05 +01:00
barnold a3c8a8ae8e Rename the Index controller to Home and move its template. 2022-09-15 08:43:17 +01:00
barnold d2f57b307c First attempt at a "protected" page...
The book page now requires login.  Failing that, the app redirects to
the login form and on login redirects to the book page.
2022-09-14 20:30:01 +01:00
barnold 153aea86e9 Keep the attempted name on failed login. 2022-09-14 19:49:50 +01:00
barnold f8645d294c Use "flash" for failed login. 2022-09-14 19:22:33 +01:00
barnold eb5a57bc21 Some template cleanup. 2022-09-14 19:05:57 +01:00
barnold 815054573e More auth things. 2022-09-14 17:58:34 +01:00
barnold cc07ccc099 Use session. 2022-09-14 11:56:03 +01:00
barnold 865c78c693 Add beginnings of login. 2022-09-14 11:45:49 +01:00
barnold ace42f33ea Add a book page...
This goes more with the flow by putting the template in a directory
named after the controller.  The controller doesn't need to identify
the template.
2022-09-14 09:26:59 +01:00
barnold c7d41ba2ff Add another Controller. 2022-09-13 20:39:45 +01:00
barnold bac3f3f480 Add a simple Controller. 2022-09-13 20:03:50 +01:00
barnold a017600c85 Use "mojo generate app MyApp" to add things...
Added files and directories as generated, based on
Mojolicious::Guides::Growing.  The generator expects the root
directory to be named 'my_app', which mine wasn't.  So I symlinked my
directory, ~/src/mojo-tutorial.barnold, to ~/src/my_app.  Then 'cd
~/src; mojo generate app MyApp; unlink my_app'.
2022-09-13 09:52:55 +01:00