Explicitly set secondary breadcrumbs
This commit is contained in:
parent
be8806877d
commit
45ed8811f7
@ -14,16 +14,6 @@ from atst.models.permissions import Permissions
|
||||
from atst.utils.localization import translate
|
||||
|
||||
|
||||
def get_breadcrumb_from_request(request):
|
||||
if request.url_rule.rule.startswith("/portfolios/<portfolio_id>/task_order"):
|
||||
return translate("navigation.portfolio_navigation.breadcrumbs.funding")
|
||||
if request.url_rule.endpoint == "portfolios.portfolio":
|
||||
return translate("navigation.portfolio_navigation.breadcrumbs.admin")
|
||||
if request.url_rule.endpoint == "portfolios.portfolio_reports":
|
||||
return translate("navigation.portfolio_navigation.breadcrumbs.reports")
|
||||
return None
|
||||
|
||||
|
||||
@portfolios_bp.context_processor
|
||||
def portfolio():
|
||||
portfolio = None
|
||||
@ -42,9 +32,4 @@ def portfolio():
|
||||
)
|
||||
return False
|
||||
|
||||
return {
|
||||
"portfolio": portfolio,
|
||||
"permissions": Permissions,
|
||||
"user_can": user_can,
|
||||
"secondary_breadcrumb": get_breadcrumb_from_request(http_request),
|
||||
}
|
||||
return {"portfolio": portfolio, "permissions": Permissions, "user_can": user_can}
|
||||
|
@ -1,6 +1,8 @@
|
||||
{% extends "portfolios/base.html" %}
|
||||
{% from "components/pagination.html" import Pagination %}
|
||||
|
||||
{% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.admin" | translate %}
|
||||
|
||||
{% block portfolio_content %}
|
||||
<div v-cloak>
|
||||
{% include "fragments/audit_events_log.html" %}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
{% extends "portfolios/base.html" %}
|
||||
|
||||
|
||||
{% block portfolio_content %}
|
||||
|
||||
{% if not portfolio.applications %}
|
||||
|
@ -3,6 +3,8 @@
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/text_input.html" import TextInput %}
|
||||
|
||||
{% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.admin" | translate %}
|
||||
|
||||
{% block portfolio_content %}
|
||||
|
||||
{% include "fragments/flash.html" %}
|
||||
|
@ -4,6 +4,8 @@
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/empty_state.html" import EmptyState %}
|
||||
|
||||
{% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.reports" | translate %}
|
||||
|
||||
{% block portfolio_content %}
|
||||
|
||||
{{ Alert("Budget Report for Portfolio " + portfolio.name,
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
{% extends "portfolios/base.html" %}
|
||||
|
||||
{% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.funding" | translate %}
|
||||
|
||||
{% block portfolio_content %}
|
||||
|
||||
{% macro ViewLink(task_order) %}
|
||||
|
@ -1,5 +1,7 @@
|
||||
{% extends "portfolios/base.html" %}
|
||||
|
||||
{% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.funding" | translate %}
|
||||
|
||||
{% from "components/checkbox_input.html" import CheckboxInput %}
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/text_input.html" import TextInput %}
|
||||
|
@ -1,5 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.funding" | translate %}
|
||||
|
||||
{% from "components/edit_link.html" import EditLink %}
|
||||
{% from "components/required_label.html" import RequiredLabel %}
|
||||
{% from "components/icon.html" import Icon %}
|
||||
|
@ -1,5 +1,7 @@
|
||||
{% extends "portfolios/base.html" %}
|
||||
|
||||
{% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.funding" | translate %}
|
||||
|
||||
{% from "components/icon.html" import Icon %}
|
||||
|
||||
{% block portfolio_content %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user