Age | Commit message (Collapse) | Author |
|
To avoid not clickable recipes on the /recipes page a default name used
to be inserted on recipe creation.
This was not a proper fix for the problem and also was annoying that the
user first had to remove the default recipe name.
This commit removes this default name.
|
|
In addition to the enforcement of titles in the model package the HTML
form field for the title is set to 'required' to give the user feedback
via the browser that a title is required.
|
|
|
|
|
|
|
|
|
|
It should be inside the body tag but used to be before it.
|
|
Design changes should be avoided for now since simple.css cares about
the CSS part of Ceres.
|
|
There is the need to add buttons to the recipe server which act like a
anchor tag (link). This can be achieved by nesting anchor and button
tag.
The problem is that if the user cycles through the elements of the page
with the 'tab' key such a button is handled as two overlapping elements
instead of one.
This commit solves the issue by using buttons with the attribute
`onclick="window.location.href='<url>';`.
|
|
|
|
|
|
They are intended to use multiple lines. This is easier to edit in a
textarea element rather than in an input element.
|
|
|
|
An empty string for one of these attributes will lead to a recipe view
page which does not render the paragraph for this item.
|
|
In the long term the <nav> section at the top should reference the list
views of all managed objects (recipes, users, products and so on).
With this structure it makes more sense to have the button to add a
recipe on the list view on recipes located at /recipes.
|
|
|
|
This allows to cache the involved JavaScript code.
|
|
The <nav> section is the same on every page. This new template reduces
code duplication.
|
|
This makes the update URL more consistent with the other ones. A check
ensures consistency of the URL and JSON ID values.
|
|
|
|
The old edit URL parameter allowed to select one different HTML
template. A more generic approach is to provide a view parameter which
allows to use multiple alternative HTML templates for the same data
defined by the Go struct.
This makes implementing additional pages like a confirm page for recipe
deletion easier.
|
|
While forms can be send without JavaScript this new approach has the
benefit that the whole data is send as one JSON.
This JSON format can also be used for an API or testing.
|
|
|
|
The index page / provides a redirect to /recipes but this is inefficient
since two HTTP requests are required.
|
|
|
|
|
|
|