mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:33:27 +00:00
dynamic template menu by config settings
This commit is contained in:
parent
acf392eb4e
commit
e0e9949da5
3 changed files with 30 additions and 44 deletions
|
@ -131,6 +131,7 @@ module.exports = (app)->
|
|||
|
||||
app.use (req, res, next) ->
|
||||
res.locals.nav = Settings.nav
|
||||
res.locals.templates = Settings.templates
|
||||
next()
|
||||
|
||||
app.use (req, res, next) ->
|
||||
|
|
|
@ -21,22 +21,12 @@
|
|||
href,
|
||||
ng-click="openUploadProjectModal()"
|
||||
) #{translate("upload_project")}
|
||||
li.divider
|
||||
li.dropdown-header #{translate("templates")}
|
||||
li
|
||||
a.menu-indent(href="/templates/cv") #{translate("cv_or_resume")}
|
||||
li
|
||||
a.menu-indent(href="/templates/cover-letters") #{translate("cover_letter")}
|
||||
li
|
||||
a.menu-indent(href="/templates/journals") #{translate("journal_article")}
|
||||
li
|
||||
a.menu-indent(href="/templates/presentations") #{translate("presentation")}
|
||||
li
|
||||
a.menu-indent(href="/templates/thesis") #{translate("thesis")}
|
||||
li
|
||||
a.menu-indent(href="/templates/bibliographies") #{translate("bibliographies")}
|
||||
li
|
||||
a.menu-indent(href="/templates") #{translate("view_all")} »
|
||||
if (templates)
|
||||
li.divider
|
||||
li.dropdown-header #{translate("templates")}
|
||||
each item in templates
|
||||
li
|
||||
a.menu-indent(href=item.url) #{translate(item.name)}
|
||||
|
||||
.row-spaced(ng-if="projects.length > 0", ng-cloak)
|
||||
ul.list-unstyled.folders-menu(
|
||||
|
@ -101,4 +91,4 @@
|
|||
a(href="/user/subscription/plans").btn.btn-primary #{translate("upgrade")}
|
||||
p.small
|
||||
| #{translate("or_unlock_features_bonus")}
|
||||
a(href="/user/bonus") #{translate("sharing_sl")} .
|
||||
a(href="/user/bonus") #{translate("sharing_sl")} .
|
||||
|
|
|
@ -279,33 +279,28 @@ module.exports =
|
|||
}]
|
||||
}]
|
||||
|
||||
templates: [{
|
||||
name : "cv_or_resume",
|
||||
url : "/templates/cv"
|
||||
}, {
|
||||
name : "cover_letter",
|
||||
url : "/templates/cover-letters"
|
||||
}, {
|
||||
name : "journal_article",
|
||||
url : "/templates/journals"
|
||||
|
||||
}, {
|
||||
name : "presentation",
|
||||
url : "/templates/presentations"
|
||||
|
||||
}, {
|
||||
name : "thesis",
|
||||
url : "/templates/thesis"
|
||||
|
||||
}, {
|
||||
name : "bibliographies",
|
||||
url : "/templates/bibliographies"
|
||||
|
||||
}, {
|
||||
name : "view_all",
|
||||
url : "/templates"
|
||||
|
||||
}]
|
||||
# templates: [{
|
||||
# name : "cv_or_resume",
|
||||
# url : "/templates/cv"
|
||||
# }, {
|
||||
# name : "cover_letter",
|
||||
# url : "/templates/cover-letters"
|
||||
# }, {
|
||||
# name : "journal_article",
|
||||
# url : "/templates/journals"
|
||||
# }, {
|
||||
# name : "presentation",
|
||||
# url : "/templates/presentations"
|
||||
# }, {
|
||||
# name : "thesis",
|
||||
# url : "/templates/thesis"
|
||||
# }, {
|
||||
# name : "bibliographies",
|
||||
# url : "/templates/bibliographies"
|
||||
# }, {
|
||||
# name : "view_all",
|
||||
# url : "/templates"
|
||||
# }]
|
||||
|
||||
|
||||
redirects:
|
||||
|
|
Loading…
Reference in a new issue