From 8700ba37d3010a48e4889eb920a966b491381304 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Wed, 9 Jan 2019 09:45:22 -0500 Subject: [PATCH] Create partial for duplicated div for audit log and activity history --- templates/audit_log/audit_log.html | 21 +-------------------- templates/fragments/audit_events_log.html | 21 +++++++++++++++++++++ templates/workspaces/activity/index.html | 21 +-------------------- 3 files changed, 23 insertions(+), 40 deletions(-) create mode 100644 templates/fragments/audit_events_log.html diff --git a/templates/audit_log/audit_log.html b/templates/audit_log/audit_log.html index 73a7443c..37edf908 100644 --- a/templates/audit_log/audit_log.html +++ b/templates/audit_log/audit_log.html @@ -2,24 +2,5 @@ {% from "components/pagination.html" import Pagination %} {% block content %} - -
-
-
-

{{ "audit_log.header_title" | translate }}

-
- -
    - {% for event in audit_events %} -
  • - {% autoescape false %} - {{ event | renderAuditEvent }} - {% endautoescape %} -
  • - {% endfor %} -
-
- - {{ Pagination(audit_events, 'atst.activity_history') }} -
+ {% include "fragments/audit_events_log.html" %} {% endblock %} diff --git a/templates/fragments/audit_events_log.html b/templates/fragments/audit_events_log.html new file mode 100644 index 00000000..2c4bb440 --- /dev/null +++ b/templates/fragments/audit_events_log.html @@ -0,0 +1,21 @@ +{% from "components/pagination.html" import Pagination %} + +
+
+
+

{{ "audit_log.header_title" | translate }}

+
+ +
    + {% for event in audit_events %} +
  • + {% autoescape false %} + {{ event | renderAuditEvent }} + {% endautoescape %} +
  • + {% endfor %} +
+
+ + {{ Pagination(audit_events, 'workspaces.workspace_activity', workspace_id=workspace_id) }} +
diff --git a/templates/workspaces/activity/index.html b/templates/workspaces/activity/index.html index bce6217e..e97d5d37 100644 --- a/templates/workspaces/activity/index.html +++ b/templates/workspaces/activity/index.html @@ -2,24 +2,5 @@ {% from "components/pagination.html" import Pagination %} {% block workspace_content %} - -
-
-
-

{{ "audit_log.header_title" | translate }}

-
- -
    - {% for event in audit_events %} -
  • - {% autoescape false %} - {{ event | renderAuditEvent }} - {% endautoescape %} -
  • - {% endfor %} -
-
- - {{ Pagination(audit_events, 'workspaces.workspace_activity', workspace_id=workspace_id) }} -
+ {% include "fragments/audit_events_log.html" %} {% endblock %}