overleaf/services/web/app/views/project/list/side-bar.pug

168 lines
5.1 KiB
Text
Raw Normal View History

.dropdown(
dropdown
dropdown-append-to-body
)
a.btn.btn-primary.sidebar-new-proj-btn.dropdown-toggle(
2014-07-16 09:59:52 -04:00
href="#",
data-toggle="dropdown",
dropdown-toggle
)
| #{translate("new_project")}
2014-07-16 09:59:52 -04:00
ul.dropdown-menu(role="menu")
li
a(
href,
ng-click="openCreateProjectModal()"
2014-07-29 10:33:31 -04:00
) #{translate("blank_project")}
2014-07-16 09:59:52 -04:00
li
a(
href,
ng-click="openCreateProjectModal('example')"
2014-07-29 10:33:31 -04:00
) #{translate("example_project")}
2014-07-16 09:59:52 -04:00
li
a(
href,
ng-click="openUploadProjectModal()"
2014-07-29 10:33:31 -04:00
) #{translate("upload_project")}
!= moduleIncludes("newProjectMenu", locals)
if portalTemplates.length > 0
//- portalTemplates is set in ProjectController
li.divider
li.dropdown-header #{translate("institution")} #{translate("templates")}
for portal in portalTemplates
li
a.menu-indent(
href=portal.url + "#templates",
ng-non-bindable
) #{portal.name}
if (templates)
//- templates is an express local var, via settings.templateLinks
li.divider
li.dropdown-header #{translate("templates")}
each item in templates
li
a.menu-indent(href=item.url) #{translate(item.name)}
2014-07-16 09:59:52 -04:00
.row-spaced(ng-if="projects.length > 0", ng-cloak)
ul.list-unstyled.folders-menu(
ng-controller="TagListController"
)
2016-01-28 10:11:57 -05:00
li(ng-class="{active: (filter == 'all')}", ng-click="filterProjects('all')")
a(href) #{translate("all_projects")}
li(ng-class="{active: (filter == 'owned')}", ng-click="filterProjects('owned')")
a(href) #{translate("your_projects")}
li(ng-class="{active: (filter == 'shared')}", ng-click="filterProjects('shared')")
a(href) #{translate("shared_with_you")}
li.folders-menu-item-with-tooltip(ng-class="{active: (filter == 'archived')}", ng-click="filterProjects('archived')")
a(href) #{settings.overleaf ? translate("archived_projects") : translate("deleted_projects")}
.folders-menu-tooltip-trigger(
href
tooltip=translate('archived_projects_info_note')
tooltip-placement="right"
tooltip-append-to-body="true"
stop-propagation="click"
) i
li.folders-menu-item-with-tooltip(ng-class="{active: (filter == 'trashed')}", ng-click="filterProjects('trashed')")
a(href) #{translate("trashed_projects")}
.folders-menu-tooltip-trigger(
href
tooltip=translate('trashed_projects_info_note')
tooltip-placement="right"
tooltip-append-to-body="true"
stop-propagation="click"
) i
2017-10-05 10:26:49 -04:00
li.separator
h2 #{translate("tags_slash_folders")}
li.tag(ng-cloak)
a.tag-name(href, ng-click="openNewTagModal()")
i.fa.fa-fw.fa-plus(aria-hidden="true")
span.name #{translate("new_folder")}
2016-01-28 10:11:57 -05:00
li.tag(
2017-07-19 05:34:50 -04:00
ng-repeat="tag in tags | orderBy:'name'",
2014-07-16 09:59:52 -04:00
ng-class="{active: tag.selected}",
2016-01-28 10:11:57 -05:00
ng-cloak,
ng-click="selectTag(tag)"
2014-07-16 09:59:52 -04:00
)
2016-01-28 10:11:57 -05:00
a.tag-name(href)
2014-07-16 09:59:52 -04:00
i.icon.fa.fa-fw(
ng-class="{\
'fa-folder-open': tag.selected,\
'fa-folder': !tag.selected\
2014-07-16 09:59:52 -04:00
}"
ng-style="{ 'color': 'hsl({{ getHueForTagId(tag._id) }}, 70%, 45%)' }"
aria-hidden="true"
2014-07-16 09:59:52 -04:00
)
span.name {{tag.name}}
span.subdued ({{countProjectsForTag(tag)}})
span.dropdown.tag-menu(dropdown)
2016-01-28 10:11:57 -05:00
a.dropdown-toggle(
href="#",
data-toggle="dropdown",
dropdown-toggle,
stop-propagation="click"
)
span.caret
ul.dropdown-menu.dropdown-menu-right(
role="menu"
)
li
2016-01-28 13:18:22 -05:00
a(href, ng-click="renameTag(tag)", stop-propagation="click")
2016-01-28 10:11:57 -05:00
| #{translate("rename")}
li
2016-01-28 13:18:22 -05:00
a(href, ng-click="deleteTag(tag)", stop-propagation="click")
2016-01-28 10:11:57 -05:00
| #{translate("delete")}
2017-04-28 12:09:34 -04:00
li.tag.untagged(
ng-if="tags.length",
ng-cloak,
ng-click="selectUntagged()"
2017-04-28 11:57:37 -04:00
ng-class="{active: filter === 'untagged'}",
)
2017-04-28 12:09:34 -04:00
a.tag-name(href)
span.name
| #{translate("uncategorized")}
2017-04-28 11:57:37 -04:00
span.subdued ({{ nUntagged }})
2014-07-16 09:59:52 -04:00
.row-spaced(ng-if="projects.length == 0", ng-cloak)
.first-project
div
i.fa.fa-arrow-up.fa-2x(aria-hidden="true")
2014-07-16 09:59:52 -04:00
div
2014-07-29 10:33:31 -04:00
strong #{translate("create_your_first_project")}
2014-07-16 09:59:52 -04:00
- if (showUserDetailsArea)
span(ng-controller="LeftHandMenuPromoController", ng-cloak)
.row-spaced#userProfileInformation(ng-if="hasProjects")
div(ng-show="userEmails.length > 0 && userAffiliations.length == 0", ng-cloak)
hr
.text-centered.user-profile
p Are you affiliated with an institution?
a.btn.btn-info(
href="/user/settings"
2018-09-13 08:54:43 -04:00
) Add Affiliation
2014-07-16 09:59:52 -04:00
//- .row-spaced(ng-if="hasProjects && userHasNoSubscription && !userOnPayingUniversity", ng-cloak).text-centered
//- hr
//- p.small #{translate("on_free_sl")}
//- p
//- a(href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary #{translate("upgrade")}
//- p.small.text-centered
//- | #{translate("or_unlock_features_bonus")}
//- a(href="/user/bonus" ng-click="share()") #{translate("sharing_sl")}.
.row-spaced(ng-if="hasProjects && userHasNoSubscription && !userOnPayingUniversity", ng-cloak).text-centered
hr
p.small To help you work from home throughout 2020 and beyond, we're providing a number of special initiatives.
p
a(href="https://www.overleaf.com/events/wfh2020").btn.btn-primary View
script.
window.userHasNoSubscription = #{!!(settings.enableSubscriptions && !hasSubscription)}