mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #640 from sharelatex/as-fix-leave-quick-action
Show leave quick action instead of archive for unowned projects
This commit is contained in:
commit
f3c871a972
2 changed files with 14 additions and 3 deletions
|
@ -64,13 +64,21 @@ if settings.overleaf
|
|||
)
|
||||
i.icon.fa.fa-cloud-download
|
||||
button.btn.btn-link.action-btn(
|
||||
ng-if="!project.archived"
|
||||
ng-if="!project.archived && isOwner()"
|
||||
tooltip=translate('archive'),
|
||||
tooltip-placement="top",
|
||||
tooltip-append-to-body="true",
|
||||
ng-click="archive($event)"
|
||||
ng-click="archiveOrLeave($event)"
|
||||
)
|
||||
i.icon.fa.fa-inbox
|
||||
button.btn.btn-link.action-btn(
|
||||
ng-if="!project.archived && !isOwner()"
|
||||
tooltip=translate('leave'),
|
||||
tooltip-placement="top",
|
||||
tooltip-append-to-body="true",
|
||||
ng-click="archiveOrLeave($event)"
|
||||
)
|
||||
i.icon.fa.fa-sign-out
|
||||
button.btn.btn-link.action-btn(
|
||||
ng-if="project.archived"
|
||||
tooltip=translate('unarchive'),
|
||||
|
|
|
@ -490,6 +490,9 @@ define [
|
|||
else
|
||||
return "None"
|
||||
|
||||
$scope.isOwner = () ->
|
||||
window.user_id == $scope.project.owner._id
|
||||
|
||||
$scope.$watch "project.selected", (value) ->
|
||||
if value?
|
||||
$scope.updateSelectedProjects()
|
||||
|
@ -502,7 +505,7 @@ define [
|
|||
e.stopPropagation()
|
||||
$scope.downloadProjectsById([$scope.project.id])
|
||||
|
||||
$scope.archive = (e) ->
|
||||
$scope.archiveOrLeave = (e) ->
|
||||
e.stopPropagation()
|
||||
$scope.archiveOrLeaveProjects([$scope.project])
|
||||
|
||||
|
|
Loading…
Reference in a new issue