From 7865bf04f012c495a4cd6bda43404e4fd048b7d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Vigan=C3=B2?= Date: Mon, 16 Oct 2023 22:48:46 +0200 Subject: [PATCH] Add consists view in rolling stock and them in company filter --- ram/portal/static/css/main.css | 5 ++ ram/portal/templates/base.html | 6 +-- ram/portal/templates/cards/company.html | 2 +- ram/portal/templates/cards/consist.html | 2 +- ram/portal/templates/consist.html | 4 +- ram/portal/templates/rollingstock.html | 70 ++++++++++++++++++------- ram/portal/views.py | 35 +++++++++---- ram/ram/__init__.py | 2 +- 8 files changed, 89 insertions(+), 37 deletions(-) diff --git a/ram/portal/static/css/main.css b/ram/portal/static/css/main.css index c83f1d9..324fa29 100644 --- a/ram/portal/static/css/main.css +++ b/ram/portal/static/css/main.css @@ -12,6 +12,11 @@ td > img.logo { max-height: 48px; } +td > img.logo-xl { + max-width: 400px; + max-height: 96px; +} + .btn > span { display: inline-block; } diff --git a/ram/portal/templates/base.html b/ram/portal/templates/base.html index 4aeb7da..c16101b 100644 --- a/ram/portal/templates/base.html +++ b/ram/portal/templates/base.html @@ -162,9 +162,6 @@
  • Scales
  • -
  • Real
  • + {% show_bookshelf_menu %} {% show_flatpages_menu %} diff --git a/ram/portal/templates/cards/company.html b/ram/portal/templates/cards/company.html index 3157a9e..558b389 100644 --- a/ram/portal/templates/cards/company.html +++ b/ram/portal/templates/cards/company.html @@ -14,7 +14,7 @@ {% if d.item.logo %} Logo - + {% endif %} diff --git a/ram/portal/templates/cards/consist.html b/ram/portal/templates/cards/consist.html index b8cfc31..2fad777 100644 --- a/ram/portal/templates/cards/consist.html +++ b/ram/portal/templates/cards/consist.html @@ -44,7 +44,7 @@ Length - {{ d.item.consist_item.all | length }} + {{ d.item.consist_item.count }} diff --git a/ram/portal/templates/consist.html b/ram/portal/templates/consist.html index 4328606..87a5010 100644 --- a/ram/portal/templates/consist.html +++ b/ram/portal/templates/consist.html @@ -81,7 +81,9 @@ Company - {{ consist.company }} + + {{ consist.company }} ({{ consist.company.extended_name }}) + Era diff --git a/ram/portal/templates/rollingstock.html b/ram/portal/templates/rollingstock.html index a96cc08..a08ab12 100644 --- a/ram/portal/templates/rollingstock.html +++ b/ram/portal/templates/rollingstock.html @@ -45,13 +45,16 @@
    + {% with class=rolling_stock.rolling_class company=rolling_stock.rolling_class.company %}