diff --git a/atst/routes/portfolios/index.py b/atst/routes/portfolios/index.py index 1d7739e7..2341d2d0 100644 --- a/atst/routes/portfolios/index.py +++ b/atst/routes/portfolios/index.py @@ -22,7 +22,18 @@ def portfolios(): def portfolio(portfolio_id): portfolio = Portfolios.get_for_update_information(g.current_user, portfolio_id) form = PortfolioForm(data={"name": portfolio.name}) - return render_template("portfolios/edit.html", form=form, portfolio=portfolio) + pagination_opts = Paginator.get_pagination_opts(http_request) + audit_events = AuditLog.get_portfolio_events( + g.current_user, portfolio, pagination_opts + ) + return render_template( + "portfolios/edit.html", + form=form, + portfolio=portfolio, + portfolio_name=portfolio.name, + portfolio_id=portfolio_id, + audit_events=audit_events, + ) @portfolios_bp.route("/portfolios//edit", methods=["POST"]) diff --git a/styles/components/_portfolio_layout.scss b/styles/components/_portfolio_layout.scss index f5671413..a81f6a87 100644 --- a/styles/components/_portfolio_layout.scss +++ b/styles/components/_portfolio_layout.scss @@ -350,3 +350,9 @@ border-bottom: none; } } + +.portfolio-admin { + .edit-portfolio-name.action-group { + margin-top: 2rem; + } +} diff --git a/templates/portfolios/edit.html b/templates/portfolios/edit.html index f61c7d8c..a71dd143 100644 --- a/templates/portfolios/edit.html +++ b/templates/portfolios/edit.html @@ -1,5 +1,6 @@ {% extends "portfolios/base.html" %} +{% from "components/pagination.html" import Pagination %} {% from "components/icon.html" import Icon %} {% from "components/text_input.html" import TextInput %} @@ -7,32 +8,26 @@ {% block portfolio_content %} -{% include "fragments/flash.html" %} + {% include "fragments/flash.html" %} -
- {{ form.csrf_token }} +
-
+ + {{ form.csrf_token }} +
+
+ {{ TextInput(form.name, validation="portfolioName") }} +
-
-

Portfolio Settings

-
+
+
+ +
+
+
+ + {% include "fragments/audit_events_log.html" %} -
- {{ TextInput(form.name, validation="portfolioName") }} -
+ {{ Pagination(audit_events, 'portfolios.portfolio_activity', portfolio_id=portfolio_id) }}
- - - - - - - {% endblock %}