From b277bd8424bdb8aef6c0c2e22acd70854f6ba18b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 22 Jan 2021 11:27:03 +0100 Subject: [PATCH] feat: link api docs --- messages/uniworx/de-de-formal.msg | 1 + messages/uniworx/en-eu.msg | 3 +++ src/Foundation/Navigation.hs | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/messages/uniworx/de-de-formal.msg b/messages/uniworx/de-de-formal.msg index 4878e3014..a07b7ed9c 100644 --- a/messages/uniworx/de-de-formal.msg +++ b/messages/uniworx/de-de-formal.msg @@ -1428,6 +1428,7 @@ MenuAllocationUsers: Bewerber MenuAllocationPriorities: Zentrale Dringlichkeiten MenuAllocationCompute: Platzvergabe berechnen MenuAllocationAccept: Platzvergabe akzeptieren +MenuApiDocs: API-Dokumentation (Englisch) MenuSwagger: OpenAPI 2.0 (Swagger) MenuAllocationAddUser: Bewerber hinzufügen MenuFaq: FAQ diff --git a/messages/uniworx/en-eu.msg b/messages/uniworx/en-eu.msg index bb00e62bc..61df840d0 100644 --- a/messages/uniworx/en-eu.msg +++ b/messages/uniworx/en-eu.msg @@ -1428,6 +1428,8 @@ MenuAllocationUsers: Applicants MenuAllocationPriorities: Central priorities MenuAllocationCompute: Compute allocation MenuAllocationAccept: Accept allocation +MenuApiDocs: API documentation +MenuSwagger: OpenAPI 2.0 (Swagger) MenuAllocationAddUser: Add applicant MenuFaq: FAQ MenuSheetPersonalisedFiles: Download personalised sheet files @@ -1522,6 +1524,7 @@ BreadcrumbAllocationPriorities: Central priorities BreadcrumbAllocationCompute: Compute allocation BreadcrumbAllocationAccept: Accept allocation BreadcrumbExternalApis: External APIs +BreadcrumbApiDocs: API documentation BreadcrumbSwagger: API documentation BreadcrumbAllocationAddUser: Add applicant BreadcrumbMessageHide: Hide diff --git a/src/Foundation/Navigation.hs b/src/Foundation/Navigation.hs index be33ae209..83587b671 100644 --- a/src/Foundation/Navigation.hs +++ b/src/Foundation/Navigation.hs @@ -666,6 +666,14 @@ defaultLinks = fmap catMaybes . mapM runMaybeT $ -- Define the menu items of the , navQuick' = mempty , navForceActive = False } + , return $ NavFooter NavLink + { navLabel = MsgMenuApiDocs + , navRoute = ApiDocsR + , navAccess' = return True + , navType = NavTypeLink { navModal = False } + , navQuick' = mempty + , navForceActive = False + } , return NavHeader { navHeaderRole = NavHeaderPrimary , navIcon = IconMenuNews @@ -2564,6 +2572,19 @@ pageActions TopWorkflowInstanceListR = return , navChildren = [] } ] +pageActions ApiDocsR = return + [ NavPageActionPrimary + { navLink = NavLink + { navLabel = MsgMenuSwagger + , navRoute = SwaggerR + , navAccess' = return True + , navType = NavTypeLink { navModal = False } + , navQuick' = mempty + , navForceActive = False + } + , navChildren = [] + } + ] pageActions _ = return [] submissionList :: ( MonadIO m