overleaf/services/web/app/views/project/list.jade

439 lines
14 KiB
Text
Raw Normal View History

2014-02-12 10:23:40 +00:00
extends ../layout
2014-06-11 13:52:23 +00:00
block scripts
script(type="text/javascript").
2014-06-11 15:32:56 +00:00
window.data = {
2014-06-16 12:34:38 +00:00
projects: !{JSON.stringify(projects)},
tags: !{JSON.stringify(tags)}
2014-06-11 15:32:56 +00:00
};
2014-06-17 15:19:40 +00:00
window.algolia = {
institutions: {
app_id: '#{algolia_app_id}',
api_key: '#{algolia_api_key}'
}
};
2014-06-04 16:46:22 +00:00
block content
2014-06-17 11:43:42 +00:00
.content.content-alt(ng-controller="ProjectPageController")
.container
2014-06-11 13:52:23 +00:00
.row
2014-06-19 12:30:45 +00:00
.col-md-2
.dropdown
2014-06-17 11:43:42 +00:00
a.btn.btn-primary.dropdown-toggle(
href="#",
data-toggle="dropdown"
) New Project
ul.dropdown-menu(role="menu")
li
2014-06-13 15:05:44 +00:00
a(
href="#",
ng-click="openCreateProjectModal()"
) Blank Project
li
2014-06-13 15:05:44 +00:00
a(
href="#",
ng-click="openCreateProjectModal('example')"
2014-06-13 16:11:36 +00:00
) Example Project
li
2014-06-13 16:11:36 +00:00
a(
href="#",
ng-click="openUploadProjectModal()"
) Upload Project
li.divider
li.dropdown-header Templates
li
a.menu-indent(href="/templates/cv") CV or Resume
li
a.menu-indent(href="/templates/cover-letters") Cover Letter
li
a.menu-indent(href="/templates/journals") Journal Article
li
a.menu-indent(href="/templates/presentations") Presentation
li
a.menu-indent(href="/templates/thesis") Thesis
li
a.menu-indent(href="/templates/bibliographies") Bibliographies
li
a.menu-indent(href="/templates") View All »
.row-spaced
2014-06-18 15:49:29 +00:00
ul.list-unstyled.folders-menu(
ng-controller="TagListController"
)
2014-06-16 13:45:47 +00:00
li(ng-class="{active: (filter == 'all')}")
2014-06-19 12:30:45 +00:00
a(href, ng-click="filterProjects('all')") All projects
2014-06-16 13:45:47 +00:00
li(ng-class="{active: (filter == 'owned')}")
2014-06-19 12:30:45 +00:00
a(href, ng-click="filterProjects('owned')") Your projects
2014-06-16 13:45:47 +00:00
li(ng-class="{active: (filter == 'shared')}")
2014-06-19 12:30:45 +00:00
a(href, ng-click="filterProjects('shared')") Shared projects
2014-06-16 14:06:58 +00:00
li(ng-class="{active: (filter == 'archived')}")
2014-06-19 12:30:45 +00:00
a(href, ng-click="filterProjects('archived')") Deleted projects
li
h2 Folders
2014-06-13 12:55:55 +00:00
li(
ng-repeat="tag in tags | filter:nonEmpty",
2014-06-13 12:55:55 +00:00
ng-controller="TagListItemController",
2014-06-18 15:49:29 +00:00
ng-class="{active: tag.selected}",
ng-cloak
2014-06-13 12:55:55 +00:00
)
2014-06-19 12:30:45 +00:00
a(href="#", ng-click="selectTag()")
2014-06-13 12:55:55 +00:00
i.icon.fa(
2014-06-13 16:11:36 +00:00
ng-class="{\
'fa-folder-open-o': tag.selected,\
'fa-folder-o': !tag.selected\
}"
2014-06-13 12:55:55 +00:00
)
2014-06-12 15:21:12 +00:00
| {{tag.name}}
2014-06-19 12:30:45 +00:00
span.subdued ({{tag.project_ids.length}})
2014-02-12 10:23:40 +00:00
-if (settings.enableSubscriptions)
2014-06-09 07:54:14 +00:00
.row-spaced
a(href="/user/bonus").btn.btn-info Upgrade Account
2014-06-04 16:46:22 +00:00
- if (showUserDetailsArea)
2014-06-17 15:19:40 +00:00
.row-spaced#userProfileInformation(ng-cloak)
div(ng-controller="UpdateForm").userProfileInformationArea
div(ng-hide="hidePersonalInfoSection").alert.alert-info
2014-06-17 15:19:40 +00:00
div(ng-show="percentComplete >= 100")
h4 100% complete, well done!
div(ng-hide="percentComplete >= 100")
h4 Your profile is
strong {{percentComplete}}%
| complete
2014-02-12 10:23:40 +00:00
2014-06-17 15:19:40 +00:00
.progress
2014-06-20 10:15:25 +00:00
.progress-bar.progress-bar-info(ng-style="{'width' : (percentComplete+'%')}")
2014-06-12 14:50:00 +00:00
2014-06-17 15:19:40 +00:00
button#completeUserProfileInformation.btn.btn-primary(
ng-hide="formVisable",
ng-click="showForm()"
) Complete now
div(ng-show="formVisable")
form(enctype='multipart/form-data', method='post')
.form-group
input.form-control(
type='text',
name='first_name',
ng-model="userInfoForm.first_name",
ng-blur="sendUpdate()",
placeholder="First Name",
select-when="formVisable"
2014-06-17 15:19:40 +00:00
)
.form-group
input.form-control(
type='text',
name='last_name',
ng-model="userInfoForm.last_name",
ng-blur="sendUpdate()",
placeholder='Last Name'
)
.form-group#institution_auto_complete
autocomplete(
ng-model="userInfoForm.institution",
data="institutions",
ng-blur="sendUpdate()",
on-type="updateInstitutionsList",
attr-placeholder="Institution",
attr-inputclass="form-control"
)
.form-group
input.form-control(
type='text',
name='role',
ng-model="userInfoForm.role",
placeholder='Role',
ng-blur="sendUpdate()",
list="_roles"
)
datalist#_roles
option(ng-repeat='role in roles') {{role}}
2014-06-19 12:30:45 +00:00
.col-md-10
.container-fluid
.row
.col-md-12
form.project-search.form-horizontal(role="form")
2014-06-18 10:53:18 +00:00
.form-group.has-feedback.has-feedback-left.col-md-7
2014-06-13 12:55:55 +00:00
input.form-control.col-md-7(
placeholder='Search projects…',
autofocus='autofocus',
2014-06-18 10:53:18 +00:00
ng-model="searchText",
focus-on='search:clear'
)
i.fa.fa-search.form-control-feedback-left
i.fa.fa-times.form-control-feedback(
ng-click="clearSearchText()",
style="cursor: pointer;",
ng-show="searchText.length > 0"
2014-06-13 12:55:55 +00:00
)
//- i.fa.fa-remove
2014-02-12 10:23:40 +00:00
2014-06-18 15:49:29 +00:00
.project-tools(ng-cloak)
2014-06-16 14:06:58 +00:00
.btn-toolbar(ng-show="filter != 'archived'")
.btn-group(ng-hide="selectedProjects.length < 1")
2014-06-13 12:55:55 +00:00
a.btn.btn-default(
href='#',
2014-06-18 15:46:56 +00:00
tooltip="Download",
tooltip-placement="bottom",
2014-06-18 15:43:37 +00:00
ng-click="downloadSelectedProjects()"
2014-06-13 12:55:55 +00:00
)
i.fa.fa-cloud-download
2014-06-13 12:55:55 +00:00
a.btn.btn-default(
href='#',
2014-06-18 15:46:56 +00:00
tooltip="Delete",
tooltip-placement="bottom",
2014-06-16 15:13:09 +00:00
ng-click="openArchiveProjectsModal()"
2014-06-13 12:55:55 +00:00
)
i.fa.fa-trash-o
2014-06-06 18:37:04 +00:00
2014-06-16 13:45:47 +00:00
.btn-group.dropdown(ng-hide="selectedProjects.length < 1")
2014-06-13 12:55:55 +00:00
a.btn.btn-default.dropdown-toggle(
href="#",
2014-06-18 15:46:56 +00:00
data-toggle="dropdown",
tooltip="Add to folders",
tooltip-placement="bottom"
2014-06-13 12:55:55 +00:00
)
i.fa.fa-folder-open-o
|
span.caret
2014-06-13 12:55:55 +00:00
ul.dropdown-menu.dropdown-menu-right.js-tags-dropdown-menu(
role="menu"
ng-controller="TagListController"
2014-06-13 12:55:55 +00:00
)
li.dropdown-header Add to folder
2014-06-13 12:55:55 +00:00
li(
ng-repeat="tag in tags | filter:nonEmpty | orderBy:'name'",
2014-06-13 12:55:55 +00:00
ng-controller="TagDropdownItemController"
)
a(href="#", ng-click="addOrRemoveProjectsFromTag()", stop-propagation="click")
2014-06-13 12:55:55 +00:00
i.fa(
ng-class="{\
2014-06-16 13:45:47 +00:00
'fa-check-square-o': areSelectedProjectsInTag == true,\
'fa-square-o': areSelectedProjectsInTag == false,\
'fa-minus-square-o': areSelectedProjectsInTag == 'partial'\
2014-06-13 12:55:55 +00:00
}"
)
| {{tag.name}}
2014-06-13 12:55:55 +00:00
li.divider
li
a(href="#", ng-click="openNewTagModal()", stop-propagation="click") Create New Folder
2014-06-06 18:37:04 +00:00
.btn-group(ng-hide="selectedProjects.length != 1").dropdown
2014-06-13 14:24:20 +00:00
a.btn.btn-default.dropdown-toggle(
href='#',
data-toggle="dropdown"
) More
span.caret
ul.dropdown-menu.dropdown-menu-right(role="menu")
li(ng-show="getFirstSelectedProject().accessLevel == 'owner'")
2014-06-13 14:24:20 +00:00
a(
href='#',
ng-click="openRenameProjectModal()"
) Rename
2014-06-16 14:32:20 +00:00
li
a(
href='#',
ng-click="openCloneProjectModal()"
) Make a copy
2014-06-16 14:06:58 +00:00
.btn-toolbar(ng-show="filter == 'archived'")
.btn-group(ng-hide="selectedProjects.length < 1")
a.btn.btn-default(
href='#',
data-original-title="Restore",
data-toggle="tooltip",
data-placement="bottom",
ng-click="restoreSelectedProjects()"
) Restore
.btn-group(ng-hide="selectedProjects.length < 1")
a.btn.btn-danger(
href='#',
data-original-title="Delete Forever",
data-toggle="tooltip",
data-placement="bottom",
ng-click="openDeleteProjectsModal()"
2014-06-16 14:06:58 +00:00
) Delete Forever
.row.row-spaced
.col-md-12
.card.card-thin
- if (projects.length > 0)
ul.list-unstyled.project-list(select-all-list, ng-cloak)
li.container-fluid
.row
.col-md-6
2014-06-16 13:45:47 +00:00
input.select-all(
select-all,
type="checkbox"
2014-06-16 13:45:47 +00:00
)
span.title TITLE
.col-md-2
span.owner OWNER
.col-md-4
span.last-modified LAST MODIFIED
2014-06-13 12:55:55 +00:00
li.project_entry.container-fluid(
ng-repeat="project in visibleProjects | orderBy:'lastUpdated':true",
ng-controller="ProjectListItemController"
)
.row
.col-md-6
input.select-item(
select-individual,
type="checkbox",
ng-model="project.selected"
)
span.title
a.projectName(href="/project/{{project.id}}") {{project.name}}
span
span.label.label-default(ng-repeat='tag in project.tags')
| {{tag.name}}
.col-md-2
2014-06-16 13:45:47 +00:00
span.owner {{ownerName()}}
.col-md-4
span.last-modified.isoDate {{project.lastUpdated | formatDate}}
- else
.row
.span12
.welcome
h1
i.fa.fa-arrow-left
| Welcome! Follow the arrow to get started
p New to LaTeX? Start by having a look at our
a(href="/templates") templates
| or
a(href="/learn") help guides
| .
2014-06-13 12:55:55 +00:00
script(type='text/ng-template', id='newTagModalTemplate')
.modal-header
h3 Create New Folder
.modal-body
2014-06-18 14:23:00 +00:00
form(name="newTagForm", novalidate)
input.form-control(
type="text",
placeholder="New Folder Name",
required,
ng-model="inputs.newTagName",
2014-06-22 19:08:56 +00:00
on-enter="create()",
2014-06-18 14:23:00 +00:00
focus-on="open"
)
2014-06-13 12:55:55 +00:00
.modal-footer
button.btn.btn-default(ng-click="cancel()") Cancel
2014-06-18 14:23:00 +00:00
button.btn.btn-primary(
ng-disabled="newTagForm.$invalid"
ng-click="create()"
) Create
2014-06-13 14:24:20 +00:00
script(type='text/ng-template', id='renameProjectModalTemplate')
.modal-header
h3 Rename Project
.modal-body
2014-06-18 14:23:00 +00:00
form(name="renameProjectForm", novalidate)
input.form-control(
type="text",
placeholder="Project Name",
ng-model="inputs.projectName",
required,
2014-06-22 19:08:56 +00:00
on-enter="rename()",
2014-06-18 14:23:00 +00:00
focus-on="open"
)
2014-06-13 14:24:20 +00:00
.modal-footer
button.btn.btn-default(ng-click="cancel()") Cancel
2014-06-18 14:23:00 +00:00
button.btn.btn-primary(
ng-click="rename()",
ng-disabled="renameProjectForm.$invalid"
) Rename
2014-06-13 15:05:44 +00:00
2014-06-16 14:32:20 +00:00
script(type='text/ng-template', id='cloneProjectModalTemplate')
.modal-header
h3 Copy Project
.modal-body
2014-06-18 14:23:00 +00:00
form(name="cloneProjectForm", novalidate)
.form-group
label New Name
input.form-control(
type="text",
placeholder="New Project Name",
required,
ng-model="inputs.projectName",
2014-06-22 19:08:56 +00:00
on-enter="clone()",
2014-06-18 14:23:00 +00:00
focus-on="open"
)
2014-06-16 14:32:20 +00:00
.modal-footer
button.btn.btn-default(
ng-disabled="state.inflight"
ng-click="cancel()"
) Cancel
button.btn.btn-primary(
2014-06-18 14:23:00 +00:00
ng-disabled="cloneProjectForm.$invalid || state.inflight"
2014-06-16 14:32:20 +00:00
ng-click="clone()"
)
span(ng-hide="state.inflight") Copy
span(ng-show="state.inflight") Copying...
2014-06-13 15:05:44 +00:00
script(type='text/ng-template', id='newProjectModalTemplate')
.modal-header
h3 New Project
.modal-body
2014-06-18 14:23:00 +00:00
form(novalidate, name="newProjectForm")
input.form-control(
type="text",
placeholder="Project Name",
required,
ng-model="inputs.projectName",
2014-06-22 19:08:56 +00:00
on-enter="create()",
2014-06-18 14:23:00 +00:00
focus-on="open"
)
2014-06-13 15:05:44 +00:00
.modal-footer
button.btn.btn-default(
ng-disabled="state.inflight"
ng-click="cancel()"
) Cancel
button.btn.btn-primary(
2014-06-18 14:23:00 +00:00
ng-disabled="newProjectForm.$invalid || state.inflight"
2014-06-13 15:05:44 +00:00
ng-click="create()"
)
span(ng-hide="state.inflight") Create
span(ng-show="state.inflight") Creating...
2014-06-13 16:11:36 +00:00
2014-06-16 15:13:09 +00:00
script(type='text/ng-template', id='deleteProjectsModalTemplate')
.modal-header
h3 {{action}} Projects
.modal-body
div(ng-show="projectsToDelete.length > 0")
p You are about to delete the following projects:
ul
li(ng-repeat="project in projectsToDelete | orderBy:'name'")
strong {{project.name}}
div(ng-show="projectsToLeave.length > 0")
p You are about to leave the following projects:
ul
li(ng-repeat="project in projectsToLeave | orderBy:'name'")
strong {{project.name}}
.modal-footer
button.btn.btn-default(
ng-click="cancel()"
) Cancel
button.btn.btn-danger(
ng-click="delete()"
) {{action}}
2014-06-13 16:11:36 +00:00
script(type="text/ng-template", id="uploadProjectModalTemplate")
.modal-header
h3 Upload Zipped Project
2014-06-22 16:32:15 +00:00
.modal-body(
fine-upload
endpoint="/project/new/upload"
waiting-for-response-text="Creating project..."
failed-upload-text="Upload failed. Is it a valid zip file?"
upload-button-text="Select a .zip file"
drag-area-text="drag .zip file"
multiple="false"
allowed-extensions="['zip']"
on-complete-callback="onComplete"
)
2014-06-13 16:11:36 +00:00
span Upload a zipped project
.modal-footer
2014-06-16 15:13:09 +00:00
button.btn.btn-default(ng-click="cancel()") Cancel