Text Templates

Description

The Text Template module allows users to create and manage text templates, such as email messages. The module consists of two parts - a template configuration, usually set up by a developer, and a template text editor, which is intended for end-users to manage themselves, allowing quick changes to templates.

This module is available in both Ambience and Repertoire software suite.

Module Interface

Interface Description Required Privilege
Text Templates Allows access to Text Template module. mod-text-templates

Add

This function allows you to add a new text template.

To add a new text template, click on the “Add” button at the upper right corner of the page.

The “Add” dialog box will appear.

Field Description
Name Unique name of text template.
Description A brief description of the text template.
Lookups Allows you to add lookups to the template.

Key in an unique name for the new text template in the “Name” field. Provide a brief description for the new text template in the “Description” field.

If the name of the template already exist or the name is not entered, the relevant error message will appear when saving the template.

The “Lookups” field allows you to define the items in the template that you wish to dynamically substitute, along with a preview value which can give an example of what the expected text would look like with those substitutions made. For example, if the text template is to create an email message, items such as company name, company address, disclaimer, etc. can be added, along with illustrative values so users can preview with realistic data.

To add a lookup, click on the “+” icon at the upper right corner of the “Lookups” field. The “Add Lookup” dialog box will appear.

In the “Key” field, enter a key name for the lookup item. Enter the desired preview value for in the “Value” field. Click on the “OK” button to save the lookup item. To abort, click on the “Cancel” button.

Once the lookup item is added, it will appear in the “Lookups” section.

Click on the “OK” button to add the new template. Click on the “Cancel” button to abort the action.

Edit

This function allows you to edit the properties of the text template, as well as the lookups for the template.

To edit a template, click on the “Edit” icon under the “Actions” column corresponding the desired template.

The “Edit” dialog box will appear.

Edit the name and description fields as desired.

To edit a lookup item, click on the “Edit” icon on the right of the desired lookup.

Edit the fields as desired and click on the “OK” button to save the changes.

To delete a lookup item, click on the “Delete” icon next to the item.

Once all changes are done, click on the “Save” button on the upper right corner of the panel to save the changes. To abort the action, click on the “Cancel” button.

Open Editor

This function allows you to open a text editor to edit or create create the actual template.

To open the text editor, click on the name of the text template under the “Name” column. The “Text Editor” page will appear.

Refer to Text Editor for more details.

Delete

This function allows you to delete a text template from the management page.

To do so, click on the “Delete” icon under the “Actions” column corresponding the desired template.

There is an option to undo the deletion. A notification with an “Undo” button appears right after clicking on the “Delete” icon.

Upon clicking on the “Undo” button, the deleted template is restored and is added back to the list of templates. Do note that the notification will disappear after five seconds.

Upload

To upload a text template, start by clicking on the “Upload” button on the upper right corner of the page.

The “Upload” dialog box will appear.

Single File

Browse to the location of the template JSON (.json) file to be uploaded and key in an unique name in the “Name” field. If no file is selected or the name already exist, the relevant error message will appear.

If the report to be uploaded is to replace an existing report, select the “Overwrite” field. Click on the “OK” button to upload the report. Click on the “Cancel” button to aborts the action.

Upon successful uploading, the relevant message will appear.

Zip File

Browse to the location of the zip file to be uploaded. The name of the reports will be extracted from the zip file. Click on the “OK” button to upload the reports. The “Upload Results” dialog box will display the results of the uploading.

Those results in black are uploaded successfully while those in red indicates upload failures with their relevant messages. Click on the “Close” button to close the dialog box.

More Actions

This feature allows user to perform actions on multiple templates at the same time.

When the “More Actions” button located at the upper right corner of the page is clicked, a list of available actions are displayed.

If no template is selected prior clicking the button, there will be fewer actions available. To select a template, select the checkbox next to the name of the template.

Option Description
Select All Selects all templates in the list.
Select None Unselects all templates.
Invert Selection Inverts the current selection.
That is, any templates selected will be unselected and vice versa.
Download Downloads multiple templates as a zip file.
If only one template is selected, the selected template will be downloaded as a JSON file.

Download

To download the selected templates, click on the “More Actions” button and select the “Download” option.

If only one template is selected, the downloaded template has a filename of <filename>.text-template.json.

If more than one template are selected prior, the “Download” dialog box will appear.

Key in the desired name for the zip file and click on the “OK” button. The selected templates will be downloaded as a zip file with the filename provided earlier. The individual template in the zip file will have the filename format as mentioned above.

Refresh

After performing actions on the browser/tab, the list is reloaded to display the list of text templates. The manual “Refresh” button is available and is particularly useful if there are others making changes on the same page.

The “Refresh” button is found on the upper right corner of the page. Clicking on it reloads the list.

Search

There is a cross-field search function for the list of text templates. It is located at the upper left corner of the page.

This provides an easy way to search through the text templates. It is case-insensitive and displays files that have the entered search value in any of the values of the fields below:

  • Name
  • Description
  • Last Modified
  • Last Modified By

Alternatively, you can click on the any items under the “Last Modified By” column to aid the search for the templates in the page.

In the example above, template that is last modified by “UserA” is shown.

These two search methods can be combined together, with each criteria separated by a comma.