diff --git a/adminalerts/templates/adminalerts/alert_list.html b/adminalerts/templates/adminalerts/alert_list.html index 53e83702..a7330d5d 100644 --- a/adminalerts/templates/adminalerts/alert_list.html +++ b/adminalerts/templates/adminalerts/alert_list.html @@ -13,16 +13,13 @@ table#sodar-aa-list-table tbody tr td:nth-child(4) { white-space: nowrap; } - table#sodar-aa-list-table thead tr th:nth-child(5), table#sodar-aa-list-table tbody tr td:nth-child(5) { width: 150px; } - table#sodar-aa-list-table tr td:nth-child(6) { width: 75px; } - /* Responsive modifications */ @media screen and (max-width: 1100px) { table#sodar-aa-list-table thead tr th:nth-child(3), @@ -30,14 +27,12 @@ display: none; } } - @media screen and (max-width: 900px) { table#sodar-aa-list-table thead tr th:nth-child(2), table#sodar-aa-list-table tbody tr td:nth-child(2) { display: none; } } - @media screen and (max-width: 750px) { table#sodar-aa-list-table thead tr th:nth-child(4), table#sodar-aa-list-table tbody tr td:nth-child(4) { @@ -47,20 +42,110 @@ {% endblock css %} +{% block projectroles %} + +
+

Admin Alerts

+ + Create Alert + +
+ +
+
+
+ + + + + + + + + + + + + {% for a in object_list %} + + + + + + + + + {% endfor %} + {% if not object_list %} + + + + {% endif %} + +
MessageUserCreatedExpiryStatus
+ + {{ a.message }} + + {% get_user_html a.user as user_html %}{{ user_html|safe }}{{ a.date_created | date:'Y-m-d H:i:s' }}{{ a.date_expire | date:'Y-m-d' }} + + + + +
+ No alerts found. +
+
+
+ {% if is_paginated %} + {% include 'projectroles/_pagination.html' with pg_small=False %} + {% endif %} +
+ +{% endblock projectroles %} + {% block javascript %} {{ block.super }} -{% endblock javascript %} - -{% block projectroles %} - -
-

Admin Alerts

- - - Create Alert - -
- -
- - {% if object_list.count > 0 %} -
-
- - - - - - - - - - - - - {% for a in object_list %} - - - - - - - - - {% endfor %} - -
MessageUserCreatedExpiryStatus
{{ a.message }}{% get_user_html a.user as user_html %}{{ user_html|safe }}{{ a.date_created | date:'Y-m-d H:i:s' }}{{ a.date_expire | date:'Y-m-d' }} - - - -
-
-
- - {% if is_paginated %} - {% include 'projectroles/_pagination.html' with pg_small=False %} - {% endif %} - - {% else %} {# if object_list.count == 0 #} -
- -
- {% endif %} - -
- -{% endblock projectroles %} +{% endblock javascript %} \ No newline at end of file diff --git a/adminalerts/tests/test_ui.py b/adminalerts/tests/test_ui.py index fa49c13b..c97bc8b3 100644 --- a/adminalerts/tests/test_ui.py +++ b/adminalerts/tests/test_ui.py @@ -87,8 +87,10 @@ def test_list_items(self): url = reverse('adminalerts:list') self.assert_element_count(expected, url, 'sodar-aa-alert-item', 'id') - def test_list_buttons(self): - """Test existence of buttons in list""" + def test_list_dropdown(self): + """Test existence of alert dropdown in list""" expected = [(self.superuser, 1)] url = reverse('adminalerts:list') - self.assert_element_count(expected, url, 'sodar-aa-alert-buttons', 'id') + self.assert_element_count( + expected, url, 'sodar-aa-alert-dropdown', 'class' + )