@webx-ui/module-reviews
@webx-ui/module-reviews
The front end of the reviews section of the WebX UI admin panel: reviews — a photo, a name, a job title, the stars and a text — and the categories they are filed under.
The other half is the Composer package webx-ui/module-reviews, which owns the reviews, their
order, the Reviews block, reviews() for templates and the API. A section appears in the panel
when both halves are installed.
Install
npm install @webx-ui/module-reviews
import { createAdmin } from '@webx-ui/module-admin'
import { reviews } from '@webx-ui/module-reviews'
import '@webx-ui/module-reviews/style.css'
createAdmin({
basePath: '/cms',
modules: [...reviews()],
}).mount()
reviews() answers with two sections — the reviews and their categories — because the panel draws
one entry per module. The server puts both in the reviews group. reviews({ path: '/testimonials' })
puts them somewhere else inside the panel.
On the server, the block type the module offers is installed once:
php artisan webx:blocks:offered --install --module=reviews
Reviews
A list and the form of one review side by side, without pages: the list is where reviews are put
in order, and a drag cannot cross a page boundary. The open review is in the address
(?review=12), so a link to it is a link to the list around it too. New review is a row that
opens an empty form; the review is created by its first save. On a phone the form slides over the
list and draws its own «Back».
A row shows the photo (or the initials), the name, the stars and the languages a reader sees the review in; a published review whose text is written in no language is marked — it is seen nowhere.
The list has two orders, and the filter decides which one you are dragging:
- no category chosen — the order of the whole list;
- a category chosen — the order inside that category only. Every other category keeps its own.
While a search narrows the list, the grips disappear.
The form is the reviews.form screen, described in JSON on the server: the photo from the library,
the name, the job title and the text in every language of the site, the stars, the date, a link to
the person's profile, the categories, Published and a card for the project's own fields. Save
with the button or Ctrl+S; leaving with unsaved changes asks first. A review has no draft: a save
is on the site.
Categories
The panel's shared category screens with this module's words (reviewCategoriesOptions()),
without addresses: a category is a button in a block's filter and a way to pick reviews for a
block.
On the site
The module has no page of its own. Reviews reach the site in the Reviews block — one, a grid, a
slider or a marquee — or through reviews() in a template of the site. See the
guide.
Licence
MIT
Related Packages
Pages for the WebX UI admin panel: the tree of a site's pages, their addresses,...
Blog for the WebX UI admin panel: articles made of blocks, rubrics and tags, sch...
Services for the WebX UI admin panel: a catalogue of services made of blocks, fl...
Menus for the WebX UI admin panel: named menus, a tree of items, and what each o...
Version History
| Version | Released | License |
|---|---|---|
| 0.2.2 | MIT | |
| 0.2.1 | MIT | |
| 0.2.0 | MIT | |
| 0.1.18 | MIT | |
| 0.1.17 | MIT | |
| 0.1.16 | MIT | |
| 0.1.15 | MIT | |
| 0.1.14 | MIT | |
| 0.1.13 | MIT | |
| 0.1.12 | MIT | |
| 0.1.11 | MIT | |
| 0.1.10 | MIT | |
| 0.1.9 | MIT | |
| 0.1.8 | MIT | |
| 0.1.7 | MIT | |
| 0.1.6 | MIT | |
| 0.1.5 | MIT | |
| 0.1.4 | MIT | |
| 0.1.3 | MIT | |
| 0.1.2 | MIT | |
| 0.1.1 | MIT | |
| 0.1.0 | MIT |