mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 10:33:22 +00:00
* Share button shown to all users, with a tooltip for non-admin; remove its id.
This commit is contained in:
parent
855840d89a
commit
fc7b5bdd63
3 changed files with 24 additions and 6 deletions
|
@ -99,11 +99,15 @@ header.toolbar.toolbar-header.toolbar-with-labels(
|
|||
i.review-icon
|
||||
p.toolbar-label
|
||||
| #{translate("review")}
|
||||
a.btn.btn-full-height#shareButton(
|
||||
href,
|
||||
ng-if="permissions.admin",
|
||||
ng-click="openShareProjectModal();",
|
||||
ng-controller="ShareController",
|
||||
|
||||
a.btn.btn-full-height(
|
||||
href
|
||||
ng-class="{ 'btn-full-height-disabled' : !permissions.admin }"
|
||||
ng-click="openShareProjectModal(permissions.admin);"
|
||||
ng-controller="ShareController"
|
||||
tooltip-enable="!permissions.admin"
|
||||
tooltip="Only the project owner can use the Share menu at the moment, but we're working on making it accessible to collaborators, too."
|
||||
tooltip-placement="bottom"
|
||||
)
|
||||
i.fa.fa-fw.fa-group
|
||||
p.toolbar-label #{translate("share")}
|
||||
|
|
|
@ -3,7 +3,10 @@ define [
|
|||
], (App) ->
|
||||
App.controller "ShareController", ["$scope", "$modal", "ide", "projectInvites", "projectMembers", "event_tracking",
|
||||
($scope, $modal, ide, projectInvites, projectMembers, event_tracking) ->
|
||||
$scope.openShareProjectModal = () ->
|
||||
$scope.openShareProjectModal = (isAdmin) ->
|
||||
if !isAdmin
|
||||
return
|
||||
|
||||
event_tracking.sendMBOnce "ide-open-share-modal-once"
|
||||
|
||||
$modal.open(
|
||||
|
|
|
@ -72,6 +72,17 @@
|
|||
background-color: @toolbar-btn-active-bg-color;
|
||||
box-shadow: @toolbar-btn-active-shadow;
|
||||
}
|
||||
&.btn-full-height-disabled {
|
||||
opacity: 0.65;
|
||||
&:hover,
|
||||
&.active,
|
||||
&:active {
|
||||
text-shadow: none;
|
||||
background-color: transparent;
|
||||
color: @toolbar-btn-color;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
.label {
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
|
|
Loading…
Reference in a new issue