Commit Graph

60 Commits

Author SHA1 Message Date
barnold 179be1f700 De-hardcode the book count. 2022-10-12 19:09:06 +01:00
barnold 390850ec75 Conform to change of database name. 2022-10-10 12:50:11 +01:00
barnold dde8343978 Local override for configuration...
Look for a local .yml file and apply it if present.
2022-10-09 14:22:40 +01:00
barnold dd6ea0a0ba Improve links to be "portable"...
so that they still work if the app is server under a 'root' path like
'/pg-catalog/...' instead of directly under '/...'.
2022-10-02 12:49:09 +01:00
barnold 85dde076e4 Simplify navigation...
Put all the links at the top, unconditionally.  Make the search forms
look slightly nicer.
2022-09-29 14:14:43 +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 dd701b2265 Placate an "uninitialized value" warning. 2022-09-26 16:07:31 +01:00
barnold 9f16a10009 Link book title to its gutenberg page. 2022-09-26 09:14:39 +01:00
barnold 646d0c4084 Add truncations to limit table widths. 2022-09-26 09:03:20 +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 74ae6e1745 Add a helper for formatting numbers. 2022-09-18 18:56:42 +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 e90a76ba61 Conform to the column name change...
of book.name to book.title that I made in dbix-tutorial.
2022-09-18 11:01:34 +01:00
barnold 8dcdb9fb10 Improve the book listing...
Add order_by.  Prefetch author and show author's name.  Add table
markup.
2022-09-17 16:28:17 +01:00
barnold 143dcc9bdc Can page to first, prev, next, last. 2022-09-17 16:05:45 +01:00
barnold f6b5a4cd16 Drop '/book' as a route, it's all pagey now. 2022-09-17 15:39:32 +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 ca7f54311b Put back a little logging. 2022-09-16 11:47:41 +01:00
barnold 368b9483bd Add a missing "use", oops. 2022-09-16 11:10:29 +01:00
barnold 7d951ba450 Use Book::Schema, becoming dependent on dbix-tutorial...
See dbix-tutorial's INSTALL for how to make it usable from here.
2022-09-16 11:02:47 +01:00
barnold 6790782acf Add some db resilience...
Replace the dbh attribute with a get_dbh method.  The method checks
whether the connection is good before returning it.
2022-09-15 21:06:00 +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 5675b87240 Read config file for "secrets". 2022-09-15 10:00:36 +01:00
barnold 2184cb2931 Remove the more experimental pages. 2022-09-15 09:05:57 +01:00
barnold a2ca675bca Add an account page. 2022-09-15 08:55: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