|
| File: org/alfresco/components/invite/reject-invite.get.desc.xml |
<webscript>
<shortname>Reject invite</shortname>
<description>Component that rejects an invite</description>
<url>/components/invite/reject-invite</url>
</webscript> |
| File: org/alfresco/components/invite/reject-invite.get.head.ftl |
<!-- Decline Invite Assets -->
<link rel="stylesheet" type="text/css" href="${page.url.context}/components/invite/reject-invite.css" />
<script type="text/javascript" src="${page.url.context}/components/invite/reject-invite.js"></script>
|
| File: org/alfresco/components/invite/reject-invite.get.html.ftl |
<div class="page-title theme-bg-color-1">
<div class="title">
<h1><span>${msg("header.title")}</span></h1>
</div>
</div>
<#if (error?? && error)>
<div class="reject-invite-body">
<h1>${msg("error.noinvitation.title")}</h1>
<p>${msg("error.noinvitation.text")}</p>
</div>
<#else>
<script type="text/javascript">//<![CDATA[
new Alfresco.RejectInvite("${args.htmlid}").setOptions(
{
inviteId: "${page.url.args.inviteId!''}",
inviteTicket: "${page.url.args.inviteTicket!''}"
}).setMessages(
${messages}
);
//]]></script>
<#assign inviter = invite.inviter.userName>
<#if (invite.inviter.firstName?? || invite.inviter.lastName??)>
<#assign inviter = (invite.inviter.firstName!'' + ' ' + invite.inviter.lastName!'')>
</#if>
<#assign siteName><#if (invite.site.title?? && invite.site.title?length > 0)>${invite.site.title}<#else>${invite.site.shortName}</#if></#assign>
<#assign siteMarkup><span class="site-name">${siteName}</span></#assign>
<div class="reject-invite-body">
<div id="${args.htmlid}-confirm" class="main-content">
<div class="question">${msg("reject.question", inviter, siteMarkup)}</div>
<div class="actions">
<span id="${args.htmlid}-decline-button" class="yui-button yui-push-button">
<span class="first-child">
<input type="button" name="decline-button" value="${msg("action.reject")}">
</span>
</span>
<span id="${args.htmlid}-accept-button" class="yui-button yui-push-button">
<span class="first-child">
<input type="button" name="accept-button" value="${msg("action.accept")}">
</span>
</span>
</div>
</div>
<div id="${args.htmlid}-declined" class="main-content hidden">
<p>${msg("message.rejected", inviter, siteMarkup)}<p>
</div>
<div id="${args.htmlid}-learn-more" class="learn-more">
<p>${msg("learn.more")} <a href="http://www.alfresco.com">www.alfresco.com</a></p>
</div>
</div>
</#if> |
| File: org/alfresco/components/invite/reject-invite.get.js |
<import resource="classpath:alfresco/site-webscripts/org/alfresco/callutils.js">
function main()
{
// check that we got all required information
var check = ["inviteId", "inviteeUserName", "siteShortName", "inviteTicket"];
for (var x=0; x < check.length; x++)
{
if (page.url.args[check[x]] == undefined)
{
// redirect to error page
status.code = 400;
status.message = "One or more parameters are missing";
return;
}
}
//fetch the invite information, which gives us all information required to display the page
var url = "/api/invite/" + page.url.args.inviteId + "/" + page.url.args.inviteTicket;
var connector = remote.connect("alfresco-noauth");
var json = connector.call(url);
if (json.status == 200)
{
// Create javascript objects from the repo response
var data = eval('(' + json + ')');
model.invite = data.invite;
}
else
{
// Inform the user that there is no invite object available
model.error = true;
}
}
main();
|
| File: org/alfresco/components/invite/reject-invite.get.properties |
header.title=Reject Invitation
message.decline.failure=Unable to reject invitation
error.noinvitation.title=Invitation not found
error.noinvitation.text=No invitation found; the inviter has probably canceled the invitation
reject.question=Are you sure you want to reject the invitation from {0} to join the {1} collaboration site?
action.reject=Yes
action.accept=No
message.rejected={0}''s invitation to join the {1} site has been rejected.
learn.more=Learn more about Share at:
|