Edit this page on Github

Templating

Table of contents

Listing templates

To list templates, click the “Templates” tab in the navigation bar at the top of the page.

By default, all templates available to you will be displayed.

screenshot of listing all templates





If you only want to display the templates that you have created yourself, click “Your templates”.

screenshot of listing your templates





Create a new job based on a template

Clicking “New job” on a template in the list of templates will create a new job.

The job will be given a name to reflect what template it is based on.

First, you will be asked if you want to upload any additional files. Some files may already be present here if the template contains files.

The script to use is already defined by the template.

screenshot of file upload button





Since the script to use is already defined by the template, the next thing you need to do is to complete the mandatory options.

screenshot of mandatory jobs form for the DTBook to PEF (MTM) script





In this example, some of the optional parameters has been pre-filled by the template. Different templates can have different values.

When you’re done; click “Start job”. You will be redirected to the job view.

screenshot of optional parameters form for the DTBook to PEF (MTM) script





The job view

The job view contains some details about the job such as its status, when it was started, which script was used, what the inputs and option values were, an execution log, and some scripts also contain a report.

When the job has finished running, you can download the results, and also the input files if needed.

At the bottom of the page you have three buttons, letting you either:

screenshot of job view





Creating a template from scratch

To create a new template from scratch, click “New job”. Upload the files you want to include in the template, if any.

screenshot of the view after clicking new job





In this example, a CSS-file has been added. All jobs that are created based on this template later will include this CSS-file, so that the CSS-file doesn’t have to be re-uploaded for every future job.

screenshot of file upload widget after having uploaded a css file





Next, choose a script. You cannot create a template without choosing a script.

screenshot of the script listing when creating a job





Finally, you can fill out the options as you want them to be stored in the template, and instead of clicking “Start job”, click instead “Save as template”.

screenshot of the script options form with both a button for creating a job as well as a button for saving as a template





You will be redirected to the template listing, and the new template will be highlighted.

screenshot of template listing after having created a job as a template, where the new template is highlighted





You will probably want to rename your template to something more descriptive. Click “Rename” next to the template, fill out a new name, and click “Save”.

screenshot showing how to rename a template





Sharing a template with other users

When you create templates, they are by default only visible to yourself (and administrators). Other users cannot use your private templates.

In this screenshot, we see the template listing for another user, who cannot see the template we just created.

screenshot showing the template listing for the other user that cannot see the first users private template





Back in the template listing for the first user, click “Share with others” to share the template.

screenshot showing the template listing for the first user with a button that toggles the template between being shared and being private





The template will now be listed as “shared” in the template list. You can change it back to private at a later point if you want to.

screenshot showing the first users template listing after having toggled the template from private to shared





In this screenshot we see the template listing for the other user who could not see the template earlier. The template is now available for them to use.

screenshot showing the template listing for the other user that can now see the first users shared template