Skip to content
Kamoorjdocs
Documentation

Reference Templates

Student and employee certificate templates: creation, status, partials and permissions.

On this page

Purpose

References → Reference Templates, /reference-templates. Maintain the institution's library of certificate types for students and employees. A template defines content, appearance, variables and input settings; an issued certificate is a separately registered document with its own number and saved snapshot. Templates are not student or personnel records and do not correct their source data.

To issue a document, use References and the issuance page. Unlike the module export builder, a reference concerns a specific person and is registered in issuance history.

Table and filtering

Column Value
Name Template name in the interface language, falling back to the first saved name if the translation is absent.
Page format A3, A4, A5 or Letter, displayed in uppercase.
Status Green Active badge for an enabled template and an inactive badge otherwise.

The list includes enabled and disabled templates. The server defaults to newest first (15 items in the standard response). This page does not enable the common table’s separate server pagination; for a large library narrow the list by status and do not assume the visible selection is the entire catalog. Its available filter is is_enabled (enabled/disabled); apply it to find active forms and clear to see the whole list. The server supports searching translated names and sorting by status and creation time, but the current page does not enable a separate ordinary search box. Subject type is not a table column or filter; inspect it in the editor. The settings gear opens the header/footer library.

Standard table export produces a list of templates, not a certificate PDF. The export column catalog includes name, paper format, status and optional creation time.

Create and edit

  1. Choose Add to open /reference-templates/new. For an existing template, open or edit its entry at /reference-templates/:id.
  2. Specify the translated name and subject type. student is a student certificate (default); employee is an employee certificate. Their variable catalogs differ. A template cannot be issued for a person of the other type.
  3. Configure the body, paper, orientation (portrait or landscape), visual appearance and required input fields. Connect a reusable header/footer if needed and save with the intended enabled state. See the template editor.

The stored template has a required body and additional properties: translated name and description, subject type, header and footer references, background settings, paper format, orientation, manual fields and enabled flag. Server defaults for a new form are A4, portrait, student and enabled if not supplied explicitly. Names are limited to 255 characters; at least one nonempty translation is required. RU/EN/HY are recommended.

Manual fields, when defined, can be text, date or multiline text. Keys have at most 64 characters, use Latin letters, digits and underscores, and must be case-insensitively unique. The layout validator and variable catalog depend on subject type.

Headers and footers

The list gear opens /reference-templates/settings, with independently permissioned libraries of headers and footers. A shared partial without subject type is reusable for either type; a typed partial can only be used with the matching student or employee template. A header cannot substitute for a footer. The server checks existence, kind and compatibility. See reference template partials.

Check the reuse of a shared partial before editing it: future issuances from several forms can acquire the updated appearance. Issued snapshots are not changed automatically.

Statuses and deletion

Status Result
Active (is_enabled = true) Available when choosing a certificate for the matching subject type.
Inactive (is_enabled = false) Remains saved but excluded from new issuance selection.

This module has no distinct Draft/Archived lifecycle and no default template assignment. Prepare a disabled form and enable it after verification. Editing a template changes future issuance, not existing registered documents.

Use the row menu and confirm deletion. The server rejects deletion with 422 if non-deleted issued certificates reference the template. Do not delete issued documents just to remove a used template; disable the form instead. Deletion is soft. The server supports listing and restoring deleted templates with corresponding rights, but the current table hides the trash button. Restoration is not an ordinary list operation.

Example

Create an employee “Employment confirmation” template. Fill the name translations, choose A4, attach a common institutional header, add the supported employee name, unit and position variables and a manual purpose field if needed. Save and check it using a test employee record; source data belongs in employee details. Enable the verified form. It should appear on the issuance page when an employee is selected, not a student. Confirm real issuance only after checking the result.

Permissions and scopes

The reference-templates catalog itself has no Faculty, Profession or Department scopes: forms are institution-wide. Subject type is data compatibility, not a role scope. Issuance and history of individual documents have their own rights and scopes.

Operation Interface group / server right
List, open, variables, saved preview and signatory candidates ReferenceTemplatesTablePull / reference-templates.index; variables also use ReferenceTemplatesVariablesPull
Create, open settings gear ReferenceTemplatesCreateAction / reference-templates.store
Edit, delete ReferenceTemplatesEditAction, ReferenceTemplatesDeleteAction; server routes reference-templates.update and reference-templates.destroy bind to reference-templates.store
Deleted items and restoration (server) reference-templates.deleted-items binds to index, reference-templates.restore to store
Manage headers and footers Independent reference-header-templates, reference-footer-templates modules

Staff who issue references need catalog read access, which does not itself grant issuance or template creation rights. Configure access in role permissions.

Troubleshooting

  • Template listed but missing during issuance. Verify enabled state, subject type, catalog read access and the loading limit: the issuance page requests up to 100 enabled templates then filters by type.
  • Deletion rejected. If there are issued references, disable the template instead.
  • No settings gear. The template creation group is required; then check separate library permissions.
  • Missing variable. Verify subject type and catalog; use the editor rather than typing an arbitrary technical key as text.
  • Old certificate differs from edited template. This is expected: the issuance snapshot is stored. Inspect history to see the original issued document.

Implementation sources

Updated Nov 27, 2026