Corrections travail en groupe
This commit is contained in:
@@ -103,23 +103,24 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
|
||||
/secure/**=ROLE_ADMIN,ROLE_AUTHOR,ROLE_PCMEMBER
|
||||
/secure/**=IS_AUTHENTICATED_REMEMBERED
|
||||
/listarticle.htm=ROLE_CHAIRMAN
|
||||
/managearticle.htm=ROLE_USER
|
||||
/managearticle.htm=ROLE_AUTHOR
|
||||
/registeruser.htm=ROLE_ANONYMOUS,ROLE_USER
|
||||
/submissionarticle.htm=ROLE_USER
|
||||
/choosepreference.htm=ROLE_PCMEMBER
|
||||
/dispatcharticlelist.htm=ROLE_PCMEMBER
|
||||
/dispatcharticle.htm=ROLE_PCMEMBER
|
||||
/conflictlist.htm=ROLE_CHAIRMAN
|
||||
/dispatcharticle.htm=ROLE_CHAIRMAN
|
||||
/delegatearticle.htm=ROLE_PCMEMBER
|
||||
/addconference.htm=ROLE_CHAIRMAN,ROLE_CONFERENCE_CREATOR
|
||||
/evaluation.htm=ROLE_PCMEMBER,ROLE_REFEREE
|
||||
/createreport.htm=ROLE_PCMEMBER,ROLE_REFEREE
|
||||
/listconference.htm=ROLE_USER
|
||||
/validatearticle.htm=ROLE_CHAIRMAN
|
||||
/validateorreject.htm=ROLE_CHAIRMAN
|
||||
/listevaluation.htm=ROLE_USER
|
||||
/listevaluation.htm=ROLE_PCMEMBER,ROLE_REFEREE
|
||||
/download.htm=ROLE_USER
|
||||
/deletearticle.htm=ROLE_AUTHOR,ROLE_CHAIRMAN,ROLE_ADMIN
|
||||
/listreport.htm=ROLE_PCMEMBER,ROLE_REFEREE,ROLE_CHAIRMAN
|
||||
/deletearticle.htm=ROLE_AUTHOR
|
||||
/listreport.htm=ROLE_USER
|
||||
/detailarticle.htm=ROLE_USER
|
||||
/admin.htm=ROLE_ADMIN
|
||||
/**=IS_AUTHENTICATED_ANONYMOUSLY
|
||||
</value>
|
||||
</property>
|
||||
|
||||
@@ -18,9 +18,11 @@ home.referee=I am a program committee member. How Yacos can help me ?
|
||||
home.referee.txt=If you are the chairman, a PC member or simply a referee, thanks to yacos you can follow articles posted by authors.<br />As chairman, you can dispatch articles to your members for review and rating, manage your conference, the deadlines...<br />As the PC member or referee, you can review an article, post your comments and rate it, express your preference toward the submitted articles,...
|
||||
home.youknow=So now you know...
|
||||
home.link.choose=Choose one conference
|
||||
home.link.userBoard=Go to your dashboard
|
||||
|
||||
connected.noconference.title=No conference selected
|
||||
connected.noconference.warning=You must choose a conference to access all your features :
|
||||
connected.noconference.warning=Or you can see a recap of your current involvement in the conferences available in the system :
|
||||
article.post.noconference=You must choose a conference before post or edit an article.
|
||||
|
||||
conference.detail.description=Description
|
||||
@@ -207,6 +209,7 @@ dispatch.title=Dispatch the articles to the members
|
||||
|
||||
# Conference Form
|
||||
step=Step ({0}/{1})
|
||||
conference.remainingTokens=You have {0} tokens left to create new conferences.<br/>\n You can ask to the admin if you need more.
|
||||
conference.help.step1=
|
||||
conference.help.step2=This step is used to define some dates like the starting date for the conference.<br/>\nYou just have to click on a field and the calendar will appear.
|
||||
conference.help.step3=Here you can add some constraints at your conference like the number of pages by articles or the type of file you want the authors to use.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<!-- Doctype -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<link rel="icon" type="image/png" href="./images/favicon.png" />
|
||||
<title><fmt:message key="title" /></title>
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type='text/javascript' src='./javascripts/prototype.js'></script>
|
||||
<script type='text/javascript' src='./javascripts/rounded_boxes.js'></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//<![CDATA[
|
||||
var LoginManager = Class.create({
|
||||
initialize: function(inputField, inputField2){
|
||||
$(inputField).observe("keypress", this.KeyPressHandler.bindAsEventListener(this));
|
||||
@@ -30,7 +30,7 @@ var LoginManager = Class.create({
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
<decorator:head />
|
||||
</head>
|
||||
|
||||
@@ -15,20 +15,21 @@
|
||||
|
||||
<!-- MENU : ROLE_USER for general option -->
|
||||
<authz:authorize ifAllGranted="ROLE_USER">
|
||||
<div id="mainmenubloc">
|
||||
<div class="mainmenubloc">
|
||||
<h4><fmt:message key="menu.general.title" /></h4>
|
||||
<ul>
|
||||
<li><a href="<c:url value="userBoard.htm"/>"><fmt:message key="menu.general.userBoard" /></a></li>
|
||||
<li><a href="<c:url value="main.htm"/>"><fmt:message key="menu.general.confInfo" /></a></li>
|
||||
<li><a href="<c:url value="listConference.htm"/>"><fmt:message key="conference.linkMenu.choose" /></a></li>
|
||||
</ul>
|
||||
<div id="footer"></div>
|
||||
<div class="footer"></div>
|
||||
</div>
|
||||
</authz:authorize>
|
||||
|
||||
|
||||
<!-- MENU : CHAIRMAN -->
|
||||
<authz:authorize ifAllGranted="ROLE_CHAIRMAN">
|
||||
<div id="mainmenubloc">
|
||||
<authz:authorize ifAnyGranted="ROLE_CHAIRMAN,ROLE_CONFERENCE_CREATOR">
|
||||
<div class="mainmenubloc">
|
||||
<h4><fmt:message key="menu.chairman.title" /></h4>
|
||||
<ul>
|
||||
<authz:authorize ifAllGranted="ROLE_CONFERENCE_CREATOR">
|
||||
@@ -41,13 +42,13 @@
|
||||
<li><a href="<c:url value="conflictList.htm"/>"><fmt:message key="menu.chairman.article.conflict" /></a></li>
|
||||
<li><a href="<c:url value="forum.htm?role=chairman"/>"><fmt:message key="menu.chairman.article.discussion" /></a></li>
|
||||
</ul>
|
||||
<div id="footer"></div>
|
||||
<div class="footer"></div>
|
||||
</div>
|
||||
</authz:authorize>
|
||||
|
||||
<!-- MENU : ROLE_PCMEMBER -->
|
||||
<authz:authorize ifAllGranted="ROLE_PCMEMBER">
|
||||
<div id="mainmenubloc">
|
||||
<div class="mainmenubloc">
|
||||
<h4><fmt:message key="menu.pcmember.title" /></h4>
|
||||
<ul>
|
||||
<li><a href="<c:url value="choosePreference.htm"/>"><fmt:message key="menu.pcmember.article.preference" /></a></li>
|
||||
@@ -55,24 +56,24 @@
|
||||
<li><a href="<c:url value="listEvaluation.htm?role=pcmember"/>"><fmt:message key="menu.pcmember.article.evaluation.modify" /></a></li>
|
||||
<li><a href="<c:url value="forum.htm?role=pcmember"/>"><fmt:message key="menu.pcmember.article.discussion" /></a></li>
|
||||
</ul>
|
||||
<div id="footer"></div>
|
||||
<div class="footer"></div>
|
||||
</div>
|
||||
</authz:authorize>
|
||||
|
||||
<!-- MENU : ROLE_REFEREE -->
|
||||
<authz:authorize ifAllGranted="ROLE_REFEREE">
|
||||
<div id="mainmenubloc">
|
||||
<div class="mainmenubloc">
|
||||
<h4><fmt:message key="menu.referee.title" /></h4>
|
||||
<ul>
|
||||
<li><a href="<c:url value="listEvaluation.htm?role=referee"/>"><fmt:message key="menu.referee.article.evaluation.modify" /></a></li>
|
||||
</ul>
|
||||
<div id="footer"></div>
|
||||
<div class="footer"></div>
|
||||
</div>
|
||||
</authz:authorize>
|
||||
|
||||
<!-- MENU : ROLE_AUTHOR for articles management and ROLE_USER for submission -->
|
||||
<authz:authorize ifAllGranted="ROLE_USER">
|
||||
<div id="mainmenubloc">
|
||||
<div class="mainmenubloc">
|
||||
<h4><fmt:message key="menu.author.title" /></h4>
|
||||
<ul>
|
||||
<li><a href="<c:url value="submissionArticle.htm"/>"><fmt:message key="menu.author.article.submission" /></a></li>
|
||||
@@ -80,18 +81,18 @@
|
||||
<li><a href="<c:url value="manageArticle.htm"/>"><fmt:message key="menu.author.article.modify" /></a></li>
|
||||
</authz:authorize>
|
||||
</ul>
|
||||
<div id="footer"></div>
|
||||
<div class="footer"></div>
|
||||
</div>
|
||||
</authz:authorize>
|
||||
|
||||
<!-- MENU : ROLE_ANONYMOUS -->
|
||||
<authz:authorize ifNotGranted="ROLE_USER">
|
||||
<div id="mainmenubloc">
|
||||
<div class="mainmenubloc">
|
||||
<h4><fmt:message key="menu.anonymous.title" /></h4>
|
||||
<ul>
|
||||
<li><a href="<c:url value="submissionArticle.htm"/>"><fmt:message key="menu.anonymous.article.submission" /></a></li>
|
||||
</ul>
|
||||
<div id="footer"></div>
|
||||
<div class="footer"></div>
|
||||
</div>
|
||||
</authz:authorize>
|
||||
|
||||
|
||||
@@ -18,7 +18,13 @@
|
||||
<fmt:param value="5" />
|
||||
</fmt:message>
|
||||
|
||||
<form:form commandName="formConference" name="monForm">
|
||||
<p class="formHelp">
|
||||
<fmt:message key="conference.remainingTokens">
|
||||
<fmt:param value="${currentUser.conferenceCreationTokens}"/>
|
||||
</fmt:message>
|
||||
</p>
|
||||
|
||||
<form:form commandName="formConference">
|
||||
<table class="form">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -50,7 +56,7 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="submit" align="middle" name="_target1"
|
||||
<td><input type="submit" name="_target1"
|
||||
value="Next" /></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</fmt:message>
|
||||
|
||||
<p class="formHelp"><fmt:message key="conference.help.step2" /></p>
|
||||
<form:form commandName="formConference" name="monForm">
|
||||
<form:form commandName="formConference">
|
||||
<table class="form">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</fmt:message>
|
||||
<p class="formHelp"><fmt:message key="conference.help.step3" /></p>
|
||||
|
||||
<form:form commandName="formConference" name="monForm">
|
||||
<form:form commandName="formConference">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<script type='text/javascript' src='./javascripts/prototype.js'></script>
|
||||
|
||||
<script type='text/javascript'>
|
||||
|
||||
//<![CDATA[
|
||||
function init() {
|
||||
fillTable2();
|
||||
fillTable();
|
||||
@@ -157,6 +157,7 @@ var CritereManager = Class.create({
|
||||
}
|
||||
}
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
@@ -178,7 +179,7 @@ var CritereManager = Class.create({
|
||||
</fmt:message>
|
||||
|
||||
<p class="formHelp"><fmt:message key="conference.help.step4" /></p>
|
||||
<form:form commandName="formConference" name="monForm">
|
||||
<form:form commandName="formConference">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<script type='text/javascript' src='./javascripts/scriptaculous.js'></script>
|
||||
|
||||
<script type='text/javascript'>
|
||||
|
||||
//<![CDATA[
|
||||
function init() {
|
||||
dwr.engine.setAsync(false); // a v<>rifier
|
||||
//AddCriteriaJS.initPerson();
|
||||
@@ -86,7 +86,7 @@ function addPerson(eleid) {
|
||||
|
||||
function deletePerson(eleid) {
|
||||
var person = peopleCache2[eleid.substring(11)];
|
||||
if (confirm("Are you sure you want to delete " + person.firstName + " " + person.lastName + "?")) {
|
||||
if (confirm("Are you sure you want to remove " + person.firstName + " " + person.lastName + "?")) {
|
||||
dwr.engine.beginBatch();
|
||||
AddCriteriaJS.deletePerson(person);
|
||||
filterUser(null, dwr.util.getValue("myfilter"));
|
||||
@@ -104,7 +104,7 @@ function filterUser(el, value) {
|
||||
AddCriteriaJS.fillUser(value);
|
||||
setTimeout("fillTable()", 500);
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
@@ -126,7 +126,7 @@ function filterUser(el, value) {
|
||||
|
||||
<p class="formHelp"><fmt:message key="conference.help.step5" /></p>
|
||||
|
||||
<form:form commandName="formConference" name="monForm">
|
||||
<form:form commandName="formConference">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -166,7 +166,7 @@ function filterUser(el, value) {
|
||||
<tr id="patternadded" style="display: none;">
|
||||
<td><span id="tablePersonadded">Person</span></td>
|
||||
<td><a id="supprPerson" href="#"
|
||||
onclick="deletePerson(this.id)">Delete</a></td>
|
||||
onclick="deletePerson(this.id)">Remove</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h4>YACOS Administration</h4>
|
||||
<div class="cbb">
|
||||
<h2>Edit users</h2>
|
||||
<label>Filter :<input id="userFilterInput" type="text" name="userFilter"/></label>
|
||||
@@ -22,8 +22,13 @@
|
||||
<div class="dynamicListPlaceholder">
|
||||
Please enter a value in the filter field.
|
||||
</div>
|
||||
<div class="dynamicListItem">
|
||||
|
||||
<div class="dynamicListItem" id="person_item_pattern" style="display:none;height:0px;width:0px;">
|
||||
<div id="person_name" style="display:table-cell;">Name</div>
|
||||
<div style="display:table-cell">
|
||||
<a href="#" id="person_add_token">+</a>
|
||||
<span id="person_num_tokens">Num Tokens</span>
|
||||
<a href="#" id="person_remove_token">-</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<script type='text/javascript' src='./dwr/util.js'></script>
|
||||
<script type='text/javascript' src='./dwr/interface/DelegateArticlesJS.js'></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//<![CDATA[
|
||||
var selectedArticleId;
|
||||
var articleId;
|
||||
var pattern;
|
||||
@@ -111,13 +111,13 @@
|
||||
|
||||
function removeRemote() {
|
||||
var itemsToRemove = $('refereesList'+articleId).select('div.selected');
|
||||
var membersId = itemsToRemove.pluck('id');
|
||||
var refereeId = itemsToRemove.pluck('id');
|
||||
//var articleId = $('articleId').value;
|
||||
DelegateArticlesJS.removeMembers(membersId, articleId, remove);
|
||||
DelegateArticlesJS.removeReferee(refereeId, articleId, remove);
|
||||
}
|
||||
|
||||
function remove() {
|
||||
var itemsToRemove = $('membersArticleList'+articleId).select('div.selected');
|
||||
var itemsToRemove = $('refereesArticleList'+articleId).select('div.selected');
|
||||
//suppression dans la premi<6D>re liste
|
||||
itemsToRemove.invoke('remove');
|
||||
|
||||
@@ -135,12 +135,12 @@
|
||||
var itemsToAdd = $('refereesList'+articleId).select('div.selected');
|
||||
var refereeId = itemsToAdd.pluck('id');
|
||||
//var articleId = $('articleId').value;
|
||||
DelegateArticlesJS.addReferee(membersId, articleId, add());
|
||||
DelegateArticlesJS.addReferee(refereeId, articleId, add());
|
||||
|
||||
}
|
||||
|
||||
function add() {
|
||||
var itemsToAdd = $('refereeList'+articleId).select('div.selected');
|
||||
var itemsToAdd = $('refereesList'+articleId).select('div.selected');
|
||||
//suppression dans la premi<6D>re liste
|
||||
itemsToAdd.invoke('remove');
|
||||
|
||||
@@ -159,7 +159,8 @@
|
||||
itemsToRemove.invoke('remove');
|
||||
itemsToRemove = $('refereesList'+artId).select('div.dynamicListItem');
|
||||
itemsToRemove.invoke('remove');
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
<script type='text/javascript' src='./dwr/engine.js'></script>
|
||||
<script type='text/javascript' src='./dwr/util.js'></script>
|
||||
<script type='text/javascript' src='./dwr/interface/DispatchArticlesJS.js'></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
<script type="text/javascript">
|
||||
// Mandatory for XHTML strict validation
|
||||
//<![CDATA[
|
||||
var selectedArticleId;
|
||||
var articleId;
|
||||
var pattern;
|
||||
@@ -155,7 +156,8 @@
|
||||
itemsToRemove.invoke('remove');
|
||||
itemsToRemove = $('membersList'+artId).select('div.dynamicListItem');
|
||||
itemsToRemove.invoke('remove');
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
@@ -196,8 +198,8 @@
|
||||
</div>
|
||||
|
||||
</td><td>
|
||||
<input type="button" id="addButton" value="add>>>" onclick="addRemote()"/><br/>
|
||||
<input type="button" id="removeButton" value="<<<remove" onclick="removeRemote()"/>
|
||||
<input type="button" name="addButton" value="add>>>" onclick="addRemote()"/><br/>
|
||||
<input type="button" name="removeButton" value="<<<remove" onclick="removeRemote()"/>
|
||||
</td><td>
|
||||
<h1><fmt:message key="members.list2"/></h1>
|
||||
<div id="membersArticleList${article.id}" style="border:1px solid black; max-height:150px;overflow:auto;">
|
||||
@@ -207,8 +209,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
</c:forEach>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<script type='text/javascript' src='./javascripts/prototype.js'></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function HideRegistered() {
|
||||
var listElem = $$('.isRegistered');
|
||||
for (var i = 0; i < listElem.length; i++) {
|
||||
@@ -25,6 +26,7 @@
|
||||
listElem[i].style.display = "";
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<form action="<c:url value='j_acegi_security_check'/>" method="POST" id="mainformlogin2">
|
||||
<form action="<c:url value='j_acegi_security_check'/>" method="post" id="mainformlogin2">
|
||||
<table class="content_table">
|
||||
<tr>
|
||||
<td width="100" align="left">
|
||||
|
||||
@@ -47,8 +47,14 @@
|
||||
<!-- Connected but no conference chosen -->
|
||||
<h4 class="title"><fmt:message key="connected.noconference.title" /></h4>
|
||||
<div class="warningBox">
|
||||
<fmt:message key="connected.noconference.warning" />
|
||||
<a href="<c:url value="listConference.htm"/>"><fmt:message key="home.link.choose" /></a>
|
||||
<p>
|
||||
<fmt:message key="connected.noconference.warning" />
|
||||
<a href="<c:url value="listConference.htm"/>"><fmt:message key="home.link.choose" /></a>
|
||||
</p>
|
||||
<p>
|
||||
<fmt:message key="connected.noconference.warning.userBoard" />
|
||||
<a href="<c:url value="userBoard.htm"/>"><fmt:message key="home.link.userBoard" /></a>
|
||||
</p>
|
||||
</div>
|
||||
</authz:authorize>
|
||||
<authz:authorize ifAllGranted="ROLE_ANONYMOUS">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<script type='text/javascript' src='./javascripts/effects.js'></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
//<![CDATA[
|
||||
function showConfAll() {
|
||||
if ($('confList').visible())
|
||||
$('confList').fade();
|
||||
@@ -64,7 +64,7 @@ function showArticleReferee() {
|
||||
else
|
||||
$('articleListReferee').appear();
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
@@ -98,32 +98,21 @@ function showArticleReferee() {
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<h3 class="descriptionTitle">Chairman's informations</h3>
|
||||
<div class="textBox">
|
||||
You are Chairman in <b>${numberChairman}</b> conference(s)<br /><br />
|
||||
<a name="listConfAuthor"></a>
|
||||
<h3 class="descriptionTitle">Author's informations</h3>
|
||||
<div class="textBox">
|
||||
You are Author in <b>${numberAuthor}</b> conference(s)<br /><br />
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${numberCreationTokens} != 0">
|
||||
You can create <b>${numberCreationTokens}</b> conference(s). Click
|
||||
<a href="addConference.htm">here</a> to create one now.
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
You can't create a conference at the moment. If you want to create a conference, you should address to the <a href="mailto:admin@yacos.org">administrator</a> of this site.
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<a name="listConfChairman"></a>
|
||||
<c:if test="${not empty listConfForUser}">
|
||||
<br /><br />
|
||||
If you want to see the list of conferences you are registered in, click <a href="#listConfChairman" onclick="showConfChairman();">here</a>.
|
||||
If you want to see the list of conferences you are registered in, click <a href="#listConfAuthor" onclick="showConfAuthor();">here</a>.
|
||||
|
||||
|
||||
<div id="confListChairman" style="display: none;">
|
||||
<div id="confListAuthor" style="display: none;">
|
||||
<table width="100%" align="center">
|
||||
<tbody>
|
||||
<c:forEach items="${listConfForUser}" var="conf">
|
||||
<c:forEach items="${listRole}" var="role">
|
||||
<c:if test="${conf.id == role.conference.id and role.type == 'CHAIRMAN'}">
|
||||
<c:if test="${conf.id == role.conference.id and role.type == 'AUTHOR'}">
|
||||
<tr>
|
||||
<td align="center">${conf.title}</td>
|
||||
<td align="center"><a href="chooseConference.htm?idConf=${conf.id}">Select</a></td>
|
||||
@@ -134,65 +123,25 @@ function showArticleReferee() {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<br /><br />
|
||||
</c:if>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<a name="listConfPcmember"></a>
|
||||
<h3 class="descriptionTitle">PCMember's informations</h3>
|
||||
<div class="textBox">
|
||||
You are PCMember in <b>${numberPCMember}</b> conference(s)<br /><br />
|
||||
<a name="listArticleAuthor"></a>
|
||||
You have posted <b>${numberArticle}</b> article(s).<br /><br />
|
||||
|
||||
<c:if test="${not empty listConfForUser}">
|
||||
If you want to see the list of conferences you are registered in, click <a href="#listConfPcmember" onclick="showConfPcmember();">here</a>.
|
||||
If you want to see the list of articles you have submitted, click <a href="#listArticleAuthor" onclick="showArticleAll();">here</a>.
|
||||
|
||||
|
||||
<div id="confListPcmember" style="display: none;">
|
||||
<div id="articleList" style="display: none;">
|
||||
<table width="100%" align="center">
|
||||
<tbody>
|
||||
<c:forEach items="${listConfForUser}" var="conf">
|
||||
<c:forEach items="${listRole}" var="role">
|
||||
<c:if test="${conf.id == role.conference.id and role.type == 'PCMEMBER'}">
|
||||
<tr>
|
||||
<td align="center">${conf.title}</td>
|
||||
<td align="center"><a href="chooseConference.htm?idConf=${conf.id}">Select</a></td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<br /><br />
|
||||
</c:if>
|
||||
|
||||
|
||||
<a name="listArticlePcMember"></a>
|
||||
You have <b>${numberArticlePCMember}</b> article(s) in your evaluation list.<br /><br />
|
||||
|
||||
<c:if test="${not empty listArticlePCMember}">
|
||||
If you want to see the list of articles you have in your evaluation list, click <a href="#listArticlePcMember" onclick="showArticlePcMember();">here</a>.
|
||||
|
||||
|
||||
<div id="articleListPcMember" style="display: none;">
|
||||
<table width="100%" align="center">
|
||||
<tbody>
|
||||
<c:forEach var="article" items="${listArticlePCMember}" varStatus="i">
|
||||
<c:forEach var="article" items="${listAllArticle}" varStatus="i">
|
||||
<tr>
|
||||
<td align="center" width="25%">${article.title}</td>
|
||||
<td align="center" width="25%">
|
||||
<c:choose>
|
||||
<c:when test="${not empty article.referee}">
|
||||
Delegated to:<br />
|
||||
<c:forEach var="referee" items="${article.referee}">
|
||||
${referee.firstName} ${referee.lastName}<br/>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:if test="${article.state == 'SUBMITED'}">
|
||||
To evaluate
|
||||
Submitted
|
||||
</c:if>
|
||||
<c:if test="${article.state == 'EVALUATED'}">
|
||||
Evaluated
|
||||
@@ -202,10 +151,7 @@ function showArticleReferee() {
|
||||
</c:if>
|
||||
<c:if test="${article.state == 'ACCEPTED'}">
|
||||
Accepted
|
||||
</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</c:if>
|
||||
</td>
|
||||
<td align="center" width="25%">
|
||||
<a href="chooseConference.htm?idConf=${article.conference.id}">${article.conference.title}</a>
|
||||
@@ -292,21 +238,21 @@ function showArticleReferee() {
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<a name="listConfAuthor"></a>
|
||||
<h3 class="descriptionTitle">Author's informations</h3>
|
||||
<div class="textBox">
|
||||
You are Author in <b>${numberAuthor}</b> conference(s)<br /><br />
|
||||
<a name="listConfPcmember"></a>
|
||||
<h3 class="descriptionTitle">PCMember's informations</h3>
|
||||
<div class="textBox">
|
||||
You are PCMember in <b>${numberPCMember}</b> conference(s)<br /><br />
|
||||
|
||||
<c:if test="${not empty listConfForUser}">
|
||||
If you want to see the list of conferences you are registered in, click <a href="#listConfAuthor" onclick="showConfAuthor();">here</a>.
|
||||
If you want to see the list of conferences you are registered in, click <a href="#listConfPcmember" onclick="showConfPcmember();">here</a>.
|
||||
|
||||
|
||||
<div id="confListAuthor" style="display: none;">
|
||||
<div id="confListPcmember" style="display: none;">
|
||||
<table width="100%" align="center">
|
||||
<tbody>
|
||||
<c:forEach items="${listConfForUser}" var="conf">
|
||||
<c:forEach items="${listRole}" var="role">
|
||||
<c:if test="${conf.id == role.conference.id and role.type == 'AUTHOR'}">
|
||||
<c:if test="${conf.id == role.conference.id and role.type == 'PCMEMBER'}">
|
||||
<tr>
|
||||
<td align="center">${conf.title}</td>
|
||||
<td align="center"><a href="chooseConference.htm?idConf=${conf.id}">Select</a></td>
|
||||
@@ -317,25 +263,34 @@ function showArticleReferee() {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<br /><br />
|
||||
<br /><br />
|
||||
</c:if>
|
||||
|
||||
<a name="listArticleAuthor"></a>
|
||||
You have posted <b>${numberArticle}</b> article(s).<br /><br />
|
||||
|
||||
<c:if test="${not empty listConfForUser}">
|
||||
If you want to see the list of articles you have submitted, click <a href="#listArticleAuthor" onclick="showArticleAll();">here</a>.
|
||||
<a name="listArticlePcMember"></a>
|
||||
You have <b>${numberArticlePCMember}</b> article(s) in your evaluation list.<br /><br />
|
||||
|
||||
<c:if test="${not empty listArticlePCMember}">
|
||||
If you want to see the list of articles you have in your evaluation list, click <a href="#listArticlePcMember" onclick="showArticlePcMember();">here</a>.
|
||||
|
||||
|
||||
<div id="articleList" style="display: none;">
|
||||
<div id="articleListPcMember" style="display: none;">
|
||||
<table width="100%" align="center">
|
||||
<tbody>
|
||||
<c:forEach var="article" items="${listAllArticle}" varStatus="i">
|
||||
<c:forEach var="article" items="${listArticlePCMember}" varStatus="i">
|
||||
<tr>
|
||||
<td align="center" width="25%">${article.title}</td>
|
||||
<td align="center" width="25%">
|
||||
<c:choose>
|
||||
<c:when test="${not empty article.referee}">
|
||||
Delegated to:<br />
|
||||
<c:forEach var="referee" items="${article.referee}">
|
||||
${referee.firstName} ${referee.lastName}<br/>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:if test="${article.state == 'SUBMITED'}">
|
||||
Submitted
|
||||
To evaluate
|
||||
</c:if>
|
||||
<c:if test="${article.state == 'EVALUATED'}">
|
||||
Evaluated
|
||||
@@ -345,7 +300,10 @@ function showArticleReferee() {
|
||||
</c:if>
|
||||
<c:if test="${article.state == 'ACCEPTED'}">
|
||||
Accepted
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</td>
|
||||
<td align="center" width="25%">
|
||||
<a href="chooseConference.htm?idConf=${article.conference.id}">${article.conference.title}</a>
|
||||
@@ -361,6 +319,48 @@ function showArticleReferee() {
|
||||
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="descriptionTitle">Chairman's informations</h3>
|
||||
<div class="textBox">
|
||||
You are Chairman in <b>${numberChairman}</b> conference(s)<br /><br />
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${numberCreationTokens} != 0">
|
||||
You can create <b>${numberCreationTokens}</b> conference(s). Click
|
||||
<a href="addConference.htm">here</a> to create one now.
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
You can't create a conference at the moment. If you want to create a conference, you should address to the <a href="mailto:admin@yacos.org">administrator</a> of this site.
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<a name="listConfChairman"></a>
|
||||
<c:if test="${not empty listConfForUser}">
|
||||
<br /><br />
|
||||
If you want to see the list of conferences you are registered in, click <a href="#listConfChairman" onclick="showConfChairman();">here</a>.
|
||||
|
||||
|
||||
<div id="confListChairman" style="display: none;">
|
||||
<table width="100%" align="center">
|
||||
<tbody>
|
||||
<c:forEach items="${listConfForUser}" var="conf">
|
||||
<c:forEach items="${listRole}" var="role">
|
||||
<c:if test="${conf.id == role.conference.id and role.type == 'CHAIRMAN'}">
|
||||
<tr>
|
||||
<td align="center">${conf.title}</td>
|
||||
<td align="center"><a href="chooseConference.htm?idConf=${conf.id}">Select</a></td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</c:if>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -338,7 +338,11 @@
|
||||
<dwr:convert type="bean"
|
||||
class="org.yacos.web.PCmember.controller.RefereeBean">
|
||||
</dwr:convert>
|
||||
|
||||
|
||||
<dwr:convert type="bean"
|
||||
class="org.yacos.web.admin.DWRPersonBean">
|
||||
</dwr:convert>
|
||||
|
||||
<dwr:convert type="bean" class="java.lang.StackTraceElement"></dwr:convert>
|
||||
<dwr:convert type="exception" class="java.lang.exception"></dwr:convert>
|
||||
|
||||
|
||||
@@ -1,30 +1,59 @@
|
||||
var AdminController = Class.create({
|
||||
var AdminManager = Class.create({
|
||||
initialize: function(){
|
||||
this.input = $('userFilterInput');
|
||||
input.observe('keyPress',this.userInputKeyHandler.bind(this));
|
||||
this.input.observe('keyPress',this.userInputKeyHandler.bind(this));
|
||||
this.fillUserList();
|
||||
},
|
||||
addConferenceCreationToken: function(event){
|
||||
|
||||
addConferenceCreationToken: function(event,user_object){
|
||||
AdminController.addConferenceCreationToken(user_object.login,
|
||||
function(updated_number){
|
||||
dwr.util.setValue("person_num_tokens"+"_"+user_object.id,
|
||||
updated_number);
|
||||
}
|
||||
);
|
||||
event.stop();
|
||||
},
|
||||
removeConferenceCreationToken: function(event){
|
||||
|
||||
removeConferenceCreationToken: function(event,user_object){
|
||||
AdminController.removeConferenceCreationToken(user_object.login,
|
||||
function(updated_number){
|
||||
dwr.util.setValue("person_num_tokens"+"_"+user_object.id,
|
||||
updated_number);
|
||||
}
|
||||
);
|
||||
event.stop();
|
||||
},
|
||||
userInputKeyHandler: function(){
|
||||
|
||||
switch(event.keyCode){
|
||||
case Event.KEY_RETURN:
|
||||
this.addRemote();
|
||||
event.stop();
|
||||
return false;
|
||||
}
|
||||
},
|
||||
fillUserList: function(){
|
||||
AdminController.getUserList(function(people){
|
||||
var newPersonItem;
|
||||
AdminController.getUsersList(function(people){
|
||||
var content;
|
||||
var elemName;
|
||||
var contentValue;
|
||||
var id;
|
||||
var person;
|
||||
for (var i = 0; i < people.length; i++) {
|
||||
newPersonItem = new Element('div',{
|
||||
'class':'dynamicListItem',
|
||||
'style':'display:none;height:0px;width:0px;',
|
||||
'id':elemName}).update(value).insert(hidden);
|
||||
person = people[i];
|
||||
id = "_"+person.id;
|
||||
elemName="person_item_pattern"+id;
|
||||
|
||||
dwr.util.cloneNode("person_item_pattern", { idSuffix:id });
|
||||
dwr.util.setValue("person_name" + id, person.firstName + " " + person.lastName);
|
||||
dwr.util.setValue("person_num_tokens"+id,person.numTokens);
|
||||
|
||||
$("person_add_token"+id).observe('click',
|
||||
this.addConferenceCreationToken.bindAsEventListener(this,person));
|
||||
$("person_remove_token"+id).observe('click',
|
||||
this.removeConferenceCreationToken.bindAsEventListener(this,person));
|
||||
$(elemName).appear();
|
||||
}
|
||||
}.bind(this) );
|
||||
}
|
||||
});
|
||||
|
||||
new AdminController();
|
||||
Event.observe(window,'load',function(e){new AdminManager();});
|
||||
@@ -4,8 +4,8 @@
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<form action="<c:url value='j_acegi_security_check'/>" method="POST" id="mainformlogin">
|
||||
<fmt:message key="login.txt.login"/> :
|
||||
<form action="<c:url value='j_acegi_security_check'/>" method="post" id="mainformlogin">
|
||||
<label for="j_username"><fmt:message key="login.txt.login"/> :</label>
|
||||
<input id="username" type='text' name='j_username' value="<fmt:message key='login.field.login' />" onfocus="if (this.value == '<fmt:message key='login.field.login' />') { this.value = ''; }" onblur="if (this.value == '') { this.value = '<fmt:message key='login.field.login' />'; }" />
|
||||
<input id="password" type='password' name='j_password' />
|
||||
<a href="javascript:document.getElementById('mainformlogin').submit();" id="submit_btn"><fmt:message key="login.btn.connexion" /></a>
|
||||
|
||||
@@ -260,9 +260,7 @@ form > table > thead th {
|
||||
|
||||
|
||||
#main {
|
||||
|
||||
position: relative;
|
||||
/*background-color: #8bff74;*/
|
||||
padding: 15px 0 0;
|
||||
width: 100%;
|
||||
display: table;
|
||||
@@ -340,19 +338,19 @@ table.content_table {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group manageArticle */
|
||||
a.manage_link {
|
||||
text-decoration: none;
|
||||
padding-right: 50px;
|
||||
color: #008281;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.manage_link:hover {
|
||||
color: #003e82;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group manageArticle */
|
||||
a.manage_link {
|
||||
text-decoration: none;
|
||||
padding-right: 50px;
|
||||
color: #008281;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.manage_link:hover {
|
||||
color: #003e82;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
|
||||
@@ -360,16 +358,16 @@ a.manage_link:hover {
|
||||
|
||||
#main #mainmenu {
|
||||
width: 150px;
|
||||
float: left;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
#main #mainmenu #mainmenubloc {
|
||||
#main #mainmenu .mainmenubloc {
|
||||
margin: 10px auto;
|
||||
width: 161px;
|
||||
background: url(../images/title-small.png) no-repeat left top;
|
||||
}
|
||||
|
||||
#main #mainmenu #mainmenubloc h4 {
|
||||
#main #mainmenu .mainmenubloc h4 {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
@@ -378,36 +376,36 @@ a.manage_link:hover {
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
#main #mainmenu #mainmenubloc ul {
|
||||
#main #mainmenu .mainmenubloc ul {
|
||||
background: url(../images/menu-background-repeat.png) repeat-y;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
#main #mainmenu #mainmenubloc ul li {
|
||||
#main #mainmenu .mainmenubloc ul li {
|
||||
background: url(../images/menu-background-repeat.png) repeat-y;
|
||||
height: 22px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#main #mainmenu #mainmenubloc ul li:hover {
|
||||
#main #mainmenu .mainmenubloc ul li:hover {
|
||||
background-image: url(../images/menu-background-repeat-hover.png);
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
#main #mainmenu #mainmenubloc a {
|
||||
#main #mainmenu .mainmenubloc a {
|
||||
text-decoration: none;
|
||||
color: #8d0000;
|
||||
text-align: left;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#main #mainmenu #mainmenubloc a:hover {
|
||||
#main #mainmenu .mainmenubloc a:hover {
|
||||
color: #ff7a00;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#main #mainmenu #mainmenubloc #footer {
|
||||
#main #mainmenu .mainmenubloc .footer {
|
||||
background-image: url(../images/menu-bottom.png);
|
||||
width: 161px;
|
||||
height: 6px;
|
||||
@@ -417,7 +415,7 @@ a.manage_link:hover {
|
||||
/* @group maincontent */
|
||||
|
||||
#main #maincontent {
|
||||
margin-left: 200px;
|
||||
margin-left: 20px;
|
||||
width: 780px;
|
||||
background: url(../images/title-big.png) no-repeat left top;
|
||||
margin-top: 10px;
|
||||
@@ -779,4 +777,10 @@ div.user_new {
|
||||
|
||||
#loginFull_forgotPassword {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display:none;
|
||||
height:0px;
|
||||
width:0px;
|
||||
}
|
||||
@@ -51,6 +51,10 @@ public class UserDetails implements org.acegisecurity.userdetails.UserDetails {
|
||||
|
||||
ArrayList<GrantedAuthority> authoritiesList = new ArrayList<GrantedAuthority>();
|
||||
|
||||
if(this.login.equals("admin")){
|
||||
authoritiesList.add(new GrantedAuthorityImpl("ROLE_ADMIN"));
|
||||
}
|
||||
|
||||
if(SessionService.getInstance().getConferenceManager().canCreateConference(login)){
|
||||
authoritiesList.add(new GrantedAuthorityImpl("ROLE_CONFERENCE_CREATOR"));
|
||||
}
|
||||
|
||||
@@ -15,8 +15,10 @@ import org.yacos.core.article.IArticleManager;
|
||||
import org.yacos.core.conferences.Conference;
|
||||
import org.yacos.core.conferences.IConferenceManager;
|
||||
import org.yacos.core.users.IUserManager;
|
||||
import org.yacos.core.users.Role;
|
||||
import org.yacos.core.users.Speciality;
|
||||
import org.yacos.core.users.User;
|
||||
import org.yacos.core.users.Role.RoleType;
|
||||
import org.yacos.web.system.session.SessionService;
|
||||
|
||||
public class DelegateArticleController implements Controller{
|
||||
@@ -129,6 +131,7 @@ public List<RefereeBean> getRefereesWithTheArticle(int articleId ){
|
||||
public void addReferee(List<String> refereesId,int articleId){
|
||||
for (String refereeId : refereesId) {
|
||||
articleManager.delegateArticleToReferee(articleId, refereeId,memberId);
|
||||
conferenceManager.addRole(RoleType.REFEREE, refereeId, SessionService.getInstance().getCurrentConference().getId());
|
||||
}
|
||||
logger.debug("add referee to article");
|
||||
}
|
||||
@@ -136,6 +139,9 @@ public List<RefereeBean> getRefereesWithTheArticle(int articleId ){
|
||||
public void removeReferee(List<String> refereesId,int articleId){
|
||||
for (String refereeId : refereesId) {
|
||||
articleManager.undelegateArticleToReferee(articleId, refereeId, memberId);
|
||||
User referee = userManager.getUser(refereeId);
|
||||
Role role = new Role(RoleType.REFEREE,referee,SessionService.getInstance().getCurrentConference());
|
||||
conferenceManager.removeRole(role);
|
||||
}
|
||||
logger.debug("remove members to article");
|
||||
|
||||
|
||||
@@ -124,4 +124,4 @@ public class ListEvaluationController extends SimpleFormController {
|
||||
|
||||
return new ModelAndView("listEvaluation", "listArticle", listArticleBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,28 @@
|
||||
package org.yacos.web.admin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
|
||||
import org.yacos.core.article.IArticleManager;
|
||||
import org.yacos.core.conferences.IConferenceManager;
|
||||
import org.yacos.core.exceptions.NoConferenceCreationTokenLeftException;
|
||||
import org.yacos.core.users.IUserManager;
|
||||
import org.yacos.core.users.User;
|
||||
import org.yacos.web.system.controller.MailSenderService;
|
||||
import org.yacos.web.system.session.SessionService;
|
||||
import org.yacos.web.system.session.YACOSUtils;
|
||||
|
||||
public class AdminController extends MultiActionController {
|
||||
private IArticleManager articleManager;
|
||||
private IUserManager userManager;
|
||||
private IConferenceManager conferenceManager;
|
||||
|
||||
private HashSet<String> addedConferenceCreationTokens = new HashSet<String>();
|
||||
/**
|
||||
* @return the articleManager
|
||||
*/
|
||||
@@ -50,6 +60,48 @@ public class AdminController extends MultiActionController {
|
||||
this.conferenceManager = conferenceManager;
|
||||
}
|
||||
|
||||
public int addConferenceCreationToken(String login){
|
||||
conferenceManager.addConferenceCreationToken(login);
|
||||
addedConferenceCreationTokens.add(login);
|
||||
return conferenceManager.conferenceCreationTokens(login);
|
||||
}
|
||||
|
||||
public int removeConferenceCreationToken(String login){
|
||||
try {
|
||||
conferenceManager.useConferenceCreationToken(login);
|
||||
} catch (NoConferenceCreationTokenLeftException e) {
|
||||
// We don't have to handle this exception, the count just won't change
|
||||
}
|
||||
return conferenceManager.conferenceCreationTokens(login);
|
||||
}
|
||||
|
||||
public void sendNotifications(){
|
||||
User user;
|
||||
for(String login : addedConferenceCreationTokens){
|
||||
user = userManager.getUser(login);
|
||||
MailSenderService.getInstance().sendEMail(user.getEmail(),
|
||||
"YACOS : "+user.getFirstName()+" "+user.getLastName()+" you have been granted a conference creation token",
|
||||
"You receive this email because the YACOS admin allowed you to create a new conference in the system.\n"
|
||||
+ "Your current conference creation token count is "+user.getConferenceCreationTokens()+"\n"
|
||||
+ YACOSUtils.fullURL("addConference.htm"));
|
||||
}
|
||||
}
|
||||
|
||||
public List<DWRPersonBean> getUsersList(){
|
||||
List<DWRPersonBean> beans = new ArrayList<DWRPersonBean>();
|
||||
DWRPersonBean bean;
|
||||
for(User user : userManager.getUsers()){
|
||||
bean = new DWRPersonBean();
|
||||
bean.setLogin(user.getLogin());
|
||||
bean.setFirstName(user.getFirstName());
|
||||
bean.setLastName(user.getLastName());
|
||||
bean.setId(beans.size());
|
||||
bean.setNumTokens(conferenceManager.conferenceCreationTokens(user.getLogin()));
|
||||
beans.add(bean);
|
||||
}
|
||||
return beans;
|
||||
}
|
||||
|
||||
public ModelAndView show(HttpServletRequest request, HttpServletResponse response){
|
||||
return new ModelAndView("admin");
|
||||
}
|
||||
|
||||
69
YACOSWeb/src/org/yacos/web/admin/DWRPersonBean.java
Normal file
69
YACOSWeb/src/org/yacos/web/admin/DWRPersonBean.java
Normal file
@@ -0,0 +1,69 @@
|
||||
package org.yacos.web.admin;
|
||||
|
||||
public class DWRPersonBean {
|
||||
private int id;
|
||||
private String login;
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private int numTokens;
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* @param id the id to set
|
||||
*/
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* @return the login
|
||||
*/
|
||||
public String getLogin() {
|
||||
return login;
|
||||
}
|
||||
/**
|
||||
* @param login the login to set
|
||||
*/
|
||||
public void setLogin(String login) {
|
||||
this.login = login;
|
||||
}
|
||||
/**
|
||||
* @return the firstName
|
||||
*/
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
/**
|
||||
* @param firstName the firstName to set
|
||||
*/
|
||||
public void setFirstName(String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
/**
|
||||
* @return the lastName
|
||||
*/
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
/**
|
||||
* @param lastName the lastName to set
|
||||
*/
|
||||
public void setLastName(String lastName) {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
/**
|
||||
* @return the numTokens
|
||||
*/
|
||||
public int getNumTokens() {
|
||||
return numTokens;
|
||||
}
|
||||
/**
|
||||
* @param numTokens the numTokens to set
|
||||
*/
|
||||
public void setNumTokens(int numTokens) {
|
||||
this.numTokens = numTokens;
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import org.yacos.web.chairman.form.FormConference;
|
||||
import org.yacos.web.chairman.validation.ConferenceValidator;
|
||||
import org.yacos.web.system.controller.MailSenderService;
|
||||
import org.yacos.web.system.session.SessionService;
|
||||
import org.yacos.web.system.session.YACOSUtils;
|
||||
|
||||
public class AddConferenceController extends AbstractWizardFormController {
|
||||
|
||||
@@ -467,8 +468,7 @@ public class AddConferenceController extends AbstractWizardFormController {
|
||||
mailBody += "You've been invited to join the program comity of the conference :\n";
|
||||
mailBody += conf.getTitle()+"/n";
|
||||
mailBody += "You can register on this page : \n";
|
||||
String baseUrl = request.getSession().getServletContext().getContextPath();
|
||||
mailBody += baseUrl+"/registerUser.htm /n";
|
||||
mailBody += YACOSUtils.fullURL("registerUser.htm")+" /n";
|
||||
mailBody += "Please note that you MUST use this eMail address in the registration form in order to get the appropriate credentials.";
|
||||
// TODO : use a template
|
||||
for(String invitationEmail : listInvitations){
|
||||
@@ -477,10 +477,9 @@ public class AddConferenceController extends AbstractWizardFormController {
|
||||
MailSenderService.getInstance().sendEMail(invitationEmail, mailSubject , mailBody);
|
||||
} catch (ConferenceDoesntExistException e) {
|
||||
// Should never happen
|
||||
e.printStackTrace();
|
||||
logger.warn("Could not send invitation email.");
|
||||
} catch (MailSendException e) {
|
||||
// TODO : see what we can do about this
|
||||
e.printStackTrace();
|
||||
logger.warn("Could not send invitation email.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ public class SUserRegistrationController extends SimpleFormController {
|
||||
userCommand.getLastName(),
|
||||
userCommand.getOrganization(),
|
||||
userCommand.getEmail());
|
||||
SessionService.getInstance().authenticate(
|
||||
userCommand.getLogin(),
|
||||
userCommand.getPassword());
|
||||
model.put("account", "2");
|
||||
} catch (PKAlreadyUsedException e) {
|
||||
errors.rejectValue("login", "form.register.error.alreadyExists");
|
||||
|
||||
@@ -250,10 +250,19 @@ public class SessionService {
|
||||
return WebUtils.getSessionAttribute(request, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh the user credentials
|
||||
* Forces the system to reload the user details, including the roles
|
||||
*/
|
||||
public void refreshAuthentication(){
|
||||
refreshAuthentication(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh the user credentials, optionally providing a new password
|
||||
* Forces the system to reload the user details, including the roles
|
||||
* @param newPassword An optional new password, null if not needed
|
||||
*/
|
||||
public void refreshAuthentication(String newPassword) {
|
||||
// First step : remove user from the cache
|
||||
DaoAuthenticationProvider authProvider = (DaoAuthenticationProvider) RequestContextUtils.getWebApplicationContext(request).getBean("daoAuthenticationProvider");
|
||||
@@ -276,4 +285,14 @@ public class SessionService {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to authenticate a user given a login and password
|
||||
* @param login The user login
|
||||
* @param password The user password
|
||||
*/
|
||||
public void authenticate(String login, String password) {
|
||||
Authentication newAuth = new UsernamePasswordAuthenticationToken(login,password);
|
||||
SecurityContextHolder.getContext().setAuthentication(newAuth);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package org.yacos.web.system.session;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class YACOSUtils {
|
||||
private static String VALID_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!?%$()";
|
||||
|
||||
@@ -12,4 +16,30 @@ public class YACOSUtils {
|
||||
|
||||
return password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an absolute URL from a relative Path
|
||||
* CAN ONLY BE CALLED IN A HttpRequest CONTEXT
|
||||
* @param path A relative path to a server resource
|
||||
* @return The corresponding absolute http URL, null if the URL is malformed
|
||||
*/
|
||||
public static String fullURL(String path) {
|
||||
HttpServletRequest request = SessionService.request;
|
||||
|
||||
String resource = path;
|
||||
if(! resource.substring(0, 1).equals("/")){
|
||||
resource = "/"+resource;
|
||||
}
|
||||
|
||||
try {
|
||||
URL url = new URL(request.getScheme(),
|
||||
request.getServerName(),
|
||||
request.getServerPort(),
|
||||
resource);
|
||||
return url.toString();
|
||||
} catch (MalformedURLException e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user