mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 18:51:30 +00:00
Hide content page links in nav when on dash
This commit is contained in:
parent
46b14064a0
commit
bfcb91e60f
2 changed files with 12 additions and 1 deletions
|
@ -27,8 +27,16 @@ nav.navbar.navbar-default.navbar-main
|
||||||
|
|
||||||
// loop over header_extras
|
// loop over header_extras
|
||||||
each item in nav.header_extras
|
each item in nav.header_extras
|
||||||
|
-
|
||||||
|
if ((item.only_when_logged_in && getSessionUser())
|
||||||
|
|| (item.only_when_logged_out && (!getSessionUser()))
|
||||||
|
|| (!item.only_when_logged_out && !item.only_when_logged_in && !item.only_content_pages)
|
||||||
|
|| (item.only_content_pages && (typeof(suppressNavContentLinks) == "undefined" || !suppressNavContentLinks))
|
||||||
|
){
|
||||||
|
var showNavItem = true
|
||||||
|
}
|
||||||
|
|
||||||
if ((item.only_when_logged_in && getSessionUser()) || (item.only_when_logged_out && (!getSessionUser())) || (!item.only_when_logged_out && !item.only_when_logged_in))
|
if showNavItem
|
||||||
if item.dropdown
|
if item.dropdown
|
||||||
li.dropdown(class=item.class, dropdown)
|
li.dropdown(class=item.class, dropdown)
|
||||||
a.dropdown-toggle(href, dropdown-toggle)
|
a.dropdown-toggle(href, dropdown-toggle)
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
extends ../layout
|
extends ../layout
|
||||||
|
|
||||||
|
block vars
|
||||||
|
- var suppressNavContentLinks = true
|
||||||
|
|
||||||
block content
|
block content
|
||||||
//- We need to do .replace(/\//g, '\\/') do that '</script>' -> '<\/script>'
|
//- We need to do .replace(/\//g, '\\/') do that '</script>' -> '<\/script>'
|
||||||
//- and doesn't prematurely end the script tag.
|
//- and doesn't prematurely end the script tag.
|
||||||
|
|
Loading…
Reference in a new issue