diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6f6fce1..aae9bd0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,7 @@ Important repository areas: - `backend/workflows/`: application code - `backend/workflows/templates/workflows/`: templates and in-app documentation - `backend/workflows/static/workflows/`: CSS and JS -- `backend/media/templates/`: PDF HTML templates +- `backend/workflows/pdf_assets/`: default PDF HTML templates and default letterhead Current backend modularization: - `views.py`: thin route wrapper layer diff --git a/backend/config/settings.py b/backend/config/settings.py index a3c70d9..e6529a5 100644 --- a/backend/config/settings.py +++ b/backend/config/settings.py @@ -183,8 +183,7 @@ NEXTCLOUD_ENABLED = os.getenv('NEXTCLOUD_ENABLED', '0') == '1' PDF_OUTPUT_DIR = Path(os.getenv('PDF_OUTPUT_DIR', str(MEDIA_ROOT / 'pdfs'))) PDF_OUTPUT_DIR.mkdir(parents=True, exist_ok=True) -PDF_TEMPLATES_DIR = MEDIA_ROOT / 'templates' -PDF_TEMPLATES_DIR.mkdir(parents=True, exist_ok=True) +PDF_TEMPLATES_DIR = Path(os.getenv('PDF_TEMPLATES_DIR', str(BASE_DIR / 'workflows' / 'pdf_assets'))) EMAIL_TEXT_DIR = MEDIA_ROOT / 'email_text' EMAIL_TEXT_DIR.mkdir(parents=True, exist_ok=True) BACKUP_OUTPUT_DIR = BASE_DIR / 'backups' diff --git a/backend/media/templates/offboarding_template.html b/backend/workflows/pdf_assets/offboarding_template.html similarity index 100% rename from backend/media/templates/offboarding_template.html rename to backend/workflows/pdf_assets/offboarding_template.html diff --git a/backend/media/templates/onboarding_intro_session_pdf.html b/backend/workflows/pdf_assets/onboarding_intro_session_pdf.html similarity index 100% rename from backend/media/templates/onboarding_intro_session_pdf.html rename to backend/workflows/pdf_assets/onboarding_intro_session_pdf.html diff --git a/backend/media/templates/onboarding_intro_template.html b/backend/workflows/pdf_assets/onboarding_intro_template.html similarity index 100% rename from backend/media/templates/onboarding_intro_template.html rename to backend/workflows/pdf_assets/onboarding_intro_template.html diff --git a/backend/media/templates/onboarding_template.html b/backend/workflows/pdf_assets/onboarding_template.html similarity index 100% rename from backend/media/templates/onboarding_template.html rename to backend/workflows/pdf_assets/onboarding_template.html diff --git a/backend/workflows/pdf_assets/templates.pdf b/backend/workflows/pdf_assets/templates.pdf new file mode 100644 index 0000000..76b07df Binary files /dev/null and b/backend/workflows/pdf_assets/templates.pdf differ diff --git a/backend/workflows/templates/workflows/developer_handbook.html b/backend/workflows/templates/workflows/developer_handbook.html index 7ce2bb6..49d6389 100644 --- a/backend/workflows/templates/workflows/developer_handbook.html +++ b/backend/workflows/templates/workflows/developer_handbook.html @@ -64,7 +64,7 @@
  • /backend/workflows/templates/workflows/base_shell.html: standard page shell for new staff-facing pages
  • /backend/workflows/roles.py: centralized role names, capability matrix, and template permission helpers
  • Rule: all interactive app pages should extend base_shell.html; do not rebuild topbar/frame logic in page-local templates.
  • -
  • /backend/media/templates/: PDF HTML templates and letterhead source files
  • +
  • /backend/workflows/pdf_assets/: default PDF HTML templates and default letterhead
  • /backend/media/pdfs/: generated PDF outputs on host volume
  • /backend/locale/: translation catalogs
  • /docker-compose.yml: local runtime orchestration
  • diff --git a/backend/workflows/templates/workflows/project_wiki.html b/backend/workflows/templates/workflows/project_wiki.html index 1313617..5ba9ca6 100644 --- a/backend/workflows/templates/workflows/project_wiki.html +++ b/backend/workflows/templates/workflows/project_wiki.html @@ -119,9 +119,9 @@

    7) PDF Engine