История коммитов

simba77
feat(admin): save a counter in one step
The form of a counter saves at once instead of passing through a preview page that carried every value on in hidden fields and asked to go back in the browser to correct a mistake. A missing name or code is shown at its field. The form is laid out in cards: the name and the codes on the left, whether and where the counter shows on the right, with a warning when it waits for the cookie consent while the banner is turned off. The display modes say what they do — the code on every page, or its own code on the homepage; the second code on every page is offered only to a counter that has it. The outdated note on XML is gone.

An existing counter is previewed in a sandboxed frame, so its scripts run apart from the panel and its cookies. The preview step (/admin/counters/preview) and the page of one counter (/admin/counters/{id}) are gone: the list turns a counter on and off.
simba77
feat(admin): rework the list of the counters
The counters are a table in the order the site prints them: where a counter shows (on every page, only on the homepage, or with its own code there), whether it waits for the cookie consent, and whether it is on. Its menu edits it, moves it where moving does something, turns it on or off and deletes it in a dialog; the actions return to the list and say what they did.
simba77
feat(consent): rebuild the settings of the cookie banner
The text is written per language through the shared language switch, opened on the default language of the site and with the note on how the site falls back to it, instead of a tab for each of the thirteen languages. Under every language the banner is previewed as its visitors see it now. Showing sits in a card of its own: the switch of the banner, and "Ask every visitor again", which raises the version of the consent on save instead of a number typed by hand.
simba77
refactor(admin): share the language switch of the contacts settings
The dropdown of languages with a panel of fields per language, and the note on how the site falls back to the default language, become components of the panel (language-switch, language-fallback-hint) driven by one script (language-panels.js). AdminLanguageOptions lists the installed languages, marks the default one and picks the one opened first. The contacts settings use them instead of markup and a script of their own.
simba77
fix(consent): fall back to the default language for the cookie banner text
The banner took the text of the visitor's language or else the English one, so a site writing only in its own language showed its visitors in other languages the stock text. It now tries the default language of the site before English, as the contacts page does.

The heading of the settings card was shown in English: a missing blank line in ru.po merged its entry into the next one.
simba77
feat(collections): lay out the forms of an item, a section and a field
The forms are laid out in cards, two columns like the forms of the news, with the shared footer of buttons (sticky for an item). Every form is headed by what it is: an item form no longer says Items, a section form no longer says Sections.

An item: the name, code and texts with the fields of the collection beside each other on the left; publishing and its place on the right. Dates are picked with the date and time inputs of the browser instead of typed as YYYY-MM-DD HH:MM:SS, the section is chosen from the tree by its path, and a required field left empty now stops the item with a message — the flag was not checked before.

A section says where it stands in the tree; a field gathers its properties as switches and warns that changing the type of a filled field may lose values.
simba77
feat(collections): list the fields of a collection as a table
The fields tab is a table of what the items carry: the name and code, the type, whether a field is required, multiple and shown in the list of the items, and its sorting; the menu of a row edits it or deletes it in a dialog. An empty collection explains what a field is for.
simba77
feat(collections): show the sections of a collection as one tree
The sections tab shows the whole tree at once, each section under its parent in the order of the collection, drawn like the tree of the forum, instead of one level at a time opened with Open. A section counts the items of its subtree, as the link to its items does, with its own when they differ; its menu edits it, lists its items, adds an item or a subsection in it and deletes it in a dialog. Saving or deleting a section returns to the tree.

The paged query of one level of sections is gone; the tree is built from every section of the collection with its item count.
simba77
feat(collections): rebuild the list of the items of a collection
The items tab is a live list: a search by the name, the code or the id, the section with everything under it (or the items outside every section) and the status — published, hidden, scheduled or expired. A row shows where the item stands, whether the site shows it, when it changed, and the values of the fields the collection marks for the list; its menu edits it, opens it on the site and deletes it in a dialog that returns to the same page of the list.

A field gets "Show in the list of items" (migration: collection_fields.in_list). The panel has a query of its own for the list, separate from the query API of the site; the sections of a collection are read as a tree (SectionTree). Numbers are shown in full: a price is not shortened to 75K.
simba77
feat(collections): give every collection a page with tabs
A collection is one page in the panel now: its name, a link to it on the site, and a tab for its items, sections (when it uses them), fields and settings, each with what it holds. The parts of a collection were separate pages reached only through the list.

The list of the collections is a table with the number of items, sections and fields and whether a collection is public, API only or turned off; a row opens the collection, its menu leads to every part of it. The settings moved from /admin/collections/{id}/edit to the settings tab (the old address is gone), laid out in cards with the deleting of the collection at the bottom. A new collection opens on its fields. Deleting a collection, field, section or item asks in a dialog; the collection's says what goes with it.

The public address of a collection is worked out by the model, and the list and the head take it from there.