Commit Graph

49 Commits

Author SHA1 Message Date
b579f5fb42 Admin interface for comments
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 1m6s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 10s
2025-11-28 00:13:07 +01:00
db9bd92036 Try/except-error fixed
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 36s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 8s
2025-11-27 23:57:35 +01:00
7e89ffb6f1 XSS protection added to comments
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 1m1s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 8s
2025-11-27 23:51:04 +01:00
e5202d9b2b Comment function added 2025-11-27 23:11:59 +01:00
c285ae81af Test with NFS
All checks were successful
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 4s
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 15s
2025-11-24 15:20:31 +01:00
f7799675d5 Typo in template fixed 2025-11-24 13:46:13 +01:00
a14a80f7bd Design tweaks
All checks were successful
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 4s
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 15s
2025-11-24 13:38:53 +01:00
e923624aec Metadata moved to end of document 2025-11-19 13:49:45 +01:00
b2e2da95b2 Badges align properly now
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 15s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 4s
2025-11-10 13:46:31 +01:00
4fece110d9 Added list of Vorgaben to Referenz-Admin
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/vui) (push) Successful in 3m6s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/vui-data-loader) (push) Successful in 7s
2025-11-10 09:32:51 +01:00
c5f4715e97 Some tweaks on Oblique 2025-11-07 14:31:05 +01:00
683d53dac0 Names now in alphabetical order
All checks were successful
Build image when workload image tag changes / build-if-image-changed (push) Successful in 35s
2025-11-07 00:36:22 +01:00
b8069802f6 Debug print removed from dokumente/test.py 2025-11-06 16:04:44 +01:00
69ca9bce4d Merge branch 'development' into feature/add-missing-tests 2025-11-06 14:34:44 +00:00
733a437ae0 Add comprehensive JSON generation tests and update documentation
- Add 9 new JSON export tests in dokumente/test_json.py
- Add 9 JSON tests to main dokumente/tests.py
- Fix Geltungsbereich field name issues in test setup
- Update test documentation with JSON test coverage
- Update test counts: Total 206 tests (was 188)
- JSON tests cover both management command and view functionality
- Tests include file output, stdout, error handling, and edge cases
- All 206 tests now passing
2025-11-06 14:36:04 +01:00
8520412867 Better 'Stichwort' admin pages 2025-11-05 12:18:59 +01:00
af636fe6ea JSON functionality extended to website. Tests pending. 2025-11-04 16:07:29 +01:00
3ccb32e8e1 feat: add comprehensive JSON export command for dokumente
- Add Django management command 'export_json' for exporting all dokumente data
- Implement structured JSON format with proper section types from database
- Include all document fields: gueltigkeit, signatur_cso, anhaenge, changelog
- Support Kurztext, Geltungsbereich, Einleitung with Langtext-style structure
- Use actual abschnitttyp values instead of hardcoded 'text'
- Handle Referenz model fields correctly (name_nummer, name_text)
- Support --output parameter for file export or stdout by default
2025-11-04 15:56:54 +01:00
b82c6fea38 Merge branch 'development' into feature/list-of-incomplete-vorgaben 2025-11-04 13:58:26 +00:00
cb374bfa77 feat: enhance incomplete Vorgaben page with table layout and admin integration
- Redesign incomplete Vorgaben page from card layout to unified table format
- Add visual status indicators (✓/✗) for each completeness category
- Link Vorgaben directly to admin edit pages (/autorenumgebung/ instead of /admin/)
- Enhance Vorgabe admin with Kurztext and Langtext inlines for complete editing
- Update all tests to work with new table structure and admin URLs
- Add JavaScript for dynamic summary count updates
- Maintain staff-only access control and responsive design

All 112 tests passing successfully.
2025-11-04 14:52:41 +01:00
2b41490806 Tests corrected, 'Thema' is now required (produces errors otherwise) 2025-11-04 14:35:55 +01:00
da1deac44e Unvollständige Vorgaben nur noch für Admins 2025-11-04 13:25:27 +01:00
faae37e6ae Fixed tests - expecting English and getting German, now expect German 2025-11-04 13:19:27 +01:00
6aefb046b6 feat: incomplete Vorgaben page implementation
## New Incomplete Vorgaben Page
- Created new incomplete_vorgaben view in dokumente/views.py
- Added URL pattern /dokumente/unvollstaendig/ in dokumente/urls.py
- Built responsive Bootstrap template showing 4 categories of incomplete Vorgaben:
  1. Vorgaben without references
  2. Vorgaben without Stichworte
  3. Vorgaben without Kurz- or Langtext
  4. Vorgaben without Checklistenfragen
- Added navigation link "Unvollständig" to main menu
- Created comprehensive test suite with 14 test cases covering all functionality
- All incomplete Vorgaben tests now passing (14/14)

