diff --git a/app/ajax/faculty/past_projects.py b/app/ajax/faculty/past_projects.py index 60af19d1..5070ec74 100644 --- a/app/ajax/faculty/past_projects.py +++ b/app/ajax/faculty/past_projects.py @@ -61,12 +61,8 @@ # language=jinja2 _metadata = """ -
- {{ project_selection_data(p) }} -
-
- {{ project_metadata(p) }} -
+{{ project_selection_data(p) }} +{{ project_metadata(p) }} """ diff --git a/app/templates/faculty/dashboard/selector_card.html b/app/templates/faculty/dashboard/selector_card.html index 917049fb..08c4c3a9 100644 --- a/app/templates/faculty/dashboard/selector_card.html +++ b/app/templates/faculty/dashboard/selector_card.html @@ -183,14 +183,13 @@
-
Name
-
Info
+
Name
Meeting requests
Meetings confirmed
{% for project in live_projects %}
-
+
@@ -198,7 +197,8 @@
- {{ project_metadata(project) }} + {{ project_metadata(project, user_classes="mt-2") }} + {{ project_selection_data(project) }}
-
-
- {{ project_selection_data(project) }} -
-
{% for req in project.requests_waiting %} diff --git a/app/templates/faculty/macros.html b/app/templates/faculty/macros.html index d83f26e8..ce66d834 100644 --- a/app/templates/faculty/macros.html +++ b/app/templates/faculty/macros.html @@ -1,25 +1,60 @@ {% from "labels.html" import simple_label, unformatted_label %} -{% macro project_metadata(project) %} +{% macro project_metadata(project, user_classes=none) %} {% if project is not none %} -
+
{% if project.last_view %}
last view {{ project.last_view.strftime("%a %d %b %Y %H:%M:%S") }}
{% endif %}
{% else %} - Missing project data + Missing project data {% endif %} {% endmacro %} -{% macro project_selection_data(project) %} +{% macro project_selection_data(project, user_classes=none) %} {% if project is not none %} -
-
{{ unformatted_label(project.selections_label(popover=True), prefix='') }}
-
{{ unformatted_label(project.bookmarks_label(popover=True), prefix='') }}
-
{{ unformatted_label(project.views_label(), prefix='') }}
+ {% set select_label = project.selections_label(popover=True) %} + {% set bookmark_label = project.bookmarks_label(popover=True) %} + {% set view_label = project.views_label() %} +
+ {% if 'label' in select_label %} + {{ select_label['label'] }}, + {% else %} + selection data missing, + {% endif %} + {% if 'label' in bookmark_label %} + {{ bookmark_label['label'] }}, + {% else %} + bookmark data missing, + {% endif %} + {% if 'label' in view_label %} + {{ view_label['label'] }}, + {% else %} + views data missing, + {% endif %}
+ {% if 'popover' in select_label %} + {%- set popover_str = select_label['popover'] %} + {%- if popover_str is iterable and popover_str is not string %} + {%- set popover_str = popover_str|wrap_list('
', '
')|join -%} + {%- endif -%} +
View selections
+ {% endif %} + {% if 'popover' in bookmark_label %} + {%- set popover_str = bookmark_label['popover'] %} + {%- if popover_str is iterable and popover_str is not string %} + {%- set popover_str = popover_str|wrap_list('
', '
')|join -%} + {%- endif -%} +
View bookmarks
+ {% endif %} {% else %} - Missing project data + Missing project data {% endif %} {% endmacro %}