M8-S2 — A home page and a printable ticket
Section titled “M8-S2 — A home page and a printable ticket”| Module | M8 — Screens for every audience |
| After this session you can | Build a home page that shows each person what concerns them, and give people a formatted document from a record. |
| Time | Facilitated: 48 min · On your own: 48 min |
| Before you start | M8-S1. A text editor on your computer (Notepad or similar). From ACP: M7-S1, where you built Task Home. |
| Go deeper | Pages & widgets · Export templates |
◆ Orientation (1 min) — One place to start, one thing to keep
Section titled “◆ Orientation (1 min) — One place to start, one thing to keep”People now have several screens. A home page gathers them, and shows the chart only to the staff. Customers, for their part, ask for a copy of a solved ticket they can keep or forward: a PDF made from a template. Both build on what you know: the page on ACP’s Task Home, the template on the export you used in ACP.
▤ Concept (3 min) — The grid, visibility, and templates
Section titled “▤ Concept (3 min) — The grid, visibility, and templates”What is new since Task Home
Section titled “What is new since Task Home”In ACP you built Task Home with a Text and a View widget, marked it Default Page and published it. Three things are new here:
- Width. Widgets sit on a 12-column grid. With Edit width a widget takes 4, 6, 8 or 12 columns; widgets fill a row left to right, and New row starts a fresh one. An 8-wide list beside a 4-wide chart fills one row.
- More widgets. Title (a heading), Summary (a chart from a summary: Choose module, Choose entity, Choose summary) and Navigation (a grid of shortcuts to pages, views and reports).
- Custom Visibility. By default every widget is seen by everyone who can open the page. Under a widget’s General settings, Custom Visibility narrows it to chosen users or groups. A widget can only be narrower than its page.
Each widget still respects access: a View widget shows a person only the records the view gives them. Check the page on a phone with Show preview on the Content tab, which shows your real records in the mobile layout without saving.
An export template is a document with placeholders
Section titled “An export template is a document with placeholders”An export template is a file you prepare (Word, HTML or Excel) with placeholders where record
values go. You upload it to the entity’s Templates tab; people then export a record with it
from a view. A Single Entry template makes one document for one record; Multiple Entries
makes one for several. For a PDF, upload a .docx or an .html file with Type Pdf.
In an HTML template, {{% … %}} holds logic (a loop over the records) and {{%= … %}} prints a
value. entry.value.<identifier> is one field of the record; the identifier is the field’s
normalized name, such as ticket_title. Three helpers:
| Write | To get |
|---|---|
loc(entry.value.ticket_title) | a two-language field in the reader’s language |
date(entry.value.start_date, 'dd/MM/yyyy') | a date in the format you want |
today() | today’s date |
A Single Entry template can carry a Filter, so it is offered only on records that meet it, and For other entries decides whether others see it greyed out (Disable export option) or not at all (Hide export option).
⛏ Lab (38 min) — Build Support Home and the Ticket summary
Section titled “⛏ Lab (38 min) — Build Support Home and the Ticket summary”Goal. A published Support Home page, with a staff-only chart; a Ticket summary PDF that customers can export from their closed tickets.
Before you start. Signed in as yourself.
Support Home
- Open Customer Support System › Pages › New Page. Name Support Home (Arabic الصفحة الرئيسية للدعم), an icon.
- Turn on Pin to Sidebar. Under Access Permissions, turn on Authenticated and Default Page; leave Select Users and Select groups empty.
- On Content, add a Title widget, Heading 2, Customer support, width 12.
- Add a Text widget: Open a ticket from Ticket Request. We answer within two working days. Width 12.
- Add a View widget: Source Ticket Request, Face Table, Count of entries 5. Width 8.
- Add a Summary widget: Choose module Customer Support System, Choose entity Support Tickets, Choose summary Ticket Status. Width 4.
- In the Summary widget’s General settings, turn on Custom Visibility and choose the group Support Staff.
- Add a Navigation widget, width 12, filtered to Data Entity Views and Reports.
- Select Show preview: the phone frame stacks the widgets in order. Close it, save the page (Done), and Publish it.
Screenshot pending The Support Home page designer: a table widget 8 columns wide beside the Ticket Status chart 4 columns wide, with the phone preview open What to notice: 8 plus 4 fills one row on the web; on the phone the two widgets stack. The chart’s Custom Visibility is set, so customers will not see it.
The template file
- In a text editor, create a file
ticket-summary.htmlwith this content, and save it:
<!DOCTYPE html><html><head><title>Ticket summary</title></head><body lang="en-US" dir="ltr">{{% for(entry of entries){ %}} <h1>Support ticket {{%=entry.value.ticket_number %}}</h1> <p><b>Title:</b> {{%=loc(entry.value.ticket_title) %}}</p> <p><b>Description:</b> {{%=loc(entry.value.ticket_description) %}}</p> <p><b>Opened on:</b> {{%=date(entry.value.start_date, 'dd/MM/yyyy') %}}</p> <p>Printed on {{%=date(today(), 'dd/MM/yyyy') %}}</p>{{% }; %}}</body></html>- Check each identifier: in the Support Tickets designer, open each field’s settings and
compare its normalized name with the file (
ticket_number,ticket_title,ticket_description,start_date). Correct the file if one differs.
The template on the entity
- Open Support Tickets › Templates › New Template (or Add Template). Name
Ticket summary, Level Single Entry, Type Pdf, File › Choose file
ticket-summary.html, Export Type UI Export. - Under Filter, choose the saved query Closed tickets; For other entries Hide export option. Select Save.
- Edit Ticket Request. In the entry-details settings, under Templates, tick Ticket summary. Save.
Check it
- As Customer One, open Support Home: the welcome, your tickets and the shortcuts; no chart.
- Open your closed ticket Software installation in Ticket Request and export it with Ticket summary: a PDF with its number, title, description and dates downloads. Open an open ticket: the template is not offered.
- As Support Manager, open Support Home: the chart is there.
Check.
- Support Home is published, pinned, the default page, with five widgets in two rows plus the navigation.
- The Ticket Status widget is visible to Support Staff only.
- Ticket summary is a Single Entry Pdf template filtered by Closed tickets.
- Customer One exported a PDF of a closed ticket, and was not offered it on an open one.
- Support Manager sees the chart on Support Home.
Pass condition. Customer One lands on a home page without the chart and can download a PDF summary of a closed ticket only.
If something goes wrong
| What you see | What to do |
|---|---|
| A value is blank in the PDF | The identifier in the file differs from the field’s normalized name, or the view does not display that field. |
| The template is not offered in Ticket Request | Tick it under Templates in the entry-details settings; a Single Entry template appears on a record, not on the list. |
| A PDF template produces no file | Upload a .html (or .docx) file with Type Pdf. |
| Customer One sees the chart | Custom Visibility is off on the Summary widget, or set to everyone. |
| You cannot tick Default Page | Users or groups are picked on the page; clear them. |
The title shows [object Object] or both languages | Wrap two-language fields in loc(…). |
Model answer
What you built:
- Support Home: a 12-wide title and text, an 8-wide View widget beside a 4-wide chart, and a 12-wide navigation grid; default page for everyone signed in; the chart limited by Custom Visibility to Support Staff. Customers’ View widget shows only their own tickets, because Ticket Request uses My tickets.
- Ticket summary: an HTML file whose loop prints each record’s fields through their normalized
names, with
loc()for two-language text anddate()for dates; uploaded as a Single Entry Pdf template, offered only on closed tickets, and ticked in Ticket Request’s details.
✓ Practice (5 min) — Check your understanding
Section titled “✓ Practice (5 min) — Check your understanding”On a page open to everyone signed in, a manager wants a chart that only managers see. What do you do?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
Three widgets have the widths 6, 8 and 4, in that order, with no New row. How are they laid out on the web?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
A template prints Ticket title as both languages run together. What fixes it?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
With Hide export option, a customer opening an open ticket does not see Ticket summary at all.
Check your answer
The correct answer is A (True). Open the explanation under each option to see why.
↺ Recap (1 min) — What you can do now
Section titled “↺ Recap (1 min) — What you can do now”You laid out a home page on the grid with a staff-only chart, checked it on a phone, and wrote a template that turns a closed ticket into a PDF. After Module 8 you can design the screens, pages and documents of an application for each of its audiences.
Next. One audience is still missing: colleagues who need something from the support team. In Module 9 you publish a service in the catalog, with an approval by the requester’s own manager.