mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-27 10:33:22 +00:00
Conditionally show sharing bits
This commit is contained in:
parent
55f9cd4851
commit
46eadfada4
2 changed files with 8 additions and 10 deletions
|
@ -8,9 +8,8 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
|
||||||
h3 #{translate("share_project")}
|
h3 #{translate("share_project")}
|
||||||
.modal-body.modal-body-share
|
.modal-body.modal-body-share
|
||||||
.container-fluid
|
.container-fluid
|
||||||
|
|
||||||
//- Private (with token-access available)
|
//- Private (with token-access available)
|
||||||
.row.public-access-level(ng-show="project.publicAccesLevel == 'private'")
|
.row.public-access-level(ng-show="isAdmin && project.publicAccesLevel == 'private'")
|
||||||
.col-xs-12.text-center
|
.col-xs-12.text-center
|
||||||
| #{translate('link_sharing_is_off')}
|
| #{translate('link_sharing_is_off')}
|
||||||
|
|
|
|
||||||
|
@ -28,7 +27,7 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
|
||||||
)
|
)
|
||||||
|
|
||||||
//- Token-based access
|
//- Token-based access
|
||||||
.row.public-access-level(ng-show="project.publicAccesLevel == 'tokenBased'")
|
.row.public-access-level(ng-show="isAdmin && project.publicAccesLevel == 'tokenBased'")
|
||||||
.col-xs-12.text-center
|
.col-xs-12.text-center
|
||||||
strong
|
strong
|
||||||
| #{translate('link_sharing_is_on')}.
|
| #{translate('link_sharing_is_on')}.
|
||||||
|
@ -57,7 +56,7 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
|
||||||
pre.access-token(ng-hide="readOnlyTokenLink") #{translate('loading')}...
|
pre.access-token(ng-hide="readOnlyTokenLink") #{translate('loading')}...
|
||||||
|
|
||||||
//- legacy public-access
|
//- legacy public-access
|
||||||
.row.public-access-level(ng-show="project.publicAccesLevel == 'readAndWrite' || project.publicAccesLevel == 'readOnly'")
|
.row.public-access-level(ng-show="isAdmin && (project.publicAccesLevel == 'readAndWrite' || project.publicAccesLevel == 'readOnly')")
|
||||||
.col-xs-12.text-center
|
.col-xs-12.text-center
|
||||||
strong(ng-if="project.publicAccesLevel == 'readAndWrite'") #{translate("this_project_is_public")}
|
strong(ng-if="project.publicAccesLevel == 'readAndWrite'") #{translate("this_project_is_public")}
|
||||||
strong(ng-if="project.publicAccesLevel == 'readOnly'") #{translate("this_project_is_public_read_only")}
|
strong(ng-if="project.publicAccesLevel == 'readOnly'") #{translate("this_project_is_public_read_only")}
|
||||||
|
@ -102,7 +101,7 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
|
||||||
ng-click="revokeInvite(invite)"
|
ng-click="revokeInvite(invite)"
|
||||||
)
|
)
|
||||||
i.fa.fa-times
|
i.fa.fa-times
|
||||||
.row.invite-controls
|
.row.invite-controls(ng-show="isAdmin")
|
||||||
form(ng-show="canAddCollaborators")
|
form(ng-show="canAddCollaborators")
|
||||||
.small #{translate("share_with_your_collabs")}
|
.small #{translate("share_with_your_collabs")}
|
||||||
.form-group
|
.form-group
|
||||||
|
@ -177,8 +176,9 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
|
||||||
) #{translate("start_free_trial")}
|
) #{translate("start_free_trial")}
|
||||||
|
|
||||||
p.small(ng-show="startedFreeTrial")
|
p.small(ng-show="startedFreeTrial")
|
||||||
| #{translate("refresh_page_after_starting_free_trial")}.
|
| #{translate("refresh_page_after_starting_free_trial")}
|
||||||
|
.row.public-access-level(ng-show="!isAdmin")
|
||||||
|
.col-xs-12.text-center To add more collaborators, please ask the project owner
|
||||||
.modal-footer.modal-footer-share
|
.modal-footer.modal-footer-share
|
||||||
.modal-footer-left
|
.modal-footer-left
|
||||||
i.fa.fa-refresh.fa-spin(ng-show="state.inflight")
|
i.fa.fa-refresh.fa-spin(ng-show="state.inflight")
|
||||||
|
|
|
@ -4,9 +4,7 @@ define [
|
||||||
App.controller "ShareController", ["$scope", "$modal", "ide", "projectInvites", "projectMembers", "event_tracking",
|
App.controller "ShareController", ["$scope", "$modal", "ide", "projectInvites", "projectMembers", "event_tracking",
|
||||||
($scope, $modal, ide, projectInvites, projectMembers, event_tracking) ->
|
($scope, $modal, ide, projectInvites, projectMembers, event_tracking) ->
|
||||||
$scope.openShareProjectModal = (isAdmin) ->
|
$scope.openShareProjectModal = (isAdmin) ->
|
||||||
if !isAdmin
|
$scope.isAdmin = isAdmin;
|
||||||
return
|
|
||||||
|
|
||||||
event_tracking.sendMBOnce "ide-open-share-modal-once"
|
event_tracking.sendMBOnce "ide-open-share-modal-once"
|
||||||
|
|
||||||
$modal.open(
|
$modal.open(
|
||||||
|
|
Loading…
Reference in a new issue