mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 09:31:09 -05:00
- Implemented OperatorListView and OperatorDetailView for managing operators. - Created corresponding templates for operator listing and detail views. - Added PropertyOwnerListView and PropertyOwnerDetailView for managing property owners. - Developed templates for property owner listing and detail views. - Established relationships between parks and operators, and parks and property owners in the models. - Created migrations to reflect the new relationships and fields in the database. - Added admin interfaces for PropertyOwner management. - Implemented tests for operators and property owners.
96 lines
4.3 KiB
HTML
96 lines
4.3 KiB
HTML
{% extends "base/base.html" %}
|
|
{% load static %}
|
|
|
|
{% block title %}{{ operator.name }} - ThrillWiki{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container px-4 mx-auto sm:px-6 lg:px-8">
|
|
<!-- Operator Header -->
|
|
<div class="mb-8">
|
|
<h1 class="text-4xl font-bold text-gray-900 dark:text-white mb-4">{{ operator.name }}</h1>
|
|
|
|
{% if operator.description %}
|
|
<div class="prose dark:prose-invert max-w-none mb-6">
|
|
<p class="text-lg text-gray-600 dark:text-gray-400">{{ operator.description }}</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Operator Details -->
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
|
{% if operator.founded_year %}
|
|
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 shadow-sm">
|
|
<h3 class="text-sm font-medium text-gray-500 dark:text-gray-400">Founded</h3>
|
|
<p class="text-lg font-semibold text-gray-900 dark:text-white">{{ operator.founded_year }}</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if operator.headquarters %}
|
|
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 shadow-sm">
|
|
<h3 class="text-sm font-medium text-gray-500 dark:text-gray-400">Headquarters</h3>
|
|
<p class="text-lg font-semibold text-gray-900 dark:text-white">{{ operator.headquarters }}</p>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 shadow-sm">
|
|
<h3 class="text-sm font-medium text-gray-500 dark:text-gray-400">Parks Operated</h3>
|
|
<p class="text-lg font-semibold text-gray-900 dark:text-white">{{ parks.count }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Parks Section -->
|
|
{% if parks %}
|
|
<div class="mb-8">
|
|
<h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">Parks Operated</h2>
|
|
<div class="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
{% for park in parks %}
|
|
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
|
|
{% if park.main_image %}
|
|
<img src="{{ park.main_image.url }}" alt="{{ park.name }}" class="w-full h-48 object-cover">
|
|
{% endif %}
|
|
|
|
<div class="p-6">
|
|
<h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-2">
|
|
<a href="{% url 'parks:park_detail' park.slug %}" class="hover:text-blue-600 dark:hover:text-blue-400">
|
|
{{ park.name }}
|
|
</a>
|
|
</h3>
|
|
|
|
{% if park.location_display %}
|
|
<p class="text-gray-600 dark:text-gray-400 mb-2">{{ park.location_display }}</p>
|
|
{% endif %}
|
|
|
|
{% if park.opened_date %}
|
|
<p class="text-sm text-gray-500 dark:text-gray-500">Opened {{ park.opened_date|date:"Y" }}</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="mb-8">
|
|
<h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-6">Parks Operated</h2>
|
|
<div class="bg-gray-50 dark:bg-gray-800 rounded-lg p-8 text-center">
|
|
<p class="text-gray-500 dark:text-gray-400">No parks currently operated by this company.</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Additional Information -->
|
|
{% if operator.website %}
|
|
<div class="mb-8">
|
|
<h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-4">Links</h2>
|
|
<div class="bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm">
|
|
<a href="{{ operator.website }}" target="_blank" rel="noopener noreferrer"
|
|
class="inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300">
|
|
Official Website
|
|
<svg class="w-4 h-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path>
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %} |