diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index 70dbffbee..5df942106 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -23,6 +23,7 @@ from django.conf import settings #from django.template.defaultfilters import slugify, date as date_format, time as time_format from django.template.defaultfilters import date as date_format from django.utils.text import slugify +from django.utils.safestring import mark_safe from ietf.dbtemplate.models import DBTemplate from ietf.doc.models import Document @@ -488,20 +489,19 @@ class TimeSlot(models.Model): return self.time + self.duration def get_hidden_location(self): - location = self.location - if location: - location = location.name - elif self.type_id == "reg": - location = self.meeting.reg_area - elif self.type_id == "break": - location = self.meeting.break_area - return location + if not hasattr(self, '_cached_hidden_location'): + location = self.location + if location: + location = location.name + elif self.type_id == "reg": + location = self.meeting.reg_area + elif self.type_id == "break": + location = self.meeting.break_area + self._cached_hidden_location = location + return self._cached_hidden_location def get_location(self): - location = self.get_hidden_location() - if not self.show_location: - location = "" - return location + return self.get_hidden_location() if self.show_location else "" def get_functional_location(self): name_parts = [] @@ -513,6 +513,15 @@ class TimeSlot(models.Model): name_parts.append(location) return ' - '.join(name_parts) + def get_html_location(self): + if not hasattr(self, '_cached_html_location'): + self._cached_html_location = self.get_location() + if len(self._cached_html_location) > 8: + self._cached_html_location = mark_safe(self._cached_html_location.replace('/', '/')) + else: + self._cached_html_location = mark_safe(self._cached_html_location.replace(' ', ' ')) + return self._cached_html_location + def tz(self): if not hasattr(self, '_cached_tz'): if self.meeting.time_zone: diff --git a/ietf/static/ietf/css/ietf.css b/ietf/static/ietf/css/ietf.css index 8d5f65829..aab014f5c 100644 --- a/ietf/static/ietf/css/ietf.css +++ b/ietf/static/ietf/css/ietf.css @@ -1289,3 +1289,19 @@ a.fc-event, .fc-event, .fc-content, .fc-title, .fc-event-container { cursor: default; background-color: #eee; } + +/* A modified .container-fluid without padding on very narrow devices*/ +.container-fluid-narrow { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (max-width: 480px) { + .container-fluid-narrow { + padding-right: 0; + padding-left: 0; + margin-right: auto; + margin-left: auto; + } +} \ No newline at end of file diff --git a/ietf/templates/base.html b/ietf/templates/base.html index 791785abd..1ad7555d5 100644 --- a/ietf/templates/base.html +++ b/ietf/templates/base.html @@ -85,7 +85,7 @@ -
+
{% comment %} {% bootstrap_messages %} {% endcomment %} {% for message in messages %}
{{ message }}
@@ -134,7 +134,7 @@
-