overleaf/services/web/app/views/project/editor/share.pug

263 lines
8.3 KiB
Text
Raw Normal View History

2014-07-01 09:12:28 -04:00
script(type='text/ng-template', id='shareProjectModalTemplate')
.modal-header
2014-07-01 10:05:32 -04:00
button.close(
type="button"
data-dismiss="modal"
ng-click="cancel()"
) ×
2014-07-31 12:07:43 -04:00
h3 #{translate("share_project")}
2014-07-01 09:12:28 -04:00
.modal-body.modal-body-share
.container-fluid
//- Private
2014-07-01 10:05:32 -04:00
.row.public-access-level(ng-show="project.publicAccesLevel == 'private'")
.col-xs-12.text-center
| Link-sharing is off, only invited users can view this project.
|   
2014-07-01 10:05:32 -04:00
a(
href
ng-click="openMakeTokenBasedModal()"
) Turn on link-sharing
//- Token-based access
.row.public-access-level(ng-show="project.publicAccesLevel == 'tokenBased'")
.col-xs-12.text-center
strong
| Link-sharing is on.
|   
a(
href
ng-click="openMakePrivateModal()"
) Turn off link-sharing
.col-xs-12.access-token-display-area
div.access-token-wrapper
strong Anyone with this link can edit this project
2017-09-29 05:11:23 -04:00
pre.access-token {{ getReadAndWriteTokenLink() }}
div.access-token-wrapper
strong Anyone with this link can access this project
pre.access-token {{ getReadOnlyTokenLink() }}
//- legacy public-access
.row.public-access-level(ng-show="project.publicAccesLevel == 'readAndWrite' || project.publicAccesLevel == 'readOnly'")
.col-xs-12.text-center
2014-07-31 12:07:43 -04:00
strong(ng-if="project.publicAccesLevel == 'readAndWrite'") #{translate("this_project_is_public")}
strong(ng-if="project.publicAccesLevel == 'readOnly'") #{translate("this_project_is_public_read_only")}
|   
2014-07-01 10:05:32 -04:00
a(
href
ng-click="openMakePrivateModal()"
2014-07-31 12:07:43 -04:00
) #{translate("make_private")}
2014-07-01 09:12:28 -04:00
.row.project-member
.col-xs-8 {{ project.owner.email }}
.text-left(
ng-class="{'col-xs-3': project.members.length > 0, 'col-xs-4': project.members.length == 0}"
2014-09-26 11:35:57 -04:00
) #{translate("owner")}
2014-07-01 09:12:28 -04:00
.row.project-member(ng-repeat="member in project.members")
.col-xs-8 {{ member.email }}
.col-xs-3.text-left
2014-07-31 12:07:43 -04:00
span(ng-show="member.privileges == 'readAndWrite'") #{translate("can_edit")}
span(ng-show="member.privileges == 'readOnly'") #{translate("read_only")}
.col-xs-1
2014-07-01 09:12:28 -04:00
a(
href
2017-01-31 09:57:22 -05:00
tooltip=translate('remove_collaborator')
2014-07-01 09:12:28 -04:00
tooltip-placement="bottom"
ng-click="removeMember(member)"
)
i.fa.fa-times
.row.project-invite(ng-repeat="invite in project.invites")
.col-xs-8 {{ invite.email }} 
2016-08-03 06:55:24 -04:00
div.small
| #{translate("invite_not_accepted")}. 
a(href="#", ng-click="resendInvite(invite, $event)") #{translate("resend")}
.col-xs-3.text-left
// todo: get invite privileges
span(ng-show="invite.privileges == 'readAndWrite'") #{translate("can_edit")}
span(ng-show="invite.privileges == 'readOnly'") #{translate("read_only")}
.col-xs-1
a(
href
2017-01-31 09:57:22 -05:00
tooltip=translate('revoke_invite')
tooltip-placement="bottom"
ng-click="revokeInvite(invite)"
)
i.fa.fa-times
2014-07-01 09:12:28 -04:00
.row.invite-controls
form(ng-show="canAddCollaborators")
2014-07-31 12:07:43 -04:00
.small #{translate("share_with_your_collabs")}
2014-07-01 09:12:28 -04:00
.form-group
tags-input(
template="shareTagTemplate"
2017-01-31 09:57:22 -05:00
placeholder=settings.customisation.shareProjectPlaceholder || 'joe@example.com, sue@example.com, ...'
ng-model="inputs.contacts"
2014-07-01 09:12:28 -04:00
focus-on="open"
display-property="display"
add-on-paste="true"
add-on-enter="false"
replace-spaces-with-dashes="false"
type="email"
2014-07-01 09:12:28 -04:00
)
auto-complete(
source="filterAutocompleteUsers($query)"
template="shareAutocompleteTemplate"
display-property="email"
min-length="0"
)
2014-07-01 09:12:28 -04:00
.form-group
.pull-right
select.privileges.form-control(
ng-model="inputs.privileges"
name="privileges"
)
2014-07-31 12:07:43 -04:00
option(value="readAndWrite") #{translate("can_edit")}
option(value="readOnly") #{translate("read_only")}
2014-07-01 09:12:28 -04:00
|   
//- We have to use mousedown here since click has issues with the
//- blur handler in tags-input sometimes changing its height and
//- moving this button, preventing the click registering.
2014-07-01 09:12:28 -04:00
button.btn.btn-info(
type="submit"
ng-mousedown="addMembers()"
ng-keyup="$event.keyCode == 13 ? addMembers() : null"
2014-07-31 12:07:43 -04:00
) #{translate("share")}
2016-02-18 09:51:55 -05:00
div(ng-hide="canAddCollaborators")
p.text-center #{translate("need_to_upgrade_for_more_collabs")}. Also:
.row
.col-md-8.col-md-offset-2
ul.list-unstyled
li
i.fa.fa-check  
| #{translate("unlimited_projects")}
li
i.fa.fa-check  
| #{translate("collabs_per_proj", {collabcount:'Multiple'})}
li
i.fa.fa-check  
| #{translate("full_doc_history")}
li
i.fa.fa-check  
| #{translate("sync_to_dropbox")}
2015-11-16 09:31:05 -05:00
2016-02-18 09:51:55 -05:00
li
i.fa.fa-check  
| #{translate("sync_to_github")}
2015-11-16 09:31:05 -05:00
2016-02-18 09:51:55 -05:00
li
i.fa.fa-check  
|#{translate("compile_larger_projects")}
2015-11-16 09:31:05 -05:00
2016-02-18 09:51:55 -05:00
p.text-center.row-spaced-thin(ng-controller="FreeTrialModalController")
2015-11-16 09:31:05 -05:00
a.btn.btn-success(
href
ng-class="buttonClass"
sixpack-convert="track_changes_feature_info"
ng-click="startFreeTrial('projectMembers')"
) #{translate("start_free_trial")}
p.small(ng-show="startedFreeTrial")
2014-07-31 12:07:43 -04:00
| #{translate("refresh_page_after_starting_free_trial")}.
2014-07-01 09:12:28 -04:00
.modal-footer.modal-footer-share
2014-07-01 09:12:28 -04:00
.modal-footer-left
i.fa.fa-refresh.fa-spin(ng-show="state.inflight")
span.text-danger.error(ng-show="state.error")
span(ng-switch="state.errorReason")
span(ng-switch-when="cannot_invite_non_user")
| #{translate("cannot_invite_non_user")}
span(ng-switch-when="cannot_invite_self")
| #{translate("cannot_invite_self")}
span(ng-switch-when="invalid_email")
| #{translate("invalid_email")}
span(ng-switch-default)
| #{translate("generic_something_went_wrong")}
2016-07-27 05:28:01 -04:00
button.btn.btn-default(
2014-07-01 09:12:28 -04:00
ng-click="done()"
2016-03-01 15:17:15 -05:00
) #{translate("close")}
2014-07-01 10:05:32 -04:00
script(type="text/ng-template", id="makePublicModalTemplate")
.modal-header
button.close(
type="button"
data-dismiss="modal"
ng-click="cancel()"
) ×
2014-07-31 12:07:43 -04:00
h3 #{translate("make_project_public")}?
2014-07-01 10:05:32 -04:00
.modal-body.modal-body-share
2014-07-31 12:07:43 -04:00
p #{translate("make_project_public_consequences")}
2014-07-01 10:05:32 -04:00
p
select.form-control(
ng-model="inputs.privileges"
name="privileges"
)
2014-07-31 12:07:43 -04:00
option(value="readAndWrite") #{translate("allow_public_editing")}
option(value="readOnly") #{translate("allow_public_read_only")}
2014-07-01 10:05:32 -04:00
.modal-footer
button.btn.btn-default(
ng-click="cancel()"
2014-07-31 12:07:43 -04:00
) #{translate("cancel")}
2014-07-01 10:05:32 -04:00
button.btn.btn-info(
ng-click="makePublic()"
2014-07-31 12:07:43 -04:00
) #{translate("make_public")}
2014-07-01 10:05:32 -04:00
script(type="text/ng-template", id="makeTokenBasedModalTemplate")
.modal-header
button.close(
type="button"
data-dismiss="modal"
ng-click="cancel()"
) ×
2017-10-05 09:47:50 -04:00
h3 Enable link-sharing?
.modal-body.modal-body-share
2017-10-05 09:47:50 -04:00
p When link-sharing is enabled, anyone with the relevant link will be able to access this project
.modal-footer
button.btn.btn-default(
ng-click="cancel()"
) #{translate("cancel")}
button.btn.btn-info(
ng-click="makeTokenBased()"
2017-10-05 09:47:50 -04:00
) Enable Link-Sharing
2014-07-01 10:05:32 -04:00
script(type="text/ng-template", id="makePrivateModalTemplate")
.modal-header
button.close(
type="button"
data-dismiss="modal"
ng-click="cancel()"
) ×
2014-07-31 12:07:43 -04:00
h3 #{translate("make_project_private")}?
2014-07-01 10:05:32 -04:00
.modal-body.modal-body-share
2014-07-31 12:07:43 -04:00
p #{translate("make_project_private_consequences")}
2014-07-01 10:05:32 -04:00
.modal-footer
button.btn.btn-default(
ng-click="cancel()"
2014-07-31 12:07:43 -04:00
) #{translate("cancel")}
2014-07-01 10:05:32 -04:00
button.btn.btn-info(
ng-click="makePrivate()"
2014-07-31 12:07:43 -04:00
) #{translate("make_private")}
script(type="text/ng-template", id="shareTagTemplate")
.tag-template
span(ng-if="data.type")
i.fa.fa-fw(ng-class="{'fa-user': data.type != 'group', 'fa-group': data.type == 'group'}")
|
span {{$getDisplayText()}}
|
a(href, ng-click="$removeTag()").remove-button
i.fa.fa-fw.fa-close
script(type="text/ng-template", id="shareAutocompleteTemplate")
.autocomplete-template
div(ng-if="data.type == 'user'")
i.fa.fa-fw.fa-user
|
span(ng-bind-html="$highlight(data.display)")
div(ng-if="data.type == 'group'")
i.fa.fa-fw.fa-group
|
span(ng-bind-html="$highlight(data.name)")
span.subdued.small(ng-show="data.member_count") ({{ data.member_count }} members)