mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-21 20:51:13 -05:00
add category views for each type of ride, add ride designers
This commit is contained in:
@@ -5,75 +5,100 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="container px-4 mx-auto">
|
||||
<!-- Company Header -->
|
||||
<div class="p-6 mb-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="flex flex-col items-start justify-between md:flex-row md:items-center">
|
||||
<div>
|
||||
<h1 class="mb-2 text-3xl font-bold text-gray-900 dark:text-white">{{ company.name }}</h1>
|
||||
{% if company.headquarters %}
|
||||
<p class="text-gray-600 dark:text-gray-400">
|
||||
<i class="mr-2 fas fa-map-marker-alt"></i>{{ company.headquarters }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="flex gap-2 mt-4 md:mt-0">
|
||||
{% if company.website %}
|
||||
<a href="{{ company.website }}" target="_blank" rel="noopener noreferrer"
|
||||
class="btn-secondary">
|
||||
<i class="mr-2 fas fa-external-link-alt"></i>Visit Website
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url 'companies:company_edit' slug=company.slug %}" class="btn-secondary">
|
||||
<i class="mr-2 fas fa-edit"></i>Edit
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if company.description %}
|
||||
<div class="mt-6 prose dark:prose-invert max-w-none">
|
||||
{{ company.description|linebreaks }}
|
||||
</div>
|
||||
<!-- Action Buttons - Above header -->
|
||||
<div class="flex justify-end gap-2 mb-2">
|
||||
{% if company.website %}
|
||||
<a href="{{ company.website }}" target="_blank" rel="noopener noreferrer"
|
||||
class="transition-transform btn-secondary hover:scale-105">
|
||||
<i class="mr-1 fas fa-external-link-alt"></i>Visit Website
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url 'companies:company_edit' slug=company.slug %}"
|
||||
class="transition-transform btn-secondary hover:scale-105">
|
||||
<i class="mr-1 fas fa-edit"></i>Edit
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Company Stats -->
|
||||
<div class="grid grid-cols-1 gap-6 mb-6 md:grid-cols-3">
|
||||
<div class="p-6 text-center bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="text-3xl font-bold text-blue-600 dark:text-blue-400">
|
||||
{{ parks.count }}
|
||||
<!-- Header Grid -->
|
||||
<div class="grid gap-2 mb-12 sm:mb-16 md:mb-8 grid-cols-1 sm:grid-cols-12 h-auto md:h-[140px]">
|
||||
<!-- Company Info Card -->
|
||||
<div class="flex flex-col items-center justify-center h-full col-span-1 p-2 text-center bg-white rounded-lg shadow-lg sm:col-span-3 dark:bg-gray-800">
|
||||
<h1 class="text-2xl font-bold leading-tight text-gray-900 sm:text-3xl dark:text-white">{{ company.name }}</h1>
|
||||
|
||||
{% if company.headquarters %}
|
||||
<div class="flex items-center justify-center mt-0.5 text-sm text-gray-600 dark:text-gray-400">
|
||||
<i class="mr-1 fas fa-map-marker-alt"></i>
|
||||
<p>{{ company.headquarters }}</p>
|
||||
</div>
|
||||
<div class="mt-1 text-gray-600 dark:text-gray-400">Theme Parks</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="p-6 text-center bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="text-3xl font-bold text-blue-600 dark:text-blue-400">
|
||||
{{ parks|length }}
|
||||
|
||||
<!-- Stats and Quick Facts -->
|
||||
<div class="grid h-full grid-cols-12 col-span-1 gap-2 sm:col-span-9">
|
||||
<!-- Stats Column -->
|
||||
<div class="grid grid-cols-2 col-span-12 gap-2 sm:col-span-4">
|
||||
<div class="flex flex-col items-center justify-center p-2 text-center bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Total Parks</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 sm:text-2xl dark:text-sky-400">{{ parks.count }}</dd>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center p-2 text-center bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Active Parks</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 sm:text-2xl dark:text-sky-400">{{ parks|length }}</dd>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-1 text-gray-600 dark:text-gray-400">Active Parks</div>
|
||||
</div>
|
||||
|
||||
<div class="p-6 text-center bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="text-3xl font-bold text-blue-600 dark:text-blue-400">
|
||||
{% with total_rides=0 %}
|
||||
{% for park in parks %}
|
||||
{% with total_rides=total_rides|add:park.rides.count %}{% endwith %}
|
||||
{% endfor %}
|
||||
{{ total_rides }}
|
||||
{% endwith %}
|
||||
|
||||
<!-- Quick Facts Grid -->
|
||||
<div class="grid h-full grid-cols-3 col-span-12 gap-1 p-1.5 bg-white rounded-lg shadow-lg sm:col-span-8 dark:bg-gray-800">
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-ticket-alt dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Total Attractions</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ total_rides }}</dd>
|
||||
</div>
|
||||
|
||||
{% if company.founded_date %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-calendar-alt dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Founded</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ company.founded_date }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if company.website %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-globe dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Website</dt>
|
||||
<dd>
|
||||
<a href="{{ company.website }}"
|
||||
class="text-blue-600 text-2xs sm:text-xs hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300"
|
||||
target="_blank" rel="noopener noreferrer">
|
||||
Visit
|
||||
<i class="ml-0.5 text-2xs fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="mt-1 text-gray-600 dark:text-gray-400">Total Attractions</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if company.description %}
|
||||
<div class="p-6 mb-8 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-900 dark:text-white">About</h2>
|
||||
<div class="prose dark:prose-invert max-w-none">
|
||||
{{ company.description|linebreaks }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Parks List -->
|
||||
<div class="p-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-6 text-2xl font-bold text-gray-900 dark:text-white">Theme Parks</h2>
|
||||
<h2 class="mb-6 text-xl font-semibold text-gray-900 dark:text-white">Theme Parks</h2>
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{% for park in parks %}
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700">
|
||||
<div class="overflow-hidden transition-transform rounded-lg hover:scale-[1.02] bg-gray-50 dark:bg-gray-700">
|
||||
{% if park.photos.exists %}
|
||||
<img src="{{ park.photos.first.image.url }}"
|
||||
alt="{{ park.name }}"
|
||||
@@ -87,7 +112,7 @@
|
||||
<div class="p-4">
|
||||
<h3 class="mb-2 text-lg font-semibold">
|
||||
<a href="{% url 'parks:park_detail' park.slug %}"
|
||||
class="text-blue-600 dark:text-blue-400 hover:underline">
|
||||
class="text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300">
|
||||
{{ park.name }}
|
||||
</a>
|
||||
</h3>
|
||||
|
||||
@@ -5,70 +5,100 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="container px-4 mx-auto">
|
||||
<!-- Manufacturer Header -->
|
||||
<div class="p-6 mb-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="flex flex-col items-start justify-between md:flex-row md:items-center">
|
||||
<div>
|
||||
<h1 class="mb-2 text-3xl font-bold text-gray-900 dark:text-white">{{ manufacturer.name }}</h1>
|
||||
{% if manufacturer.headquarters %}
|
||||
<p class="text-gray-600 dark:text-gray-400">
|
||||
<i class="mr-2 fas fa-map-marker-alt"></i>{{ manufacturer.headquarters }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="flex gap-2 mt-4 md:mt-0">
|
||||
{% if manufacturer.website %}
|
||||
<a href="{{ manufacturer.website }}" target="_blank" rel="noopener noreferrer"
|
||||
class="btn-secondary">
|
||||
<i class="mr-2 fas fa-external-link-alt"></i>Visit Website
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url 'companies:manufacturer_edit' slug=manufacturer.slug %}" class="btn-secondary">
|
||||
<i class="mr-2 fas fa-edit"></i>Edit
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if manufacturer.description %}
|
||||
<div class="mt-6 prose dark:prose-invert max-w-none">
|
||||
{{ manufacturer.description|linebreaks }}
|
||||
</div>
|
||||
<!-- Action Buttons - Above header -->
|
||||
<div class="flex justify-end gap-2 mb-2">
|
||||
{% if manufacturer.website %}
|
||||
<a href="{{ manufacturer.website }}" target="_blank" rel="noopener noreferrer"
|
||||
class="transition-transform btn-secondary hover:scale-105">
|
||||
<i class="mr-1 fas fa-external-link-alt"></i>Visit Website
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url 'companies:manufacturer_edit' slug=manufacturer.slug %}"
|
||||
class="transition-transform btn-secondary hover:scale-105">
|
||||
<i class="mr-1 fas fa-edit"></i>Edit
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Manufacturer Stats -->
|
||||
<div class="grid grid-cols-1 gap-6 mb-6 md:grid-cols-3">
|
||||
<div class="p-6 text-center bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="text-3xl font-bold text-blue-600 dark:text-blue-400">
|
||||
{{ rides.count }}
|
||||
<!-- Header Grid -->
|
||||
<div class="grid gap-2 mb-12 sm:mb-16 md:mb-8 grid-cols-1 sm:grid-cols-12 h-auto md:h-[140px]">
|
||||
<!-- Manufacturer Info Card -->
|
||||
<div class="flex flex-col items-center justify-center h-full col-span-1 p-2 text-center bg-white rounded-lg shadow-lg sm:col-span-3 dark:bg-gray-800">
|
||||
<h1 class="text-2xl font-bold leading-tight text-gray-900 sm:text-3xl dark:text-white">{{ manufacturer.name }}</h1>
|
||||
|
||||
{% if manufacturer.headquarters %}
|
||||
<div class="flex items-center justify-center mt-0.5 text-sm text-gray-600 dark:text-gray-400">
|
||||
<i class="mr-1 fas fa-map-marker-alt"></i>
|
||||
<p>{{ manufacturer.headquarters }}</p>
|
||||
</div>
|
||||
<div class="mt-1 text-gray-600 dark:text-gray-400">Total Rides</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="p-6 text-center bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="text-3xl font-bold text-blue-600 dark:text-blue-400">
|
||||
{{ rides|filter:"type='ROLLER_COASTER'"|length }}
|
||||
|
||||
<!-- Stats and Quick Facts -->
|
||||
<div class="grid h-full grid-cols-12 col-span-1 gap-2 sm:col-span-9">
|
||||
<!-- Stats Column -->
|
||||
<div class="grid grid-cols-2 col-span-12 gap-2 sm:col-span-4">
|
||||
<div class="flex flex-col items-center justify-center p-2 text-center bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Total Rides</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 sm:text-2xl dark:text-sky-400">{{ rides.count }}</dd>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center p-2 text-center bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Coasters</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 sm:text-2xl dark:text-sky-400">{{ coaster_count }}</dd>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-1 text-gray-600 dark:text-gray-400">Roller Coasters</div>
|
||||
</div>
|
||||
|
||||
<div class="p-6 text-center bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="text-3xl font-bold text-blue-600 dark:text-blue-400">
|
||||
{{ rides|regroup:"park"|length }}
|
||||
|
||||
<!-- Quick Facts Grid -->
|
||||
<div class="grid h-full grid-cols-3 col-span-12 gap-1 p-1.5 bg-white rounded-lg shadow-lg sm:col-span-8 dark:bg-gray-800">
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-map dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Parks Served</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ parks_count }}</dd>
|
||||
</div>
|
||||
|
||||
{% if manufacturer.founded_date %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-calendar-alt dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Founded</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ manufacturer.founded_date }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if manufacturer.website %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-globe dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Website</dt>
|
||||
<dd>
|
||||
<a href="{{ manufacturer.website }}"
|
||||
class="text-blue-600 text-2xs sm:text-xs hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300"
|
||||
target="_blank" rel="noopener noreferrer">
|
||||
Visit
|
||||
<i class="ml-0.5 text-2xs fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="mt-1 text-gray-600 dark:text-gray-400">Parks with Rides</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if manufacturer.description %}
|
||||
<div class="p-6 mb-8 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-900 dark:text-white">About</h2>
|
||||
<div class="prose dark:prose-invert max-w-none">
|
||||
{{ manufacturer.description|linebreaks }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Rides List -->
|
||||
<div class="p-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-6 text-2xl font-bold text-gray-900 dark:text-white">Rides</h2>
|
||||
<h2 class="mb-6 text-xl font-semibold text-gray-900 dark:text-white">Rides</h2>
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{% for ride in rides %}
|
||||
<div class="overflow-hidden rounded-lg bg-gray-50 dark:bg-gray-700">
|
||||
<div class="overflow-hidden transition-transform rounded-lg hover:scale-[1.02] bg-gray-50 dark:bg-gray-700">
|
||||
{% if ride.photos.exists %}
|
||||
<img src="{{ ride.photos.first.image.url }}"
|
||||
alt="{{ ride.name }}"
|
||||
@@ -82,7 +112,7 @@
|
||||
<div class="p-4">
|
||||
<h3 class="mb-2 text-lg font-semibold">
|
||||
<a href="{% url 'parks:rides:ride_detail' ride.park.slug ride.slug %}"
|
||||
class="text-blue-600 dark:text-blue-400 hover:underline">
|
||||
class="text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300">
|
||||
{{ ride.name }}
|
||||
</a>
|
||||
</h3>
|
||||
|
||||
121
templates/designers/designer_detail.html
Normal file
121
templates/designers/designer_detail.html
Normal file
@@ -0,0 +1,121 @@
|
||||
{% extends 'base/base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ designer.name }} - ThrillWiki{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container px-4 mx-auto">
|
||||
<!-- Header -->
|
||||
<div class="grid grid-cols-1 gap-6 mb-8 lg:grid-cols-3">
|
||||
<!-- Designer Info -->
|
||||
<div class="lg:col-span-2">
|
||||
<div class="p-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h1 class="mb-2 text-3xl font-bold text-gray-900 dark:text-white">{{ designer.name }}</h1>
|
||||
{% if designer.description %}
|
||||
<div class="mt-4 prose dark:prose-invert max-w-none">
|
||||
{{ designer.description|linebreaks }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Stats Card -->
|
||||
<div class="lg:col-span-1">
|
||||
<div class="p-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-900 dark:text-white">Quick Stats</h2>
|
||||
<dl class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Total Rides</dt>
|
||||
<dd class="mt-1 text-3xl font-semibold text-blue-600 dark:text-blue-400">{{ stats.total_rides }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Roller Coasters</dt>
|
||||
<dd class="mt-1 text-3xl font-semibold text-blue-600 dark:text-blue-400">{{ stats.total_coasters }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Parks</dt>
|
||||
<dd class="mt-1 text-3xl font-semibold text-blue-600 dark:text-blue-400">{{ stats.total_parks }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Countries</dt>
|
||||
<dd class="mt-1 text-3xl font-semibold text-blue-600 dark:text-blue-400">{{ stats.total_countries }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
{% if designer.website %}
|
||||
<div class="mt-6">
|
||||
<a href="{{ designer.website }}" target="_blank" rel="noopener noreferrer"
|
||||
class="inline-flex items-center text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
<i class="mr-2 fas fa-external-link-alt"></i>
|
||||
Visit Website
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Rides List -->
|
||||
<div class="p-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-6 text-2xl font-semibold text-gray-900 dark:text-white">Designed Rides</h2>
|
||||
|
||||
{% if rides %}
|
||||
<div class="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{% for ride in rides %}
|
||||
<div class="p-4 transition-shadow rounded-lg bg-gray-50 hover:shadow-md dark:bg-gray-700/50">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">
|
||||
<a href="{% url 'parks:rides:ride_detail' park_slug=ride.park.slug ride_slug=ride.slug %}"
|
||||
class="hover:text-blue-600 dark:hover:text-blue-400">
|
||||
{{ ride.name }}
|
||||
</a>
|
||||
</h3>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">
|
||||
at <a href="{% url 'parks:park_detail' ride.park.slug %}"
|
||||
class="text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
{{ ride.park.name }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<span class="px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-blue-700 dark:text-blue-50">
|
||||
{{ ride.get_category_display }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-2 gap-4 mt-4">
|
||||
{% if ride.opening_date %}
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Opened</dt>
|
||||
<dd class="text-gray-900 dark:text-white">{{ ride.opening_date }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ride.manufacturer %}
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Manufacturer</dt>
|
||||
<dd class="text-gray-900 dark:text-white">{{ ride.manufacturer.name }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ride.category == 'RC' and ride.coaster_stats %}
|
||||
{% if ride.coaster_stats.height_ft %}
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Height</dt>
|
||||
<dd class="text-gray-900 dark:text-white">{{ ride.coaster_stats.height_ft }} ft</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ride.coaster_stats.speed_mph %}
|
||||
<div>
|
||||
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Speed</dt>
|
||||
<dd class="text-gray-900 dark:text-white">{{ ride.coaster_stats.speed_mph }} mph</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-gray-500 dark:text-gray-400">No rides found.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -22,35 +22,35 @@
|
||||
<div class="container px-4 mx-auto">
|
||||
<!-- Action Buttons - Above header -->
|
||||
{% if user.is_authenticated %}
|
||||
<div class="flex justify-end gap-3 mb-4">
|
||||
<div class="flex justify-end gap-2 mb-2">
|
||||
<a href="{% url 'parks:park_update' park.slug %}"
|
||||
class="transition-transform btn-secondary hover:scale-105">
|
||||
<i class="mr-2 fas fa-pencil-alt"></i>Edit
|
||||
<i class="mr-1 fas fa-pencil-alt"></i>Edit
|
||||
</a>
|
||||
{% if perms.media.add_photo %}
|
||||
<button class="transition-transform btn-secondary hover:scale-105"
|
||||
@click="$dispatch('show-photo-upload')">
|
||||
<i class="mr-2 fas fa-camera"></i>Upload Photo
|
||||
<i class="mr-1 fas fa-camera"></i>Upload Photo
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Header Grid -->
|
||||
<div class="grid h-[340px] gap-4 mb-6 grid-cols-1 sm:grid-cols-6 md:grid-cols-12">
|
||||
<div class="grid gap-2 mb-12 sm:mb-16 md:mb-8 grid-cols-1 sm:grid-cols-12 h-auto md:h-[140px]">
|
||||
<!-- Park Info Card -->
|
||||
<div class="flex flex-col h-full col-span-1 p-4 overflow-auto bg-white rounded-lg shadow-lg sm:col-span-2 md:col-span-3 dark:bg-gray-800">
|
||||
<h1 class="text-3xl font-bold text-gray-900 dark:text-white">{{ park.name }}</h1>
|
||||
<div class="flex flex-col items-center justify-center h-full col-span-1 p-2 text-center bg-white rounded-lg shadow-lg sm:col-span-3 dark:bg-gray-800">
|
||||
<h1 class="text-2xl font-bold leading-tight text-gray-900 sm:text-3xl dark:text-white">{{ park.name }}</h1>
|
||||
|
||||
{% if park.formatted_location %}
|
||||
<div class="flex items-center mt-2 text-gray-600 dark:text-gray-400">
|
||||
<i class="mr-2 fas fa-map-marker-alt"></i>
|
||||
<div class="flex items-center justify-center mt-0.5 text-sm text-gray-600 dark:text-gray-400">
|
||||
<i class="mr-1 fas fa-map-marker-alt"></i>
|
||||
<p>{{ park.formatted_location }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="flex flex-wrap items-center gap-2 mt-3">
|
||||
<span class="status-badge text-sm font-medium {% if park.status == 'OPERATING' %}status-operating
|
||||
<div class="flex flex-wrap items-center justify-center gap-1 mt-1">
|
||||
<span class="status-badge text-xs sm:text-sm font-medium py-0.5 {% if park.status == 'OPERATING' %}status-operating
|
||||
{% elif park.status == 'CLOSED_TEMP' or park.status == 'CLOSED_PERM' %}status-closed
|
||||
{% elif park.status == 'UNDER_CONSTRUCTION' %}status-construction
|
||||
{% elif park.status == 'DEMOLISHED' %}status-demolished
|
||||
@@ -58,8 +58,8 @@
|
||||
{{ park.get_status_display }}
|
||||
</span>
|
||||
{% if park.average_rating %}
|
||||
<span class="flex items-center text-sm font-medium text-yellow-800 bg-yellow-100 status-badge dark:bg-yellow-600 dark:text-yellow-50">
|
||||
<span class="mr-1 text-yellow-500 dark:text-yellow-200">★</span>
|
||||
<span class="flex items-center text-xs font-medium text-yellow-800 bg-yellow-100 sm:text-sm status-badge py-0.5 dark:bg-yellow-600 dark:text-yellow-50">
|
||||
<span class="mr-0.5 text-yellow-500 dark:text-yellow-200">★</span>
|
||||
{{ park.average_rating|floatformat:1 }}/10
|
||||
</span>
|
||||
{% endif %}
|
||||
@@ -67,36 +67,36 @@
|
||||
</div>
|
||||
|
||||
<!-- Stats and Quick Facts -->
|
||||
<div class="grid h-full grid-cols-1 col-span-1 gap-4 sm:grid-cols-6 sm:col-span-4 md:grid-cols-12 md:col-span-9">
|
||||
<div class="grid h-full grid-cols-12 col-span-1 gap-2 sm:col-span-9">
|
||||
<!-- Stats Column -->
|
||||
<div class="flex flex-col col-span-1 gap-4 sm:col-span-2 md:col-span-4">
|
||||
<div class="grid-cols-2 col-span-12 gap-2 text-sky-400grid sm:grid-cols-1 md:grid-cols-2 sm:col-span-4">
|
||||
<!-- Total Rides Card -->
|
||||
{% if park.total_rides %}
|
||||
<a href="{% url 'parks:rides:ride_list' park.slug %}"
|
||||
class="flex flex-col flex-1 p-4 transition-transform bg-white rounded-lg shadow-lg hover:scale-[1.02] dark:bg-gray-800">
|
||||
<dt class="text-lg font-semibold text-gray-900 dark:text-white">Total Rides</dt>
|
||||
<dd class="mt-2 text-4xl font-bold text-gray-900 dark:text-white">{{ park.total_rides }}</dd>
|
||||
class="flex flex-col items-center justify-center p-2 text-center transition-transform bg-white rounded-lg shadow-lg hover:scale-[1.02] dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Total Rides</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 hover:text-sky-800 sm:text-2xl dark:text-sky-400 dark:hover:text-sky-300">{{ park.total_rides }}</dd>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<!-- Total Roller Coasters Card -->
|
||||
{% if park.total_roller_coasters %}
|
||||
<div class="flex flex-col flex-1 p-4 bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-lg font-semibold text-gray-900 dark:text-white">Total Roller Coasters</dt>
|
||||
<dd class="mt-2 text-4xl font-bold text-gray-900 dark:text-white">{{ park.total_roller_coasters }}</dd>
|
||||
<div class="flex flex-col items-center justify-center p-2 text-center bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Roller Coasters</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 hover:text-sky-800 sm:text-2xl dark:text-sky-400 dark:hover:text-sky-300">{{ park.total_roller_coasters }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Quick Facts Grid -->
|
||||
<div class="grid h-full grid-cols-2 col-span-1 gap-4 p-4 bg-white rounded-lg shadow-lg sm:grid-cols-2 sm:col-span-4 md:grid-cols-4 md:col-span-8 lg:grid-cols-6 dark:bg-gray-800">
|
||||
<div class="grid h-full grid-cols-3 col-span-12 gap-1 p-1.5 bg-white rounded-lg shadow-lg sm:col-span-8 dark:bg-gray-800">
|
||||
{% if park.owner %}
|
||||
<div class="flex flex-col items-center justify-center text-center lg:col-span-2">
|
||||
<i class="mb-1 text-lg text-blue-600 fas fa-building dark:text-blue-400"></i>
|
||||
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Owner/Operator</dt>
|
||||
<dd class="mt-0.5">
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-building dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Owner</dt>
|
||||
<dd>
|
||||
<a href="{% url 'companies:company_detail' park.owner.slug %}"
|
||||
class="text-sm text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
class="text-blue-600 text-2xs sm:text-xs hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
{{ park.owner.name }}
|
||||
</a>
|
||||
</dd>
|
||||
@@ -104,39 +104,23 @@
|
||||
{% endif %}
|
||||
|
||||
{% if park.opening_date %}
|
||||
<div class="flex flex-col items-center justify-center text-center">
|
||||
<i class="mb-1 text-lg text-blue-600 fas fa-calendar-alt dark:text-blue-400"></i>
|
||||
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Opening Date</dt>
|
||||
<dd class="mt-0.5 text-sm text-gray-900 dark:text-white">{{ park.opening_date }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if park.operating_season %}
|
||||
<div class="flex flex-col items-center justify-center text-center">
|
||||
<i class="mb-1 text-lg text-blue-600 fas fa-clock dark:text-blue-400"></i>
|
||||
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Operating Season</dt>
|
||||
<dd class="mt-0.5 text-sm text-gray-900 dark:text-white">{{ park.operating_season }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if park.size_acres %}
|
||||
<div class="flex flex-col items-center justify-center text-center">
|
||||
<i class="mb-1 text-lg text-blue-600 fas fa-ruler-combined dark:text-blue-400"></i>
|
||||
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Size</dt>
|
||||
<dd class="mt-0.5 text-sm text-gray-900 dark:text-white">{{ park.size_acres }} acres</dd>
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-calendar-alt dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Opened</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ park.opening_date }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if park.website %}
|
||||
<div class="flex flex-col items-center justify-center text-center lg:col-span-2">
|
||||
<i class="mb-1 text-lg text-blue-600 fas fa-globe dark:text-blue-400"></i>
|
||||
<dt class="text-xs font-medium text-gray-500 dark:text-gray-400">Website</dt>
|
||||
<dd class="mt-0.5">
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-globe dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Website</dt>
|
||||
<dd>
|
||||
<a href="{{ park.website }}"
|
||||
class="inline-flex items-center text-sm text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300"
|
||||
class="inline-flex items-center text-blue-600 text-2xs sm:text-xs hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300"
|
||||
target="_blank" rel="noopener noreferrer">
|
||||
Official Website
|
||||
<i class="ml-1 fas fa-external-link-alt"></i>
|
||||
Visit
|
||||
<i class="ml-0.5 text-2xs fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
@@ -144,7 +128,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Photos -->
|
||||
|
||||
<!-- Photos Section -->
|
||||
{% if park.photos.exists %}
|
||||
<div class="p-6 mb-8 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-900 dark:text-white">Photos</h2>
|
||||
|
||||
154
templates/rides/ride_category_list.html
Normal file
154
templates/rides/ride_category_list.html
Normal file
@@ -0,0 +1,154 @@
|
||||
{% extends "base/base.html" %}
|
||||
{% load static %}
|
||||
{% load ride_tags %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container px-4 mx-auto">
|
||||
<div class="flex flex-col items-start justify-between gap-4 mb-6 md:flex-row md:items-center">
|
||||
<div>
|
||||
<h1 class="text-3xl font-bold text-gray-900 dark:text-white">{{ title }}</h1>
|
||||
{% if park %}
|
||||
<a href="{% url 'parks:park_detail' park.slug %}" class="text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
Back to {{ park.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Category Filters -->
|
||||
<div class="flex flex-wrap gap-4 mb-8">
|
||||
{% if park %}
|
||||
<a href="{% url 'parks:park_roller_coasters' park.slug %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'RC' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Roller Coasters
|
||||
</a>
|
||||
<a href="{% url 'parks:park_dark_rides' park.slug %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'DR' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Dark Rides
|
||||
</a>
|
||||
<a href="{% url 'parks:park_flat_rides' park.slug %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'FR' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Flat Rides
|
||||
</a>
|
||||
<a href="{% url 'parks:park_water_rides' park.slug %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'WR' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Water Rides
|
||||
</a>
|
||||
<a href="{% url 'parks:park_transports' park.slug %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'TR' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Transports
|
||||
</a>
|
||||
<a href="{% url 'parks:park_others' park.slug %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'OT' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Others
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'rides:roller_coasters' %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'RC' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Roller Coasters
|
||||
</a>
|
||||
<a href="{% url 'rides:dark_rides' %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'DR' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Dark Rides
|
||||
</a>
|
||||
<a href="{% url 'rides:flat_rides' %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'FR' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Flat Rides
|
||||
</a>
|
||||
<a href="{% url 'rides:water_rides' %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'WR' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Water Rides
|
||||
</a>
|
||||
<a href="{% url 'rides:transports' %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'TR' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Transports
|
||||
</a>
|
||||
<a href="{% url 'rides:others' %}"
|
||||
class="px-4 py-2 rounded-lg transition-colors {% if category_code == 'OT' %}bg-blue-600 text-white dark:bg-blue-500{% else %}bg-gray-100 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600{% endif %}">
|
||||
Others
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if not categories %}
|
||||
<p class="text-gray-600 dark:text-gray-400">No rides found.</p>
|
||||
{% endif %}
|
||||
|
||||
{% for category_name, rides in categories.items %}
|
||||
<div class="mb-10">
|
||||
<h2 class="mb-4 text-2xl font-semibold text-gray-900 dark:text-white">{{ category_name }}s</h2>
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{% for ride in rides %}
|
||||
<div class="overflow-hidden transition-transform transform bg-white rounded-lg shadow-lg dark:bg-gray-800 hover:-translate-y-1">
|
||||
<div class="aspect-w-16 aspect-h-9">
|
||||
{% if ride.photos.exists %}
|
||||
<img src="{{ ride.photos.first.image.url }}"
|
||||
alt="{{ ride.name }}"
|
||||
class="object-cover w-full">
|
||||
{% else %}
|
||||
<img src="{% get_ride_placeholder_image ride.category %}"
|
||||
alt="{{ ride.name }}"
|
||||
class="object-cover w-full">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="p-4">
|
||||
<h3 class="mb-2 text-xl font-bold">
|
||||
<a href="{% url 'parks:rides:ride_detail' ride.park.slug ride.slug %}"
|
||||
class="text-gray-900 hover:text-blue-600 dark:text-white dark:hover:text-blue-400">
|
||||
{{ ride.name }}
|
||||
</a>
|
||||
</h3>
|
||||
{% if not park %}
|
||||
<p class="mb-3 text-gray-600 dark:text-gray-400">
|
||||
at <a href="{% url 'parks:park_detail' ride.park.slug %}"
|
||||
class="text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
{{ ride.park.name }}
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if ride.manufacturer %}
|
||||
<p class="mb-3 text-gray-600 dark:text-gray-400">{{ ride.manufacturer.name }}</p>
|
||||
{% endif %}
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="text-blue-800 bg-blue-100 status-badge dark:bg-blue-400/30 dark:text-blue-200 dark:ring-1 dark:ring-blue-400/30">
|
||||
{{ ride.get_category_display }}
|
||||
</span>
|
||||
<span class="status-badge {% if ride.status == 'OPERATING' %}status-operating
|
||||
{% elif ride.status == 'CLOSED_TEMP' or ride.status == 'CLOSED_PERM' %}status-closed
|
||||
{% elif ride.status == 'UNDER_CONSTRUCTION' %}status-construction
|
||||
{% elif ride.status == 'DEMOLISHED' %}status-demolished
|
||||
{% elif ride.status == 'RELOCATED' %}status-relocated{% endif %}">
|
||||
{{ ride.get_status_display }}
|
||||
</span>
|
||||
{% if ride.average_rating %}
|
||||
<span class="text-yellow-800 bg-yellow-100 status-badge dark:bg-yellow-400/30 dark:text-yellow-200 dark:ring-1 dark:ring-yellow-400/30">
|
||||
<i class="mr-1 text-yellow-500 fas fa-star dark:text-yellow-300"></i>
|
||||
{{ ride.average_rating|floatformat:1 }}/10
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if ride.coaster_stats %}
|
||||
<div class="grid grid-cols-2 gap-2 mt-4">
|
||||
{% if ride.coaster_stats.height_ft %}
|
||||
<div class="text-sm text-gray-600 dark:text-gray-400">
|
||||
Height: {{ ride.coaster_stats.height_ft }}ft
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ride.coaster_stats.speed_mph %}
|
||||
<div class="text-sm text-gray-600 dark:text-gray-400">
|
||||
Speed: {{ ride.coaster_stats.speed_mph }}mph
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -5,54 +5,161 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="container px-4 mx-auto">
|
||||
<!-- Header -->
|
||||
<div class="p-6 mb-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<h1 class="mb-2 text-3xl font-bold text-gray-900 dark:text-white">{{ ride.name }}</h1>
|
||||
<p class="mb-2 text-gray-600 dark:text-gray-400">
|
||||
at <a href="{% url 'parks:park_detail' ride.park.slug %}" class="text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
{{ ride.park.name }}
|
||||
</a>
|
||||
{% if ride.park_area %}
|
||||
- {{ ride.park_area.name }}
|
||||
{% endif %}
|
||||
</p>
|
||||
<div class="flex flex-wrap gap-2 mt-3">
|
||||
<span class="status-badge {% if ride.status == 'OPERATING' %}status-operating
|
||||
{% elif ride.status == 'CLOSED_TEMP' or ride.status == 'CLOSED_PERM' %}status-closed
|
||||
{% elif ride.status == 'UNDER_CONSTRUCTION' %}status-construction
|
||||
{% elif ride.status == 'DEMOLISHED' %}status-demolished
|
||||
{% elif ride.status == 'RELOCATED' %}status-relocated{% endif %}">
|
||||
{{ ride.get_status_display }}
|
||||
</span>
|
||||
<span class="text-blue-800 bg-blue-100 status-badge dark:bg-blue-700 dark:text-blue-50">
|
||||
{{ ride.get_category_display }}
|
||||
</span>
|
||||
{% if ride.average_rating %}
|
||||
<span class="flex items-center text-yellow-800 bg-yellow-100 status-badge dark:bg-yellow-600 dark:text-yellow-50">
|
||||
<span class="mr-1 text-yellow-500 dark:text-yellow-200">★</span>
|
||||
{{ ride.average_rating|floatformat:1 }}/10
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- Action Buttons - Above header -->
|
||||
{% if user.is_authenticated %}
|
||||
<div class="flex justify-end gap-2 mb-2">
|
||||
<a href="{% url 'parks:rides:ride_edit' park_slug=ride.park.slug ride_slug=ride.slug %}"
|
||||
class="transition-transform btn-secondary hover:scale-105">
|
||||
<i class="mr-1 fas fa-pencil-alt"></i>Edit
|
||||
</a>
|
||||
{% if perms.media.add_photo %}
|
||||
<button class="transition-transform btn-secondary hover:scale-105"
|
||||
@click="$dispatch('show-photo-upload')">
|
||||
<i class="mr-1 fas fa-camera"></i>Upload Photo
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Header Grid -->
|
||||
<div class="grid grid-cols-1 gap-2 mb-8 sm:grid-cols-12">
|
||||
<!-- Ride Info Card -->
|
||||
<div class="flex flex-col items-center justify-center h-full col-span-1 p-2 text-center bg-white rounded-lg shadow-lg sm:col-span-3 dark:bg-gray-800">
|
||||
<h1 class="text-2xl font-bold leading-tight text-gray-900 sm:text-3xl dark:text-white">{{ ride.name }}</h1>
|
||||
|
||||
<div class="flex items-center justify-center mt-0.5 text-sm text-gray-600 dark:text-gray-400">
|
||||
at <a href="{% url 'parks:park_detail' ride.park.slug %}" class="ml-1 text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
{{ ride.park.name }}
|
||||
</a>
|
||||
{% if ride.park_area %}
|
||||
- {{ ride.park_area.name }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if user.is_authenticated %}
|
||||
<div class="flex gap-2">
|
||||
<a href="{% url 'parks:rides:ride_edit' park_slug=ride.park.slug ride_slug=ride.slug %}" class="btn-secondary">
|
||||
<i class="mr-2 fas fa-pencil-alt"></i>Edit
|
||||
</a>
|
||||
{% if perms.media.add_photo %}
|
||||
<button class="btn-secondary" @click="$dispatch('show-photo-upload')">
|
||||
<i class="mr-2 fas fa-camera"></i>Upload Photo
|
||||
</button>
|
||||
|
||||
<div class="flex flex-wrap items-center justify-center gap-1 mt-1">
|
||||
<span class="status-badge text-xs sm:text-sm font-medium py-0.5 {% if ride.status == 'OPERATING' %}status-operating
|
||||
{% elif ride.status == 'CLOSED_TEMP' or ride.status == 'CLOSED_PERM' %}status-closed
|
||||
{% elif ride.status == 'UNDER_CONSTRUCTION' %}status-construction
|
||||
{% elif ride.status == 'DEMOLISHED' %}status-demolished
|
||||
{% elif ride.status == 'RELOCATED' %}status-relocated{% endif %}">
|
||||
{{ ride.get_status_display }}
|
||||
</span>
|
||||
<span class="text-blue-800 bg-blue-100 status-badge text-xs sm:text-sm font-medium py-0.5 dark:bg-blue-700 dark:text-blue-50">
|
||||
{{ ride.get_category_display }}
|
||||
</span>
|
||||
{% if ride.average_rating %}
|
||||
<span class="flex items-center text-xs font-medium text-yellow-800 bg-yellow-100 sm:text-sm status-badge py-0.5 dark:bg-yellow-600 dark:text-yellow-50">
|
||||
<span class="mr-0.5 text-yellow-500 dark:text-yellow-200">★</span>
|
||||
{{ ride.average_rating|floatformat:1 }}/10
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Stats and Quick Facts -->
|
||||
<div class="grid h-full grid-cols-12 col-span-1 gap-2 sm:col-span-9">
|
||||
<!-- Stats Column -->
|
||||
<div class="grid grid-cols-2 col-span-12 gap-2 sm:col-span-4">
|
||||
{% if coaster_stats %}
|
||||
{% if coaster_stats.height_ft %}
|
||||
<div class="flex flex-col items-center justify-center p-2 text-center bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Height</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 sm:text-2xl dark:text-sky-400">{{ coaster_stats.height_ft }} ft</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.speed_mph %}
|
||||
<div class="flex flex-col items-center justify-center p-2 text-center bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Speed</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 sm:text-2xl dark:text-sky-400">{{ coaster_stats.speed_mph }} mph</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.inversions %}
|
||||
<div class="flex flex-col items-center justify-center p-2 text-center bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Inversions</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 sm:text-2xl dark:text-sky-400">{{ coaster_stats.inversions }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.length_ft %}
|
||||
<div class="flex flex-col items-center justify-center p-2 text-center bg-white rounded-lg shadow-lg dark:bg-gray-800">
|
||||
<dt class="text-sm font-semibold text-gray-900 sm:text-base dark:text-white">Length</dt>
|
||||
<dd class="mt-0.5 text-xl font-bold text-sky-900 sm:text-2xl dark:text-sky-400">{{ coaster_stats.length_ft }} ft</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Quick Facts Grid -->
|
||||
<div class="grid h-full grid-cols-3 col-span-12 gap-1 p-1.5 bg-white rounded-lg shadow-lg sm:col-span-8 dark:bg-gray-800">
|
||||
{% if ride.manufacturer %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-industry dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Manufacturer</dt>
|
||||
<dd>
|
||||
<a href="{% url 'companies:manufacturer_detail' ride.manufacturer.slug %}"
|
||||
class="text-blue-600 text-2xs sm:text-xs hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
{{ ride.manufacturer.name }}
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if ride.designer %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-drafting-compass dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Designer</dt>
|
||||
<dd>
|
||||
<a href="{% url 'designers:designer_detail' ride.designer.slug %}"
|
||||
class="text-blue-600 text-2xs sm:text-xs hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
{{ ride.designer.name }}
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if coaster_stats.roller_coaster_type %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-train dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Coaster Type</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ coaster_stats.get_roller_coaster_type_display }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if coaster_stats.track_material %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-layer-group dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Track Material</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ coaster_stats.get_track_material_display }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if ride.opening_date %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-calendar-alt dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Opened</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ ride.opening_date }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if ride.capacity_per_hour %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-users dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Capacity</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ ride.capacity_per_hour }}/hr</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if coaster_stats.launch_type %}
|
||||
<div class="flex flex-col items-center justify-center text-center p-0.5">
|
||||
<i class="text-sm text-blue-600 sm:text-base fas fa-rocket dark:text-blue-400"></i>
|
||||
<dt class="font-medium text-gray-500 text-2xs dark:text-gray-400">Launch Type</dt>
|
||||
<dd class="text-gray-900 text-2xs sm:text-xs dark:text-white">{{ coaster_stats.get_launch_type_display }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Photos -->
|
||||
<!-- Photos Section -->
|
||||
{% if ride.photos.exists %}
|
||||
<div class="p-6 mb-8 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-900 dark:text-white">Photos</h2>
|
||||
@@ -60,13 +167,50 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Reviews Section -->
|
||||
<div class="p-6 mb-8 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h2 class="text-xl font-semibold text-gray-900 dark:text-white">Reviews</h2>
|
||||
{% if user.is_authenticated %}
|
||||
<button class="btn-primary">
|
||||
<i class="mr-2 fas fa-star"></i>
|
||||
Write a Review
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if ride.reviews.exists %}
|
||||
<div class="space-y-4">
|
||||
{% for review in ride.reviews.all %}
|
||||
<div class="pb-4 border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<h3 class="font-semibold text-gray-900 dark:text-white">{{ review.title }}</h3>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">
|
||||
by {{ review.user.username }} on {{ review.created_at|date }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<span class="mr-1 text-yellow-400">★</span>
|
||||
<span class="text-gray-900 dark:text-white">{{ review.rating }}/10</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-2 text-gray-700 dark:text-gray-300">{{ review.content }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-gray-500 dark:text-gray-400">No reviews yet. Be the first to review this ride!</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Main Content Grid -->
|
||||
<div class="grid grid-cols-1 gap-6 lg:grid-cols-3">
|
||||
<!-- Left Column - Description and Details -->
|
||||
<div class="lg:col-span-2">
|
||||
{% if ride.description %}
|
||||
<div class="p-6 mb-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-900 dark:text-white">About</h2>
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-900 dark:text-white">Trivia</h2>
|
||||
<div class="prose dark:prose-invert max-w-none">
|
||||
{{ ride.description|linebreaks }}
|
||||
</div>
|
||||
@@ -79,8 +223,8 @@
|
||||
<div class="space-y-2">
|
||||
{% for name_history in ride.previous_names %}
|
||||
<div class="flex justify-between">
|
||||
<span>{{ name_history.name }}</span>
|
||||
<span class="text-gray-500">{{ name_history.period }}</span>
|
||||
<span class="text-gray-900 dark:text-white">{{ name_history.name }}</span>
|
||||
<span class="text-gray-500 dark:text-gray-400">{{ name_history.period }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -91,44 +235,129 @@
|
||||
<div class="p-6 mb-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-900 dark:text-white">Roller Coaster Statistics</h2>
|
||||
<div class="grid grid-cols-2 gap-4 md:grid-cols-3">
|
||||
<!-- Coaster Type -->
|
||||
{% if coaster_stats.roller_coaster_type %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Coaster Type</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.get_roller_coaster_type_display }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Height Stats -->
|
||||
{% if coaster_stats.height_ft %}
|
||||
<div>
|
||||
<span class="block text-gray-500">Height</span>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Maximum Height</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.height_ft }} ft
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.max_drop_height_ft %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Drop Height</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.max_drop_height_ft }} ft
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Track Stats -->
|
||||
{% if coaster_stats.length_ft %}
|
||||
<div>
|
||||
<span class="block text-gray-500">Length</span>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Track Length</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.length_ft }} ft
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.track_type %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Track Layout</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.track_type }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.track_material %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Track Material</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.get_track_material_display }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Speed and Time -->
|
||||
{% if coaster_stats.speed_mph %}
|
||||
<div>
|
||||
<span class="block text-gray-500">Speed</span>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Maximum Speed</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.speed_mph }} mph
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<span class="block text-gray-500">Inversions</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.inversions }}
|
||||
</span>
|
||||
</div>
|
||||
{% if coaster_stats.ride_time_seconds %}
|
||||
<div>
|
||||
<span class="block text-gray-500">Ride Duration</span>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Ride Duration</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.ride_time_seconds }} sec
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Train Details -->
|
||||
{% if coaster_stats.train_style %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Train Style</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.train_style }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.trains_count %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Number of Trains</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.trains_count }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.cars_per_train %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Cars per Train</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.cars_per_train }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.seats_per_car %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Seats per Car</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.seats_per_car }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Other Stats -->
|
||||
{% if coaster_stats.inversions %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Inversions</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.inversions }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coaster_stats.launch_type %}
|
||||
<div>
|
||||
<span class="block text-gray-500 dark:text-gray-400">Launch Type</span>
|
||||
<span class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
{{ coaster_stats.get_launch_type_display }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -140,18 +369,29 @@
|
||||
<h2 class="mb-4 text-xl font-semibold text-gray-900 dark:text-white">Quick Facts</h2>
|
||||
<dl class="space-y-4">
|
||||
<div>
|
||||
<dt class="text-gray-500">Manufacturer</dt>
|
||||
<dt class="text-gray-500 dark:text-gray-400">Manufacturer</dt>
|
||||
<dd class="font-medium text-gray-900 dark:text-white">{{ ride.manufacturer }}</dd>
|
||||
</div>
|
||||
{% if ride.designer %}
|
||||
<div>
|
||||
<dt class="text-gray-500 dark:text-gray-400">Designer</dt>
|
||||
<dd class="font-medium text-gray-900 dark:text-white">
|
||||
<a href="{% url 'designers:designer_detail' ride.designer.slug %}"
|
||||
class="text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
|
||||
{{ ride.designer.name }}
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ride.model_name %}
|
||||
<div>
|
||||
<dt class="text-gray-500">Model</dt>
|
||||
<dt class="text-gray-500 dark:text-gray-400">Model</dt>
|
||||
<dd class="font-medium text-gray-900 dark:text-white">{{ ride.model_name }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ride.opening_date %}
|
||||
<div>
|
||||
<dt class="text-gray-500">Opening Date</dt>
|
||||
<dt class="text-gray-500 dark:text-gray-400">Opening Date</dt>
|
||||
<dd class="font-medium text-gray-900 dark:text-white">
|
||||
{{ ride.opening_date }}
|
||||
</dd>
|
||||
@@ -159,7 +399,7 @@
|
||||
{% endif %}
|
||||
{% if ride.status_since %}
|
||||
<div>
|
||||
<dt class="text-gray-500">Status Since</dt>
|
||||
<dt class="text-gray-500 dark:text-gray-400">Status Since</dt>
|
||||
<dd class="font-medium text-gray-900 dark:text-white">
|
||||
{{ ride.status_since }}
|
||||
</dd>
|
||||
@@ -167,7 +407,7 @@
|
||||
{% endif %}
|
||||
{% if ride.closing_date %}
|
||||
<div>
|
||||
<dt class="text-gray-500">Closing Date</dt>
|
||||
<dt class="text-gray-500 dark:text-gray-400">Closing Date</dt>
|
||||
<dd class="font-medium text-gray-900 dark:text-white">
|
||||
{{ ride.closing_date }}
|
||||
</dd>
|
||||
@@ -175,7 +415,7 @@
|
||||
{% endif %}
|
||||
{% if ride.capacity_per_hour %}
|
||||
<div>
|
||||
<dt class="text-gray-500">Capacity</dt>
|
||||
<dt class="text-gray-500 dark:text-gray-400">Capacity</dt>
|
||||
<dd class="font-medium text-gray-900 dark:text-white">
|
||||
{{ ride.capacity_per_hour }} riders/hour
|
||||
</dd>
|
||||
@@ -183,7 +423,7 @@
|
||||
{% endif %}
|
||||
{% if ride.min_height_in %}
|
||||
<div>
|
||||
<dt class="text-gray-500">Minimum Height</dt>
|
||||
<dt class="text-gray-500 dark:text-gray-400">Minimum Height</dt>
|
||||
<dd class="font-medium text-gray-900 dark:text-white">
|
||||
{{ ride.min_height_in }} inches
|
||||
</dd>
|
||||
@@ -206,65 +446,33 @@
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
{% for field, changes in record.diff_against_previous.items %}
|
||||
<div class="text-sm">
|
||||
<span class="font-medium">{{ field }}:</span>
|
||||
{{ changes.old }} → {{ changes.new }}
|
||||
</div>
|
||||
{% if field != "updated_at" %}
|
||||
<div class="text-sm">
|
||||
<span class="font-medium">{{ field|title }}:</span>
|
||||
<span class="text-red-600 dark:text-red-400">{{ changes.old }}</span>
|
||||
<span class="mx-1">→</span>
|
||||
<span class="text-green-600 dark:text-green-400">{{ changes.new }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<p class="text-gray-500">No history available.</p>
|
||||
<p class="text-gray-500 dark:text-gray-400">No history available.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Reviews Section -->
|
||||
<div class="p-6 mt-6 bg-white rounded-lg shadow dark:bg-gray-800">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h2 class="text-xl font-semibold text-gray-900 dark:text-white">Reviews</h2>
|
||||
{% if user.is_authenticated %}
|
||||
<button class="btn-primary">
|
||||
<i class="mr-2 fas fa-star"></i>
|
||||
Write a Review
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if ride.reviews.exists %}
|
||||
<div class="space-y-4">
|
||||
{% for review in ride.reviews.all %}
|
||||
<div class="pb-4 border-b border-gray-200 dark:border-gray-700">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<h3 class="font-semibold text-gray-900 dark:text-white">{{ review.title }}</h3>
|
||||
<p class="text-sm text-gray-500">
|
||||
by {{ review.user.username }} on {{ review.created_at|date }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<span class="mr-1 text-yellow-400">★</span>
|
||||
<span>{{ review.rating }}/10</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-2 text-gray-700 dark:text-gray-300">{{ review.content }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-gray-500">No reviews yet. Be the first to review this ride!</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Photo Upload Modal -->
|
||||
{% if perms.media.add_photo %}
|
||||
<div x-data="{ show: false }"
|
||||
<div x-cloak
|
||||
x-data="{ show: false }"
|
||||
@show-photo-upload.window="show = true"
|
||||
x-show="show"
|
||||
class="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50"
|
||||
class="fixed inset-0 z-[60] flex items-center justify-center bg-black bg-opacity-50"
|
||||
@click.self="show = false">
|
||||
<div class="w-full max-w-2xl p-6 mx-4 bg-white rounded-lg shadow-xl dark:bg-gray-800">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
|
||||
Reference in New Issue
Block a user