# Graduation document headers and footers ## Purpose and library Open **Graduation → Graduation document templates → Settings** (`/graduation/document-templates/settings`). Reusable document parts (partials) are stored here: headers and footers. For example, multiple diploma types can reuse the university name and logo in the header and the signature section in the footer. There are separate header and footer tabs, each visible only with that type's read permission. The table displays names and available edit/delete actions. Add opens a separate editor. This is the graduation-document library, not the [reference partial library](/en/docs/reference-template-partials). ## Partial editor The route is `/graduation/document-templates/settings/partials/:id`; use new for creation, and the `?kind=header` or `?kind=footer` parameter. If no kind is supplied for a new partial, the UI defaults to header. 1. Choose Add in the appropriate tab. 2. Enter a name in the required languages. The server requires at least one translation and a nonempty name up to 255 characters. 3. Create a section and adjust grid, rows, cells, dimensions and spacing. 4. Insert text, variable, ordinary table, image, signature, date, divider or spacer. Format using the selected block's properties. 5. Check schematic preview and save. A new partial opens its assigned ID route. Unlike the new shared body editor, this uses a three-panel editor with a separate canvas and preview dock. It edits one band and stores layout sections and dynamic fields, not a standalone PDF with independent metadata. ## Data and restrictions Reusable parts permit only a subset of document-level variables: | Group | Examples | |---|---| | Institution | `university.name` | | Student | `student.full_name` | | Enrollment | `enrollment.faculty`, `enrollment.profession` | | MKC | `mkc.name`, `mkc.code` | | Signatory | `employee.by_role_scope` with role properties | Result/paragraph loop variables and `manual.*` are not allowed by the header/footer server catalog. Put these values into the [document body](/en/docs/graduation-document-template-editor). For signatories, verify the corresponding employee. A displayed name and signature area do not constitute a digital signature. The server validates layout and dynamic fields. ## Attach to a template 1. Make a University header containing an approved logo and `university.name`. 2. Make a Diploma signatures footer with two cells for position and signatory name/signature line. 3. Open the [diploma template](/en/docs/graduation-document-templates) and select these records in the header/footer document settings. 4. Save and check actual rendering in the issuance preview. Only existing, nondeleted partials of the corresponding kind can be selected. Editing a shared part affects future renders of all connected templates. Saved snapshots of already issued documents do not automatically change. Partial deletion is soft deletion; the server does not block it because templates use the partial. Review linked templates and replace or clear their selection before deleting. The current library has no restore table, although restore server operations exist. After deleting a partial, it ordinarily stops loading when a document is assembled again. ## Permissions and scopes The library and editor have the `graduation-document-templates` route guard. The settings gear requires `GraduationDocumentTemplatesCreateAction`. Separate groups are: | Kind | Read | Changes | |---|---|---| | Headers | `GraduationDocumentHeaderTemplatesTablePull` | `GraduationDocumentHeaderTemplatesCreateAction`, `GraduationDocumentHeaderTemplatesEditAction`, `GraduationDocumentHeaderTemplatesDeleteAction` | | Footers | `GraduationDocumentFooterTemplatesTablePull` | `GraduationDocumentFooterTemplatesCreateAction`, `GraduationDocumentFooterTemplatesEditAction`, `GraduationDocumentFooterTemplatesDeleteAction` | Server modules are `graduation-document-header-templates` and `graduation-document-footer-templates`. Reads and deleted-list retrieval bind to that module's .index; creation, editing, deletion and restoration to .store. Variable retrieval requires `graduation-document-templates.index`. Neither library declares special educational permission scopes. If a tab is missing, check its specific read permission even when the main template list is accessible. See [role permissions](/en/docs/role-permissions). ## Implementation references - [PartialsManager.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Graduation/GraduationDocuments/GraduationDocumentTemplates/PartialsManager.tsx) - [index.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Graduation/GraduationDocuments/GraduationDocumentTemplates/PartialEditor/index.tsx) - [LegacyEditor.tsx](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Graduation/GraduationDocuments/GraduationDocumentTemplates/Editor/container/LegacyEditor.tsx) - [GraduationDocumentTemplatesService.ts](https://gitlab.kamoorj.com/development/frontend-edusystems/-/blob/b928b3290040bab5c888b195b813f6705170e309/src/admin/src/pages/Graduation/GraduationDocuments/GraduationDocumentTemplatesService.ts) - [api.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/GraduationDocuments/routes/api.php) - [GraduationDocumentPartialController.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/GraduationDocuments/Http/Controllers/GraduationDocumentPartialController.php) - [StoreGraduationDocumentPartialRequest.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/GraduationDocuments/Http/Requests/StoreGraduationDocumentPartialRequest.php) - [GraduationDocumentPartialService.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/GraduationDocuments/Services/GraduationDocumentPartialService.php) - [GraduationHeaderFooterVariableCatalog.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/GraduationDocuments/Services/GraduationHeaderFooterVariableCatalog.php) - [GraduationDocumentVariableCatalog.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/GraduationDocuments/Services/GraduationDocumentVariableCatalog.php) - [GraduationDocumentRenderService.php](https://gitlab.kamoorj.com/development/backend-edusystems/-/blob/83e0edc8d75daf02ae011b433d0be83afe994212/app/Modules/GraduationDocuments/Services/GraduationDocumentRenderService.php)