Invalid-invite page, and re-jigg the share modal

This commit is contained in:
Shane Kilkelly 2016-07-27 10:10:44 +01:00
parent 855cc28483
commit 827629a74a
4 changed files with 35 additions and 8 deletions

View file

@ -59,7 +59,7 @@ module.exports = CollaboratorsInviteController =
logger.err {projectId, token}, "error getting invite by token"
return next(err)
_renderInvalidPage = () ->
res.render "project/invite/not-valid", {invite}
res.render "project/invite/not-valid"
if !invite
logger.log {projectId, token}, "no invite found for token"
return _renderInvalidPage()

View file

@ -27,12 +27,12 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
) #{translate("make_private")}
.row.project-member
.col-xs-8 {{ project.owner.email }}
.text-right(
.text-left(
ng-class="{'col-xs-3': project.members.length > 0, 'col-xs-4': project.members.length == 0}"
) #{translate("owner")}
.row.project-member(ng-repeat="member in project.members")
.col-xs-8 {{ member.email }}
.col-xs-3.text-right
.col-xs-3.text-left
span(ng-show="member.privileges == 'readAndWrite'") #{translate("can_edit")}
span(ng-show="member.privileges == 'readOnly'") #{translate("read_only")}
.col-xs-1
@ -44,10 +44,12 @@ script(type='text/ng-template', id='shareProjectModalTemplate')
)
i.fa.fa-times
.row.project-invite(ng-repeat="invite in state.invites")
.col-xs-8 {{ invite.email }} (invite)
.col-xs-3.text-right
span(ng-show="member.privileges == 'readAndWrite'") #{translate("can_edit")}
span(ng-show="member.privileges == 'readOnly'") #{translate("read_only")}
.col-xs-8 {{ invite.email }} 
span.label.label-primary pending
.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

View file

@ -1 +1,18 @@
h1 Invite Not Valid TEST
extends ../../layout
block content
.content.content-alt
.container
.row
.col-md-8.col-md-offset-2
.card.project-invite-invalid
.page-header.text-centered
h1 This is not a valid project invite
.row.text-center
.col-md-12
p
| The invite may have expired. Please contact the project owner.
.row.text-center.actions
.col-md-12
a.btn.btn-info(href="/project") #{translate("back_to_your_projects")}

View file

@ -2,4 +2,12 @@
form {
padding-top: 15px;
}
margin-bottom: 30px;
}
.project-invite-invalid {
.actions {
padding-top: 15px;
}
margin-bottom: 30px;
}