## Bug Fixes and Improvements
- Fixed model field usage: corrected Referenz model field names (name_nummer, url)
- Fixed test logic: corrected test expectations and data setup for accurate validation
- Fixed template styling: made badge styling consistent across all sections
- Removed debug output: cleaned up print statements for production readiness
- Enhanced test data creation to use correct model field names

## Test Coverage
- Total tests: 41/41 passing
- Search functionality: 27 tests covering validation, security, case-insensitivity, and content types
- Incomplete Vorgaben: 14 tests covering page functionality, data categorization, and edge cases
- Both features are fully tested and production-ready

## Security Enhancements
- Input validation prevents SQL injection attempts
- HTML escaping prevents XSS attacks in search results
- Length validation prevents buffer overflow attempts
- Character validation ensures only appropriate input is processed

The application now provides robust search capabilities with comprehensive security measures and a valuable content management tool for identifying incomplete Vorgaben entries.
2025-11-04 13:15:51 +01:00
28a1bb4b62 Translated 'rogue' English error message 2025-11-04 11:21:04 +01:00
898e9b8163 Merge branch 'feature/sanitychecks' into development 2025-11-04 09:07:37 +01:00
7e4d2fa29b Changed edge case in date validation for Vorgaben 2025-11-03 13:21:47 +01:00
779604750e Add Vorgaben sanity check functionality
Implement comprehensive validation system to detect conflicting Vorgaben with overlapping validity periods.

Features:
- Static method Vorgabe.sanity_check_vorgaben() for global conflict detection
- Instance method Vorgabe.find_conflicts() for individual conflict checking
- Model validation via Vorgabe.clean() to prevent conflicting data
- Utility functions for date range intersection and conflict reporting
- Django management command 'sanity_check_vorgaben' for manual checks
- Comprehensive test suite with 17 new tests covering all functionality

Validation logic ensures Vorgaben with same dokument, thema, and nummer cannot have overlapping gueltigkeit_von/gueltigkeit_bis date ranges. Handles open-ended ranges (None end dates) and provides clear error messages.

Files added/modified:
- dokumente/models.py: Added sanity check methods and validation
- dokumente/utils.py: New utility functions for conflict detection
- dokumente/management/commands/sanity_check_vorgaben.py: New management command
- dokumente/tests.py: Added comprehensive test coverage
- test_sanity_check.py: Standalone test script

All tests pass (56/56) with no regressions.
2025-11-03 12:55:56 +01:00
aca9a2f307 Removed "Ändern" and "Löschen"-Links 2025-11-03 12:36:39 +01:00
a075811173 Collapsing and drag/drop implemented 2025-11-01 00:34:21 +01:00
d4143da9fc Horizontal fieldsets OK 2025-11-01 00:21:13 +01:00
b0c9b89e94 Borders work, collapsing doesn't yet 2025-11-01 00:18:29 +01:00
Adrian A. Baumann
8bca1bb3c7 Tabular view for Vorgaben added 2025-10-31 11:43:34 +01:00
Adrian A. Baumann
6df72c95cb Tests for documents fixed (Vorgabe-Order added) 2025-10-29 13:47:16 +01:00
2afada0bce Date 'bis None' changed to 'bis auf weiteres' 2025-10-29 13:30:46 +01:00
Adrian A. Baumann
a42a65b40f Make Vorgaben draggable; Deploy 938 2025-10-28 16:19:37 +01:00
6654779e67 Corrections on Dokumente-Admin; Homepage now only shows active documents 2025-10-28 13:36:26 +01:00
7befde104d Added 'aktiv' to document tests 2025-10-27 21:24:23 +01:00
96819a7427 Merge branch 'feature/dokumente-unit-tests' into development 2025-10-27 21:18:53 +01:00
650fe0a87b added 'aktiv' to dokument (so people can play around with standards) 2025-10-27 20:49:22 +01:00
Adrian A. Baumann
39a2021cc3 Attempt at improving reference choice in documents 2025-10-27 13:50:14 +01:00
957a1b9255 Changed tests to be more in line with our terms 2025-10-27 10:03:58 +01:00
afc07d4561 Fix tests: Update field names to match actual model structure (abschnitttyp field, inhalt field) 2025-10-24 17:58:54 +00:00
af06598172 Fix tests: Update Abschnitttyp to AbschnittTyp 2025-10-24 17:54:59 +00:00
4213ca60ac Add comprehensive unit tests for dokumente app 2025-10-24 17:48:08 +00:00
bf2f15fa5c removed initial test lines 2025-10-24 19:42:07 +02:00
4d1232b764 Tests - not runnable yet. 2025-10-23 16:35:31 +02:00
7087be672a Added "Geltungsbereich" back into search function and corrected it; Changed "standards" page to "dokumente" internally 2025-10-23 09:35:23 +02:00
Adrian A. Baumann
b391ab0ef6 >Renamed app "standards" to "dokumente" - finally working as expected. 2025-10-22 15:08:42 +02:00