mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 10:23:04 -05:00
8f71b104c5
If the user does not own the project, the project can only be left, not archived. Previously the quick action button was only showing the archive icon but clicking the button would correctly leave the project. This is confusing, so this commit corrects to show the leave icon for projects not owned by the current user
89 lines
No EOL
2.4 KiB
Text
89 lines
No EOL
2.4 KiB
Text
- var titleClasses = settings.overleaf ? "col-xs-6 col-sm-4 col-md-6" : "col-xs-6"
|
|
- var lastUpdatedClasses = settings.overleaf ? " col-xs-4 col-sm-3 col-md-2" : "col-xs-4"
|
|
|
|
div(class=titleClasses)
|
|
input.select-item(
|
|
select-individual,
|
|
type="checkbox",
|
|
ng-disabled="shouldDisableCheckbox(project)",
|
|
ng-model="project.selected"
|
|
stop-propagation="click"
|
|
aria-label=translate('select_project') + " '{{ project.name }}'"
|
|
)
|
|
span
|
|
a.projectName(
|
|
ng-href="{{projectLink(project)}}"
|
|
stop-propagation="click"
|
|
) {{project.name}}
|
|
span(
|
|
ng-controller="TagListController"
|
|
)
|
|
.tag-label(
|
|
ng-repeat='tag in project.tags'
|
|
stop-propagation="click"
|
|
)
|
|
a.label.label-default.tag-label-name(
|
|
href,
|
|
ng-click="selectTag(tag)"
|
|
) {{tag.name}}
|
|
a.label.label-default.tag-label-remove(
|
|
href
|
|
ng-click="removeProjectFromTag(project, tag)"
|
|
) ×
|
|
|
|
.col-xs-2
|
|
span.owner {{ownerName()}}
|
|
span(ng-if="isLinkSharingProject(project)")
|
|
|
|
|
i.fa.fa-link.small(
|
|
tooltip=translate("link_sharing")
|
|
tooltip-placement="right"
|
|
tooltip-append-to-body="true"
|
|
)
|
|
|
|
div(class=lastUpdatedClasses)
|
|
if settings.overleaf
|
|
span.last-modified(tooltip="{{project.lastUpdated | formatDate}}") {{project.lastUpdated | fromNowDate}}
|
|
else
|
|
span.last-modified {{project.lastUpdated | formatDate}}
|
|
|
|
if settings.overleaf
|
|
.hidden-xs.col-sm-3.col-md-2.action-btn-row
|
|
button.btn.btn-link.action-btn(
|
|
tooltip=translate('copy'),
|
|
tooltip-placement="top",
|
|
tooltip-append-to-body="true",
|
|
ng-click="clone($event)"
|
|
)
|
|
i.icon.fa.fa-files-o
|
|
button.btn.btn-link.action-btn(
|
|
tooltip=translate('download'),
|
|
tooltip-placement="top",
|
|
tooltip-append-to-body="true",
|
|
ng-click="download($event)"
|
|
)
|
|
i.icon.fa.fa-cloud-download
|
|
button.btn.btn-link.action-btn(
|
|
ng-if="!project.archived && isOwner()"
|
|
tooltip=translate('archive'),
|
|
tooltip-placement="top",
|
|
tooltip-append-to-body="true",
|
|
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'),
|
|
tooltip-placement="top",
|
|
tooltip-append-to-body="true",
|
|
ng-click="restore($event)"
|
|
)
|
|
i.icon.fa.fa-reply |