mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-05 13:49:24 +00:00
Merge pull request #555 from sharelatex/as-archived-dash
Switch "deleted" projects to "archived" project
This commit is contained in:
commit
87d8eed1c8
3 changed files with 8 additions and 3 deletions
|
@ -32,14 +32,16 @@
|
|||
ng-click="downloadSelectedProjects()"
|
||||
)
|
||||
i.fa.fa-cloud-download
|
||||
- var archiveButtonString = settings.overleaf ? translate("archive") : translate("delete")
|
||||
- var archiveButtonIcon = settings.overleaf ? "fa-inbox" : "fa-trash-o"
|
||||
a.btn.btn-default(
|
||||
href,
|
||||
tooltip=translate('delete'),
|
||||
tooltip=`{{ isArchiveableProjectSelected ? '${archiveButtonString}' : '${translate("leave")}' }}`,
|
||||
tooltip-placement="bottom",
|
||||
tooltip-append-to-body="true",
|
||||
ng-click="openArchiveProjectsModal()"
|
||||
)
|
||||
i.fa.fa-trash-o
|
||||
i.fa(ng-class=`isArchiveableProjectSelected ? '${archiveButtonIcon}' : 'fa-sign-out'`)
|
||||
|
||||
.btn-group.dropdown(ng-hide="selectedProjects.length < 1", dropdown)
|
||||
a.btn.btn-default.dropdown-toggle(
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
li(ng-class="{active: (filter == 'shared')}", ng-click="filterProjects('shared')")
|
||||
a(href) #{translate("shared_with_you")}
|
||||
li(ng-class="{active: (filter == 'archived')}", ng-click="filterProjects('archived')")
|
||||
a(href) #{translate("deleted_projects")}
|
||||
a(href) #{settings.overleaf ? translate("archived_projects") : translate("deleted_projects")}
|
||||
if isShowingV1Projects
|
||||
li(ng-class="{active: (filter == 'v1')}", ng-click="filterProjects('v1')")
|
||||
a(href) #{translate("v1_projects")}
|
||||
|
|
|
@ -8,6 +8,7 @@ define [
|
|||
$scope.notifications = window.data.notifications
|
||||
$scope.allSelected = false
|
||||
$scope.selectedProjects = []
|
||||
$scope.isArchiveableProjectSelected = false
|
||||
$scope.filter = "all"
|
||||
$scope.predicate = "lastUpdated"
|
||||
$scope.nUntagged = 0
|
||||
|
@ -85,6 +86,8 @@ define [
|
|||
|
||||
$scope.updateSelectedProjects = () ->
|
||||
$scope.selectedProjects = $scope.projects.filter (project) -> project.selected
|
||||
$scope.isArchiveableProjectSelected = $scope.selectedProjects.some (project) ->
|
||||
window.user_id == project.owner._id
|
||||
|
||||
$scope.getSelectedProjects = () ->
|
||||
$scope.selectedProjects
|
||||
|
|
Loading…
Reference in a new issue