overleaf/services/web/app/views/admin/index.pug
Antoine Clausse 0c4ca15003 [web] Add #main-content to some pug pages (fix skip-to-content links) (#18050)
* Add `#main-content` to some pug pages

This fixes our `skip-to-content` accessibility anchor links. Alternatively or additionally, we can set `suppressSkipToContent = true` in some pages: that will remove the anchor link in the page.

While working on this, I noticed that sometimes we still have a bit of extra nesting or components that should maybe be out of `<main>` or `#main-content`. In a future PR we can maybe update these elements to target the "real core content" of the page.

* Add `suppressSkipToContent` in confirm-email page

GitOrigin-RevId: 6cbf4112f2d1a2d8eff06f142d0c2b4f3a5d9cff
2024-04-24 08:04:43 +00:00

99 lines
3.7 KiB
Text

extends ../layout-marketing
include ../_mixins/bookmarkable_tabset
block content
.content.content-alt#main-content
.container
.row
.col-xs-12
.card
.page-header
h1 Admin Panel
div(data-ol-bookmarkable-tabset)
ul.nav.nav-tabs(role="tablist")
+bookmarkable-tabset-header('system-messages', 'System Messages', true)
+bookmarkable-tabset-header('open-sockets', 'Open Sockets')
+bookmarkable-tabset-header('open-close-editor', 'Open/Close Editor')
if hasFeature('saas')
+bookmarkable-tabset-header('tpds', 'TPDS/Dropbox Management')
.tab-content
.tab-pane.active(
role="tabpanel"
id='system-messages'
)
each message in systemMessages
.alert.alert-info.row-spaced(ng-non-bindable) #{message.content}
hr
form(method='post', action='/admin/messages')
input(name="_csrf", type="hidden", value=csrfToken)
.form-group
label(for="content")
input.form-control(name="content", type="text", placeholder="Message…", required)
button.btn.btn-primary(type="submit") Post Message
hr
form(method='post', action='/admin/messages/clear')
input(name="_csrf", type="hidden", value=csrfToken)
button.btn.btn-danger(type="submit") Clear all messages
.tab-pane(
role="tabpanel"
id='open-sockets'
)
.row-spaced
ul
each agents, url in openSockets
li(ng-non-bindable) #{url} - total : #{agents.length}
ul
each agent in agents
li(ng-non-bindable) #{agent}
.tab-pane(
role="tabpanel"
id='open-close-editor'
)
if hasFeature('saas')
| The "Open/Close Editor" feature is not available in SAAS.
else
.row-spaced
form(method='post',action='/admin/closeEditor')
input(name="_csrf", type="hidden", value=csrfToken)
button.btn.btn-danger(type="submit") Close Editor
p.small Will stop anyone opening the editor. Will NOT disconnect already connected users.
.row-spaced
form(method='post',action='/admin/disconnectAllUsers')
input(name="_csrf", type="hidden", value=csrfToken)
button.btn.btn-danger(type="submit") Disconnect all users
p.small Will force disconnect all users with the editor open. Make sure to close the editor first to avoid them reconnecting.
.row-spaced
form(method='post',action='/admin/openEditor')
input(name="_csrf", type="hidden", value=csrfToken)
button.btn.btn-danger(type="submit") Reopen Editor
p.small Will reopen the editor after closing.
if hasFeature('saas')
.tab-pane(
role="tabpanel"
id='tpds'
)
h3 Flush project to TPDS
.row
form.col-xs-6(method='post',action='/admin/flushProjectToTpds')
input(name="_csrf", type="hidden", value=csrfToken)
.form-group
label(for='project_id') project_id
input.form-control(type='text', name='project_id', placeholder='project_id', required)
.form-group
button.btn-primary.btn(type='submit') Flush
hr
h3 Poll Dropbox for user
.row
form.col-xs-6(method='post',action='/admin/pollDropboxForUser')
input(name="_csrf", type="hidden", value=csrfToken)
.form-group
label(for='user_id') user_id
input.form-control(type='text', name='user_id', placeholder='user_id', required)
.form-group
button.btn-primary.btn(type='submit') Poll