mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 17:11:09 -05:00
2.3 KiB
2.3 KiB
Version Control UI Template Integration
Templates Requiring VCS Integration
Park System
- parks/templates/parks/park_detail.html - Completed
- parks/templates/parks/park_list.html - Add version status indicators
- parks/templates/parks/park_area_detail.html - Add version control UI
Rides System
- rides/templates/rides/ride_detail.html - Add version control UI
- rides/templates/rides/ride_list.html - Add version status indicators
Reviews System
- reviews/templates/reviews/review_detail.html - Add version control UI
- reviews/templates/reviews/review_list.html - Add version status indicators
Company System
- companies/templates/companies/company_detail.html - Add version control UI
- companies/templates/companies/company_list.html - Add version status indicators
Integration Guidelines
Detail Templates
For detail templates, add the version control UI below the main title:
<!-- Title Section -->
<h1>{{ object.name }}</h1>
<!-- Version Control UI -->
{% include "history_tracking/includes/version_control_ui.html" %}
<!-- Rest of the content -->
List Templates
For list templates, add version indicators in the list items:
{% for item in object_list %}
<div class="item">
<h2>{{ item.name }}</h2>
{% if version_control.vcs_enabled %}
<div class="version-info text-sm text-gray-600">
Branch: {{ item.get_version_info.current_branch.name }}
</div>
{% endif %}
</div>
{% endfor %}
Integration Steps
- Update base template to include necessary JavaScript
<!-- In base.html -->
<script src="{% static 'js/version-control.js' %}"></script>
- Add version control UI to detail views
- Include the version control UI component
- Add branch switching functionality
- Display version history
- Add version indicators to list views
- Show current branch
- Indicate if changes are pending
- Show version status
- Update view classes
- Ensure models inherit from HistoricalModel
- Add version control context
- Handle branch switching
- Test integration
- Verify UI appears correctly
- Test branch switching
- Verify history tracking
- Test merge functionality
Next Steps
- Create park area detail template with version control
- Update ride detail template
- Add version control to review system
- Integrate with company templates