From f5d875d153dccec96afd42930476810f3dae9371 Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Wed, 24 Feb 2021 22:20:29 +0000 Subject: [PATCH] Very initial pass at reimplementing event table fully responsive --- RIGS/templates/partials/event_table.html | 185 ++++++++++++----------- gulpfile.js | 2 +- 2 files changed, 98 insertions(+), 89 deletions(-) diff --git a/RIGS/templates/partials/event_table.html b/RIGS/templates/partials/event_table.html index f360d90c..b1a29088 100644 --- a/RIGS/templates/partials/event_table.html +++ b/RIGS/templates/partials/event_table.html @@ -1,104 +1,113 @@ {% load namewithnotes from filters %} -
- - - - - - - - - - - {% for event in events %} - +
+
#
+
Dates & Times
+
Event Details
+
MIC
+
+ {% for event in events %} +
- -
- - - - - - - - {% empty %} - - - - {% endfor %} - -
#Dates & TimesEvent DetailsMIC
{{ event.display_id }} - Start: {{ event.start_date|date:"D d/m/Y" }} - {% if event.has_start_time %} - {{ event.start_time|date:"H:i" }} + +
{{ event.display_id }}
+ +
+ Start: {{ event.start_date|date:"D d/m/Y" }} + {% if event.has_start_time %} + {{ event.start_time|date:"H:i" }} + {% endif %} + + {% if event.end_date %} +
+ End: {% if event.end_date != event.start_date %}{{ event.end_date|date:"D d/m/Y" }}{% endif %} + {% if event.has_end_time %} + {{ event.end_time|date:"H:i" }} {% endif %} - {% if event.end_date %} -
- End: {% if event.end_date != event.start_date %}{{ event.end_date|date:"D d/m/Y" }}{% endif %} - {% if event.has_end_time %} - {{ event.end_time|date:"H:i" }} - {% endif %} - + {% endif %} + {% if not event.cancelled %} + {% if event.meet_at %} +
Crew meet: {{ event.meet_at|date:"H:i" }} {{ event.meet_at|date:"(d/m/Y)" }} {% endif %} - {% if not event.cancelled %} - {% if event.meet_at %} -
Crew meet: {{ event.meet_at|date:"H:i" }} {{ event.meet_at|date:"(d/m/Y)" }} - {% endif %} - {% if event.access_at %} -
Access at: {{ event.access_at|date:"H:i" }} {{ event.access_at|date:"(d/m/Y)" }} - {% endif %} + {% if event.access_at %} +
Access at: {{ event.access_at|date:"H:i" }} {{ event.access_at|date:"(d/m/Y)" }} {% endif %} -
-

- - {{ event.name }} + {% endif %} + + +
+

+ + {{ event.name }} + + {% if event.venue %} + at {{ event.venue|namewithnotes:'venue_detail' }} + {% endif %} + {% if event.dry_hire %} + Dry Hire + {% endif %} +

+ {% if event.is_rig and not event.cancelled %} +
+ {{ event.person.name }} + {% if event.organisation %} + for {{ event.organisation.name }} + {% endif %} +
+ {% endif %} + {% if not event.cancelled and event.description %} +

{{ event.description|linebreaksbr }}

+ {% endif %} + {% include 'partials/event_status.html' %} +
+ +
+ {% if event.mic %} + {% if perms.RIGS.view_profile %} + + {% endif %} + + {{ event.mic }} + {% if perms.RIGS.view_profile %} - {% if event.venue %} - at {{ event.venue|namewithnotes:'venue_detail' }} - {% endif %} - {% if event.dry_hire %} - Dry Hire - {% endif %} -

- {% if event.is_rig and not event.cancelled %} -
- {{ event.person.name }} - {% if event.organisation %} - for {{ event.organisation.name }} - {% endif %} -
{% endif %} - {% if not event.cancelled and event.description %} -

{{ event.description|linebreaksbr }}

- {% endif %} - {% include 'partials/event_status.html' %} -
- {% if event.mic %} - {% if perms.RIGS.view_profile %} - - {% endif %} - - {{ event.mic }} - {% if perms.RIGS.view_profile %} - - {% endif %} - {% elif event.is_rig %} - - {% endif %} -
No events found
+ {% elif event.is_rig %} + + {% endif %} +
+ + {% endfor %} diff --git a/gulpfile.js b/gulpfile.js index 73200aaa..9fc24d98 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -80,7 +80,7 @@ function browserSync(done) { spawn('python', ['manage.py', 'runserver'], {stdio: 'inherit'}); // TODO Wait for Django server to come up before browsersync, it seems inconsistent browsersync.init({ - notify: false, + notify: true, open: false, port: 8001, proxy: 'localhost:8000'