diff --git a/shynet/dashboard/mixins.py b/shynet/dashboard/mixins.py index 6ec65ce..7a56d3b 100644 --- a/shynet/dashboard/mixins.py +++ b/shynet/dashboard/mixins.py @@ -25,7 +25,6 @@ class DateRangeMixin: else: return timezone.now() - def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) data["start_date"] = self.get_start_date() diff --git a/shynet/dashboard/templates/base.html b/shynet/dashboard/templates/base.html index e33a5f3..a3b5379 100644 --- a/shynet/dashboard/templates/base.html +++ b/shynet/dashboard/templates/base.html @@ -42,7 +42,9 @@ {% for service in user.owning_services.all %} {% url 'dashboard:service' service.uuid as url %} - {% include 'dashboard/includes/sidebar_portal.html' with label=service.name|truncatechars:16 url=url icon=service.link|iconify %} + {% with url_full=date_query_params|default:''|prepend_string:url %} + {% include 'dashboard/includes/sidebar_portal.html' with label=service.name|truncatechars:16 url=url_full icon=service.link|iconify %} + {% endwith %} {% endfor %} {% endif %} diff --git a/shynet/dashboard/templatetags/helpers.py b/shynet/dashboard/templatetags/helpers.py index 78be195..4919f9e 100644 --- a/shynet/dashboard/templatetags/helpers.py +++ b/shynet/dashboard/templatetags/helpers.py @@ -186,5 +186,5 @@ def urldisplay(url): return url @register.filter -def add_string(arg1, arg2): - return f"{str(arg1)}{str(arg2)}" +def prepend_string(arg1, arg2): + return f"{str(arg2)}{str(arg1)}"