Merge branch 'develop' of ssh://git.dsv.su.se/git/scipro/scipro into develop
* 'develop' of ssh://git.dsv.su.se/git/scipro/scipro: (119 commits) fixed a peer bug design changes in conference panel design changes in conference panel design changes in conference panel design changes in conference panel design changes in conference panel changes in peer design ändringar i conference samt en bugggfix för fileviewpanel fixed bug with fixed link that sent supervisors to student page they cant reach added a infobox about peer reviewing removed unused labels to prevent test failures small design changes to peer request submission page ändringar i peer design ändrade peer design ändrade peer design ändrat i peer-design some minor css style changes that got lost during merge conflict reverted some changes from last commit peer ändringar peer ändringar ...
This commit is contained in:
commit
ddfb2d7b8a
src/main/java/se/su/dsv/scipro
SciProApplication.java
admin
basepages
basepanels
checklists/panels
CreateChecklistTemplatePanel.htmlListCheckListPanel.htmlListCheckListTemplatePanel.htmlViewCheckListPanel.html
commentthread/panels
components
conference/panels
data
events/panels
icons
ActionIcon.javaAjaxActionIcon.javaExpandContractActionIcon.javaHelpIconDialog.htmlHelpIconDialog.javaHelpIconPanelDialog.htmlHelpIconPanelDialog.javaImageObject.java
opponent/panels
FinalSeminarDetailsPanel.htmlFinalSeminarDetailsPanel.javaOpponentListViewPanel.htmlOpponentListViewPanel.javaOpponentStudentViewListPanel.htmlProjectActiveParticipationsPanel.htmlProjectActiveParticipationsPanel.javaProjectFinalSeminarPanel.htmlProjectFinalSeminarPanel.javaProjectOppositionsPanel.htmlProjectOppositionsPanel.java
peer
data/dao
enums
pages
AbstractProjectPeerPage.javaPeerRequestSubmissionPage.htmlPeerRequestSubmissionPage.javaProjectPeerStatsPage.javaSupervisorPeerStatsPage.html
panels
DisplayQuestionPanel.htmlDisplayReviewPanel.htmlDisplayReviewPanel.javaPeerPortalPanel.htmlPeerPortalPanel.javaPeerRequestListPanel.htmlPeerRequestListPanel.javaPeerReviewListPanel.htmlPeerReviewPanel.htmlPeerReviewPanel.javaPeerReviewPerformReviewPanel.htmlPeerReviewPerformReviewPanel.javaRequestDetailsPanel.htmlRequestDetailsPanel.javaReviewPageRequestDetailsPanel.htmlReviewPageRequestDetailsPanel.javaReviewPageReviewDetailsPanel.javaStudentPeerInfoRequestsPanel.htmlStudentPeerInfoRequestsPanel.javaStudentPeerInfoReviewsPanel.htmlStudentPeerInfoReviewsPanel.javaStudentPeerRequestInfoPanel.htmlStudentPeerRequestInfoPanel.java
@ -99,6 +99,7 @@ import se.su.dsv.scipro.supervisor.pages.SupervisorChecklistPage;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorEventPage;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorFinalSeminarListingPage;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorGroupEventPage;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorLogPage;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorProjectDetailsPage;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorProjectsFinalSeminarPage;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorScheduleGeneratorPage;
|
||||
@ -241,6 +242,7 @@ public class SciProApplication extends RepositoryApplication implements IThemabl
|
||||
mountBookmarkablePage("supervisor/templates/editor", SupervisorScheduleTemplatesEditorPage.class);
|
||||
mountBookmarkablePage("supervisor/templates", SupervisorScheduleTemplatesPage.class);
|
||||
mountBookmarkablePage("supervisor/project/details", SupervisorProjectDetailsPage.class);
|
||||
mountBookmarkablePage("supervisor/project/details/notes", SupervisorLogPage.class);
|
||||
mountBookmarkablePage("supervisor/project/details/schedule", SupervisorSchedulePlannerPage.class);
|
||||
mountBookmarkablePage("supervisor/project/details/checklist", SupervisorChecklistPage.class);
|
||||
mountBookmarkablePage("supervisor/project/details/addchecklist", SupervisorAddCheckListToProjectPage.class);
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:extend>
|
||||
<h3 class="section">Peers</h3>
|
||||
<h5 class="peer-title">Peers</h5>
|
||||
<div wicket:id="switchPeersPanel"></div>
|
||||
<div wicket:id="container">
|
||||
<div wicket:id="stats"></div>
|
||||
|
@ -2,73 +2,90 @@
|
||||
<html
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:extend>
|
||||
<wicket:extend>
|
||||
|
||||
<table class="rounded-table-top">
|
||||
<tr>
|
||||
<th><a href="#" wicket:id="sortById">Id</a></th>
|
||||
<th><a href="#" wicket:id="sortByModified">Modified</a></th>
|
||||
<th><a href="#" wicket:id="sortByTitle">Title</a></th>
|
||||
<th><a href="#" wicket:id="sortByHead">Head supervisor</a></th>
|
||||
<th>Edit</th>
|
||||
</tr>
|
||||
<tr wicket:id="projectDataView">
|
||||
<td><span wicket:id="id">[id]</span></td>
|
||||
<td><span wicket:id="modified"></span></td>
|
||||
<td><span wicket:id="title">[title]</span></td>
|
||||
<td><span wicket:id="headSupervisor">[A Person]</span></td>
|
||||
<td><a href=# wicket:id="editLink">Edit</a></td>
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top"><a href="#" wicket:id="sortById">Id</a></th>
|
||||
<th><a href="#" wicket:id="sortByModified">Modified</a></th>
|
||||
<th><a href="#" wicket:id="sortByTitle">Title</a></th>
|
||||
<th><a href="#" wicket:id="sortByHead">Head supervisor</a></th>
|
||||
<th class="rounded-right-top">Edit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="projectDataView">
|
||||
<td><span wicket:id="id">[id]</span></td>
|
||||
<td><span wicket:id="modified"></span></td>
|
||||
<td><span wicket:id="title">[title]</span></td>
|
||||
<td><span wicket:id="headSupervisor">[A Person]</span></td>
|
||||
<td><a href=# wicket:id="editLink">Edit</a></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="span-18 last">
|
||||
<span wicket:id="navigator">[dataview navigator]</span>
|
||||
</div>
|
||||
|
||||
<div class="span-18 last">
|
||||
<a href=# wicket:id="createLink">Create new project</a>
|
||||
</div>
|
||||
|
||||
<div class="span-18 last">
|
||||
<div wicket:id="feedback"></div>
|
||||
</div>
|
||||
|
||||
<div class="span-18 last form-border" wicket:id="formContainer">
|
||||
<form wicket:id="projectCreationForm">
|
||||
<div>
|
||||
<strong>Exists in Daisy/Match-system</strong>
|
||||
<div wicket:id="existsInOtherSystems">NO</div>
|
||||
</div>
|
||||
<label for="projectTitle">Project title</label>
|
||||
<div>
|
||||
<input type="text" id="projectTitle" wicket:id="titleField" size="60"></input>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="projectClass">Type of project</label>
|
||||
</div>
|
||||
<span wicket:id="projectClass">
|
||||
<input type="radio" id="projectClass"/>
|
||||
</span>
|
||||
|
||||
<div><label for="students">Participating students</label></div>
|
||||
<div wicket:id="projectParticipants" id="students"></div>
|
||||
|
||||
<div><label for="headSupervisor">Head supervisor</label></div>
|
||||
<div wicket:id="headSupervisor" id="headSupervisor"></div>
|
||||
|
||||
<div><label for="followers">Add/edit project followers</label></div>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<div wicket:id="followers" id="followers"></div>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="span-18 last">
|
||||
<input type="submit" name="Save" title="Save" value="Save"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</wicket:extend>
|
||||
<div class="span-18 last">
|
||||
<span wicket:id="navigator">[dataview navigator]</span>
|
||||
</div>
|
||||
|
||||
<div class="span-18 last">
|
||||
<a href=# wicket:id="createLink">Create new project</a>
|
||||
</div>
|
||||
|
||||
<div class="span-18 last">
|
||||
<div wicket:id="feedback"></div>
|
||||
</div>
|
||||
|
||||
<div class="span-18 last form-border" wicket:id="formContainer">
|
||||
<form wicket:id="projectCreationForm">
|
||||
<div>
|
||||
<strong>Exists in Daisy/Match-system</strong>
|
||||
<div wicket:id="existsInOtherSystems">NO</div>
|
||||
</div>
|
||||
<label for="projectTitle">Project title</label>
|
||||
<div>
|
||||
<input type="text" id="projectTitle" wicket:id="titleField"
|
||||
size="60"></input>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="projectClass">Type of project</label>
|
||||
</div>
|
||||
<span wicket:id="projectClass"> <input type="radio"
|
||||
id="projectClass" />
|
||||
</span>
|
||||
|
||||
<div>
|
||||
<label for="students">Participating students</label>
|
||||
</div>
|
||||
<div wicket:id="projectParticipants" id="students"></div>
|
||||
|
||||
<div>
|
||||
<label for="headSupervisor">Head supervisor</label>
|
||||
</div>
|
||||
<div wicket:id="headSupervisor" id="headSupervisor"></div>
|
||||
|
||||
<div>
|
||||
<label for="followers">Add/edit project followers</label>
|
||||
</div>
|
||||
|
||||
<div wicket:id="followers" id="followers"></div>
|
||||
|
||||
|
||||
<div class="span-18 last">
|
||||
<input type="submit" name="Save" title="Save" value="Save" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</wicket:extend>
|
||||
</body>
|
||||
</html>
|
@ -2,72 +2,69 @@
|
||||
<html
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:extend>
|
||||
<div class="span-18 last">
|
||||
<h3 class="section">File repository</h3>
|
||||
<p><a href=# wicket:id="adminlink">Browse</a></p>
|
||||
</div>
|
||||
<div class="span-18 last">
|
||||
<h3 class="section">System notice</h3>
|
||||
<form wicket:id="systemNoticeForm">
|
||||
<p><label>Set system notice:</label> <input wicket:id="noticeField"
|
||||
type="text" /> <input type="submit" value="Submit"
|
||||
name="NoticeSubmit" /></p>
|
||||
</form>
|
||||
</div>
|
||||
<div wicket:id="scheduledContainer" class="span-18 last">
|
||||
<h3 class="section">Scheduled workers:</h3>
|
||||
<table class="rounded-table-top">
|
||||
<tr>
|
||||
<th>
|
||||
Description:
|
||||
</th>
|
||||
<th>
|
||||
Last started:
|
||||
</th>
|
||||
<th>
|
||||
Runs every:
|
||||
</th>
|
||||
<th>
|
||||
First run:
|
||||
</th>
|
||||
<th>
|
||||
Start manually:
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
<tr wicket:id="scheduleList">
|
||||
<td>
|
||||
<span wicket:id="descr">[thread description]</span>
|
||||
</td>
|
||||
<td>
|
||||
<span wicket:id="lastRun"></span>
|
||||
</td>
|
||||
<td>
|
||||
<span wicket:id="period"></span>
|
||||
</td>
|
||||
<td>
|
||||
<span wicket:id="firstRun"></span>
|
||||
</td>
|
||||
<td>
|
||||
<a href=# wicket:id="startLink">Start</a><br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
<div class="span-18 last">
|
||||
<h3 class="section">Currently running worker threads</h3>
|
||||
<div wicket:id="runningContainer">
|
||||
<span wicket:id="noneLabel"></span>
|
||||
<div wicket:id="runningList">
|
||||
<strong>Worker:</strong> <span wicket:id="runningThread">[thread name]</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<wicket:extend>
|
||||
<div class="span-18 last">
|
||||
<h5 class="peer-title">File repository</h5>
|
||||
<p>
|
||||
<a href=# wicket:id="adminlink">Browse</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="span-18 last">
|
||||
<h5 class="peer-title">System notice</h5>
|
||||
<form wicket:id="systemNoticeForm">
|
||||
<p>
|
||||
<label>Set system notice:</label> <input wicket:id="noticeField"
|
||||
type="text" /> <input type="submit" value="Submit"
|
||||
name="NoticeSubmit" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div wicket:id="scheduledContainer" class="span-18 last">
|
||||
<h5 class="peer-title">Scheduled workers:</h5>
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Description:</th>
|
||||
<th>Last started:</th>
|
||||
<th>Runs every:</th>
|
||||
<th>First run:</th>
|
||||
<th class="rounded-right-top">Start manually:</th>
|
||||
|
||||
|
||||
</wicket:extend>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody>
|
||||
<tr wicket:id="scheduleList">
|
||||
<td><span wicket:id="descr">[thread description]</span></td>
|
||||
<td><span wicket:id="lastRun"></span></td>
|
||||
<td><span wicket:id="period"></span></td>
|
||||
<td><span wicket:id="firstRun"></span></td>
|
||||
<td><a href=# wicket:id="startLink">Start</a><br /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
<div class="span-18 last">
|
||||
<h5 class="peer-title">Currently running worker threads</h5>
|
||||
<div wicket:id="runningContainer">
|
||||
<span wicket:id="noneLabel"></span>
|
||||
<div wicket:id="runningList">
|
||||
<strong>Worker:</strong> <span wicket:id="runningThread">[thread
|
||||
name]</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</wicket:extend>
|
||||
</body>
|
||||
</html>
|
@ -36,7 +36,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<button type="submit" ><img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save changes</button>
|
||||
<button type="submit" > Save changes</button>
|
||||
|
||||
</form>
|
||||
</wicket:extend>
|
||||
|
@ -31,7 +31,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<button type="submit" wicket:id="submit">
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save changes
|
||||
Save changes
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -35,7 +35,7 @@
|
||||
</table>
|
||||
|
||||
<button type="submit">
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt="" />
|
||||
|
||||
Save changes
|
||||
</button>
|
||||
|
||||
|
@ -28,7 +28,11 @@
|
||||
<tr>
|
||||
<td><label for="publicReviewsActivated">Activate public reviews with links in "Latest reviewers" panel: </label></td>
|
||||
<td><input type="checkbox" wicket:id="publicReviewsActivated" name="publicReviewsActivated" /></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="peerDownloadEnabled">Enable download of peer request files before acceptance: </label></td>
|
||||
<td><input type="checkbox" wicket:id="peerDownloadEnabled" name="peerDownloadEnabled" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<h5 class="peer-title">Settings for levels</h5>
|
||||
@ -60,7 +64,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<button type="submit" wicket:id="submit">
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save changes
|
||||
Save changes
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -79,6 +79,8 @@ public class AdminPeerSettingsPage extends AbstractAdminSettingsPage {
|
||||
|
||||
CheckBox publicReviewsActivated = new CheckBox("publicReviewsActivated");
|
||||
add(publicReviewsActivated);
|
||||
CheckBox peerDownloadEnabled = new CheckBox("peerDownloadEnabled");
|
||||
add(peerDownloadEnabled);
|
||||
}
|
||||
@Override
|
||||
public void onSubmit(){
|
||||
|
@ -8,51 +8,62 @@
|
||||
<div wicket:id="dialog">
|
||||
<div wicket:id="dialogContent"></div>
|
||||
</div>
|
||||
|
||||
<a href=# wicket:id="createLink"><img src="images/icons/add_16x16.png" alt=""/> Create new level</a>
|
||||
|
||||
<a href=# wicket:id="createLink"><img
|
||||
wicket:id="addIcon" alt="" /> Create new level</a>
|
||||
<div class="span-15 last">
|
||||
<h3 class="section">Active</h3>
|
||||
<h5 class="peer-title">Active</h5>
|
||||
</div>
|
||||
<table class="rounded-table-top">
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Edit</th>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Code</th>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th class="rounded-right-top">Edit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody wicket:id="activeProjectClassContainer">
|
||||
<tr wicket:id="projectClassList">
|
||||
<td wicket:id="code"></td>
|
||||
<td wicket:id="name"></td>
|
||||
<td wicket:id="desc"></td>
|
||||
<td><a href=# wicket:id="editLink"><img src="images/icons/edit_16x16.png" " alt="Edit" title="Edit"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr wicket:id="projectClassList">
|
||||
<td wicket:id="code"></td>
|
||||
<td wicket:id="name"></td>
|
||||
<td wicket:id="desc"></td>
|
||||
<td><a href=# wicket:id="editLink">
|
||||
<img wicket:id="editIcon" alt="Edit" title="Edit" />
|
||||
</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="span-15 last">
|
||||
<h3 class="section">Inactive</h3>
|
||||
<h5 class="peer-title">Inactive</h5>
|
||||
</div>
|
||||
<table class="rounded-table-top">
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Edit</th>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Code</th>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th class="rounded-right-top">Edit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody wicket:id="deletedProjectClassContainer">
|
||||
<tr wicket:id="projectClassListDel">
|
||||
<td wicket:id="codeDel"></td>
|
||||
<td wicket:id="nameDel"></td>
|
||||
<td wicket:id="descDel"></td>
|
||||
<td><a href=# wicket:id="undeleteLink">Activate</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr wicket:id="projectClassListDel">
|
||||
<td wicket:id="codeDel"></td>
|
||||
<td wicket:id="nameDel"></td>
|
||||
<td wicket:id="descDel"></td>
|
||||
<td><a href=# wicket:id="undeleteLink">Activate</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</wicket:extend>
|
||||
|
@ -20,6 +20,7 @@ import se.su.dsv.scipro.admin.pages.AbstractAdminSettingsPage;
|
||||
import se.su.dsv.scipro.admin.panels.AdminProjectClassPanel;
|
||||
import se.su.dsv.scipro.data.dao.interfaces.ProjectClassDao;
|
||||
import se.su.dsv.scipro.data.dataobjects.ProjectClass;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
|
||||
public class AdminProjectClassSettingsPage extends AbstractAdminSettingsPage {
|
||||
|
||||
@ -82,6 +83,7 @@ public class AdminProjectClassSettingsPage extends AbstractAdminSettingsPage {
|
||||
}
|
||||
};
|
||||
item.add(editLink);
|
||||
editLink.add(new ImageObject("editIcon", ImageObject.TWENTYFOUR + ImageObject.EDIT));
|
||||
}
|
||||
|
||||
};
|
||||
@ -148,7 +150,7 @@ public class AdminProjectClassSettingsPage extends AbstractAdminSettingsPage {
|
||||
}
|
||||
};
|
||||
add(createLink);
|
||||
|
||||
createLink.add(new ImageObject("addIcon", ImageObject.SIXTEEN + ImageObject.ADD));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,32 +6,45 @@
|
||||
</head>
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div wicket:id="dialog">
|
||||
<form wicket:id="form">
|
||||
<div wicket:id="categoryPanel"></div>
|
||||
<div wicket:id="checkListDialog"></div>
|
||||
<p></p>
|
||||
<div><input wicket:id="saveLink" type="submit" /></div>
|
||||
<!-- <span><a href="#" wicket:id="saveLink">Add checklist</a></span>-->
|
||||
</form>
|
||||
</div>
|
||||
<div wicket:id="container">
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Owner</th>
|
||||
<th>Questions</th>
|
||||
<th>Delete</th>
|
||||
</tr>
|
||||
<tr wicket:id="checkListTemplates">
|
||||
<td><span><a href="#" wicket:id="templateLink"><span wicket:id="templateName"></span></a></span></td>
|
||||
<td><span wicket:id="templateOwner"></span></td>
|
||||
<td><span wicket:id="templateOuestion"></span></td>
|
||||
<td><a href="#" wicket:id="delete"><img src="images/icons/delete_16x16.png" alt="Delete" title="Delete"/></a></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
</table>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
<div wicket:id="dialog">
|
||||
<form wicket:id="form">
|
||||
<div wicket:id="categoryPanel"></div>
|
||||
<div wicket:id="checkListDialog"></div>
|
||||
<p></p>
|
||||
<div>
|
||||
<input wicket:id="saveLink" type="submit" />
|
||||
</div>
|
||||
<!-- <span><a href="#" wicket:id="saveLink">Add checklist</a></span>-->
|
||||
</form>
|
||||
</div>
|
||||
<div wicket:id="container">
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Name</th>
|
||||
<th>Owner</th>
|
||||
<th>Questions</th>
|
||||
<th class="rounded-right-top">Delete</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="checkListTemplates">
|
||||
<td><span><a href="#" wicket:id="templateLink"><span
|
||||
wicket:id="templateName"></span></a></span></td>
|
||||
<td><span wicket:id="templateOwner"></span></td>
|
||||
<td><span wicket:id="templateOuestion"></span></td>
|
||||
<td><a href="#" wicket:id="delete">
|
||||
<img wicket:id="deleteIcon" alt="Delete" title="Delete" />
|
||||
</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -39,6 +39,7 @@ import se.su.dsv.scipro.data.dataobjects.ChecklistCategory;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.ProjectPartner;
|
||||
import se.su.dsv.scipro.data.enums.CheckListRole;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorGroupEventPage;
|
||||
|
||||
|
||||
@ -100,7 +101,8 @@ public class AdminListCheckListTemplatePanel extends Panel{
|
||||
Label templateName = new Label("templateName", new PropertyModel<String>(item.getModel(),"name"));
|
||||
Label templateOwner = new Label("templateOwner", new PropertyModel<String>(item.getModel(), "creator"));
|
||||
Label templateOuestion = new Label("templateOuestion", new PropertyModel<String>(item.getModel(), "numberOfQuestions"));
|
||||
item.add(new AjaxLink<Void>("delete") {
|
||||
|
||||
AjaxLink<Void> deleteLink = new AjaxLink<Void>("delete") {
|
||||
|
||||
private static final long serialVersionUID = 1529565679210978293L;
|
||||
|
||||
@ -120,13 +122,6 @@ public class AdminListCheckListTemplatePanel extends Panel{
|
||||
return new AjaxCallDecorator() {
|
||||
private static final long serialVersionUID = 8989126586010432130L;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.wicket.ajax.calldecorator.
|
||||
* AjaxCallDecorator
|
||||
* #decorateScript(java.lang.CharSequence)
|
||||
*/
|
||||
@Override
|
||||
public CharSequence decorateScript(CharSequence script) {
|
||||
String ret = "if(!confirm('Are you sure you want to remove the template?')) return false; "
|
||||
@ -136,7 +131,10 @@ public class AdminListCheckListTemplatePanel extends Panel{
|
||||
};
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
item.add(deleteLink);
|
||||
deleteLink.add(new ImageObject("deleteIcon", ImageObject.TWENTYFOUR + ImageObject.DELETE));
|
||||
|
||||
AjaxLink<Void> templateLink = new AjaxLink<Void>("templateLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -166,25 +164,7 @@ public class AdminListCheckListTemplatePanel extends Panel{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/*AjaxLink<Void> saveLink = new AjaxLink<Void>("saveLink"){
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
checkListTemplateDao.save(checkListTemplateDao.load(vclPanel.getCheckListTemplateId()));
|
||||
checkListTemplateModel.detach();
|
||||
target.addComponent(container);
|
||||
dialog.close(target);
|
||||
}
|
||||
|
||||
};*/
|
||||
|
||||
|
||||
|
||||
form.add(categoryPanel);
|
||||
form.add(vclPanel);
|
||||
|
||||
@ -204,8 +184,7 @@ public class AdminListCheckListTemplatePanel extends Panel{
|
||||
item.add(templateLink);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
container.add(checkListTemplates);
|
||||
add(container);
|
||||
|
||||
|
@ -1,37 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<html
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div><label for="search">Search:</label>
|
||||
<input type="text" class="text" id="search" wicket:id="searchField" />
|
||||
</div>
|
||||
|
||||
<div class="margin" wicket:id="view">
|
||||
<input type="radio">
|
||||
</div>
|
||||
|
||||
|
||||
<div wicket:id="container" class = "margin">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Student</th>
|
||||
<th>Employee</th>
|
||||
<th>Admin</th>
|
||||
<th>SysAdmin</th>
|
||||
</tr>
|
||||
<tr wicket:id="userDataView">
|
||||
<td><span wicket:id="userInfo"></span></td>
|
||||
<td><input type="checkbox" wicket:id="studentCheckBox" /></td>
|
||||
<td><input type="checkbox" wicket:id="employeeCheckBox" /></td>
|
||||
<td><input type="checkbox" wicket:id="adminCheckBox" /></td>
|
||||
<td><input type="checkbox" wicket:id="sysAdminCheckBox" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div wicket:id="pagingNavigator"></div>
|
||||
</div>
|
||||
<wicket:panel>
|
||||
<div>
|
||||
<label for="search">Search:</label> <input type="text" class="text"
|
||||
id="search" wicket:id="searchField" />
|
||||
</div>
|
||||
|
||||
|
||||
</wicket:panel>
|
||||
<div class="margin" wicket:id="view">
|
||||
<input type="radio">
|
||||
</div>
|
||||
|
||||
|
||||
<div wicket:id="container" class="margin">
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Name</th>
|
||||
<th>Student</th>
|
||||
<th>Employee</th>
|
||||
<th>Admin</th>
|
||||
<th class="rounded-right-top">SysAdmin</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="userDataView">
|
||||
<td><span wicket:id="userInfo"></span></td>
|
||||
<td><input type="checkbox" wicket:id="studentCheckBox" /></td>
|
||||
<td><input type="checkbox" wicket:id="employeeCheckBox" /></td>
|
||||
<td><input type="checkbox" wicket:id="adminCheckBox" /></td>
|
||||
<td><input type="checkbox" wicket:id="sysAdminCheckBox" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<div wicket:id="pagingNavigator"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -38,7 +38,8 @@ public class AdminTabMenuPanel extends AbstractMenuPanel {
|
||||
items.add(new MenuItem("All final seminars", AdminFinalSeminarPage.class));
|
||||
items.add(new MenuItem("All peers", AdminPeerListPage.class));
|
||||
//items.add(new MenuItem("Peer review templates", PeerReviewTemplatePage.class)); Peer should use the same Checklist as projects.
|
||||
items.add(new MenuItem("Settings", AdminGeneralSettingsPage.class, ImageIcon.ICON_SETTINGS));
|
||||
// items.add(new MenuItem("Settings", AdminGeneralSettingsPage.class, ImageIcon.ICON_SETTINGS));
|
||||
items.add(new MenuItem("Settings", AdminGeneralSettingsPage.class));
|
||||
items.add(new MenuItem("Role management", AdminRolePage.class));
|
||||
items.add(new MenuItem("Project partner", AdminProjectPartnerPage.class));
|
||||
items.add(new MenuItem("CheckList", AdminCheckListPage.class));
|
||||
|
@ -13,7 +13,9 @@
|
||||
</tr>
|
||||
<tr wicket:id="questions">
|
||||
<td colspan="2" wicket:id="questionLabel"></td>
|
||||
<td width="10"><a href="#" wicket:id="delete"><img src="images/icons/delete_16x16.png" alt="Delete" title="Delete"/></a></td>
|
||||
<td width="10"><a href="#" wicket:id="delete">
|
||||
<img wicket:id="deleteIcon" alt="Delete" title="Delete"/>
|
||||
</a></td>
|
||||
</tr>
|
||||
<tr><td colspan="3"></td></tr>
|
||||
</table>
|
||||
|
@ -28,6 +28,7 @@ import se.su.dsv.scipro.data.dataobjects.CheckListQuestion;
|
||||
import se.su.dsv.scipro.data.dataobjects.CheckListTemplate;
|
||||
import se.su.dsv.scipro.data.dataobjects.ChecklistCategory;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
|
||||
public class AdminViewCheckListTemplatePanel extends Panel {
|
||||
|
||||
@ -79,7 +80,8 @@ public class AdminViewCheckListTemplatePanel extends Panel {
|
||||
counter++;
|
||||
Label questionLabel = new Label("questionLabel", item.getModel().getObject());
|
||||
item.add(questionLabel);
|
||||
item.add(new AjaxLink<Void>("delete") {
|
||||
|
||||
AjaxLink<Void> deleteLink = new AjaxLink<Void>("delete") {
|
||||
|
||||
private static final long serialVersionUID = 1529565679210978293L;
|
||||
|
||||
@ -91,8 +93,10 @@ public class AdminViewCheckListTemplatePanel extends Panel {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
item.add(deleteLink);
|
||||
deleteLink.add(new ImageObject("deleteIcon", ImageObject.TWENTYFOUR + ImageObject.DELETE));
|
||||
}
|
||||
};
|
||||
|
||||
@ -123,11 +127,6 @@ public class AdminViewCheckListTemplatePanel extends Panel {
|
||||
|
||||
public CheckListTemplate getCheckListTemplate(){
|
||||
|
||||
/*for(ChecklistCategory clc : categoryPanel.getSelectedCategories())
|
||||
System.out.println("category" + clc);
|
||||
clt.setCategories(categoryPanel.getSelectedCategories());
|
||||
clt = checkListTemplateDao.save(clt);*/
|
||||
|
||||
return clt;
|
||||
}
|
||||
|
||||
|
@ -1,34 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<html
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<wicket:panel>
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="rounded-left-top"></th>
|
||||
<th>Total</th>
|
||||
<th>Waiting</th>
|
||||
<th>Taken</th>
|
||||
<th>Finished</th>
|
||||
<th>Canceled</th>
|
||||
<th class="rounded-right-top">Canceled</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Peer requests</td>
|
||||
<td><span wicket:id="allRequests"></span>
|
||||
</td>
|
||||
<td><span wicket:id="waitingRequests"></span>
|
||||
</td>
|
||||
<td><span wicket:id="takenRequests"></span>
|
||||
</td>
|
||||
<td><span wicket:id="finishedRequests"></span>
|
||||
</td>
|
||||
<td><span wicket:id="canceledRequests"></span>
|
||||
</td>
|
||||
<td><span wicket:id="allRequests"></span></td>
|
||||
<td><span wicket:id="waitingRequests"></span></td>
|
||||
<td><span wicket:id="takenRequests"></span></td>
|
||||
<td><span wicket:id="finishedRequests"></span></td>
|
||||
<td><span wicket:id="canceledRequests"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="12"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</wicket:panel>
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -2,15 +2,23 @@
|
||||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="rounded-left-top"></th>
|
||||
<th>Total</th>
|
||||
<th>Completed</th>
|
||||
<th>In progress</th>
|
||||
<th>Aborted</th>
|
||||
<th class="rounded-right-top">Aborted</th>
|
||||
</tr>
|
||||
<tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Peer reviews</td>
|
||||
<td><span wicket:id="allReviews"></span>
|
||||
</td>
|
||||
@ -21,10 +29,9 @@
|
||||
<td><span wicket:id="abortedReviews"></span>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="12"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</wicket:panel>
|
||||
|
@ -9,160 +9,237 @@
|
||||
</wicket:remove>
|
||||
<body>
|
||||
<wicket:extend>
|
||||
<div class="span-22 last">
|
||||
<div class="append-bottom">
|
||||
<div class="span-22 last">
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Level</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20XX-XX-XX</td>
|
||||
<td>Bachelor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20XX-XX-XX</td>
|
||||
<td>Bachelor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20XX-XX-XX</td>
|
||||
<td>Bachelor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20XX-XX-XX</td>
|
||||
<td>Bachelor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="22"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- Left column -->
|
||||
<div class="span-11">
|
||||
<div class="append-bottom">
|
||||
<div class="info-box rounded-box last">
|
||||
<p>Remember:</p>
|
||||
<ul>
|
||||
<li>We use only the artefacts and icons provided on this
|
||||
page when creating new pages.</li>
|
||||
<li>Add td colspan tag as last tag in tables to frame the
|
||||
bottom</li>
|
||||
<li>We use parent node div class 22 last and child nodes div
|
||||
class 11 and div class 11 last to make a page split in two even
|
||||
halves.</li>
|
||||
</ul>
|
||||
<!-- Left column -->
|
||||
<div class="span-11">
|
||||
<div class="append-bottom">
|
||||
<div class="info-box rounded-box last">
|
||||
<p>
|
||||
<b>Remember:</b>
|
||||
</p>
|
||||
<ul>
|
||||
<li>We use only the artefacts and icons provided on this
|
||||
page when creating new pages.</li>
|
||||
<li>We use parent node div class 22 last and child nodes
|
||||
div class 11 and div class 11 last to make a page split in two
|
||||
even halves. No colborders!</li>
|
||||
<li>When creating a table, use thead, tfoot and tbody tags.
|
||||
Use the "rounded-corner" css class for the table, and dont
|
||||
forget to add the top left, top right and tfoot classes in the
|
||||
appropriate cells in order to get rounded corners! Look at the
|
||||
example below for instruction.</li>
|
||||
<li>Dont style things unnecessarily! Leave buttons,
|
||||
checkboxes etc unstyled as is.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="append-bottom">
|
||||
<h5 class="peer-title">A heading</h5>
|
||||
</div>
|
||||
<div class="append-bottom">
|
||||
<div>Lorum ipsum blabla blabla bla bla</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="append-bottom">
|
||||
<button type="submit">Button</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="span-11 last">
|
||||
<div class="append-bottom">
|
||||
|
||||
<div class="rounded-box">
|
||||
<span class="box-title">Round box <span><a href="#"
|
||||
class="right-corner-resource">
|
||||
|
||||
<!-- <img class="round-box-icon" -->
|
||||
<!-- src="images/icons/24/delete.png" alt="Delete" title="Delete" /> -->
|
||||
|
||||
<img class="round-box-icon" wicket:id="delete_24"/>
|
||||
|
||||
</a> </span>
|
||||
</span> <span>With a heading and close/delete button</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="append-bottom">
|
||||
<div class="rounded-box">
|
||||
<span class="box-title">Round box</span> <span>With a
|
||||
heading</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="append-bottom">
|
||||
<div class="rounded-box">
|
||||
<span>Just a round box</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="append-bottom">
|
||||
<div class="rounded-box">
|
||||
<span class="box-title">Legend</span> <span>
|
||||
<table class="legend-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><img wicket:id="click"></td>
|
||||
<td><img wicket:id="green_border"></td>
|
||||
<td><img wicket:id="green"></td>
|
||||
<td><img wicket:id="yellow_border"></td>
|
||||
<td><img wicket:id="yellow"></td>
|
||||
<td><img wicket:id="red_border"></td>
|
||||
<td><img wicket:id="red"></td>
|
||||
<td><img wicket:id="grey_border"></td>
|
||||
<td><img wicket:id="grey"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Click</td>
|
||||
<td>Green selected</td>
|
||||
<td>Green</td>
|
||||
<td>Yellow selected</td>
|
||||
<td>Yellow</td>
|
||||
<td>Red selected</td>
|
||||
<td>Red</td>
|
||||
<td>Grey selected</td>
|
||||
<td>Grey</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span-22 last">
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Use</th>
|
||||
<th class="rounded-right-top">Icon</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>About/Info box</td>
|
||||
<td><img wicket:id="about"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Add</td>
|
||||
<td><img wicket:id="add"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Calendar</td>
|
||||
<td><img wicket:id="calendar"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Check/Saved</td>
|
||||
<td><img wicket:id="check"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clipboard</td>
|
||||
<td><img wicket:id="clipboard"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Clock</td>
|
||||
<td><img wicket:id="clock"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Copy</td>
|
||||
<td><img wicket:id="copy"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Date/Time</td>
|
||||
<td><img wicket:id="date_time"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delete</td>
|
||||
<td><img wicket:id="delete_16"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Document</td>
|
||||
<td><img wicket:id="document"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Add Document</td>
|
||||
<td><img wicket:id="document_add"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Download</td>
|
||||
<td><img wicket:id="document_down"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>View</td>
|
||||
<td><img wicket:id="document_view"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit</td>
|
||||
<td><img wicket:id="edit"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Error</td>
|
||||
<td><img wicket:id="error"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extend</td>
|
||||
<td><img wicket:id="extend"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extend reverse</td>
|
||||
<td><img wicket:id="extend_reverse"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Swedish flag</td>
|
||||
<td><img wicket:id="flag_sweden"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>British flag</td>
|
||||
<td><img wicket:id="flag_gb"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Folder</td>
|
||||
<td><img wicket:id="folder"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Folder with document</td>
|
||||
<td><img wicket:id="folder_document"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Folder up</td>
|
||||
<td><img wicket:id="folder_up"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gear/Settings</td>
|
||||
<td><img wicket:id="gear"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Help</td>
|
||||
<td><img wicket:id="help"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Grey star</td>
|
||||
<td><img wicket:id="star_grey"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Red star</td>
|
||||
<td><img wicket:id="star_red"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>User</td>
|
||||
<td><img wicket:id="user"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<div class="append-bottom">
|
||||
<h5 class="peer-title">Just a heading</h5>
|
||||
</table>
|
||||
</div>
|
||||
<div class="append-bottom">
|
||||
<div>Lorum ipsum blabla blabla bla bla</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="append-bottom">
|
||||
<button type="submit">Button</button>
|
||||
</div>
|
||||
<div class="append-bottom">
|
||||
<span wicket:id="tooltipDemo">MouseOver here for tooltip</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="span-11 last">
|
||||
<div class="append-bottom">
|
||||
|
||||
<div class="rounded-box">
|
||||
<span class="box-title rounded">Round box <span><a href="#" class="right-corner-resource"> <img class="round-box-icon"
|
||||
src="images/icons/24/delete.png" alt="Delete" title="Delete" />
|
||||
</a> </span> </span> <span>With a heading and close/delete button</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="append-bottom">
|
||||
<div class="rounded-box">
|
||||
<span class="box-title rounded">Round box</span> <span>With
|
||||
a heading</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="append-bottom">
|
||||
<div class="rounded-box">
|
||||
<span>Just a round box</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="append-bottom"> -->
|
||||
<!-- <div class="rounded-box"> -->
|
||||
<!-- <span class="box-title rounded">Legend</span> -->
|
||||
<!-- <span> -->
|
||||
<!-- <img src="resources/se.su.dsv.scipro.icons.ImageIcon/new_checklist_green.png" alt="contract"> -->
|
||||
<!-- <img src="resources/se.su.dsv.scipro.icons.ImageIcon/new_checklist_yellow.png" alt="contract"> -->
|
||||
<!-- <img src="resources/se.su.dsv.scipro.icons.ImageIcon/new_checklist_red.png" alt="contract"> -->
|
||||
<!-- <img src="resources/se.su.dsv.scipro.icons.ImageIcon/new_checklist_grey.png" alt="contract"> -->
|
||||
<!-- </span> -->
|
||||
<!-- <br> -->
|
||||
<!-- <span>OK Minor corrections needed Not done Not applicable</span> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<div class="append-bottom">
|
||||
<div class="rounded-box">
|
||||
<span class="box-title rounded">Legend</span> <span>
|
||||
<table class="legend-table">
|
||||
<tr>
|
||||
<td><img wicket:id="new_checklist_green"></td>
|
||||
<td><img wicket:id="new_checklist_yellow"></td>
|
||||
<td><img wicket:id="new_checklist_red"></td>
|
||||
<td><img wicket:id="new_checklist_grey"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OK</td>
|
||||
<td>Minor changes needed</td>
|
||||
<td>Not done</td>
|
||||
<td>Inapplicable</td>
|
||||
</tr>
|
||||
</table> </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span-22 last">
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<tr>
|
||||
<th>Use</th>
|
||||
<th>Icon</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Add</td>
|
||||
<td><img wicket:id="new_add"></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Copy</td>
|
||||
<td><img wicket:id="new_copy"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delete</td>
|
||||
<td><img wicket:id="new_delete"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Download</td>
|
||||
<td><img wicket:id="new_document_down"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>View</td>
|
||||
<td><img wicket:id="new_document_view"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit</td>
|
||||
<td><img wicket:id="new_edit"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Settings</td>
|
||||
<td><img wicket:id="new_gear"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="22"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</wicket:extend>
|
||||
|
@ -1,81 +1,55 @@
|
||||
package se.su.dsv.scipro.basepages;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.wicket.Component;
|
||||
import org.apache.wicket.PageParameters;
|
||||
import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||
import org.apache.wicket.markup.html.WebMarkupContainer;
|
||||
import org.apache.wicket.markup.html.form.RadioChoice;
|
||||
import org.apache.wicket.markup.html.panel.Panel;
|
||||
import org.apache.wicket.model.Model;
|
||||
import org.apache.wicket.markup.html.image.Image;
|
||||
import org.apache.wicket.resource.ContextRelativeResource;
|
||||
|
||||
import se.su.dsv.scipro.components.ExpandableMultiLineLabel;
|
||||
import se.su.dsv.scipro.components.SciProTooltipBehavior;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.icons.AjaxActionIcon;
|
||||
import se.su.dsv.scipro.icons.ImageIcon;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
|
||||
public class DemoPage extends PublicPage {
|
||||
|
||||
private boolean thomas = true;
|
||||
|
||||
public DemoPage(final PageParameters pp){
|
||||
super(pp);
|
||||
|
||||
Component tooltipAnchor = new WebMarkupContainer("tooltipDemo").add(new SciProTooltipBehavior("Look at the pretty tooltip!"));
|
||||
add(tooltipAnchor);
|
||||
|
||||
add(new ImageIcon("new_checklist_green", ImageIcon.ICON_NEW_CHECKLIST_GREEN));
|
||||
add(new ImageIcon("new_checklist_yellow", ImageIcon.ICON_NEW_CHECKLIST_YELLOW));
|
||||
add(new ImageIcon("new_checklist_red", ImageIcon.ICON_NEW_CHECKLIST_RED));
|
||||
add(new ImageIcon("new_checklist_grey", ImageIcon.ICON_NEW_CHECKLIST_GREY));
|
||||
add(new ImageIcon("new_add", ImageIcon.ICON_NEW_ADD));
|
||||
add(new ImageIcon("new_copy", ImageIcon.ICON_NEW_COPY));
|
||||
add(new ImageIcon("new_delete", ImageIcon.ICON_NEW_DELETE));
|
||||
add(new ImageIcon("new_document_down", ImageIcon.ICON_DOCUMENT_DOWN));
|
||||
add(new ImageIcon("new_document_view", ImageIcon.ICON_DOCUMENT_VIEW));
|
||||
add(new ImageIcon("new_edit", ImageIcon.ICON_NEW_EDIT));
|
||||
add(new ImageIcon("new_gear", ImageIcon.ICON_NEW_GEAR));
|
||||
/*
|
||||
* Gamla
|
||||
*
|
||||
add(new ImageIcon("yesIcon", ImageIcon.ICON_YES));
|
||||
add(new ImageIcon("noIcon", ImageIcon.ICON_NO));
|
||||
add(new ImageIcon("checkIcon", ImageIcon.ICON_CHECK));
|
||||
add(new ImageIcon("arrowDownIcon", ImageIcon.ICON_ARROW_DOWN));
|
||||
add(new ImageIcon("arrowUpIcon", ImageIcon.ICON_ARROW_UP));
|
||||
add(new ImageIcon("arrowLeftIcon", ImageIcon.ICON_ARROW_LEFT));
|
||||
add(new ImageIcon("arrowRightIcon", ImageIcon.ICON_ARROW_RIGHT));
|
||||
add(new ImageIcon("helpIcon", ImageIcon.ICON_HELP));
|
||||
add(new ImageIcon("homeIcon", ImageIcon.ICON_HOME));
|
||||
add(new ImageIcon("importantIcon", ImageIcon.ICON_IMPORTANT));
|
||||
add(new ImageIcon("mailIcon", ImageIcon.ICON_MAIL));
|
||||
add(new ImageIcon("mailNewIcon", ImageIcon.ICON_MAIL_NEW));
|
||||
add(new ImageIcon("settingsIcon", ImageIcon.ICON_SETTINGS));
|
||||
add(new ImageIcon("emptyIcon", ImageIcon.ICON_EMPTY));
|
||||
add(new ImageObject("delete_24", ImageObject.TWENTYFOUR + ImageObject.DELETE));
|
||||
|
||||
|
||||
|
||||
add(new ImageIcon("expandIcon", ImageIcon.ICON_EXPAND));
|
||||
add(new ImageIcon("contractIcon", ImageIcon.ICON_CONTRACT));
|
||||
add(new ImageIcon("editIcon", ImageIcon.ICON_EDIT));
|
||||
add(new ImageIcon("deleteIcon", ImageIcon.ICON_DELETE));
|
||||
add(new ImageIcon("addIcon", ImageIcon.ICON_ADD));
|
||||
add(new ImageIcon("detailsIcon", ImageIcon.ICON_DETAILS));
|
||||
|
||||
add(new ImageIcon("userIcon", ImageIcon.ICON_USER));
|
||||
add(new ImageIcon("eventDoneIcon", ImageIcon.ICON_EVENT_DONE));
|
||||
add(new ImageIcon("eventUpcomingIcon", ImageIcon.ICON_EVENT_UPCOMING));
|
||||
|
||||
final User u = new User();
|
||||
u.setFirstName("Thomas");
|
||||
u.setLastName("Ravelli");
|
||||
final Panel p = u.getDisplayComponent("user");
|
||||
p.setOutputMarkupId(true);
|
||||
add(p);*/
|
||||
|
||||
add(new ImageObject("about", ImageObject.SIXTEEN + ImageObject.ABOUT));
|
||||
add(new ImageObject("add", ImageObject.SIXTEEN + ImageObject.ADD));
|
||||
add(new ImageObject("calendar", ImageObject.SIXTEEN + ImageObject.CALENDAR));
|
||||
add(new ImageObject("check", ImageObject.SIXTEEN + ImageObject.CHECK));
|
||||
add(new ImageObject("clipboard", ImageObject.SIXTEEN + ImageObject.CLIPBOARD));
|
||||
add(new ImageObject("clock", ImageObject.SIXTEEN + ImageObject.CLOCK));
|
||||
add(new ImageObject("copy", ImageObject.SIXTEEN + ImageObject.COPY));
|
||||
add(new ImageObject("date_time", ImageObject.SIXTEEN + ImageObject.DATE_TIME));
|
||||
add(new ImageObject("delete_16", ImageObject.SIXTEEN + ImageObject.DELETE));
|
||||
add(new ImageObject("document", ImageObject.SIXTEEN + ImageObject.DOCUMENT));
|
||||
add(new ImageObject("document_add", ImageObject.SIXTEEN + ImageObject.DOCUMENT_ADD));
|
||||
add(new ImageObject("document_down", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN));
|
||||
add(new ImageObject("document_view", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW));
|
||||
add(new ImageObject("edit", ImageObject.SIXTEEN + ImageObject.EDIT));
|
||||
add(new ImageObject("error", ImageObject.SIXTEEN + ImageObject.ERROR));
|
||||
add(new ImageObject("extend", ImageObject.SIXTEEN + ImageObject.EXTEND));
|
||||
add(new ImageObject("extend_reverse", ImageObject.SIXTEEN + ImageObject.EXTEND_REVERSE));
|
||||
add(new ImageObject("flag_sweden", ImageObject.SIXTEEN + ImageObject.FLAG_SWEDEN));
|
||||
add(new ImageObject("flag_gb", ImageObject.SIXTEEN + ImageObject.FLAG_GB));
|
||||
add(new ImageObject("folder", ImageObject.SIXTEEN + ImageObject.FOLDER));
|
||||
add(new ImageObject("folder_document", ImageObject.SIXTEEN + ImageObject.FOLDER_DOCUMENT));
|
||||
add(new ImageObject("folder_up", ImageObject.SIXTEEN + ImageObject.FOLDER_UP));
|
||||
add(new ImageObject("gear", ImageObject.SIXTEEN + ImageObject.GEAR));
|
||||
add(new ImageObject("help", ImageObject.SIXTEEN + ImageObject.HELP));
|
||||
add(new ImageObject("star_grey", ImageObject.SIXTEEN + ImageObject.STAR_GREY));
|
||||
add(new ImageObject("star_red", ImageObject.SIXTEEN + ImageObject.STAR_RED));
|
||||
add(new ImageObject("user", ImageObject.SIXTEEN + ImageObject.USER));
|
||||
|
||||
add(new ImageObject("click", ImageObject.PATH + ImageObject.LIGHT_CLICK));
|
||||
add(new ImageObject("green_border", ImageObject.PATH + ImageObject.LIGHT_GREEN_BORDER));
|
||||
add(new ImageObject("green", ImageObject.PATH + ImageObject.LIGHT_GREEN));
|
||||
add(new ImageObject("yellow_border", ImageObject.PATH + ImageObject.LIGHT_YELLOW_BORDER));
|
||||
add(new ImageObject("yellow", ImageObject.PATH + ImageObject.LIGHT_YELLOW));
|
||||
add(new ImageObject("red_border", ImageObject.PATH + ImageObject.LIGHT_RED_BORDER));
|
||||
add(new ImageObject("red", ImageObject.PATH + ImageObject.LIGHT_RED));
|
||||
add(new ImageObject("grey_border", ImageObject.PATH + ImageObject.LIGHT_GREY_BORDER));
|
||||
add(new ImageObject("grey", ImageObject.PATH + ImageObject.LIGHT_GREY));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,9 @@
|
||||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<p>Logged in as: <span wicket:id="loggedInAs"></span> <a href=# wicket:id="userSettingsLink"><img src="images/icons/system-settings_16x16.png" alt="User Settings"/></a>
|
||||
<p>Logged in as: <span wicket:id="loggedInAs"></span> <a href=# wicket:id="userSettingsLink">
|
||||
<img wicket:id="gears" alt="User Settings"/>
|
||||
</a>
|
||||
<span wicket:id="logoutSection">| <a href=# wicket:id="logoutLink">Logout</a></span></p>
|
||||
|
||||
<div wicket:id="dialog">
|
||||
|
@ -13,6 +13,7 @@ import org.odlabs.wiquery.ui.dialog.Dialog;
|
||||
|
||||
import se.su.dsv.scipro.ApplicationSettings;
|
||||
import se.su.dsv.scipro.SciProSession;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.loginlogout.pages.LogoutPage;
|
||||
|
||||
public class UserLinksPanel extends Panel {
|
||||
@ -40,7 +41,7 @@ public class UserLinksPanel extends Panel {
|
||||
dialog.setHeight(500);
|
||||
add(dialog);
|
||||
|
||||
add(new AjaxLink<Void>("userSettingsLink"){
|
||||
AjaxLink<Void> userSettingsLink = new AjaxLink<Void>("userSettingsLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
@ -54,7 +55,10 @@ public class UserLinksPanel extends Panel {
|
||||
public boolean isVisible() {
|
||||
return SciProSession.get().isLoggedIn();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
add(userSettingsLink);
|
||||
userSettingsLink.add(new ImageObject("gears", ImageObject.SIXTEEN + ImageObject.GEAR));
|
||||
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" ><img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save changes</button>
|
||||
<button type="submit" > Save changes</button>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
@ -7,42 +7,51 @@
|
||||
<body>
|
||||
|
||||
<wicket:panel>
|
||||
|
||||
|
||||
<div class="span-10 last">
|
||||
<form wicket:id="form">
|
||||
<div wicket:id="feedbackPanel"></div>
|
||||
<div>
|
||||
<div>Template name</div>
|
||||
<input wicket:id="templateName" type="text" />
|
||||
</div>
|
||||
<p></p>
|
||||
<div wicket:id="categoryPanel"></div>
|
||||
<p></p>
|
||||
<div>Question</div>
|
||||
<div>
|
||||
<form wicket:id="addQuestionForm">
|
||||
<div>
|
||||
<input wicket:id="question" type="text" />
|
||||
</div>
|
||||
<input wicket:id="addQuestionButton" type="submit" />
|
||||
<p></p>
|
||||
<div wicket:id="container">
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<tr>
|
||||
<th>Questions</th>
|
||||
</tr>
|
||||
<tr wicket:id="questions">
|
||||
<td wicket:id="questionLabel"></td>
|
||||
</tr>
|
||||
<tr><td></td></tr>
|
||||
</table>
|
||||
<form wicket:id="form">
|
||||
<div wicket:id="feedbackPanel"></div>
|
||||
<div>
|
||||
<div>Template name</div>
|
||||
<input wicket:id="templateName" type="text" />
|
||||
</div>
|
||||
</form>
|
||||
<p></p>
|
||||
<div wicket:id="categoryPanel"></div>
|
||||
<p></p>
|
||||
<div>Question</div>
|
||||
<div>
|
||||
<form wicket:id="addQuestionForm">
|
||||
<div>
|
||||
<input wicket:id="question" type="text" />
|
||||
</div>
|
||||
<input wicket:id="addQuestionButton" type="submit" />
|
||||
<p></p>
|
||||
<div wicket:id="container">
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top rounded-left-right">Questions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="1" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="questions">
|
||||
<td wicket:id="questionLabel"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<p></p>
|
||||
<input wicket:id="save" type="submit" />
|
||||
</form>
|
||||
</div>
|
||||
<p></p>
|
||||
<input wicket:id="save" type="submit" />
|
||||
</form>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -6,30 +6,66 @@
|
||||
</head>
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div wicket:id="dialog">
|
||||
<form wicket:id="uploadForm">
|
||||
<div><input wicket:id="fileInput" id="fileInput" type="file" /></div>
|
||||
<div><input type="submit" value="Upload!" name="upload" /></div>
|
||||
</form>
|
||||
</div>
|
||||
<div wicket:id="dialog">
|
||||
<form wicket:id="uploadForm">
|
||||
<div>
|
||||
<input wicket:id="fileInput" id="fileInput" type="file" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="Upload!" name="upload" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div wicket:id="container">
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<!-- <table class="rounded-table seminar-table even-rows"> -->
|
||||
<!-- <tr> -->
|
||||
<!-- <th>Questions</th> -->
|
||||
<!-- <th>Description</th> -->
|
||||
<!-- <th>Hand-in</th> -->
|
||||
<!-- <th>Uploaded by</th> -->
|
||||
<!-- <th>Delete</th> -->
|
||||
<!-- </tr> -->
|
||||
<!-- <tr wicket:id="checkLists"> -->
|
||||
<!-- <td><a href="#" wicket:id="checkListLink"><span wicket:id="listName"></span></a></td> -->
|
||||
<!-- <td><span wicket:id="description"></span></td> -->
|
||||
<!-- <td><a href="#" wicket:id="uploadLink">Upload</a><a href="#" wicket:id="download"><span wicket:id="downloadLabel"></span></a></td> -->
|
||||
<!-- <td><span wicket:id="uploadedByLabel"></span></td> -->
|
||||
<!-- <td><a href="#" wicket:id="deleteLink">Delete</a></td> -->
|
||||
<!-- </tr> -->
|
||||
<!-- <tr></tr> -->
|
||||
<!-- </table> -->
|
||||
|
||||
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Questions</th>
|
||||
<th class="rounded-left-top">Questions</th>
|
||||
<th>Description</th>
|
||||
<th>Hand-in</th>
|
||||
<th>Uploaded by</th>
|
||||
<th>Delete</th>
|
||||
<th class="rounded-right-top">Delete</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="checkLists">
|
||||
<td><a href="#" wicket:id="checkListLink"><span wicket:id="listName"></span></a></td>
|
||||
<td><a href="#" wicket:id="checkListLink"><span
|
||||
wicket:id="listName"></span></a></td>
|
||||
<td><span wicket:id="description"></span></td>
|
||||
<td><a href="#" wicket:id="uploadLink">Upload</a><a href="#" wicket:id="download"><span wicket:id="downloadLabel"></span></a></td>
|
||||
<td><a href="#" wicket:id="uploadLink">Upload</a><a href="#"
|
||||
wicket:id="download"><span wicket:id="downloadLabel"></span></a></td>
|
||||
<td><span wicket:id="uploadedByLabel"></span></td>
|
||||
<td><a href="#" wicket:id="deleteLink">Delete</a></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
|
@ -6,26 +6,36 @@
|
||||
</head>
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div wicket:id="dialog">
|
||||
<div wicket:id="checkListDialog"></div>
|
||||
<span><input type="button" value="Add checkList" wicket:id="saveLink" /></span>
|
||||
<!-- <span><a href="#" wicket:id="saveLink">Add checklist</a></span>-->
|
||||
</div>
|
||||
<div wicket:id="container">
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Owner</th>
|
||||
<th>Questions</th>
|
||||
</tr>
|
||||
<tr wicket:id="checkListTemplates">
|
||||
<td><span><a href="#" wicket:id="templateLink"><span wicket:id="templateName"></span></a></span></td>
|
||||
<td><span wicket:id="templateOwner"></span></td>
|
||||
<td><span wicket:id="templateOuestion"></span></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
</table>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
<div wicket:id="dialog">
|
||||
<div wicket:id="checkListDialog"></div>
|
||||
<span><input type="button" value="Add checkList"
|
||||
wicket:id="saveLink" /></span>
|
||||
<!-- <span><a href="#" wicket:id="saveLink">Add checklist</a></span>-->
|
||||
</div>
|
||||
<div wicket:id="container">
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Name</th>
|
||||
<th>Owner</th>
|
||||
<th class="rounded-right-top">Questions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="checkListTemplates">
|
||||
<td><span><a href="#" wicket:id="templateLink"><span
|
||||
wicket:id="templateName"></span></a></span></td>
|
||||
<td><span wicket:id="templateOwner"></span></td>
|
||||
<td><span wicket:id="templateOuestion"></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -5,42 +5,59 @@
|
||||
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div wicket:id="dialog">
|
||||
<form wicket:id="answerForm">
|
||||
<div>Select:</div>
|
||||
<div wicket:id="trafficLights"></div>
|
||||
<div>Comment:</div>
|
||||
<div><textarea wicket:id="commentArea" rows="27" cols="20"></textarea></div>
|
||||
<div><input type="submit" value="Save" name="save" /></div>
|
||||
<!--<span><input type="button" value="Save answer" wicket:id="saveAnswer" /></span>-->
|
||||
</form>
|
||||
</div>
|
||||
<div class="span-22 last">
|
||||
<div wicket:id="container">
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<tr>
|
||||
<th class="span-11">Question</th>
|
||||
<th><div wicket:id="author1Label"></div>
|
||||
<div wicket:id="author1RoleLabel"></div></th>
|
||||
<th><div wicket:id="author2Label"></div>
|
||||
<div wicket:id="author2RoleLabel"></div></th>
|
||||
<th><div wicket:id="supervisorLabel"></div>
|
||||
<div wicket:id="supervisorRoleLabel"></div></th>
|
||||
<th><div wicket:id="reviewerLabel"></div>
|
||||
<div wicket:id="reviewerRoleLabel"></div></th>
|
||||
</tr>
|
||||
<tr wicket:id="checkListQuestions">
|
||||
<td><span wicket:id="checkListQuestion"></span></td>
|
||||
<td><a href="#" wicket:id="author1Link"><img wicket:id="image"/></a></td>
|
||||
<td><a href="#" wicket:id="author2Link"><img wicket:id="image"/></a></td>
|
||||
<td><a href="#" wicket:id="supervisorLink"><img wicket:id="image"/></a></td>
|
||||
<td><a href="#" wicket:id="reviewerLink"><img wicket:id="image"/></a></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
</table>
|
||||
<wicket:panel>
|
||||
<div wicket:id="dialog">
|
||||
<form wicket:id="answerForm">
|
||||
<div>Select:</div>
|
||||
<div wicket:id="trafficLights"></div>
|
||||
<div>Comment:</div>
|
||||
<div>
|
||||
<textarea wicket:id="commentArea" rows="27" cols="20"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="Save" name="save" />
|
||||
</div>
|
||||
<!--<span><input type="button" value="Save answer" wicket:id="saveAnswer" /></span>-->
|
||||
</form>
|
||||
</div>
|
||||
<div class="span-22 last">
|
||||
<div wicket:id="container">
|
||||
<!-- <table class="rounded-table seminar-table even-rows"> -->
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span-11 rounded-left-top">Question</th>
|
||||
<th><div wicket:id="author1Label"></div>
|
||||
<div wicket:id="author1RoleLabel"></div></th>
|
||||
<th><div wicket:id="author2Label"></div>
|
||||
<div wicket:id="author2RoleLabel"></div></th>
|
||||
<th><div wicket:id="supervisorLabel"></div>
|
||||
<div wicket:id="supervisorRoleLabel"></div></th>
|
||||
<th class="rounded-right-top"><div wicket:id="reviewerLabel"></div>
|
||||
<div wicket:id="reviewerRoleLabel"></div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="checkListQuestions">
|
||||
<td><span wicket:id="checkListQuestion"></span></td>
|
||||
<td><a href="#" wicket:id="author1Link"><img
|
||||
wicket:id="image" /></a></td>
|
||||
<td><a href="#" wicket:id="author2Link"><img
|
||||
wicket:id="image" /></a></td>
|
||||
<td><a href="#" wicket:id="supervisorLink"><img
|
||||
wicket:id="image" /></a></td>
|
||||
<td><a href="#" wicket:id="reviewerLink"><img
|
||||
wicket:id="image" /></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -5,44 +5,37 @@
|
||||
</head>
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div wicket:id="container" class="prepend-top last">
|
||||
<div class="comment last" wicket:id="comment">
|
||||
<div class="comment-header last">
|
||||
<div class="last">
|
||||
<span wicket:id="from" class="comment-posted-by">Dan Kjellman</span>
|
||||
</div>
|
||||
<div class="last">
|
||||
<span class="comment-posted-date">Posted: </span>
|
||||
<span wicket:id="date" class="comment-posted-date"></span>
|
||||
<a href="#" wicket:id="editComment">
|
||||
<img class="icon-12" src="images/icons/edit_16x16.png" " alt="Edit" title="Edit" />
|
||||
<span class="small"> Edit</span>
|
||||
</a>
|
||||
<div class="append-bottom" wicket:id="container">
|
||||
|
||||
<div class="rounded-box append-bottom" wicket:id="comment">
|
||||
|
||||
|
||||
<span wicket:id="from" class="comment-posted-by">Dan Kjellman</span><span wicket:id="date"></span>
|
||||
<span class="right">
|
||||
|
||||
|
||||
<!-- <a href="#" wicket:id="editComment"> -->
|
||||
<!-- <img wicket:id="editIcon" alt="Edit" title="Edit" /> -->
|
||||
|
||||
<!-- </a> -->
|
||||
<a href="#" wicket:id="deleteComment">
|
||||
<img class="icon-12" src="images/icons/delete_16x16.png" alt="Delete" title="Delete" />
|
||||
<span class="small"> Delete</span>
|
||||
<img class="icon-12" wicket:id="deleteIcon" alt="Edit" title="Edit" />
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-bottom-border last"></div>
|
||||
<div class="comment-area last">
|
||||
<p wicket:id="message">This is the comment</p>
|
||||
</div>
|
||||
</span>
|
||||
<div wicket:id="message">This is the comment</div>
|
||||
|
||||
</div>
|
||||
<div wicket:id="navigator" class="comment-pager last"></div>
|
||||
<!-- <div wicket:id="navigator" class="comment-pager last"></div> -->
|
||||
</div>
|
||||
<div class="last comment-form">
|
||||
<div wicket:id="feedbackPanel"></div>
|
||||
<form wicket:id="commentForm">
|
||||
<div class="last">
|
||||
<strong>Comment:</strong>
|
||||
<textarea wicket:id="textMessage" placeholder='Enter new comment'></textarea>
|
||||
</div>
|
||||
<div class="last">
|
||||
<textarea wicket:id="textMessage" ></textarea>
|
||||
</div>
|
||||
<div class="last">
|
||||
<button wicket:id="submitButton" class="button">Submit comment
|
||||
<button wicket:id="submitButton" class="button append-bottom">Submit comment
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -11,6 +11,7 @@ import org.apache.wicket.ajax.markup.html.AjaxLink;
|
||||
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
|
||||
import org.apache.wicket.feedback.ContainerFeedbackMessageFilter;
|
||||
import org.apache.wicket.markup.html.WebMarkupContainer;
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.basic.MultiLineLabel;
|
||||
import org.apache.wicket.markup.html.form.Form;
|
||||
import org.apache.wicket.markup.html.form.TextArea;
|
||||
@ -33,6 +34,7 @@ import se.su.dsv.scipro.data.dao.interfaces.CommentThreadDao;
|
||||
import se.su.dsv.scipro.data.dataobjects.Comment;
|
||||
import se.su.dsv.scipro.data.dataobjects.CommentThread;
|
||||
import se.su.dsv.scipro.data.dataobjects.interfaces.Commentable;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.message.panels.CustomPagingNavigator;
|
||||
import se.su.dsv.scipro.security.auth.roles.Roles;
|
||||
import se.su.dsv.scipro.util.DateFormatter;
|
||||
@ -141,10 +143,18 @@ public class CommentThreadPanel extends Panel {
|
||||
final Comment c = item.getModelObject();
|
||||
item.add(new DateFormatter(DateFormatter.FORMAT.EXTENDED).createFormattedDateLabel("date", c.getDateCreated()));
|
||||
item.add(c.getCreator().getDisplayComponent("from"));
|
||||
item.add(new MultiLineLabel("message", new PropertyModel<String>(item
|
||||
item.add(new Label("message", new PropertyModel<String>(item
|
||||
.getDefaultModel(), "comment")).setEnabled(false));
|
||||
item.add(new CommentDeleteLink("deleteComment", c));
|
||||
item.add(new CommentEditLink("editComment", c));
|
||||
|
||||
CommentDeleteLink commentDeleteLink = new CommentDeleteLink("deleteComment", c);
|
||||
CommentEditLink commentEditLink = new CommentEditLink("editComment", c);
|
||||
|
||||
item.add(commentDeleteLink);
|
||||
// item.add(commentEditLink);
|
||||
|
||||
commentDeleteLink.add(new ImageObject("deleteIcon", ImageObject.TWENTYFOUR + ImageObject.DELETE));
|
||||
commentEditLink.add(new ImageObject("editIcon", ImageObject.TWENTYFOUR + ImageObject.EDIT));
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@ -201,7 +211,7 @@ public class CommentThreadPanel extends Panel {
|
||||
textArea.setDefaultModelObject("");
|
||||
generateCommentListView();
|
||||
webMarkupContainer.add(commentListView);
|
||||
webMarkupContainer.add(customPagingNavigator);
|
||||
//webMarkupContainer.add(customPagingNavigator);
|
||||
target.addComponent(textArea);
|
||||
target.addComponent(webMarkupContainer);
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
package se.su.dsv.scipro.components;
|
||||
|
||||
/**
|
||||
* Used to highlight hierarchy for My Projects in Supervisor view.
|
||||
*
|
||||
*/
|
||||
public interface MenuHighlightSupervisorMyProjects extends MenuHighlight {
|
||||
|
||||
}
|
@ -21,7 +21,7 @@
|
||||
</wicket:enclosure>
|
||||
<div>
|
||||
<button type="submit" wicket:id="submitButton">
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt="" />Save report
|
||||
Upload report
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -9,7 +9,9 @@
|
||||
<ul class="multiobject-selected-list">
|
||||
<li wicket:id="noSelections">Text if nothing has been selected</li>
|
||||
<li wicket:id="listItem"><span wicket:id="listItemText"></span>
|
||||
<a href="#" wicket:id="deleteLink"><img src="images/icons/delete_16x16.png" width="12" height="12" alt="" title="remove" /></a></li>
|
||||
<a href="#" wicket:id="deleteLink">
|
||||
<img wicket:id="deleteIcon" width="12" height="12" alt="" title="remove" />
|
||||
</a></li>
|
||||
</ul>
|
||||
|
||||
</wicket:panel>
|
||||
|
@ -45,6 +45,8 @@ import org.apache.wicket.model.PropertyModel;
|
||||
import org.apache.wicket.util.string.AppendingStringBuffer;
|
||||
import org.apache.wicket.util.value.IValueMap;
|
||||
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
|
||||
/**
|
||||
* Wicket component for selecting a single object of type T with an identifier of type I via
|
||||
* autocompletion. The textfield used for autocompletion is nothing more than a <em>search field</em>
|
||||
@ -189,7 +191,7 @@ public class MultiObjectAutoCompleteField<O extends Serializable/* object */,I /
|
||||
|
||||
item.add(resultText);
|
||||
|
||||
item.add(new IndicatingAjaxLink<Void>("deleteLink"){
|
||||
IndicatingAjaxLink<Void> deleteLink = new IndicatingAjaxLink<Void>("deleteLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
@ -206,7 +208,11 @@ public class MultiObjectAutoCompleteField<O extends Serializable/* object */,I /
|
||||
return isEnableDeletionOfSelectedObjects();
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
item.add(deleteLink);
|
||||
deleteLink.add(new ImageObject("deleteIcon", ImageObject.SIXTEEN + ImageObject.DELETE));
|
||||
|
||||
add(item);
|
||||
}
|
||||
|
||||
|
26
src/main/java/se/su/dsv/scipro/components/autocomplete/TeamMemberMultiObjectAutoCompleteField.html
26
src/main/java/se/su/dsv/scipro/components/autocomplete/TeamMemberMultiObjectAutoCompleteField.html
@ -9,14 +9,23 @@
|
||||
</div>
|
||||
|
||||
<div id="unstyled-table" class="span-10 last">
|
||||
<table class="rounded-table-top">
|
||||
|
||||
<tr>
|
||||
<th>Person</th>
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Person</th>
|
||||
<th>Role</th>
|
||||
<th>Remove</th>
|
||||
<th class="rounded-right-top">Remove</th>
|
||||
</tr>
|
||||
<tr wicket:id="noSelectionsContainer">
|
||||
</thead>
|
||||
<tfoot>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="noSelectionsContainer">
|
||||
<td wicket:id="noSelections">Text if nothing has been selected</td><td></td><td></td>
|
||||
</tr>
|
||||
<tr wicket:id="listItem"><td wicket:id="listItemText"></td>
|
||||
@ -27,7 +36,10 @@
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" wicket:id="deleteLink"><img src="images/icons/delete_16x16.png" width="13" height="13" alt="" title="remove" /></a></td></tr>
|
||||
<a href="#" wicket:id="deleteLink"><img wicket:id="deleteIcon" alt="" title="remove" /></a></td></tr>
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
9
src/main/java/se/su/dsv/scipro/components/autocomplete/TeamMemberMultiObjectAutoCompleteField.java
9
src/main/java/se/su/dsv/scipro/components/autocomplete/TeamMemberMultiObjectAutoCompleteField.java
@ -23,6 +23,7 @@ import se.su.dsv.scipro.admin.pages.ProjectContainer;
|
||||
import se.su.dsv.scipro.data.dataobjects.ProjectFollower;
|
||||
import se.su.dsv.scipro.data.dataobjects.ProjectTeamMember;
|
||||
import se.su.dsv.scipro.data.enums.ProjectTeamMemberRoles;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
|
||||
|
||||
public class TeamMemberMultiObjectAutoCompleteField<O extends ProjectTeamMember/* object */,I /* its id */ extends Serializable> extends MultiObjectAutoCompleteField<O,I>{
|
||||
@ -72,7 +73,8 @@ public class TeamMemberMultiObjectAutoCompleteField<O extends ProjectTeamMember/
|
||||
ProjectRoleForm<ProjectFollower> form = new ProjectRoleForm<ProjectFollower>("projectRoleSelectionForm", model);
|
||||
item.add(form);
|
||||
|
||||
item.add(new IndicatingAjaxLink<Void>("deleteLink"){
|
||||
|
||||
IndicatingAjaxLink<Void> deleteLink = new IndicatingAjaxLink<Void>("deleteLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
@ -84,7 +86,10 @@ public class TeamMemberMultiObjectAutoCompleteField<O extends ProjectTeamMember/
|
||||
public boolean isVisible(){
|
||||
return searchTextField.isEnabled();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
item.add(deleteLink);
|
||||
deleteLink.add(new ImageObject("deleteIcon", ImageObject.TWENTYFOUR + ImageObject.DELETE));
|
||||
add(item);
|
||||
}
|
||||
};
|
||||
|
6
src/main/java/se/su/dsv/scipro/components/autocomplete/UserProjectMultiObjectAutoCompleteField.html
6
src/main/java/se/su/dsv/scipro/components/autocomplete/UserProjectMultiObjectAutoCompleteField.html
@ -8,9 +8,9 @@
|
||||
|
||||
<ul class="multiobject-selected-list">
|
||||
<li wicket:id="noSelections">Text if nothing has been selected</li>
|
||||
<li wicket:id="listItem"><span wicket:id="listItemText"></span> <a href="#" wicket:id="deleteLink"><img
|
||||
src="images/icons/delete_16x16.png" width="12" height="12" alt=""
|
||||
title="remove" /></a>
|
||||
<li wicket:id="listItem"><span wicket:id="listItemText"></span> <a href="#" wicket:id="deleteLink">
|
||||
<img wicket:id="deleteIcon" width="12" height="12" alt="" title="remove" />
|
||||
</a>
|
||||
<div>Select Project:</div>
|
||||
<select
|
||||
wicket:id="project">
|
||||
|
11
src/main/java/se/su/dsv/scipro/components/autocomplete/UserProjectMultiObjectAutoCompleteField.java
11
src/main/java/se/su/dsv/scipro/components/autocomplete/UserProjectMultiObjectAutoCompleteField.java
@ -52,6 +52,7 @@ import se.su.dsv.scipro.data.dao.interfaces.ProjectDao;
|
||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminarActiveParticipation;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.opponent.models.OpponentModel;
|
||||
|
||||
/**
|
||||
@ -224,7 +225,7 @@ public class UserProjectMultiObjectAutoCompleteField<O extends Serializable/* ob
|
||||
|
||||
item.add(resultText);
|
||||
|
||||
item.add(new IndicatingAjaxLink<Void>("deleteLink") {
|
||||
IndicatingAjaxLink<Void> deleteLink = new IndicatingAjaxLink<Void>("deleteLink") {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
@ -243,11 +244,17 @@ public class UserProjectMultiObjectAutoCompleteField<O extends Serializable/* ob
|
||||
return isEnableDeletionOfSelectedObjects();
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
item.add(deleteLink);
|
||||
deleteLink.add(new ImageObject("deleteIcon", ImageObject.SIXTEEN + ImageObject.DELETE));
|
||||
|
||||
final DropDownChoice<Project> projectDropDown = new DropDownChoice<Project>(
|
||||
"project", new Model<Project>(),
|
||||
projectDao.getProjectsByParticipant(al.getUser(), null)) {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected CharSequence getDefaultChoice(Object selected) {
|
||||
return "";
|
||||
|
@ -7,36 +7,38 @@
|
||||
<body>
|
||||
<wicket:panel>
|
||||
|
||||
<div class="margin rounded-border">
|
||||
<div>
|
||||
<div wicket:id="feedbackPanel"></div>
|
||||
<form wicket:id="sendForm">
|
||||
<textarea wicket:id="textArea"></textarea>
|
||||
<textarea class="span-22 last" wicket:id="textArea" placeholder='Enter new message'></textarea>
|
||||
<div>
|
||||
<button type="submit" wicket:id="ajaxButton">
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt="" />Send
|
||||
Message
|
||||
<button class="right append-bottom" type="submit" wicket:id="ajaxButton">
|
||||
Post message
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div wicket:id="container" class="margin clear">
|
||||
<div wicket:id="boardMessageDataView" class="rounded-border">
|
||||
<span wicket:id="messageUser" class="small"> </span> <span
|
||||
wicket:id="messageDate" class="small"></span> <span><a
|
||||
href="#" wicket:id="delete" class="right-corner-resource"> <img
|
||||
class="icon-12" src="images/icons/delete_16x16.png" alt="Delete"
|
||||
title="Delete" /> </a> </span>
|
||||
<div class="span-22 last" wicket:id="container">
|
||||
<div wicket:id="boardMessageDataView">
|
||||
<div class="rounded-box">
|
||||
<span wicket:id="messageUser"> </span> <span
|
||||
wicket:id="messageDate"></span> <span><a
|
||||
href="#" wicket:id="delete" class="right-corner-resource">
|
||||
<img class="icon-12" wicket:id="deleteIcon" alt="Delete" title="Delete" />
|
||||
</a> </span>
|
||||
<div wicket:id="messageLabel" class="margin"></div>
|
||||
<div>
|
||||
<a href="#" wicket:id="showComments"><span
|
||||
wicket:id="commentNumber"></span> </a>
|
||||
<!-- <div> -->
|
||||
<!-- <a href="#" wicket:id="showComments"><span -->
|
||||
<!-- wicket:id="commentNumber"></span> </a> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div wicket:id="commentContainer">
|
||||
|
||||
<div class="prepend-1" wicket:id="commentContainer">
|
||||
<div wicket:id="commentThread"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div wicket:id="pagingNavigator"></div>
|
||||
<!-- <div wicket:id="pagingNavigator"></div> -->
|
||||
</div>
|
||||
|
||||
</wicket:panel>
|
||||
|
@ -30,6 +30,7 @@ import se.su.dsv.scipro.data.dao.interfaces.MessageBoardDao;
|
||||
import se.su.dsv.scipro.data.dataobjects.BoardMessage;
|
||||
import se.su.dsv.scipro.data.dataobjects.MessageBoard;
|
||||
import se.su.dsv.scipro.dataproviders.BoardMessageDataProvider;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.security.auth.roles.Roles;
|
||||
import se.su.dsv.scipro.util.DateFormatter;
|
||||
|
||||
@ -82,7 +83,7 @@ public class ConferencePanel extends Panel {
|
||||
loadUserDataView(new BoardMessageDataProvider(messageBoardModel));
|
||||
webMarkupContainer.add(dataView);
|
||||
webMarkupContainer.setOutputMarkupId(true);
|
||||
webMarkupContainer.add(new PagingNavigator("pagingNavigator", dataView));
|
||||
// webMarkupContainer.add(new PagingNavigator("pagingNavigator", dataView));
|
||||
add(webMarkupContainer);
|
||||
if (boardMessageModel != null) {
|
||||
int index = boardMessageDao.getBoardMessageSortOrderIndex(boardMessageModel.getObject());
|
||||
@ -104,7 +105,8 @@ public class ConferencePanel extends Panel {
|
||||
+ bm.getFromUser().getLastName()));
|
||||
|
||||
item.add(new DateFormatter(DateFormatter.FORMAT.EXTENDED).createFormattedDateLabel("messageDate", bm.getDateCreated()));
|
||||
item.add(new AjaxLink<Void>("delete") {
|
||||
|
||||
AjaxLink<Void> deleteLink = new AjaxLink<Void>("delete") {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -118,7 +120,7 @@ public class ConferencePanel extends Panel {
|
||||
webMarkupContainer.removeAll();
|
||||
loadUserDataView(new BoardMessageDataProvider(messageBoardModel));
|
||||
webMarkupContainer.add(dataView);
|
||||
webMarkupContainer.add(new PagingNavigator("pagingNavigator", dataView));
|
||||
// webMarkupContainer.add(new PagingNavigator("pagingNavigator", dataView));
|
||||
target.addComponent(webMarkupContainer);
|
||||
}
|
||||
|
||||
@ -129,7 +131,11 @@ public class ConferencePanel extends Panel {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
item.add(deleteLink);
|
||||
deleteLink.add(new ImageObject("deleteIcon", ImageObject.SIXTEEN + ImageObject.DELETE));
|
||||
|
||||
int commentSize = commentThreadDao.getCommentThreadSize(bm);
|
||||
String comments = " Comments";
|
||||
if (commentSize == 1) {
|
||||
@ -143,79 +149,89 @@ public class ConferencePanel extends Panel {
|
||||
webMarkupContainer.setOutputMarkupPlaceholderTag(true);
|
||||
item.add(webMarkupContainer);
|
||||
|
||||
CommentThreadPanel ctp = new CommentThreadPanel("commentThread", bm, 5,
|
||||
CommentThreadPanel ctp = new CommentThreadPanel("commentThread", bm, 1000,
|
||||
subscriberModels, messageBoardModel.getObject().getTitle());
|
||||
ctp.setOutputMarkupPlaceholderTag(true);
|
||||
webMarkupContainer.add(ctp);
|
||||
|
||||
|
||||
|
||||
|
||||
comment.setDefaultModelObject("Hide comments");
|
||||
webMarkupContainer.setVisible(true);
|
||||
item.add(new AjaxLink<String>("showComments",
|
||||
new Model<String>("Hide Comments")) {
|
||||
|
||||
if (boardMessageModel != null && boardMessageModel.getObject().equals(bm)) {
|
||||
comment.setDefaultModelObject("Hide comments");
|
||||
webMarkupContainer.setVisible(true);
|
||||
item.add(new AjaxLink<String>("showComments",
|
||||
new Model<String>("Hide Comments")) {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private boolean clicked = true;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private boolean clicked = true;
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
clicked = !clicked;
|
||||
if (clicked) {
|
||||
comment.setDefaultModelObject("Hide comments");
|
||||
} else {
|
||||
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
clicked = !clicked;
|
||||
if (clicked) {
|
||||
comment.setDefaultModelObject("Hide comments");
|
||||
} else {
|
||||
int commentSize = commentThreadDao.getCommentThreadSize(bm);
|
||||
|
||||
int commentSize = commentThreadDao.getCommentThreadSize(bm);
|
||||
|
||||
String comments = " Comments";
|
||||
if (commentSize == 1) {
|
||||
comments = " Comment";
|
||||
}
|
||||
comment.setDefaultModelObject(commentSize + comments);
|
||||
String comments = " Comments";
|
||||
if (commentSize == 1) {
|
||||
comments = " Comment";
|
||||
}
|
||||
webMarkupContainer.removeAll();
|
||||
webMarkupContainer.add(new CommentThreadPanel("commentThread",
|
||||
boardMessageDao.reLoad(bm), 5, subscriberModels,
|
||||
messageBoardModel.getObject().getTitle()));
|
||||
webMarkupContainer.setVisible(clicked);
|
||||
target.addComponent(webMarkupContainer);
|
||||
target.addComponent(comment);
|
||||
comment.setDefaultModelObject(commentSize + comments);
|
||||
}
|
||||
webMarkupContainer.removeAll();
|
||||
webMarkupContainer.add(new CommentThreadPanel("commentThread",
|
||||
boardMessageDao.reLoad(bm), 5, subscriberModels,
|
||||
messageBoardModel.getObject().getTitle()));
|
||||
webMarkupContainer.setVisible(clicked);
|
||||
target.addComponent(webMarkupContainer);
|
||||
//target.addComponent(comment);
|
||||
}
|
||||
|
||||
}.add(comment));
|
||||
} else {
|
||||
webMarkupContainer.setVisible(false);
|
||||
item.add(new AjaxLink<String>("showComments",
|
||||
new Model<String>("Show Comments")) {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private boolean clicked = false;
|
||||
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
clicked = !clicked;
|
||||
if (clicked) {
|
||||
comment.setDefaultModelObject("Hide comments");
|
||||
} else {
|
||||
|
||||
int commentSize = commentThreadDao.getCommentThreadSize(bm);
|
||||
|
||||
String comments = " Comments";
|
||||
if (commentSize == 1) {
|
||||
comments = " Comment";
|
||||
}
|
||||
comment.setDefaultModelObject(commentSize + comments);
|
||||
}
|
||||
webMarkupContainer.removeAll();
|
||||
webMarkupContainer.add(new CommentThreadPanel("commentThread",
|
||||
boardMessageDao.reLoad(bm), 5, subscriberModels,
|
||||
messageBoardModel.getObject().getTitle()));
|
||||
webMarkupContainer.setVisible(clicked);
|
||||
target.addComponent(webMarkupContainer);
|
||||
target.addComponent(comment);
|
||||
}
|
||||
|
||||
}.add(comment));
|
||||
}
|
||||
// }.add(comment));
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// if (boardMessageModel != null && boardMessageModel.getObject().equals(bm)) {
|
||||
//
|
||||
// } else {
|
||||
// webMarkupContainer.setVisible(false);
|
||||
// item.add(new AjaxLink<String>("showComments",
|
||||
// new Model<String>("Show Comments")) {
|
||||
//
|
||||
// private static final long serialVersionUID = 1L;
|
||||
// private boolean clicked = false;
|
||||
//
|
||||
// @Override
|
||||
// public void onClick(AjaxRequestTarget target) {
|
||||
// clicked = !clicked;
|
||||
// if (clicked) {
|
||||
// comment.setDefaultModelObject("Hide comments");
|
||||
// } else {
|
||||
//
|
||||
// int commentSize = commentThreadDao.getCommentThreadSize(bm);
|
||||
//
|
||||
// String comments = " Comments";
|
||||
// if (commentSize == 1) {
|
||||
// comments = " Comment";
|
||||
// }
|
||||
// comment.setDefaultModelObject(commentSize + comments);
|
||||
// }
|
||||
// webMarkupContainer.removeAll();
|
||||
// webMarkupContainer.add(new CommentThreadPanel("commentThread",
|
||||
// boardMessageDao.reLoad(bm), 5, subscriberModels,
|
||||
// messageBoardModel.getObject().getTitle()));
|
||||
// webMarkupContainer.setVisible(clicked);
|
||||
// target.addComponent(webMarkupContainer);
|
||||
// target.addComponent(comment);
|
||||
// }
|
||||
//
|
||||
// }.add(comment));
|
||||
// }
|
||||
}
|
||||
};
|
||||
|
||||
@ -261,7 +277,7 @@ public class ConferencePanel extends Panel {
|
||||
webMarkupContainer.removeAll();
|
||||
loadUserDataView(new BoardMessageDataProvider(messageBoardModel));
|
||||
webMarkupContainer.add(dataView);
|
||||
webMarkupContainer.add(new PagingNavigator("pagingNavigator", dataView));
|
||||
// webMarkupContainer.add(new PagingNavigator("pagingNavigator", dataView));
|
||||
target.addComponent(webMarkupContainer);
|
||||
target.addComponent(messageTextArea);
|
||||
|
||||
|
@ -69,16 +69,16 @@ public class Comment extends Ratable implements Comparable<Comment> {
|
||||
return 0;
|
||||
|
||||
if(this.getDateCreated() != null && o.getDateCreated() != null){
|
||||
//Reversed from what you might expect, because normally we want to display newest comment first in listviews
|
||||
if(this.getDateCreated().equals(o.getDateCreated())){
|
||||
return this.getId().compareTo(o.getId());
|
||||
// Displaying newest comment on the bottom of the list, oldest at the top.
|
||||
if(o.getDateCreated().equals(this.getDateCreated())){
|
||||
return o.getId().compareTo(this.getId());
|
||||
}
|
||||
return o.getDateCreated().compareTo(this.getDateCreated());
|
||||
return this.getDateCreated().compareTo(o.getDateCreated());
|
||||
}
|
||||
if(this.getId() != null && o.getId() != null)
|
||||
return this.getId().compareTo(o.getId());
|
||||
return o.getId().compareTo(this.getId());
|
||||
if(this.comment != null && o.comment != null)
|
||||
return comment.compareTo(o.comment);
|
||||
return o.comment.compareTo(comment);
|
||||
//By now we have to conclude the two objects are basically two objects full of nulls
|
||||
return 0;
|
||||
}
|
||||
|
@ -80,6 +80,8 @@ public class GeneralSystemSettings extends DomainObject{
|
||||
@Basic(optional=false)
|
||||
private boolean publicReviewsActivated = true;
|
||||
|
||||
@Basic(optional=false)
|
||||
private boolean peerDownloadEnabled = true;
|
||||
|
||||
public GeneralSystemSettings(){
|
||||
}
|
||||
@ -249,5 +251,11 @@ public class GeneralSystemSettings extends DomainObject{
|
||||
public void setPublicReviewsActivated(boolean publicReviewsActivated) {
|
||||
this.publicReviewsActivated = publicReviewsActivated;
|
||||
}
|
||||
public void setPeerDownloadEnabled(boolean peerDownloadEnabled) {
|
||||
this.peerDownloadEnabled = peerDownloadEnabled;
|
||||
}
|
||||
public boolean isPeerDownloadEnabled() {
|
||||
return peerDownloadEnabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ package se.su.dsv.scipro.data.enums;
|
||||
*
|
||||
*/
|
||||
public enum StateOfMind {
|
||||
NEEDHELP(0, "Need Help", "This means that you need help to proceed.", "som-needhelp"),
|
||||
NEEDHELP(0, "Need Help", "This means that help is needed to proceed.", "som-needhelp"),
|
||||
NEUTRAL(1, "Neutral", "This means that no imminent help is needed.", "som-neutral"),
|
||||
FINE(2, "Everything is fine", "This means the work proceeds as planned.", "som-fine");
|
||||
|
||||
|
@ -23,6 +23,7 @@ import se.su.dsv.scipro.data.dataobjects.GroupEvent;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.icons.AjaxActionIcon;
|
||||
import se.su.dsv.scipro.icons.ImageIcon;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.schedule.groupevent.panels.CreateGroupEventLinkPanel;
|
||||
import se.su.dsv.scipro.schedule.groupevent.panels.CreateGroupEventPanel;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorGroupEventPage;
|
||||
@ -81,7 +82,8 @@ public class SupervisorGroupEventsPanel extends Panel {
|
||||
item.add(new DateFormatter().createFormattedDateLabel("eventDate", ge.getDueDate()));
|
||||
item.add(eventLink);
|
||||
|
||||
item.add(new AjaxActionIcon("editLink", ImageIcon.ICON_EDIT, "edit") {
|
||||
// item.add(new AjaxActionIcon("editLink", ImageIcon.ICON_EDIT, "edit") {
|
||||
item.add(new AjaxActionIcon("editLink", ImageObject.TWENTYFOUR + ImageObject.EDIT) {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
@ -101,7 +103,8 @@ public class SupervisorGroupEventsPanel extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
AjaxActionIcon deleteIcon = new AjaxActionIcon("deleteLink", ImageIcon.ICON_DELETE, "delete") {
|
||||
// AjaxActionIcon deleteIcon = new AjaxActionIcon("deleteLink", ImageIcon.ICON_DELETE, "delete") {
|
||||
AjaxActionIcon deleteIcon = new AjaxActionIcon("deleteLink", ImageObject.TWENTYFOUR + ImageObject.DELETE) {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
|
@ -24,8 +24,8 @@
|
||||
<table>
|
||||
<tr wicket:id="handInFiles">
|
||||
<td><span wicket:id="fileName"></span></td>
|
||||
<td><a href="#" wicket:id="open"><img src="images/icons/document-preview_16x16.png" alt="Open/Preview"/></a></td>
|
||||
<td><a href="#" wicket:id="download"><img src="images/icons/download_16x16.png" alt="Download"/></a></td>
|
||||
<td><a href="#" wicket:id="open"><img wicket:id="openIcon" alt="Open/Preview"/></a></td>
|
||||
<td><a href="#" wicket:id="download"><img wicket:id="downloadIcon" alt="Download"/></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@ -50,8 +50,8 @@
|
||||
<table>
|
||||
<tr wicket:id="feedbackFiles">
|
||||
<td><span wicket:id="fileName"></span></td>
|
||||
<td><a href="#" wicket:id="open"><img src="images/icons/document-preview_16x16.png" alt="Open/Preview"/></a></td>
|
||||
<td><a href="#" wicket:id="download"><img src="images/icons/download_16x16.png" alt="Download"/></a></td>
|
||||
<td><a href="#" wicket:id="open"><img wicket:id="openIcon" alt="Open/Preview"/></a></td>
|
||||
<td><a href="#" wicket:id="download"><img wicket:id="downloadIcon" alt="Download"/></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -16,6 +16,7 @@ import se.su.dsv.scipro.data.dao.interfaces.HandInDao;
|
||||
import se.su.dsv.scipro.data.dataobjects.FileDescription;
|
||||
import se.su.dsv.scipro.data.dataobjects.HandIn;
|
||||
import se.su.dsv.scipro.data.enums.HandInStatus;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.repository.FileRepository;
|
||||
import se.su.dsv.scipro.repository.components.FileDownloadLink;
|
||||
import se.su.dsv.scipro.repository.components.FileOpenLink;
|
||||
@ -51,8 +52,8 @@ public abstract class HandInDetailsPanel extends Panel {
|
||||
protected void populateItem(ListItem<FileDescription> fileItem) {
|
||||
final FileDescription fd = fileItem.getModelObject();
|
||||
fileItem.add(new Label("fileName", fd.getName()));
|
||||
fileItem.add(new FileDownloadLink("download", fileItem.getModel() ));
|
||||
fileItem.add(new FileOpenLink("open", fileItem.getModel()));
|
||||
fileItem.add(new FileDownloadLink("download", fileItem.getModel() ).add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN)));
|
||||
fileItem.add(new FileOpenLink("open", fileItem.getModel()).add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW)));
|
||||
add(fileItem);
|
||||
}
|
||||
|
||||
@ -84,8 +85,8 @@ public abstract class HandInDetailsPanel extends Panel {
|
||||
protected void populateItem(ListItem<FileDescription> item) {
|
||||
final FileDescription fd = item.getModelObject();
|
||||
item.add(new Label("fileName", fd.getName()));
|
||||
item.add(new FileDownloadLink("download", item.getModel() ));
|
||||
item.add(new FileOpenLink("open", item.getModel()));
|
||||
item.add(new FileDownloadLink("download", item.getModel() ).add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN)));
|
||||
item.add(new FileOpenLink("open", item.getModel()).add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW)));
|
||||
add(item);
|
||||
}
|
||||
});
|
||||
|
@ -3,10 +3,10 @@
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<a href="#" wicket:id="sendFeedbackLink" class="button">Send feedback
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/>
|
||||
|
||||
</a>
|
||||
<a href="#" wicket:id="reassignFeedbackLink" class="button">Reassign feedback
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/>
|
||||
|
||||
</a>
|
||||
<div wicket:id="sendFeedbackDialog">
|
||||
<div wicket:id="sendFeedbackDialogContainer">
|
||||
|
@ -9,7 +9,7 @@
|
||||
<div wicket:id="fileInput"></div>
|
||||
<div>
|
||||
<button type="submit" wicket:id="submitHandIn" class="button">
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> I'm done, hand it in!
|
||||
I'm done, hand it in!
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="span-8 last append-1">
|
||||
<button type="submit" wicket:id="saveAssignSupervisorButton" class="button">
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="span-8 last append-1">
|
||||
<button type="submit" wicket:id="sendFeedbackButton" class="button">
|
||||
<img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Send
|
||||
Send
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -3,19 +3,22 @@ package se.su.dsv.scipro.icons;
|
||||
import org.apache.wicket.behavior.AttributeAppender;
|
||||
import org.apache.wicket.model.Model;
|
||||
|
||||
public class ActionIcon extends ImageIcon {
|
||||
//public class ActionIcon extends ImageIcon {
|
||||
public class ActionIcon extends ImageObject {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ActionIcon(String id, String name, String size, String alt){
|
||||
super(id, name, size, alt);
|
||||
// public ActionIcon(String id, String name, String size, String alt){
|
||||
// super(id, name, size, alt);
|
||||
public ActionIcon(String id, String image){
|
||||
super(id, image);
|
||||
add(new AttributeAppender("class", true, new Model<String>("action-icon"), " "));
|
||||
}
|
||||
|
||||
public ActionIcon(String id, String name) {
|
||||
this(id, name, "", null);
|
||||
}
|
||||
|
||||
public ActionIcon(String id, String name, String alt){
|
||||
this(id, name, "", alt);
|
||||
}
|
||||
// public ActionIcon(String id, String name) {
|
||||
// this(id, name, "", null);
|
||||
// }
|
||||
//
|
||||
// public ActionIcon(String id, String name, String alt){
|
||||
// this(id, name, "", alt);
|
||||
// }
|
||||
}
|
||||
|
@ -7,8 +7,10 @@ public abstract class AjaxActionIcon extends ActionIcon {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public AjaxActionIcon(String id, String name, String size, String alt){
|
||||
super(id, name, size, alt);
|
||||
//public AjaxActionIcon(String id, String name, String size, String alt){
|
||||
//super(id, name, size, alt);
|
||||
public AjaxActionIcon(String id, String image){
|
||||
super(id, image);
|
||||
add(new AjaxEventBehavior("onclick"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
@ -18,13 +20,13 @@ public abstract class AjaxActionIcon extends ActionIcon {
|
||||
});
|
||||
}
|
||||
|
||||
public AjaxActionIcon(String id, String name) {
|
||||
this(id, name, "", null);
|
||||
}
|
||||
|
||||
public AjaxActionIcon(String id, String name, String alt){
|
||||
this(id, name, "", alt);
|
||||
}
|
||||
// public AjaxActionIcon(String id, String name) {
|
||||
// this(id, name, "", null);
|
||||
// }
|
||||
//
|
||||
// public AjaxActionIcon(String id, String name, String alt){
|
||||
// this(id, name, "", alt);
|
||||
// }
|
||||
|
||||
protected abstract void onClick(AjaxRequestTarget target);
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ public abstract class ExpandContractActionIcon extends Panel {
|
||||
this.isExpanded = isInitiallyExpanded;
|
||||
setOutputMarkupId(true);
|
||||
|
||||
expandIcon = new AjaxActionIcon("expandIcon", AjaxActionIcon.ICON_EXPAND, "Expand"){
|
||||
// expandIcon = new AjaxActionIcon("expandIcon", AjaxActionIcon.ICON_EXPAND, "Expand"){
|
||||
expandIcon = new AjaxActionIcon("expandIcon", ImageObject.SIXTEEN + ImageObject.EXTEND){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
@ -55,7 +56,8 @@ public abstract class ExpandContractActionIcon extends Panel {
|
||||
}
|
||||
};
|
||||
|
||||
contractIcon = new AjaxActionIcon("contractIcon", AjaxActionIcon.ICON_CONTRACT, "Contract"){
|
||||
// contractIcon = new AjaxActionIcon("contractIcon", AjaxActionIcon.ICON_CONTRACT, "Contract"){
|
||||
contractIcon = new AjaxActionIcon("contractIcon", ImageObject.SIXTEEN + ImageObject.EXTEND_REVERSE){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div wicket:id="dialog">
|
||||
<div wicket:id="dialogContent"></div>
|
||||
</div>
|
||||
<img wicket:id="helpIcon" class="action-icon"/>
|
||||
<img wicket:id="helpIcon" class="round-box-icon"/>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -28,7 +28,10 @@ public class HelpIconDialog extends Panel {
|
||||
dialog.add(new Fragment("dialogContent", fragmentId, markupProvider));
|
||||
|
||||
add(dialog);
|
||||
ImageIcon icon = new ImageIcon("helpIcon", ImageIcon.ICON_HELP, "Help");
|
||||
|
||||
//ImageIcon icon = new ImageIcon("helpIcon", ImageIcon.ICON_HELP, "Help");
|
||||
ImageObject icon = new ImageObject("helpIcon", ImageObject.TWENTYFOUR + ImageObject.HELP);
|
||||
|
||||
icon.add(new AttributeAppender("onclick", new Model<String>(dialog.open().render(true).toString()), " "));
|
||||
add(icon);
|
||||
}
|
||||
|
@ -5,7 +5,8 @@
|
||||
<div wicket:id="dialog">
|
||||
<div wicket:id="dialogContent"></div>
|
||||
</div>
|
||||
<img wicket:id="helpIcon" class="action-icon"/>
|
||||
<!-- <img wicket:id="helpIcon" class="action-icon"/> -->
|
||||
<img wicket:id="helpIcon" class="round-box-icon"/>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -28,7 +28,8 @@ public class HelpIconPanelDialog extends Panel {
|
||||
dialog.add(panel);
|
||||
|
||||
add(dialog);
|
||||
ImageIcon icon = new ImageIcon("helpIcon", ImageIcon.ICON_HELP, "Help");
|
||||
//ImageIcon icon = new ImageIcon("helpIcon", ImageIcon.ICON_HELP, "Help");
|
||||
ImageObject icon = new ImageObject("helpIcon", ImageObject.TWENTYFOUR + ImageObject.HELP);
|
||||
icon.add(new AttributeAppender("onclick", new Model<String>(dialog.open().render(true).toString()), " "));
|
||||
add(icon);
|
||||
}
|
||||
|
120
src/main/java/se/su/dsv/scipro/icons/ImageObject.java
Normal file
120
src/main/java/se/su/dsv/scipro/icons/ImageObject.java
Normal file
@ -0,0 +1,120 @@
|
||||
package se.su.dsv.scipro.icons;
|
||||
|
||||
import org.apache.wicket.markup.html.image.ContextImage;
|
||||
import org.apache.wicket.model.IModel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fred
|
||||
*
|
||||
*An image class that
|
||||
*
|
||||
*1. Centralizes the management of images, thus making it more object oriented.
|
||||
*Should developers/designers want to change an icon, it needs to be done only
|
||||
*once here and in the centralized folders, rather than countless times elsewhere
|
||||
*in the code.
|
||||
*2. Allows the separation of code and static resources (images in this case).
|
||||
*3. Allows for easy swapping between images of different sizes in the code.
|
||||
*
|
||||
*/
|
||||
public class ImageObject extends ContextImage{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Path to icon folder in webapp
|
||||
*/
|
||||
public static final String PATH = "images/icons/";
|
||||
|
||||
/**
|
||||
* Paths to subfolders for different size images.
|
||||
* Not all images come in different sizes, in that
|
||||
* case insert ImageIcon.PATH before the image name
|
||||
* or use the convenience factory method (recommended).
|
||||
*/
|
||||
public static final String SIXTEEN = PATH + "16/";
|
||||
public static final String TWENTYFOUR = PATH + "24/";
|
||||
public static final String THIRTYTWO = PATH + "32/";
|
||||
public static final String FORTYEIGHT = PATH + "48/";
|
||||
|
||||
/**
|
||||
* Names of image files
|
||||
*/
|
||||
public static final String ABOUT = "question_and_answer.png";
|
||||
public static final String ADD = "add.png";
|
||||
public static final String CALENDAR = "calendar.png";
|
||||
public static final String CHECK = "check.png";
|
||||
public static final String CLIPBOARD = "clipboard.png";
|
||||
public static final String CLOCK = "clock.png";
|
||||
public static final String COPY = "copy.png";
|
||||
public static final String DATE_TIME = "date-time.png";
|
||||
public static final String DELETE = "delete.png";
|
||||
public static final String DELETE2 = "delete2.png";
|
||||
public static final String DOCUMENT = "document.png";
|
||||
public static final String DOCUMENT_ADD = "document_add.png";
|
||||
public static final String DOCUMENT_DOWN = "document_down.png";
|
||||
public static final String DOCUMENT_VIEW = "document_view.png";
|
||||
public static final String EDIT = "edit.png";
|
||||
public static final String ERROR = "error.png";
|
||||
public static final String EXTEND = "navigate_right.png";
|
||||
public static final String EXTEND_REVERSE = "navigate_up.png";
|
||||
public static final String FLAG_SWEDEN = "flag_sweden.png";
|
||||
public static final String FLAG_GB = "flag_great_britain.png";
|
||||
public static final String FOLDER = "folder.png";
|
||||
public static final String FOLDER_DOCUMENT = "folder_document.png";
|
||||
public static final String FOLDER_UP = "folder_up.png";
|
||||
public static final String GEAR = "gear.png";
|
||||
public static final String HELP = "help2.png";
|
||||
public static final String STAR_GREY = "star_grey.png";
|
||||
public static final String STAR_RED = "star_red.png";
|
||||
public static final String USER = "user1.png";
|
||||
|
||||
public static final String LIGHT_CLICK = "bullet_ball_glass_click.png";
|
||||
public static final String LIGHT_GREEN_BORDER = "bullet_ball_glass_green_with_border.png";
|
||||
public static final String LIGHT_GREEN = "bullet_ball_glass_green.png";
|
||||
public static final String LIGHT_YELLOW_BORDER = "bullet_ball_glass_yellow_with_border.png";
|
||||
public static final String LIGHT_YELLOW = "bullet_ball_glass_yellow.png";
|
||||
public static final String LIGHT_RED_BORDER = "bullet_ball_glass_red_with_border.png";
|
||||
public static final String LIGHT_RED = "bullet_ball_glass_red.png";
|
||||
public static final String LIGHT_GREY_BORDER = "bullet_ball_glass_grey_with_border.png";
|
||||
public static final String LIGHT_GREY = "bullet_ball_glass_grey.png";
|
||||
|
||||
/**
|
||||
* Default constructor. Send the wicket id and the path to the image.
|
||||
* Use **ONLY** the static strings provided in this class for paths.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* wicketComponent.add(new ImageObject("deleteIcon", ImageObject.TWENTYFOUR + ImageObject.DELETE));
|
||||
*
|
||||
* wicketComponent.add(new ImageObject("greenLightIcon", ImageObject.PATH + ImageObject.LIGHT_GREEN));
|
||||
*
|
||||
* @param id
|
||||
* @param imagePath
|
||||
*/
|
||||
public ImageObject(String id, String imagePath) {
|
||||
super(id, imagePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience factory method for icons that come in only one size,
|
||||
* and hence always must have ImageObject.PATH inserted before the
|
||||
* image name.
|
||||
*
|
||||
* E.g. instead of
|
||||
*
|
||||
* wicketComponent.add(new ImageObject("greenLightIcon", ImageObject.PATH + ImageObject.LIGHT_GREEN));
|
||||
*
|
||||
* you can write
|
||||
*
|
||||
* wicketComponent.add(ImageObject.createImageObject("greenLightIcon", ImageObject.LIGHT_GREEN));
|
||||
*
|
||||
* @param id
|
||||
* @param imageName
|
||||
* @return
|
||||
*/
|
||||
public static ImageObject createImageObject(String id, String imageName){
|
||||
return new ImageObject(id, PATH + imageName);
|
||||
}
|
||||
|
||||
}
|
@ -36,12 +36,15 @@
|
||||
<ul class="no-list-style">
|
||||
<li wicket:id="opponentsList"><span wicket:id="opponent"></span>
|
||||
<div wicket:id="oppositionContainer"><strong>Report:</strong> <span wicket:id="oppositionReportTitle"></span> <a href="#"
|
||||
wicket:id="open"><img
|
||||
src="images/icons/document-preview_16x16.png" alt="Open/Preview" />
|
||||
</a> <a href="#" wicket:id="download"><img
|
||||
src="images/icons/download_16x16.png" alt="Download" /> </a> <a href="#"
|
||||
wicket:id="deleteOppositionReport"><img
|
||||
src="images/icons/delete_16x16.png" alt="delete" /> </a>
|
||||
wicket:id="open">
|
||||
<img wicket:id="openIcon" alt="Open/Preview" />
|
||||
</a> <a href="#" wicket:id="download">
|
||||
<img wicket:id="downloadIcon" alt="Download" />
|
||||
</a> <a href="#"
|
||||
wicket:id="deleteOppositionReport">
|
||||
<img wicket:id="deleteIcon" alt="delete" />
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -62,12 +65,15 @@
|
||||
|
||||
<strong>Thesis/Report: </strong>
|
||||
<div><span wicket:id="seminarReportTitle"></span> <span
|
||||
wicket:id="uploadInfoContainer"> <a href="#" wicket:id="open"><img
|
||||
src="images/icons/document-preview_16x16.png" alt="Open/Preview" /> </a>
|
||||
<a href="#" wicket:id="download"><img
|
||||
src="images/icons/download_16x16.png" alt="Download" /> </a> <a href="#"
|
||||
wicket:id="deleteSeminarReport"><img
|
||||
src="images/icons/delete_16x16.png" alt="delete" /> </a> </span></div>
|
||||
wicket:id="uploadInfoContainer"> <a href="#" wicket:id="open">
|
||||
<img wicket:id="openIcon" alt="Open/Preview" />
|
||||
</a>
|
||||
<a href="#" wicket:id="download">
|
||||
<img wicket:id="downloadIcon" alt="Download" />
|
||||
</a> <a href="#"
|
||||
wicket:id="deleteSeminarReport">
|
||||
<img wicket:id="deleteIcon" alt="delete" />
|
||||
</a> </span></div>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
|
@ -26,6 +26,7 @@ import se.su.dsv.scipro.data.dataobjects.ProjectFollower;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.data.enums.ProjectTeamMemberRoles;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.repository.components.FileDownloadLink;
|
||||
import se.su.dsv.scipro.repository.components.FileOpenLink;
|
||||
import se.su.dsv.scipro.security.auth.MetaDataActionStrategy;
|
||||
@ -145,9 +146,10 @@ public class FinalSeminarDetailsPanel extends Panel {
|
||||
reportTitle = item.getModelObject().getOpponentReport().getName();
|
||||
oppCon.add(new Label("oppositionReportTitle", reportTitle));
|
||||
|
||||
oppCon.add(new FileDownloadLink("download", item.getModelObject().getOpponentReport()));
|
||||
oppCon.add(new FileOpenLink("open", item.getModelObject().getOpponentReport()));
|
||||
oppCon.add(new AjaxLink<Void>("deleteOppositionReport"){
|
||||
oppCon.add(new FileDownloadLink("download", item.getModelObject().getOpponentReport()).add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN)));
|
||||
oppCon.add(new FileOpenLink("open", item.getModelObject().getOpponentReport()).add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW)));
|
||||
|
||||
AjaxLink<Void> deleteOppositionLink = new AjaxLink<Void>("deleteOppositionReport"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
MetaDataActionStrategy.authorize(this, Roles.ADMIN);
|
||||
@ -169,7 +171,11 @@ public class FinalSeminarDetailsPanel extends Panel {
|
||||
}
|
||||
target.addComponent(FinalSeminarDetailsPanel.this);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
oppCon.add(deleteOppositionLink);
|
||||
deleteOppositionLink.add(new ImageObject("deleteIcon", ImageObject.SIXTEEN + ImageObject.DELETE));
|
||||
|
||||
add(item);
|
||||
}
|
||||
});
|
||||
@ -205,10 +211,10 @@ public class FinalSeminarDetailsPanel extends Panel {
|
||||
}
|
||||
};
|
||||
|
||||
uploadInfoContainer.add(new FileDownloadLink("download", seminar.getDocument()));
|
||||
uploadInfoContainer.add(new FileOpenLink("open", seminar.getDocument()));
|
||||
uploadInfoContainer.add(new FileDownloadLink("download", seminar.getDocument()).add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN)));
|
||||
uploadInfoContainer.add(new FileOpenLink("open", seminar.getDocument()).add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW)));
|
||||
|
||||
uploadInfoContainer.add(new AjaxLink<Void>("deleteSeminarReport") {
|
||||
AjaxLink<Void> deleteSeminarReportLink = new AjaxLink<Void>("deleteSeminarReport") {
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
MetaDataActionStrategy.authorize(this, Roles.ADMIN);
|
||||
@ -227,7 +233,10 @@ public class FinalSeminarDetailsPanel extends Panel {
|
||||
}
|
||||
target.addComponent(FinalSeminarDetailsPanel.this);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
uploadInfoContainer.add(deleteSeminarReportLink);
|
||||
deleteSeminarReportLink.add(new ImageObject("deleteIcon", ImageObject.SIXTEEN + ImageObject.DELETE));
|
||||
|
||||
detailsContainer.add(uploadInfoContainer);
|
||||
add(detailsContainer);
|
||||
|
@ -6,57 +6,53 @@
|
||||
|
||||
<div class="span-22 prepend-top last">
|
||||
<div wicket:id="feedback"></div>
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Level</th>
|
||||
<th>Title</th>
|
||||
<th>Author(s)</th>
|
||||
<th>Head Supervisor</th>
|
||||
<th>Reviewer</th>
|
||||
<th title="Opponents" class="shortened-table-header">Opp.</th>
|
||||
<th title="Active Participants" class="shortened-table-header">A.P.</th>
|
||||
<th title="Total Attendees" class="shortened-table-header">Tot.A.</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr wicket:id="seminar-item">
|
||||
<td><span wicket:id="date" class="span-2"></span>
|
||||
</td>
|
||||
<td><span wicket:id="projectClass"></span>
|
||||
</td>
|
||||
<td><span wicket:id="title"></span>
|
||||
</td>
|
||||
<td><span wicket:id="authors"></span>
|
||||
</td>
|
||||
<td><span wicket:id="headSupervisor"></span>
|
||||
</td>
|
||||
<td><span wicket:id="reviewer"></span>
|
||||
</td>
|
||||
<td><span wicket:id="opponents"></span>
|
||||
</td>
|
||||
<td><span wicket:id="activeParticipants"></span>
|
||||
</td>
|
||||
<td><span wicket:id="totalAttendees"></span>
|
||||
</td>
|
||||
<td><form wicket:id="contactsForm">
|
||||
<input type="submit" wicket:id="contacts" />
|
||||
</form>
|
||||
</td>
|
||||
<td><form wicket:id="editForm">
|
||||
<input type="submit" wicket:id="edit" />
|
||||
</form>
|
||||
</td>
|
||||
<td><a href="#" wicket:id="delete"><img
|
||||
src="images/icons/delete_16x16.png" alt="Delete" title="Delete" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="12"></td>
|
||||
</tr>
|
||||
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Date</th>
|
||||
<th >Level</th>
|
||||
<th>Title</th>
|
||||
<th>Author(s)</th>
|
||||
<th>Head Supervisor</th>
|
||||
<th>Reviewer</th>
|
||||
<th title="Opponents" class="shortened-table-header">Opp.</th>
|
||||
<th title="Active Participants" class="shortened-table-header">A.P.</th>
|
||||
<th title="Total Attendees" class="shortened-table-header">Tot.A.</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th class="rounded-right-top"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="12" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="seminar-item">
|
||||
<td><span wicket:id="date" class="span-2"></span></td>
|
||||
<td><span wicket:id="projectClass" class="span-2"></span></td>
|
||||
<td><span wicket:id="title"></span></td>
|
||||
<td><span wicket:id="authors"></span></td>
|
||||
<td><span wicket:id="headSupervisor"></span></td>
|
||||
<td><span wicket:id="reviewer"></span></td>
|
||||
<td><span wicket:id="opponents"></span></td>
|
||||
<td><span wicket:id="activeParticipants"></span></td>
|
||||
<td><span wicket:id="totalAttendees"></span></td>
|
||||
<td><form wicket:id="contactsForm">
|
||||
<input type="submit" wicket:id="contacts" />
|
||||
</form></td>
|
||||
<td><form wicket:id="editForm">
|
||||
<input type="submit" wicket:id="edit" />
|
||||
</form></td>
|
||||
<td><a href="#" wicket:id="delete">
|
||||
<img wicket:id="deleteIcon" alt="Delete" title="Delete" />
|
||||
</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div wicket:id="pagingNavigator"></div>
|
||||
|
||||
<div wicket:id="dialog">
|
||||
|
@ -34,6 +34,7 @@ import se.su.dsv.scipro.data.dataobjects.ProjectFollower;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.data.enums.ProjectTeamMemberRoles;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.opponent.models.OpponentModel;
|
||||
import se.su.dsv.scipro.util.DateFormatter;
|
||||
|
||||
@ -184,7 +185,7 @@ public class OpponentListViewPanel extends Panel {
|
||||
});
|
||||
item.add(new ContactsForm("contactsForm", seminar));
|
||||
|
||||
item.add(new AjaxLink<Void>("delete") {
|
||||
AjaxLink<Void> deleteLink = new AjaxLink<Void>("delete") {
|
||||
|
||||
private static final long serialVersionUID = 1529565679210978293L;
|
||||
|
||||
@ -221,13 +222,6 @@ public class OpponentListViewPanel extends Panel {
|
||||
return new AjaxCallDecorator() {
|
||||
private static final long serialVersionUID = 8989126586010432130L;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.wicket.ajax.calldecorator.
|
||||
* AjaxCallDecorator
|
||||
* #decorateScript(java.lang.CharSequence)
|
||||
*/
|
||||
@Override
|
||||
public CharSequence decorateScript(CharSequence script) {
|
||||
String ret = "if(!confirm('The attendees of this seminar will NOT be notified that the seminar has been deleted, are you sure you wish to delete it?')) return false; "
|
||||
@ -237,7 +231,10 @@ public class OpponentListViewPanel extends Panel {
|
||||
};
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
item.add(deleteLink);
|
||||
deleteLink.add(new ImageObject("deleteIcon", ImageObject.TWENTYFOUR + ImageObject.DELETE));
|
||||
|
||||
}
|
||||
};
|
||||
|
@ -1,45 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<html
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div class="span-22 prepend-top last">
|
||||
<h5 class="peer-title">Available final seminars<span wicket:id="seminarHelp" class="right"></span></h5>
|
||||
<wicket:panel>
|
||||
<div class="span-22 prepend-top last">
|
||||
<h5 class="peer-title">
|
||||
Available final seminars<span wicket:id="seminarHelp" class="right"></span>
|
||||
</h5>
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Date</th>
|
||||
<th>Title</th>
|
||||
<th>Author(s)</th>
|
||||
<th>Supervisor</th>
|
||||
<th>Details</th>
|
||||
<th class="participation rounded-right-top" colspan="2">Final Seminar registration</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="8" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="seminar-item">
|
||||
<td><span wicket:id="date" class="span-2"></span></td>
|
||||
<td><span wicket:id="title"></span></td>
|
||||
<td><span wicket:id="authors"></span></td>
|
||||
<td><span wicket:id="supervisor"></span></td>
|
||||
<td><form wicket:id="contactsForm">
|
||||
<input type="submit" wicket:id="contacts" />
|
||||
</form></td>
|
||||
<td><form wicket:id="opponentForm">
|
||||
<input type="submit" wicket:id="registerOpponent" />
|
||||
</form></td>
|
||||
<td><form wicket:id="activeParticipationForm">
|
||||
<input type="submit" wicket:id="registerActiveParticipant" />
|
||||
</form></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div wicket:id="pagingNavigator"></div>
|
||||
</div>
|
||||
<div wicket:id="contactsDialog">
|
||||
<div wicket:id="contactsDialogContainer">
|
||||
<form wicket:id="contactsSeminarForm">
|
||||
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Title</th>
|
||||
<th>Author(s)</th>
|
||||
<th>Supervisor</th>
|
||||
<th>Details</th>
|
||||
<th class="participation" colspan="2">Final Seminar registration</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr wicket:id="seminar-item">
|
||||
<td><span wicket:id="date" class="span-2"></span></td>
|
||||
<td><span wicket:id="title"></span></td>
|
||||
<td><span wicket:id="authors"></span></td>
|
||||
<td><span wicket:id="supervisor"></span></td>
|
||||
<td><form wicket:id="contactsForm"><input type="submit" wicket:id="contacts" /></form></td>
|
||||
<td><form wicket:id="opponentForm"><input type="submit" wicket:id="registerOpponent" /></form></td>
|
||||
<td><form wicket:id="activeParticipationForm"><input type="submit" wicket:id="registerActiveParticipant" /></form></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div wicket:id="pagingNavigator"></div>
|
||||
</div>
|
||||
<div wicket:id="contactsDialog">
|
||||
<div wicket:id="contactsDialogContainer">
|
||||
<form wicket:id="contactsSeminarForm">
|
||||
<div wicket:id="finalSeminarAttendees"></div>
|
||||
|
||||
<div wicket:id="finalSeminarAttendees" ></div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -6,11 +6,13 @@
|
||||
<div>
|
||||
<i><span wicket:id="noActiveParticipationsMsg"></span></i>
|
||||
</div>
|
||||
<div wicket:id="activeParticipations" class="append-bottom rounded-border">
|
||||
<h5>
|
||||
<strong>Title: </strong>
|
||||
<span wicket:id="seminarProject"></span>
|
||||
</h5>
|
||||
<!-- <div wicket:id="activeParticipations" class="append-bottom rounded-border"> -->
|
||||
<div wicket:id="activeParticipations" class="rounded-box">
|
||||
<!-- <h5> -->
|
||||
<!-- <strong>Title: </strong> -->
|
||||
<!-- <span wicket:id="seminarProject"></span> -->
|
||||
<!-- </h5> -->
|
||||
<div class="box-title rounded" wicket:id="seminarProject"></div>
|
||||
<div>
|
||||
<strong>Date: </strong>
|
||||
<span wicket:id="seminarDate"></span>
|
||||
@ -45,8 +47,8 @@
|
||||
<strong>Final thesis/report: </strong>
|
||||
<i><span wicket:id="noReportMsg"></span></i>
|
||||
<span wicket:id="seminarReportTitle"></span>
|
||||
<a href="#" wicket:id="seminarReportOpenLink"><img src="images/icons/document-preview_16x16.png" alt="Open/Preview"/></a>
|
||||
<a href="#" wicket:id="seminarReportDownloadLink"><img src="images/icons/download_16x16.png" alt="Download"/></a>
|
||||
<a href="#" wicket:id="seminarReportOpenLink"><img wicket:id="openIcon" alt="Open/Preview"/></a>
|
||||
<a href="#" wicket:id="seminarReportDownloadLink"><img wicket:id="downloadIcon" alt="Download"/></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -16,6 +16,7 @@ import se.su.dsv.scipro.data.dataobjects.FinalSeminarActiveParticipation;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.repository.components.FileDownloadLink;
|
||||
import se.su.dsv.scipro.repository.components.FileOpenLink;
|
||||
import se.su.dsv.scipro.util.DateFormatter;
|
||||
@ -89,9 +90,9 @@ public class ProjectActiveParticipationsPanel extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
item.add(new FileDownloadLink("seminarReportDownloadLink", seminar.getDocument()));
|
||||
item.add(new FileDownloadLink("seminarReportDownloadLink", seminar.getDocument()).add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN)));
|
||||
|
||||
item.add(new FileOpenLink("seminarReportOpenLink", seminar.getDocument()));
|
||||
item.add(new FileOpenLink("seminarReportOpenLink", seminar.getDocument()).add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW)));
|
||||
add(item);
|
||||
}
|
||||
});
|
||||
|
@ -29,14 +29,16 @@
|
||||
<td wicket:id="uploader"></td>
|
||||
<td wicket:id="uploadDate"></td>
|
||||
<td><a href="#" wicket:id="open"><img
|
||||
src="images/icons/document-preview_16x16.png"
|
||||
wicket:id="openIcon"
|
||||
alt="Open/Preview" /> </a></td>
|
||||
<td><a href="#" wicket:id="download"><img
|
||||
src="images/icons/download_16x16.png" alt="Download" /> </a></td>
|
||||
wicket:id="downloadIcon"
|
||||
alt="Download" /> </a></td>
|
||||
<td>
|
||||
<form wicket:id="deleteReportForm">
|
||||
<a href="#" wicket:id="deleteReportSubmitLink"><img
|
||||
src="images/icons/delete_16x16.png" alt="Delete" /> </a>
|
||||
<a href="#" wicket:id="deleteReportSubmitLink">
|
||||
<img wicket:id="deleteIcon" alt="Delete" />
|
||||
</a>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@ -91,11 +93,12 @@
|
||||
</td>
|
||||
<td wicket:id="uploadDate"></td>
|
||||
<td><a href="#" wicket:id="open"><img
|
||||
src="images/icons/document-preview_16x16.png"
|
||||
wicket:id="openIcon"
|
||||
alt="Open/Preview" /> </a>
|
||||
</td>
|
||||
<td><a href="#" wicket:id="download"><img
|
||||
src="images/icons/download_16x16.png" alt="Download" /> </a>
|
||||
wicket:id="downloadIcon"
|
||||
alt="Download" /> </a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -117,7 +120,7 @@
|
||||
<div class="span-10 last">
|
||||
<form wicket:id="editForm">
|
||||
<button type="submit" wicket:id="edit">
|
||||
<img src="images/icons/edit_16x16.png" alt="" /> Edit
|
||||
Edit
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -37,6 +37,7 @@ import se.su.dsv.scipro.data.dataobjects.FinalSeminarActiveParticipation;
|
||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminarOpposition;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.icons.ImageIcon;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.opponent.models.OpponentModel;
|
||||
import se.su.dsv.scipro.opponent.pages.TurnitinPopupPage;
|
||||
import se.su.dsv.scipro.project.pages.ProjectStartPage;
|
||||
@ -206,8 +207,8 @@ public class ProjectFinalSeminarPanel extends Panel {
|
||||
turnItLink.setVisible(isSupervisorView);
|
||||
}
|
||||
|
||||
uploadInfoContainer.add(new FileDownloadLink("download", seminar.getDocument()));
|
||||
uploadInfoContainer.add(new FileOpenLink("open", seminar.getDocument()));
|
||||
uploadInfoContainer.add(new FileDownloadLink("download", seminar.getDocument()).add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN)));
|
||||
uploadInfoContainer.add(new FileOpenLink("open", seminar.getDocument()).add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW)));
|
||||
uploadInfoContainer.add(plagiarismLabel);
|
||||
uploadInfoContainer.add(turnItLink);
|
||||
uploadInfoContainer.add(checkPlagiarismLabel);
|
||||
@ -233,7 +234,7 @@ public class ProjectFinalSeminarPanel extends Panel {
|
||||
}
|
||||
};
|
||||
|
||||
deleteReportForm.add(new SubmitLink("deleteReportSubmitLink"));
|
||||
deleteReportForm.add(new SubmitLink("deleteReportSubmitLink").add(new ImageObject("deleteIcon", ImageObject.SIXTEEN + ImageObject.DELETE)));
|
||||
uploadInfoContainer.add(deleteReportForm);
|
||||
add(uploadInfoContainer);
|
||||
|
||||
@ -266,8 +267,8 @@ public class ProjectFinalSeminarPanel extends Panel {
|
||||
fileItem.add(new Label("fileName", fileItem.getModelObject().getName()));
|
||||
fileItem.add(new DateFormatter().createFormattedDateLabel("uploadDate", o.getDateReported()));
|
||||
|
||||
fileItem.add(new FileDownloadLink("download", fileItem.getModel()));
|
||||
fileItem.add(new FileOpenLink("open", fileItem.getModel()));
|
||||
fileItem.add(new FileDownloadLink("download", fileItem.getModel()).add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN)));
|
||||
fileItem.add(new FileOpenLink("open", fileItem.getModel()).add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW)));
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -4,11 +4,15 @@
|
||||
<wicket:panel>
|
||||
<h5 class="peer-title">Registered as opponent</h5>
|
||||
<i><span wicket:id="noOppositionsMessage"></span></i>
|
||||
<div class="append-bottom rounded-border" wicket:id="oppositionsList">
|
||||
<h5>
|
||||
<strong>Title:</strong>
|
||||
<span wicket:id="projectTitle"></span>
|
||||
</h5>
|
||||
<!-- <div class="append-bottom rounded-border" wicket:id="oppositionsList"> -->
|
||||
<div class="rounded-box" wicket:id="oppositionsList">
|
||||
<!-- <h5> -->
|
||||
<!-- <strong>Title:</strong> -->
|
||||
<!-- <span wicket:id="projectTitle"></span> -->
|
||||
<!-- </h5> -->
|
||||
|
||||
<div class="box-title rounded" wicket:id="projectTitle"></div>
|
||||
|
||||
<div>
|
||||
<strong>Date:</strong>
|
||||
<span wicket:id="seminarDate"></span>
|
||||
@ -48,8 +52,8 @@
|
||||
<tr wicket:id="seminarFiles">
|
||||
<td><span wicket:id="fileName"></span></td>
|
||||
<td wicket:id="uploadDate"></td>
|
||||
<td><a href="#" wicket:id="open"><img src="images/icons/document-preview_16x16.png" alt="Open/Preview"/></a></td>
|
||||
<td><a href="#" wicket:id="download"><img src="images/icons/download_16x16.png" alt="Download"/></a></td>
|
||||
<td><a href="#" wicket:id="open"><img wicket:id="openIcon" alt="Open/Preview"/></a></td>
|
||||
<td><a href="#" wicket:id="download"><img wicket:id="downloadIcon" alt="Download"/></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -68,8 +72,8 @@
|
||||
<tr wicket:id="opponentFiles">
|
||||
<td><span wicket:id="fileName"></span></td>
|
||||
<td wicket:id="uploadDate"></td>
|
||||
<td><a href="#" wicket:id="open"><img src="images/icons/document-preview_16x16.png" alt="Open/Preview"/></a></td>
|
||||
<td><a href="#" wicket:id="download"><img src="images/icons/download_16x16.png" alt="Download"/></a></td>
|
||||
<td><a href="#" wicket:id="open"><img wicket:id="openIcon" alt="Open/Preview"/></a></td>
|
||||
<td><a href="#" wicket:id="download"><img wicket:id="downloadIcon" alt="Download"/></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -23,6 +23,7 @@ import se.su.dsv.scipro.data.dataobjects.FinalSeminarOpposition;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.project.pages.ProjectOppositionPage;
|
||||
import se.su.dsv.scipro.repository.components.FileDownloadLink;
|
||||
import se.su.dsv.scipro.repository.components.FileOpenLink;
|
||||
@ -110,8 +111,8 @@ public class ProjectOppositionsPanel extends Panel {
|
||||
fileItem.add(new Label("fileName", fd.getName()));
|
||||
fileItem.add(new DateFormatter().createFormattedDateLabel("uploadDate", seminar.getDocumentUploadDate()));
|
||||
|
||||
fileItem.add(new FileDownloadLink("download", fileItem.getModel()));
|
||||
fileItem.add(new FileOpenLink("open", fileItem.getModel()));
|
||||
fileItem.add(new FileDownloadLink("download", fileItem.getModel()).add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN)));
|
||||
fileItem.add(new FileOpenLink("open", fileItem.getModel()).add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW)));
|
||||
|
||||
}
|
||||
|
||||
@ -157,8 +158,8 @@ public class ProjectOppositionsPanel extends Panel {
|
||||
opponentFileItem.add(new Label("fileName", fd.getName()));
|
||||
opponentFileItem.add(new DateFormatter().createFormattedDateLabel("uploadDate", opposition.getDateReported()));
|
||||
|
||||
opponentFileItem.add(new FileDownloadLink("download", opponentFileItem.getModel()));
|
||||
opponentFileItem.add(new FileOpenLink("open", opponentFileItem.getModel()));
|
||||
opponentFileItem.add(new FileDownloadLink("download", opponentFileItem.getModel()).add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN)));
|
||||
opponentFileItem.add(new FileOpenLink("open", opponentFileItem.getModel()).add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW)));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -11,6 +11,7 @@ import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.peer.data.dao.queryresultobjects.StudentKeyValuePair;
|
||||
import se.su.dsv.scipro.peer.data.dao.queryresultobjects.UserPeerStats;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerReview;
|
||||
|
||||
/**
|
||||
@ -62,6 +63,8 @@ public interface PeerReviewDao extends LazyDeleteDao<PeerReview> {
|
||||
public List<PeerReview> findReviewsSortedByDate(final int firstResult, final Integer limit);
|
||||
|
||||
public List<PeerReview> findReviewsSortedByDate();
|
||||
|
||||
public PeerReview findReviewByRequest(final PeerRequest request);
|
||||
|
||||
/**
|
||||
* Find given peer reviews for a given project and student
|
||||
|
@ -21,6 +21,7 @@ import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.peer.data.dao.interfaces.PeerReviewDao;
|
||||
import se.su.dsv.scipro.peer.data.dao.queryresultobjects.StudentKeyValuePair;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerReview;
|
||||
|
||||
/**
|
||||
@ -543,4 +544,29 @@ public class PeerReviewDaoJPAImp extends LazyDeleteAbstractDaoJPAImp<PeerReview>
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public PeerReview findReviewByRequest(final PeerRequest request){
|
||||
return getJpaTemplate().execute(new JpaCallback<PeerReview>() {
|
||||
public PeerReview doInJpa(EntityManager em)
|
||||
throws PersistenceException {
|
||||
|
||||
String q = "select pr " +
|
||||
"from PeerReview pr " +
|
||||
"where pr.peerRequest = :request " +
|
||||
"and pr.deleted = false " +
|
||||
"and pr.aborted = false";
|
||||
|
||||
TypedQuery<PeerReview> query = em.createQuery(q, PeerReview.class);
|
||||
|
||||
query.setParameter("request", request);
|
||||
|
||||
try {
|
||||
return query.getSingleResult();
|
||||
} catch (NoResultException e) {
|
||||
return new PeerReview();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,24 @@
|
||||
package se.su.dsv.scipro.peer.enums;
|
||||
|
||||
public enum RequestStatus {
|
||||
WAITING, TAKEN, FINISHED, CANCELED
|
||||
WAITING {
|
||||
public String toString() {
|
||||
return "Awaiting review";
|
||||
}
|
||||
},
|
||||
TAKEN {
|
||||
public String toString() {
|
||||
return "Review in progress";
|
||||
}
|
||||
},
|
||||
FINISHED {
|
||||
public String toString() {
|
||||
return "Review completed";
|
||||
}
|
||||
},
|
||||
CANCELED {
|
||||
public String toString() {
|
||||
return "Canceled";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,10 +35,10 @@ public abstract class AbstractProjectPeerPage extends ProjectPage {
|
||||
@Override
|
||||
protected List<MenuItem> getItemList() {
|
||||
final List<MenuItem> items = new ArrayList<MenuItem>();
|
||||
items.add(new MenuItem("Peer portal", ProjectPeerPortalPage.class, ImageIcon.ICON_FIND));
|
||||
items.add(new MenuItem("My requests & reviews", ProjectPeerStatsPage.class, MenuHighlightReviewPage.class, ImageIcon.ICON_STATISTICS));
|
||||
items.add(new MenuItem("Request peer review", PeerRequestSubmissionPage.class, ImageIcon.ICON_ADD));
|
||||
items.add(new MenuItem("How to write a good review", ProjectPeerReviewGuidePage.class, ImageIcon.ICON_HELP));
|
||||
items.add(new MenuItem("Peer portal", ProjectPeerPortalPage.class));
|
||||
items.add(new MenuItem("My requests & reviews", ProjectPeerStatsPage.class, MenuHighlightReviewPage.class));
|
||||
items.add(new MenuItem("Request peer review", PeerRequestSubmissionPage.class));
|
||||
items.add(new MenuItem("How to write a good review", ProjectPeerReviewGuidePage.class));
|
||||
return items;
|
||||
}
|
||||
|
||||
|
@ -3,10 +3,12 @@
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:extend>
|
||||
<div wicket:id="dialog">
|
||||
<div wicket:id="checkListDialog"></div>
|
||||
<div><input type="button" value="Close" wicket:id="closeLink" /></div>
|
||||
</div>
|
||||
<div wicket:id="dialog">
|
||||
<div wicket:id="checkListDialog"></div>
|
||||
<div>
|
||||
<input type="button" value="Close" wicket:id="closeLink" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="span-22">
|
||||
<div wicket:id="feedbackPanel"></div>
|
||||
<form wicket:id="requestForm" class="wizard-form">
|
||||
@ -35,15 +37,17 @@
|
||||
<div class="span-11 first">
|
||||
<h5 class="peer-title" wicket:id="fileUploadLabel">[Step 2 -
|
||||
Attach a file *]</h5>
|
||||
<input wicket:id="fileUpload" type="file" style="margin-top:2em;"/>
|
||||
<input wicket:id="fileUpload" type="file"
|
||||
style="margin-top: 2em;" />
|
||||
<wicket:enclosure child="linkResource">
|
||||
<div wicket:id="linkResourceLabel">[Or choose existing resource]</div>
|
||||
<div wicket:id="linkResourceLabel">[Or choose existing
|
||||
resource]</div>
|
||||
<select wicket:id="linkResource">
|
||||
<option selected value="0"></option>
|
||||
<option value="somefile.txt">somefile</option>
|
||||
<option value="anotherfile.txt">anotherfile</option>
|
||||
</select>
|
||||
</wicket:enclosure>
|
||||
</wicket:enclosure>
|
||||
</div>
|
||||
|
||||
<div class="span-11 last">
|
||||
@ -57,52 +61,63 @@
|
||||
<h5 class="peer-title">Step 4 - Select a suitable review
|
||||
template (optional)</h5>
|
||||
<div wicket:id="listContainer">
|
||||
<table class="rounded-table">
|
||||
<tr>
|
||||
<th>Select</th>
|
||||
<th class="span-16">Name</th>
|
||||
<th>Questions</th>
|
||||
<th>Preview</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Select</th>
|
||||
<th class="span-16">Name</th>
|
||||
<th>Questions</th>
|
||||
<th class="rounded-right-top">Preview</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<wicket:enclosure>
|
||||
<tr>
|
||||
<td colspan="5"><i><span
|
||||
wicket:id="noTemplatesFoundMsg"></span>
|
||||
</i>
|
||||
</td>
|
||||
</tr>
|
||||
<span wicket:id="radioGroup">
|
||||
<tr wicket:id="templateList">
|
||||
<td><input type="radio" wicket:id="radio" /></td>
|
||||
<td class="span-16"><span wicket:id="templateName"></span>
|
||||
</td>
|
||||
<td><span wicket:id="templateNumQuestions"></span>
|
||||
</td>
|
||||
<td><a href="#" wicket:id="templateLink"><img src="images/icons/document-preview_16x16.png" class="icon-16" alt="Preview template"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr wicket:enclosure="noTemp">
|
||||
</wicket:enclosure>
|
||||
<wicket:container wicket:id="radioGroup">
|
||||
<!-- <span wicket:id="radioGroup"> -->
|
||||
<tr wicket:id="templateList">
|
||||
<td><input type="radio" wicket:id="radio" /></td>
|
||||
<td class="span-16"><span wicket:id="templateName"></span>
|
||||
</td>
|
||||
<td><span wicket:id="templateNumQuestions"></span></td>
|
||||
<td><a href="#" wicket:id="templateLink">
|
||||
<img wicket:id="viewIcon" alt="Preview template" />
|
||||
</a></td>
|
||||
</tr>
|
||||
<wicket:enclosure>
|
||||
<tr>
|
||||
<td><input type="radio" wicket:id="noTemp"/></td>
|
||||
<td class="span-16">No template</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</span>
|
||||
<tr>
|
||||
<td wicket:id="pager" colspan="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"></td>
|
||||
</tr>
|
||||
</wicket:enclosure>
|
||||
<!-- </span> -->
|
||||
</wicket:container>
|
||||
<tr>
|
||||
<td wicket:id="pager" colspan="5"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<h5 class="peer-title">Step 5 - Submit your request</h5>
|
||||
<div wicket:id="feedbackPanel">
|
||||
<!-- The feedback panel -->
|
||||
</div>
|
||||
<div>
|
||||
<button wicket:id="submitButton" class="button">
|
||||
Submit your request for review
|
||||
</button>
|
||||
<button wicket:id="submitButton" class="button right">Submit
|
||||
your request for review</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -37,6 +37,7 @@ import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.exceptions.AccessDeniedException;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.peer.data.dao.controllers.PeerPortalController;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
import se.su.dsv.scipro.peer.enums.RequestStatus;
|
||||
@ -163,6 +164,8 @@ public class PeerRequestSubmissionPage extends AbstractProjectPeerPage {
|
||||
};
|
||||
item.add(templateLink);
|
||||
|
||||
templateLink.add(new ImageObject("viewIcon", ImageObject.TWENTYFOUR + ImageObject.DOCUMENT_VIEW));
|
||||
|
||||
Label templateQuestion = new Label("templateNumQuestions", new PropertyModel<String>(item.getModel(), "numberOfQuestions"));
|
||||
item.add(templateQuestion);
|
||||
|
||||
|
@ -10,6 +10,8 @@ import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.peer.panels.StudentPeerInfoRequestsPanel;
|
||||
import se.su.dsv.scipro.peer.panels.StudentPeerInfoReviewsPanel;
|
||||
import se.su.dsv.scipro.peer.panels.StudentPeerRequestInfoPanel;
|
||||
import se.su.dsv.scipro.peer.panels.StudentPeerReviewInfoPanel;
|
||||
|
||||
public class ProjectPeerStatsPage extends AbstractProjectPeerPage {
|
||||
|
||||
@ -22,7 +24,7 @@ public class ProjectPeerStatsPage extends AbstractProjectPeerPage {
|
||||
final Project project = SciProSession.get().getActiveProject();
|
||||
final Student student = roleDao.findStudentRole(SciProSession.get().getUser());
|
||||
|
||||
add(new StudentPeerInfoReviewsPanel("reviewStats", student, project){
|
||||
add(new StudentPeerReviewInfoPanel("reviewStats", student, project){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
@ -32,7 +34,7 @@ public class ProjectPeerStatsPage extends AbstractProjectPeerPage {
|
||||
|
||||
});
|
||||
|
||||
add(new StudentPeerInfoRequestsPanel("requestStats", student, project){
|
||||
add(new StudentPeerRequestInfoPanel("requestStats", student, project){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
|
@ -1,33 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<html
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:extend>
|
||||
<div class="span-22 last">
|
||||
<div class="span-22 last append-bottom">
|
||||
<label for="roleSelection">My project role: </label><select id="roleSelection" wicket:id="roleSelection"></select>
|
||||
<label for="statusOptionsDD">Project status: </label><select id="statusOptionsDD" wicket:id="statusOptionsDD"></select>
|
||||
</div>
|
||||
<div wicket:id="projectListContainer" class="span-22 last">
|
||||
<i><span wicket:id="noProjectMessage"></span></i>
|
||||
<div wicket:id="projectList" class="span-22 last append-bottom bordered-box">
|
||||
<h5 class="bordered-box-title" wicket:id="projectTitle"></h5>
|
||||
<div class="bordered-box-content">
|
||||
<wicket:extend>
|
||||
<div class="span-22 last">
|
||||
<div class="span-22 last append-bottom">
|
||||
<label for="roleSelection">My project role: </label><select
|
||||
id="roleSelection" wicket:id="roleSelection"></select> <label
|
||||
for="statusOptionsDD">Project status: </label><select
|
||||
id="statusOptionsDD" wicket:id="statusOptionsDD"></select>
|
||||
</div>
|
||||
<div wicket:id="projectListContainer" class="span-22 last">
|
||||
<i><span wicket:id="noProjectMessage"></span></i>
|
||||
<div wicket:id="projectList" class="span-22 last append-bottom">
|
||||
<h5 class="peer-title" wicket:id="projectTitle"></h5>
|
||||
<!-- <div class="bordered-box-content"> -->
|
||||
<div class="span-10 append-1">
|
||||
<div wicket:id="studentList" class="append-bottom">
|
||||
<div class="rounded-border">
|
||||
<h5 wicket:id="student" class="bold"></h5>
|
||||
<div wicket:id="studentReviews"></div>
|
||||
|
||||
<!-- <div class="rounded-border"> -->
|
||||
<!-- <h5 wicket:id="student" class="bold"></h5> -->
|
||||
<!-- <div wicket:id="studentReviews"></div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<div class="rounded-box">
|
||||
<span class="box-title rounded" wicket:id="student">Round
|
||||
box</span> <span wicket:id="studentReviews">With a heading</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span-10 last rounded-border">
|
||||
<h5 class="bold">Reviews on this project</h5>
|
||||
<div wicket:id="projectRequests"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <div class="span-10 last rounded-border"> -->
|
||||
<!-- <h5 class="bold">Reviews on this project</h5> -->
|
||||
<!-- <div wicket:id="projectRequests"></div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
|
||||
|
||||
<div class="rounded-box span-10 last">
|
||||
<span class="box-title rounded">Reviews on this project</span>
|
||||
<span wicket:id="projectRequests">With a heading</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</wicket:extend>
|
||||
</wicket:extend>
|
||||
</body>
|
||||
</html>
|
@ -7,31 +7,37 @@
|
||||
<wicket:panel>
|
||||
|
||||
<form wicket:id="form">
|
||||
|
||||
<div class="question-rounded-box append-bottom">
|
||||
<div class="question-feedback" wicket:id="feedback"></div>
|
||||
<table class="question-header-table">
|
||||
<tr>
|
||||
<td class="question-header-td-number"><span wicket:id="questionNumber"></span></td>
|
||||
<td style="text-align:left;"><strong><span wicket:id="question">What's your favorite color?'</span></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div wicket:id="trafficLights"></div>
|
||||
<div class="rounded-box">
|
||||
<div class="span-22 last" wicket:id="feedback"></div>
|
||||
|
||||
<div class="span-22 last"><span wicket:id="questionNumber"></span><strong><span wicket:id="question">What's your favorite color?'</span></strong></div>
|
||||
|
||||
<div class="span-10" wicket:id="trafficLights"></div>
|
||||
<div class="span-3">
|
||||
<table wicket:id="displayAnswerContainer">
|
||||
<tbody class="span-5">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><img wicket:id="image"/></td>
|
||||
<td><label wicket:id="answerLabel"></label></td>
|
||||
</tr>
|
||||
<tr><td><label wicket:id="answerLabel"></label></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div wicket:id="freeTextContainer">
|
||||
<div><label for="freeText" wicket:id="freeTextHeading"></label></div>
|
||||
<textarea class="" id="freeText" wicket:id="freeTextInput"></textarea>
|
||||
<textarea wicket:id="freeTextInput"></textarea>
|
||||
<div wicket:id="freeTextDisplay"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -18,14 +18,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
<h5 class="peer-title" wicket:id="commentsHeading">General comments</h5>
|
||||
<div wicket:id="reviewComment"></div>
|
||||
|
||||
<h5 class="peer-title">Attached file</h5>
|
||||
<div>
|
||||
<div class="rounded-box">
|
||||
<span wicket:id="fileName">utkast_bakgrund.pdf</span>
|
||||
<a href="#" wicket:id="open"><img src="images/icons/document-preview_16x16.png" alt="Open/Preview"/></a>
|
||||
<a href="#" wicket:id="download"><img src="images/icons/download_16x16.png" alt="Download"/></a>
|
||||
<a href="#" wicket:id="open"><img wicket:id="openIcon" alt="Open/Preview"/></a>
|
||||
<a href="#" wicket:id="download"><img wicket:id="downloadIcon" alt="Download"/></a>
|
||||
</div>
|
||||
|
||||
</wicket:panel>
|
||||
|
@ -17,6 +17,7 @@ import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
|
||||
import se.su.dsv.scipro.data.DomainObjectDetachableModel;
|
||||
import se.su.dsv.scipro.data.dataobjects.FileDescription;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.peer.data.dao.interfaces.PeerReviewDao;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.Answer;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerReview;
|
||||
@ -74,19 +75,7 @@ public class DisplayReviewPanel extends Panel {
|
||||
}
|
||||
};
|
||||
add(questionList);
|
||||
|
||||
add(new WebMarkupContainer("commentsHeading"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return reviewModel.getObject().getComment() != null;
|
||||
}
|
||||
});
|
||||
|
||||
final MultiLineLabel reviewComment = new MultiLineLabel("reviewComment", new PropertyModel<String>(reviewModel, "comment"));
|
||||
add(reviewComment);
|
||||
|
||||
|
||||
|
||||
IModel<FileDescription> fileModel = new PropertyModel<FileDescription>(reviewModel,"file");
|
||||
if(fileModel.getObject() != null){
|
||||
add(new Label("fileName", fileModel.getObject().getName()));
|
||||
@ -94,20 +83,28 @@ public class DisplayReviewPanel extends Panel {
|
||||
add(new Label("fileName", "No file attached"));
|
||||
}
|
||||
|
||||
add(new FileDownloadLink("download", fileModel){
|
||||
FileDownloadLink downloadLink = new FileDownloadLink("download", fileModel){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return isEnabled();
|
||||
}
|
||||
});
|
||||
add(new FileOpenLink("open", fileModel ){
|
||||
};
|
||||
|
||||
add(downloadLink);
|
||||
downloadLink.add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN));
|
||||
|
||||
FileOpenLink openLink = new FileOpenLink("open", fileModel ){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return isEnabled();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
add(openLink);
|
||||
openLink.add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,42 +27,25 @@
|
||||
<div wicket:id="feedbackPanel"></div>
|
||||
|
||||
<!-- List of available reviews -->
|
||||
<div class="prepend-top append-bottom span-14 last">
|
||||
<div class="prepend-top append-bottom">
|
||||
<!-- Review -->
|
||||
<div wicket:id="topNavigator" class="append-bottom"></div>
|
||||
<div wicket:id="requestList" class="append-bottom span-14 last bordered-box">
|
||||
<h5 wicket:id="projectTitle" class="bordered-box-title">The superduper project</h5>
|
||||
<div class="peer-request-content bordered-box-content">
|
||||
<div class="">
|
||||
<span>Requested </span>
|
||||
<span wicket:id="requestDate">2011-03-06 16:23</span>
|
||||
<span>by</span>
|
||||
<span wicket:id="requester">Hugo Hansson</span>
|
||||
<span> has given <strong wicket:id="given">5</strong> and received <strong wicket:id="received">3</strong> reviews</span>
|
||||
</div>
|
||||
|
||||
<div class="append-bottom">
|
||||
<strong>Review template: </strong>
|
||||
<span wicket:id="templateName"></span>
|
||||
</div>
|
||||
<div>
|
||||
<strong>Comment from submitter: </strong>
|
||||
<div>
|
||||
<span wicket:id="requestComment"></span>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<div wicket:id="requestList" class="append-bottom rounded-box">
|
||||
|
||||
<a wicket:id="reviewLink" href="#" class="button">Review this request
|
||||
|
||||
</a>
|
||||
<div class="box-title rounded"><span wicket:id="projectTitle"></span><span class="right" wicket:id="showDetailsIcon"></span></div>
|
||||
|
||||
<div class="prepend-top">
|
||||
|
||||
<span wicket:id="notReviewableMsg" class="disabled-button">
|
||||
</span>
|
||||
<strong>Requested by: </strong>
|
||||
<span wicket:id="requester">Hugo Hansson</span>
|
||||
<span>who has given <strong wicket:id="given">5</strong> and received <strong wicket:id="received">3</strong> reviews</span>
|
||||
<br />
|
||||
<strong>Date: </strong><span wicket:id="requestDate">2011-03-06 16:23</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div wicket:id="requestDetailsContainer" style="display:none;">
|
||||
<div wicket:id="requestDetails"></div></div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- End review -->
|
||||
<div wicket:id="bottomNavigator"></div>
|
||||
@ -73,19 +56,19 @@
|
||||
<div class="span-6 last">
|
||||
<wicket:enclosure>
|
||||
<div class="rounded-box">
|
||||
<span class="box-title">Latest reviewers</span>
|
||||
<span class="box-title rounded">Latest reviewers</span>
|
||||
<div wicket:id="latestReviewPanel" class="append-bottom"></div>
|
||||
</div>
|
||||
</wicket:enclosure>
|
||||
<wicket:enclosure>
|
||||
<div class="rounded-box">
|
||||
<span class="box-title">Most frequent reviewers</span>
|
||||
<span class="box-title rounded">Most frequent reviewers</span>
|
||||
<div wicket:id="mostFrequentPanel" class="append-bottom"></div>
|
||||
</div>
|
||||
</wicket:enclosure>
|
||||
|
||||
<div class="rounded-box" wicket:id="bestRatedContainer">
|
||||
<span class="box-title">Best rated reviewers</span>
|
||||
<span class="box-title rounded">Best rated reviewers</span>
|
||||
<div wicket:id="bestRatedPanel" class="append-bottom"></div>
|
||||
</div>
|
||||
<div wicket:id="statsTimespanContainer">
|
||||
|
@ -2,40 +2,37 @@ package se.su.dsv.scipro.peer.panels;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.wicket.PageParameters;
|
||||
|
||||
import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||
|
||||
import org.apache.wicket.markup.html.WebMarkupContainer;
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.link.Link;
|
||||
|
||||
import org.apache.wicket.markup.html.list.ListItem;
|
||||
import org.apache.wicket.markup.html.list.PageableListView;
|
||||
import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;
|
||||
import org.apache.wicket.markup.html.panel.EmptyPanel;
|
||||
import org.apache.wicket.markup.html.panel.FeedbackPanel;
|
||||
import org.apache.wicket.markup.html.panel.Panel;
|
||||
import org.apache.wicket.model.Model;
|
||||
import org.apache.wicket.model.PropertyModel;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
import org.apache.wicket.util.string.Strings;
|
||||
import org.odlabs.wiquery.core.effects.EffectSpeed;
|
||||
|
||||
import se.su.dsv.scipro.components.ExpandableMultiLineLabel;
|
||||
import se.su.dsv.scipro.components.InvisiblePanel;
|
||||
import se.su.dsv.scipro.components.SciProTooltipBehavior;
|
||||
import se.su.dsv.scipro.data.dao.interfaces.GeneralSystemSettingsDao;
|
||||
import se.su.dsv.scipro.data.dataobjects.GeneralSystemSettings;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.ProjectClass;
|
||||
import se.su.dsv.scipro.data.dataobjects.ProjectClassSettings;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.exceptions.UpdatedSincePageLoadException;
|
||||
import se.su.dsv.scipro.peer.data.dao.controllers.NotReviewableReason;
|
||||
import se.su.dsv.scipro.icons.ExpandContractActionIcon;
|
||||
import se.su.dsv.scipro.peer.data.dao.controllers.PeerPortalController;
|
||||
import se.su.dsv.scipro.peer.data.dao.controllers.Tuple;
|
||||
import se.su.dsv.scipro.peer.data.dao.interfaces.PeerReviewDao;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerReview;
|
||||
import se.su.dsv.scipro.peer.pages.ProjectPeerPortalPage;
|
||||
import se.su.dsv.scipro.peer.pages.ProjectPeerReviewPage;
|
||||
import se.su.dsv.scipro.util.DateFormatter;
|
||||
import se.su.dsv.scipro.util.JavascriptEventConfirmation;
|
||||
import se.su.dsv.scipro.util.WiQueryCoreEffectsHelper;
|
||||
|
||||
public class PeerPortalPanel extends Panel {
|
||||
|
||||
@ -90,15 +87,13 @@ public class PeerPortalPanel extends Panel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected void populateItem(ListItem<Tuple> item) {
|
||||
protected void populateItem(final ListItem<Tuple> item) {
|
||||
final PeerRequest request = item.getModelObject().peerRequest;
|
||||
final boolean isReviewable = item.getModelObject().isReviewable;
|
||||
final NotReviewableReason notReviewableReason = item.getModelObject().notReviewableReason;
|
||||
final String projectTitle = request.getProject().getTitle();
|
||||
final int daysToComplete = projectClassSettings.getNumDaysToSubmitPeerReview();
|
||||
item.add(new Label("projectTitle", projectTitle ));
|
||||
item.add(new DateFormatter().createFormattedDateLabel("requestDate", request.getDateCreated()));
|
||||
item.add(request.getRequester().getUser().getDisplayComponent("requester"));
|
||||
item.add(new DateFormatter(DateFormatter.FORMAT.EXTENDED).createFormattedDateLabel("requestDate", request.getDateCreated()));
|
||||
item.add(new Label("requester",request.getRequester().getUser().toString()));
|
||||
|
||||
Student requestingStudent = request.getRequester();
|
||||
Project requestingProject = request.getProject();
|
||||
@ -106,71 +101,33 @@ public class PeerPortalPanel extends Panel {
|
||||
Integer received = peerReviewDao.countReviewsReceived(requestingStudent, requestingProject);
|
||||
item.add(new Label("given", given.toString() ));
|
||||
item.add(new Label("received", received.toString() ));
|
||||
|
||||
item.add(new Label("templateName", new Model<String>(){
|
||||
|
||||
final WebMarkupContainer requestDetailsContainer = new WebMarkupContainer("requestDetailsContainer");
|
||||
requestDetailsContainer.setOutputMarkupId(true);
|
||||
requestDetailsContainer.add(new EmptyPanel("requestDetails"));
|
||||
item.add(requestDetailsContainer);
|
||||
final ExpandContractActionIcon showDetailsIcon = new ExpandContractActionIcon("showDetailsIcon"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public String getObject(){
|
||||
return request.getCheckListTemplate() != null ? request.getCheckListTemplate().getName() : "No template attached";
|
||||
}
|
||||
}));
|
||||
|
||||
if(request.getComment() != null){
|
||||
item.add(new ExpandableMultiLineLabel("requestComment", 50, request.getComment(), false));
|
||||
} else {
|
||||
item.add(new Label("requestComment", "No comment provided"));
|
||||
}
|
||||
|
||||
Link<Void> reviewLink = new Link<Void>("reviewLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return isReviewable;
|
||||
public void onExpand(AjaxRequestTarget target) {
|
||||
requestDetailsContainer.replace(new RequestDetailsPanel("requestDetails", item.getModelObject(), student, project, daysToComplete));
|
||||
target.addComponent(requestDetailsContainer);
|
||||
target.appendJavascript(WiQueryCoreEffectsHelper.slideDownJs(requestDetailsContainer, EffectSpeed.FAST));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick() {
|
||||
try{
|
||||
PeerReview review = peerPortalController.acceptReview(request, student, project);
|
||||
PageParameters pp = new PageParameters();
|
||||
pp.put(PeerReview.PP_PEER_REVIEW_ID, review.getId());
|
||||
setResponsePage(ProjectPeerReviewPage.class, pp);
|
||||
} catch (UpdatedSincePageLoadException ue) {
|
||||
error("Another user has already accepted the request, please choose another one");
|
||||
setResponsePage(ProjectPeerPortalPage.class);
|
||||
} catch (Exception e){
|
||||
error("An error occured, please try again");
|
||||
setResponsePage(ProjectPeerPortalPage.class);
|
||||
}
|
||||
public void onContract(AjaxRequestTarget target) {
|
||||
target.appendJavascript(WiQueryCoreEffectsHelper.slideUpJs(requestDetailsContainer, EffectSpeed.FAST));
|
||||
}
|
||||
|
||||
};
|
||||
if(isReviewable){
|
||||
String confirmString = "Please confirm that you want to peer review \""+projectTitle+"\" within "+daysToComplete+" days.";
|
||||
confirmString = Strings.escapeMarkup(confirmString, true, true).toString();
|
||||
reviewLink.add(new JavascriptEventConfirmation("onClick", confirmString));
|
||||
}
|
||||
item.add(reviewLink);
|
||||
|
||||
Label notReviewableMsg = new Label("notReviewableMsg", "You cannot review this request"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return !isReviewable;
|
||||
}
|
||||
};
|
||||
item.add(notReviewableMsg);
|
||||
|
||||
if( notReviewableReason != null){
|
||||
notReviewableMsg.add( new SciProTooltipBehavior( notReviewableReason.toString() ) );
|
||||
}
|
||||
item.add(showDetailsIcon);
|
||||
|
||||
add(item);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
add(requestList);
|
||||
|
||||
class RequestListNavigator extends PagingNavigator{
|
||||
@ -183,10 +140,10 @@ public class PeerPortalPanel extends Panel {
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
if(visible == null){
|
||||
if(REQUESTS_PER_PAGE > requestList.getViewSize()){
|
||||
visible = false;
|
||||
} else {
|
||||
if(requestList.getPageCount() > 1){
|
||||
visible = true;
|
||||
} else {
|
||||
visible = false;
|
||||
}
|
||||
}
|
||||
return visible;
|
||||
|
@ -6,40 +6,39 @@
|
||||
|
||||
<div class="span-22 prepend-top last">
|
||||
<div wicket:id="feedback"></div>
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<tr>
|
||||
<th>Date Created</th>
|
||||
<th>Level</th>
|
||||
<th>Project</th>
|
||||
<th>Requester</th>
|
||||
<th>Head Supervisor</th>
|
||||
<th>Request Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr wicket:id="peer-request">
|
||||
<td><span wicket:id="date" class="span-2"></span>
|
||||
</td>
|
||||
<td><span wicket:id="projectClass"></span>
|
||||
</td>
|
||||
<td><span wicket:id="title"></span>
|
||||
</td>
|
||||
<td><span wicket:id="requester"></span>
|
||||
</td>
|
||||
<td><span wicket:id="headSupervisor"></span>
|
||||
</td>
|
||||
<td><span wicket:id="requestStatus"></span>
|
||||
</td>
|
||||
<td><a href="#" wicket:id="delete"><img
|
||||
src="images/icons/delete_16x16.png" alt="Delete" title="Delete" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="12"></td>
|
||||
</tr>
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rounded-left-top">Date Created</th>
|
||||
<th>Level</th>
|
||||
<th>Project</th>
|
||||
<th>Requester</th>
|
||||
<th>Head Supervisor</th>
|
||||
<th>Request Status</th>
|
||||
<th class="rounded-right-top"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="peer-request">
|
||||
<td><span wicket:id="date" class="span-2"></span></td>
|
||||
<td><span wicket:id="projectClass"></span></td>
|
||||
<td><span wicket:id="title"></span></td>
|
||||
<td><span wicket:id="requester"></span></td>
|
||||
<td><span wicket:id="headSupervisor"></span></td>
|
||||
<td><span wicket:id="requestStatus"></span></td>
|
||||
<td><a href="#" wicket:id="delete">
|
||||
<img wicket:id="deleteIcon" alt="Delete" title="Delete" />
|
||||
</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div wicket:id="pagingNavigator"></div>
|
||||
</div>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -17,6 +17,7 @@ import org.apache.wicket.markup.repeater.data.IDataProvider;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
|
||||
import se.su.dsv.scipro.data.dataobjects.User;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.peer.data.dao.interfaces.PeerRequestDao;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
import se.su.dsv.scipro.peer.enums.RequestStatus;
|
||||
@ -66,7 +67,7 @@ public class PeerRequestListPanel extends Panel {
|
||||
item.add(new Label("requester", peerRequest.getRequester().getUser().toString()));
|
||||
item.add(new Label("requestStatus", peerRequest.getStatus().toString()));
|
||||
|
||||
item.add(new AjaxLink<Void>("delete") {
|
||||
AjaxLink<Void> deleteLink = new AjaxLink<Void>("delete") {
|
||||
|
||||
private static final long serialVersionUID = 1529565679210978293L;
|
||||
|
||||
@ -96,14 +97,6 @@ public class PeerRequestListPanel extends Panel {
|
||||
protected IAjaxCallDecorator getAjaxCallDecorator() {
|
||||
return new AjaxCallDecorator() {
|
||||
private static final long serialVersionUID = 8989126586010432130L;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.wicket.ajax.calldecorator.
|
||||
* AjaxCallDecorator
|
||||
* #decorateScript(java.lang.CharSequence)
|
||||
*/
|
||||
@Override
|
||||
public CharSequence decorateScript(CharSequence script) {
|
||||
String ret = "if(!confirm('Are you sure you wish to cancel this waiting Peer request?')) return false; "
|
||||
@ -113,7 +106,10 @@ public class PeerRequestListPanel extends Panel {
|
||||
};
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
item.add(deleteLink);
|
||||
deleteLink.add(new ImageObject("deleteIcon", ImageObject.TWENTYFOUR + ImageObject.DELETE));
|
||||
|
||||
}
|
||||
};
|
||||
|
@ -5,15 +5,23 @@
|
||||
<wicket:panel>
|
||||
|
||||
<div class="span-22 prepend-top last">
|
||||
<table class="rounded-table seminar-table even-rows">
|
||||
<table class="rounded-corner">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date Accepted</th>
|
||||
<th class="rounded-left-top">Date Accepted</th>
|
||||
<th>Level</th>
|
||||
<th>Project</th>
|
||||
<th>Requester</th>
|
||||
<th>Reviewer</th>
|
||||
<th>Review Status</th>
|
||||
<th class="rounded-right-top">Review Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr wicket:id="peer-review">
|
||||
<td><span wicket:id="date" class="span-2"></span>
|
||||
</td>
|
||||
@ -28,9 +36,7 @@
|
||||
<td><a href="#" wicket:id="reviewLink"><span wicket:id="reviewStatus"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="12"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div wicket:id="pagingNavigator"></div>
|
||||
</div>
|
||||
|
@ -1,41 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<html
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:panel>
|
||||
|
||||
<div wicket:id="feedback"></div>
|
||||
<wicket:panel>
|
||||
|
||||
<!-- Left column -->
|
||||
<div class="span-12 colborder">
|
||||
<!-- Request details -->
|
||||
<div wicket:id="requestDetails" class="span-12 last"></div>
|
||||
<!-- End Request details -->
|
||||
|
||||
<!-- Review details -->
|
||||
<div wicket:id="reviewDetails" class="span-12 last">
|
||||
</div>
|
||||
<!-- End Review details -->
|
||||
|
||||
<!-- Review result -->
|
||||
<div class="span-12 last append-bottom last">
|
||||
|
||||
<div wicket:id="performReview"></div>
|
||||
<div wicket:id="displayReview"></div>
|
||||
|
||||
<div wicket:id="feedback"></div>
|
||||
|
||||
<div class="span-22 last">
|
||||
<h5 class="peer-title">
|
||||
<span wicket:id="projectTitleLabel"></span> <a class="white-link" href="#"
|
||||
wicket:id="backToMy"><span class="right"
|
||||
wicket:id="backLinkLabel"></span></a>
|
||||
</h5>
|
||||
</div>
|
||||
<!-- End review result -->
|
||||
|
||||
</div>
|
||||
<!-- End left column -->
|
||||
|
||||
<!-- Right column -->
|
||||
<div class="span-9 last">
|
||||
<div class="last">
|
||||
<h5 class="peer-title">Conference</h5>
|
||||
<div wicket:id="comments"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End right column -->
|
||||
</wicket:panel>
|
||||
|
||||
<!-- Left column -->
|
||||
<div class="span-22 last">
|
||||
<!-- Request details -->
|
||||
<div wicket:id="requestDetails" class="span-22 last"></div>
|
||||
<!-- End Request details -->
|
||||
|
||||
<!-- Review details -->
|
||||
<div wicket:id="reviewDetails" class="span-22 last"></div>
|
||||
<!-- End Review details -->
|
||||
|
||||
<!-- Review result -->
|
||||
<div class="span-22 last append-bottom last">
|
||||
|
||||
<div wicket:id="performReview"></div>
|
||||
<div wicket:id="displayReview"></div>
|
||||
|
||||
</div>
|
||||
<!-- End review result -->
|
||||
|
||||
</div>
|
||||
<!-- End left column -->
|
||||
|
||||
<!-- Right column -->
|
||||
<div class="span-22 last">
|
||||
<div class="last append-bottom">
|
||||
<h5 class="peer-title append-bottom">Communication</h5>
|
||||
<div wicket:id="comments"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End right column -->
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -1,6 +1,8 @@
|
||||
package se.su.dsv.scipro.peer.panels;
|
||||
|
||||
import org.apache.wicket.feedback.ContainerFeedbackMessageFilter;
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
||||
import org.apache.wicket.markup.html.panel.EmptyPanel;
|
||||
import org.apache.wicket.markup.html.panel.FeedbackPanel;
|
||||
import org.apache.wicket.markup.html.panel.Panel;
|
||||
@ -10,6 +12,9 @@ import se.su.dsv.scipro.SciProSession;
|
||||
import se.su.dsv.scipro.commentthread.panels.CommentThreadPanel;
|
||||
import se.su.dsv.scipro.data.dao.interfaces.ProjectDao;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerReview;
|
||||
import se.su.dsv.scipro.peer.pages.ProjectPeerStatsPage;
|
||||
import se.su.dsv.scipro.peer.pages.SupervisorPeerStatsPage;
|
||||
import se.su.dsv.scipro.supervisor.pages.SupervisorStartPage;
|
||||
|
||||
public class PeerReviewPanel extends Panel {
|
||||
|
||||
@ -20,11 +25,27 @@ public class PeerReviewPanel extends Panel {
|
||||
|
||||
public PeerReviewPanel(final String id, final PeerReview review, final boolean isSupervisorView) {
|
||||
super(id);
|
||||
|
||||
add(new Label("projectTitleLabel", review.getPeerRequest().getProject().getTitle()));
|
||||
|
||||
BookmarkablePageLink<Void> backToMyRR;
|
||||
if (isSupervisorView){
|
||||
backToMyRR = new BookmarkablePageLink<Void>("backToMy", SupervisorPeerStatsPage.class);
|
||||
backToMyRR.add(new Label("backLinkLabel", "Go back to My projects"));
|
||||
}
|
||||
else {
|
||||
backToMyRR = new BookmarkablePageLink<Void>("backToMy", ProjectPeerStatsPage.class);
|
||||
backToMyRR.add(new Label("backLinkLabel", "Go back to My requests & reviews "));
|
||||
}
|
||||
|
||||
|
||||
add(backToMyRR);
|
||||
|
||||
add(new ReviewPageRequestDetailsPanel("requestDetails", review.getPeerRequest()));
|
||||
PeerReviewPerformReviewPanel performReviewPanel = new PeerReviewPerformReviewPanel("performReview", review);
|
||||
add(performReviewPanel);
|
||||
add(new DisplayReviewPanel("displayReview", review));
|
||||
add(new CommentThreadPanel("comments",review, 4));
|
||||
add(new CommentThreadPanel("comments",review, 1000));
|
||||
//Details about the peers reviewer is available to the requester and the supervisors.
|
||||
if (isSupervisorView) {
|
||||
add(new ReviewPageReviewDetailsPanel("reviewDetails", review));
|
||||
|
@ -5,20 +5,9 @@
|
||||
>
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<wicket:enclosure>
|
||||
<div class="last append-bottom">
|
||||
<h5 class="peer-title">Comment from requester</h5>
|
||||
<div wicket:id="requestComment"></div>
|
||||
</div>
|
||||
</wicket:enclosure>
|
||||
<div class="append-bottom last span-12" wicket:id="reviewDueContainer">
|
||||
<h5 class="peer-title">Review deadline: <span wicket:id="deadlineDate"></span></h5>
|
||||
<div wicket:id="countDown" class="span-7 last"></div>
|
||||
</div>
|
||||
|
||||
<div class="span-12 last">
|
||||
<div class="span-22 last">
|
||||
<form wicket:id="reviewForm">
|
||||
<!-- <div wicket:id="topFeedbackPanel" class="last"></div>-->
|
||||
|
||||
<div class="prepend-top last">
|
||||
<h5 class="peer-title" wicket:id="questionsHeading">Questions *</h5>
|
||||
@ -28,21 +17,27 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="last append-bottom">
|
||||
<h5 class="peer-title" wicket:id="commentTitle">Your comments</h5>
|
||||
<textarea wicket:id="reviewComment"></textarea>
|
||||
</div>
|
||||
<div class="last append-bottom">
|
||||
<h5 class="peer-title">Attach a file (optional)</h5>
|
||||
<input type="file" wicket:id="reviewFileUpload"></input>
|
||||
<!-- <h5 class="peer-title">Attach a file (optional)</h5> -->
|
||||
<div class="info-box rounded-box last">
|
||||
<p>
|
||||
<b>Remember:</b>
|
||||
</p>
|
||||
<ul>
|
||||
<li>You must press "Submit peer review" for the review to be registered as finished!</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="rounded-box">
|
||||
|
||||
<span><strong>Attach a file (optional) :</strong></span>
|
||||
<input type="file" wicket:id="reviewFileUpload"></input>
|
||||
<span class="right"><button wicket:id="submitButton" class="button">Submit peer review
|
||||
</button></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="last">
|
||||
<button wicket:id="submitButton" class="button">Submit peer review
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
@ -88,44 +88,6 @@ public class PeerReviewPerformReviewPanel extends Panel {
|
||||
this.setVisible(false);
|
||||
}
|
||||
|
||||
MultiLineLabel requestComment = new MultiLineLabel("requestComment", peerReview.getPeerRequest().getComment());
|
||||
if(peerReview.getPeerRequest().getComment() == null)
|
||||
requestComment.setVisible(false);
|
||||
add(requestComment);
|
||||
|
||||
final WebMarkupContainer reviewDueContainer = new WebMarkupContainer("reviewDueContainer"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return !peerReview.isSubmitted();
|
||||
}
|
||||
};
|
||||
|
||||
if( !peerReview.isSubmitted() ){
|
||||
String onExpireRedirectUrl = RequestUtils.toAbsolutePath(
|
||||
RequestCycle.get().urlFor(ProjectPeerPortalPage.class, new PageParameters()).toString());
|
||||
|
||||
JsStatement stmt = new JsStatement().append(String.format(
|
||||
"alert(\'The deadline has passed and the review has been aborted\');" +
|
||||
"window.location = \'%s\'", onExpireRedirectUrl)
|
||||
);
|
||||
|
||||
int numDaysUntilDeadline = peerReview.getProject().getProjectClass().getProjectClassSettings().getNumDaysToSubmitPeerReview();
|
||||
DateTime deadline = new DateTime(peerReview.getDateCreated()).plusDays(numDaysUntilDeadline);
|
||||
Model<Date> deadlineModel = new Model<Date>(deadline.toDate());
|
||||
|
||||
final JavascriptCountdown jsc = new JavascriptCountdown("countDown", deadlineModel);
|
||||
jsc.setOnExpiryCallback(stmt);
|
||||
reviewDueContainer.add(jsc);
|
||||
|
||||
reviewDueContainer.add(new DateFormatter().createFormattedDateLabel("deadlineDate", deadlineModel));
|
||||
} else {
|
||||
reviewDueContainer.add(new EmptyPanel("countDown"));
|
||||
reviewDueContainer.add(new EmptyPanel("deadlineDate"));
|
||||
}
|
||||
add(reviewDueContainer);
|
||||
|
||||
reviewForm = new PerformReviewForm("reviewForm", new DomainObjectDetachableModel<PeerReview>(peerReviewDao, peerReview));
|
||||
add(reviewForm);
|
||||
|
||||
@ -136,7 +98,6 @@ public class PeerReviewPerformReviewPanel extends Panel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final ListView<Answer> questionList;
|
||||
private final TextArea<String> commentTextArea;
|
||||
private final Button submitButton;
|
||||
private FileUpload upload = null;
|
||||
|
||||
@ -155,7 +116,6 @@ public class PeerReviewPerformReviewPanel extends Panel {
|
||||
questions.add(q);
|
||||
}
|
||||
|
||||
add(new Label("commentTitle", "Your comments (optional)"));
|
||||
|
||||
if(reviewModel.getObject().getAnswers().isEmpty()){ //No answers exist, create empty ones for all questions
|
||||
for(Question q : questions){
|
||||
@ -166,9 +126,7 @@ public class PeerReviewPerformReviewPanel extends Panel {
|
||||
else {
|
||||
answers.addAll(reviewModel.getObject().getAnswers());
|
||||
}
|
||||
} else {
|
||||
add(new Label("commentTitle", "Your comments *"));
|
||||
}
|
||||
}
|
||||
ListModel<Answer> answersModel = new ListModel<Answer>(answers);
|
||||
questionList = new ListView<Answer>("questions", answersModel ) {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -199,9 +157,6 @@ public class PeerReviewPerformReviewPanel extends Panel {
|
||||
add(requestComment);*/
|
||||
|
||||
|
||||
commentTextArea = new TextArea<String>("reviewComment", new PropertyModel<String>(reviewModel, "comment"));
|
||||
add(commentTextArea);
|
||||
|
||||
add(new FileUploadField("reviewFileUpload", new PropertyModel<FileUpload>(this, "upload")));
|
||||
|
||||
submitButton = new Button("submitButton"){
|
||||
|
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div wicket:id="dialog">
|
||||
<div wicket:id="checkListDialog"></div>
|
||||
<div><input type="button" value="Close" wicket:id="closeLink" /></div>
|
||||
</div>
|
||||
<div class="append-bottom prepend-top">
|
||||
|
||||
<strong>Comment from submitter:</strong>
|
||||
<span wicket:id="requestComment"></span>
|
||||
</div>
|
||||
<wicket:enclosure child="download">
|
||||
<div>
|
||||
<strong>Attachment: </strong>
|
||||
<span wicket:id="fileName" >peer.pdf</span>
|
||||
<a href="#" wicket:id="open"><img src="images/icons/16/document_view.png" alt="Open/Preview"/></a>
|
||||
<a href="#" wicket:id="download"><img src="images/icons/16/document_down.png" alt="Download"/></a>
|
||||
</div>
|
||||
</wicket:enclosure>
|
||||
<div>
|
||||
<strong>Review template:</strong>
|
||||
<a href="#" wicket:id="templateLink"><span wicket:id="templateName"></span></a>
|
||||
</div>
|
||||
<div class="append-bottom">
|
||||
<a class="right append-05" wicket:id="reviewLink" href="#" >Review this request</a>
|
||||
<span class="right append-05" wicket:id="notReviewableMsg">
|
||||
</span>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,201 @@
|
||||
package se.su.dsv.scipro.peer.panels;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.wicket.PageParameters;
|
||||
import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||
import org.apache.wicket.ajax.markup.html.AjaxLink;
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.basic.MultiLineLabel;
|
||||
import org.apache.wicket.markup.html.link.Link;
|
||||
import org.apache.wicket.markup.html.panel.EmptyPanel;
|
||||
import org.apache.wicket.markup.html.panel.Panel;
|
||||
import org.apache.wicket.model.IModel;
|
||||
import org.apache.wicket.model.LoadableDetachableModel;
|
||||
import org.apache.wicket.model.Model;
|
||||
import org.apache.wicket.model.PropertyModel;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
import org.apache.wicket.util.string.Strings;
|
||||
import org.odlabs.wiquery.ui.dialog.Dialog;
|
||||
|
||||
import se.su.dsv.scipro.checklists.panels.ViewCheckListTemplatePanelPeer;
|
||||
import se.su.dsv.scipro.data.dao.interfaces.CheckListTemplateDao;
|
||||
import se.su.dsv.scipro.data.dao.interfaces.GeneralSystemSettingsDao;
|
||||
import se.su.dsv.scipro.data.dataobjects.CheckListTemplate;
|
||||
import se.su.dsv.scipro.data.dataobjects.FileDescription;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.exceptions.UpdatedSincePageLoadException;
|
||||
import se.su.dsv.scipro.peer.data.dao.controllers.NotReviewableReason;
|
||||
import se.su.dsv.scipro.peer.data.dao.controllers.PeerPortalController;
|
||||
import se.su.dsv.scipro.peer.data.dao.controllers.Tuple;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerReview;
|
||||
import se.su.dsv.scipro.peer.pages.ProjectPeerPortalPage;
|
||||
import se.su.dsv.scipro.peer.pages.ProjectPeerReviewPage;
|
||||
import se.su.dsv.scipro.repository.FileRepository;
|
||||
import se.su.dsv.scipro.repository.components.FileDownloadLink;
|
||||
import se.su.dsv.scipro.repository.components.FileOpenLink;
|
||||
import se.su.dsv.scipro.util.JavascriptEventConfirmation;
|
||||
|
||||
public class RequestDetailsPanel extends Panel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SpringBean
|
||||
private PeerPortalController peerPortalController;
|
||||
@SpringBean
|
||||
private FileRepository fileRepository;
|
||||
@SpringBean
|
||||
private GeneralSystemSettingsDao generalSystemSettingsDao;
|
||||
@SpringBean
|
||||
private CheckListTemplateDao checkListTemplateDao;
|
||||
|
||||
private Dialog dialog;
|
||||
|
||||
public RequestDetailsPanel(String id, final Tuple tuple, final Student student, final Project project, int daysToComplete) {
|
||||
super(id);
|
||||
final PeerRequest request = tuple.peerRequest;
|
||||
final Boolean isReviewable = tuple.isReviewable;
|
||||
final NotReviewableReason notReviewableReason = tuple.notReviewableReason;
|
||||
final String projectTitle = request.getProject().getTitle();
|
||||
final CheckListTemplate checkListTemplate = request.getCheckListTemplate();
|
||||
|
||||
dialog = new Dialog("dialog");
|
||||
dialog.setModal(true);
|
||||
dialog.setAutoOpen(false);
|
||||
dialog.setWidth(500);
|
||||
dialog.setHeight(400);
|
||||
dialog.add(new EmptyPanel("checkListDialog"));
|
||||
dialog.add(new EmptyPanel("closeLink"));
|
||||
add(dialog);
|
||||
|
||||
final IModel<CheckListTemplate> checkListTemplateModel = new LoadableDetachableModel<CheckListTemplate>() {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected CheckListTemplate load() {
|
||||
return checkListTemplateDao.load(checkListTemplate.getId());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
AjaxLink<Void> templateLink = new AjaxLink<Void>("templateLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
private ViewCheckListTemplatePanelPeer vclPanel;
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
vclPanel = new ViewCheckListTemplatePanelPeer("checkListDialog", checkListTemplateModel.getObject(), null);
|
||||
|
||||
AjaxLink<Void> closeLink = new AjaxLink<Void>("closeLink"){
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
dialog.close(target);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
dialog.replace(vclPanel);
|
||||
dialog.setTitle("Preview of chosen checklist template");
|
||||
dialog.replace(closeLink);
|
||||
target.addComponent(dialog);
|
||||
dialog.open(target);
|
||||
}
|
||||
|
||||
};
|
||||
templateLink.add(new Label("templateName", new Model<String>(){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public String getObject(){
|
||||
return checkListTemplate != null ? checkListTemplate.getName() : "No template attached";
|
||||
}
|
||||
}));
|
||||
templateLink.setEnabled(checkListTemplate != null);
|
||||
add(templateLink);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(request.getComment() != null){
|
||||
add(new MultiLineLabel("requestComment", request.getComment()));
|
||||
} else {
|
||||
add(new Label("requestComment", "No comment provided"));
|
||||
}
|
||||
|
||||
IModel<FileDescription> fileModel = new PropertyModel<FileDescription>(request,"file");
|
||||
if(fileModel.getObject() != null){
|
||||
add(new Label("fileName", new PropertyModel<String>(fileModel, "name")));
|
||||
} else {
|
||||
add(new Label("fileName", "No file provided"));
|
||||
}
|
||||
|
||||
add(new FileDownloadLink("download", fileModel) {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return generalSystemSettingsDao.getGeneralSystemSettingsInstance().isPeerDownloadEnabled();
|
||||
}
|
||||
});
|
||||
|
||||
add(new FileOpenLink("open", fileModel ));
|
||||
|
||||
Link<Void> reviewLink = new Link<Void>("reviewLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return isReviewable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick() {
|
||||
try{
|
||||
PeerReview review = peerPortalController.acceptReview(request, student, project);
|
||||
PageParameters pp = new PageParameters();
|
||||
pp.put(PeerReview.PP_PEER_REVIEW_ID, review.getId());
|
||||
setResponsePage(ProjectPeerReviewPage.class, pp);
|
||||
} catch (UpdatedSincePageLoadException ue) {
|
||||
error("Another user has already accepted the request, please choose another one");
|
||||
setResponsePage(ProjectPeerPortalPage.class);
|
||||
} catch (Exception e){
|
||||
error("An error occured, please try again");
|
||||
setResponsePage(ProjectPeerPortalPage.class);
|
||||
}
|
||||
}
|
||||
};
|
||||
if(isReviewable){
|
||||
String confirmString = "Please confirm that you want to peer review \""+projectTitle+"\" within "+daysToComplete+" days.";
|
||||
confirmString = Strings.escapeMarkup(confirmString, true, true).toString();
|
||||
reviewLink.add(new JavascriptEventConfirmation("onClick", confirmString));
|
||||
}
|
||||
add(reviewLink);
|
||||
|
||||
String reason = "You cannot review this request";
|
||||
|
||||
if( notReviewableReason != null)
|
||||
reason = notReviewableReason.toString();
|
||||
|
||||
Label notReviewableMsg = new Label("notReviewableMsg", reason){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return !isReviewable;
|
||||
}
|
||||
};
|
||||
add(notReviewableMsg);
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -5,23 +5,28 @@
|
||||
>
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<h5 class="peer-title">Request details</h5>
|
||||
<div class="span-8">
|
||||
<ul class="no-list-style">
|
||||
<li><strong>Project: </strong><span wicket:id="projectTitle">The superduper project</span></li>
|
||||
<li><strong>Request date: </strong><span wicket:id="requestDate">2011-03-06 16:23</span></li>
|
||||
<li><strong>Keywords: </strong>Not, Implemented, Yet</li>
|
||||
<li><strong>Requested by: </strong><span wicket:id="requester">Kalle Svensson</span></li>
|
||||
<li><strong>Status: </strong><span wicket:id="statusLabel">In progress</span></li>
|
||||
<li><strong>Deadline </strong><span wicket:id="deadline">20xx xx xx xx : xx</span></li>
|
||||
<li>
|
||||
<strong>Attachment: </strong>
|
||||
<span wicket:id="fileName" class="append-05">utkast_bakgrund.pdf</span>
|
||||
<a href="#" wicket:id="open"><img src="images/icons/document-preview_16x16.png" alt="Open/Preview"/></a>
|
||||
<a href="#" wicket:id="download"><img src="images/icons/download_16x16.png" alt="Download"/></a>
|
||||
</li>
|
||||
<li><strong>Requested by: </strong><span wicket:id="requester">Kalle Svensson</span></li>
|
||||
<li><strong>Supervisor: </strong><span wicket:id="supervisor">Ola Handledare</span></li>
|
||||
<li><strong>Request date: </strong><span wicket:id="requestDate">2011-03-06 16:23</span></li>
|
||||
<li>
|
||||
<strong>Review template: </strong>
|
||||
<span wicket:id="reviewTemplateName">Data collection (Bachelor)</span>
|
||||
<a href="#" wicket:id="open"><img wicket:id="openIcon" alt="Open/Preview"/></a>
|
||||
<a href="#" wicket:id="download"><img wicket:id="downloadIcon" alt="Download"/></a>
|
||||
</li>
|
||||
<li><div> </div></li>
|
||||
<li><span wicket:id="commentLabel"></span></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span-14 last">
|
||||
|
||||
</div>
|
||||
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -1,15 +1,21 @@
|
||||
package se.su.dsv.scipro.peer.panels;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.basic.MultiLineLabel;
|
||||
import org.apache.wicket.markup.html.link.Link;
|
||||
import org.apache.wicket.markup.html.panel.Panel;
|
||||
import org.apache.wicket.model.IModel;
|
||||
import org.apache.wicket.model.Model;
|
||||
import org.apache.wicket.model.PropertyModel;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import se.su.dsv.scipro.data.dataobjects.FileDescription;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
import se.su.dsv.scipro.peer.enums.RequestStatus;
|
||||
import se.su.dsv.scipro.repository.FileRepository;
|
||||
import se.su.dsv.scipro.repository.components.FileDownloadLink;
|
||||
import se.su.dsv.scipro.repository.components.FileOpenLink;
|
||||
@ -24,11 +30,11 @@ public class ReviewPageRequestDetailsPanel extends Panel {
|
||||
|
||||
public ReviewPageRequestDetailsPanel(final String id, final PeerRequest request){
|
||||
super(id);
|
||||
|
||||
add(new Label("projectTitle", request.getProject().getTitle()));
|
||||
|
||||
add(request.getRequester().getUser().getDisplayComponent("requester"));
|
||||
add(request.getProject().getHeadSupervisor().getUser().getDisplayComponent("supervisor"));
|
||||
add(new DateFormatter().createFormattedDateLabel("requestDate", request.getDateCreated()));
|
||||
add(new DateFormatter(DateFormatter.FORMAT.EXTENDED).createFormattedDateLabel("requestDate", request.getDateCreated()));
|
||||
|
||||
add(new Label("statusLabel", request.getStatus().toString()));
|
||||
|
||||
//A file should always be provided, null check just in case
|
||||
IModel<FileDescription> fileModel = new PropertyModel<FileDescription>(request,"file");
|
||||
@ -37,36 +43,37 @@ public class ReviewPageRequestDetailsPanel extends Panel {
|
||||
} else {
|
||||
add(new Label("fileName", "No file provided"));
|
||||
}
|
||||
|
||||
add(new FileDownloadLink("download", fileModel) {
|
||||
|
||||
FileDownloadLink downloadLink = new FileDownloadLink("download", fileModel) {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return isEnabled();
|
||||
}
|
||||
});
|
||||
add(new FileOpenLink("open", fileModel ) {
|
||||
};
|
||||
|
||||
add(downloadLink);
|
||||
downloadLink.add(new ImageObject("downloadIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_DOWN));
|
||||
|
||||
FileOpenLink openLink = new FileOpenLink("open", fileModel ) {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return isEnabled();
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
add(openLink);
|
||||
openLink.add(new ImageObject("openIcon", ImageObject.SIXTEEN + ImageObject.DOCUMENT_VIEW));
|
||||
|
||||
add(new Label("reviewTemplateName", new Model<String>(){
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public String getObject(){
|
||||
return request.getCheckListTemplate() != null ? request.getCheckListTemplate().getName() :
|
||||
"No template provided";
|
||||
}
|
||||
}));
|
||||
add(new MultiLineLabel("commentLabel", request.getComment()));
|
||||
|
||||
int numDaysUntilDeadline = request.getProject().getProjectClass().getProjectClassSettings().getNumDaysToSubmitPeerReview();
|
||||
DateTime deadline = new DateTime(request.getDateCreated()).plusDays(numDaysUntilDeadline);
|
||||
Model<Date> deadlineModel = new Model<Date>(deadline.toDate());
|
||||
add(new DateFormatter(DateFormatter.FORMAT.EXTENDED).createFormattedDateLabel("deadline", deadlineModel));
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,11 +31,11 @@ public class ReviewPageReviewDetailsPanel extends Panel {
|
||||
add(new Label("projectTitle", review.getProject().getTitle()));
|
||||
add(review.getReviewer().getUser().getDisplayComponent("reviewer"));
|
||||
add(review.getProject().getHeadSupervisor().getUser().getDisplayComponent("supervisor"));
|
||||
add(new DateFormatter().createFormattedDateLabel("acceptDate", review.getDateCreated()));
|
||||
add(new DateFormatter(DateFormatter.FORMAT.EXTENDED).createFormattedDateLabel("acceptDate", review.getDateCreated()));
|
||||
|
||||
int numDaysUntilDeadline = review.getProject().getProjectClass().getProjectClassSettings().getNumDaysToSubmitPeerReview();
|
||||
DateTime deadline = new DateTime(review.getDateCreated()).plusDays(numDaysUntilDeadline);
|
||||
add(new DateFormatter().createFormattedDateLabel("deadlineDate", deadline.toDate()));
|
||||
add(new DateFormatter(DateFormatter.FORMAT.EXTENDED).createFormattedDateLabel("deadlineDate", deadline.toDate()));
|
||||
//Model<Date> deadlineModel = new Model<Date>(deadline.toDate());
|
||||
|
||||
final String ratingPanelContainer = "ratingPanelContainer";
|
||||
|
@ -43,7 +43,7 @@
|
||||
<span wicket:id="reviewDate"></span>
|
||||
</span>
|
||||
<a href="#" wicket:id="cancelRequestLink">
|
||||
<img src="images/icons/delete_16x16.png" class="icon-8"/> Cancel
|
||||
<img wicket:id="deleteIcon" class="icon-8"/> Cancel
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -2,6 +2,8 @@ package se.su.dsv.scipro.peer.panels;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.EnumType;
|
||||
|
||||
import org.apache.wicket.Page;
|
||||
import org.apache.wicket.PageParameters;
|
||||
import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||
@ -18,6 +20,7 @@ import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
import se.su.dsv.scipro.SciProSession;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.peer.data.dao.interfaces.PeerRequestDao;
|
||||
import se.su.dsv.scipro.peer.data.dao.interfaces.PeerReviewDao;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
@ -151,7 +154,7 @@ public abstract class StudentPeerInfoRequestsPanel extends Panel {
|
||||
@Override
|
||||
protected void populateItem(ListItem<PeerRequest> item) {
|
||||
final PeerRequest request = item.getModelObject();
|
||||
item.add(new DateFormatter().createFormattedDateLabel("reviewDate", request.getDateCreated()));
|
||||
item.add(new DateFormatter(DateFormatter.FORMAT.EXTENDED).createFormattedDateLabel("reviewDate", request.getDateCreated()));
|
||||
|
||||
final AjaxLink<Void> cancelLink = new AjaxLink<Void>(CANCEL_LINK_ID){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -184,7 +187,10 @@ public abstract class StudentPeerInfoRequestsPanel extends Panel {
|
||||
}
|
||||
};
|
||||
cancelLink.add(new JavascriptEventConfirmation("onclick", "Are you sure you want to cancel this request"));
|
||||
item.add(cancelLink);
|
||||
item.add(cancelLink);
|
||||
|
||||
cancelLink.add(new ImageObject("deleteIcon", ImageObject.SIXTEEN + ImageObject.DELETE));
|
||||
|
||||
add(item);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
</a>
|
||||
|
||||
<a href="#" wicket:id="abortLink">
|
||||
<img src="images/icons/delete_16x16.png" class="icon-8"/> Abort review
|
||||
<img wicket:id="deleteIcon" class="icon-8"/> Abort review
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -19,6 +19,7 @@ import org.odlabs.wiquery.ui.dialog.Dialog;
|
||||
import se.su.dsv.scipro.SciProSession;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.icons.ImageObject;
|
||||
import se.su.dsv.scipro.peer.data.dao.interfaces.PeerReviewDao;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerReview;
|
||||
@ -104,6 +105,9 @@ public abstract class StudentPeerInfoReviewsPanel extends Panel {
|
||||
BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>("reviewLink", getPeerReviewPageClass(), pp);
|
||||
link.add(new DateFormatter().createFormattedDateLabel("reviewDate", pr.getDateCreated()));
|
||||
link.add(new Label("projectTitle", request.getProject().getTitle(30)));
|
||||
|
||||
|
||||
|
||||
final AjaxLink<Void> abortLink = new AjaxLink<Void>("abortLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -120,6 +124,9 @@ public abstract class StudentPeerInfoReviewsPanel extends Panel {
|
||||
return pr.getReviewer().getUser().equals(SciProSession.get().getUser());
|
||||
}
|
||||
};
|
||||
|
||||
abortLink.add(new ImageObject("deleteIcon", ImageObject.SIXTEEN + ImageObject.DELETE));
|
||||
|
||||
item.add(link);
|
||||
item.add(abortLink);
|
||||
add(item);
|
||||
|
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"
|
||||
>
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div class="prepend-top append-bottom span-10 last">
|
||||
<!-- Request -->
|
||||
<i wicket:id="noRequestsMsg"></i>
|
||||
<div wicket:id="myRequestsList" class="append-bottom rounded-box">
|
||||
<span class="box-title rounded" wicket:id="projectTitle"></span>
|
||||
<div class="append-bottom">
|
||||
<strong>Uploaded: </strong>
|
||||
<span wicket:id="requestDate">Today</span>
|
||||
<br />
|
||||
<strong>Authors: </strong><span wicket:id="authorLabel">Sven och Lotta</span>
|
||||
<br />
|
||||
<strong>Status: </strong><span wicket:id="statusLabel">Status: Awaiting review</span>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<span wicket:id="commentLabel">Bla bla bla bla bla..</span>
|
||||
</div>
|
||||
<div class="right append-05 ">
|
||||
<input type="button" wicket:id="openReviewLink" value="Open"></input>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End request -->
|
||||
<div wicket:id="bottomNavigator"></div>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,140 @@
|
||||
package se.su.dsv.scipro.peer.panels;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.EnumType;
|
||||
|
||||
import org.apache.wicket.Page;
|
||||
import org.apache.wicket.PageParameters;
|
||||
import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||
import org.apache.wicket.ajax.markup.html.AjaxLink;
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.basic.MultiLineLabel;
|
||||
import org.apache.wicket.markup.html.list.ListItem;
|
||||
import org.apache.wicket.markup.html.list.PageableListView;
|
||||
import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;
|
||||
import org.apache.wicket.markup.html.panel.Panel;
|
||||
import org.apache.wicket.model.LoadableDetachableModel;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
|
||||
import se.su.dsv.scipro.SciProSession;
|
||||
import se.su.dsv.scipro.data.dataobjects.Project;
|
||||
import se.su.dsv.scipro.data.dataobjects.Student;
|
||||
import se.su.dsv.scipro.peer.data.dao.interfaces.PeerRequestDao;
|
||||
import se.su.dsv.scipro.peer.data.dao.interfaces.PeerReviewDao;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerRequest;
|
||||
import se.su.dsv.scipro.peer.data.dataobjects.PeerReview;
|
||||
import se.su.dsv.scipro.peer.enums.RequestStatus;
|
||||
import se.su.dsv.scipro.security.auth.Authorization;
|
||||
import se.su.dsv.scipro.security.auth.roles.Roles;
|
||||
import se.su.dsv.scipro.util.DateFormatter;
|
||||
import se.su.dsv.scipro.util.JavascriptEventConfirmation;
|
||||
|
||||
@Authorization(authorizedRoles={Roles.SYSADMIN}) //Temp for deployment
|
||||
public abstract class StudentPeerRequestInfoPanel extends Panel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SpringBean
|
||||
private PeerReviewDao peerReviewDao;
|
||||
|
||||
@SpringBean
|
||||
private PeerRequestDao peerRequestDao;
|
||||
|
||||
private Boolean visible = null;
|
||||
|
||||
protected abstract Class<? extends Page> getPeerReviewPageClass();
|
||||
|
||||
public StudentPeerRequestInfoPanel(String id, final Student student, final Project project) {
|
||||
super(id);
|
||||
setOutputMarkupId(true);
|
||||
|
||||
final LoadableDetachableModel<List<PeerRequest>> myRequestsModel =
|
||||
new LoadableDetachableModel<List<PeerRequest>>(){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected List<PeerRequest> load() {
|
||||
return peerRequestDao.findPeerRequestsByStudentAndProject(student, project, null);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
final PageableListView<PeerRequest> myRequestsList = new PageableListView<PeerRequest>("myRequestsList", myRequestsModel, 2){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected void populateItem(ListItem<PeerRequest> item) {
|
||||
final PeerRequest request = item.getModelObject();
|
||||
final String projectTitle = request.getProject().getTitle();
|
||||
|
||||
final PeerReview pr = peerReviewDao.findReviewByRequest(item.getModelObject());
|
||||
final PageParameters pp = new PageParameters();
|
||||
pp.put(PeerReview.PP_PEER_REVIEW_ID, pr.getId());
|
||||
|
||||
boolean first = true;
|
||||
String authors = "";
|
||||
for (Student student : request.getProject().getProjectParticipants()) {
|
||||
if (first) {
|
||||
first = false;
|
||||
authors += student.getUser();
|
||||
} else {
|
||||
authors += ", " + student.getUser();
|
||||
}
|
||||
}
|
||||
|
||||
item.add(new Label("projectTitle", projectTitle));
|
||||
item.add(new DateFormatter(DateFormatter.FORMAT.EXTENDED).createFormattedDateLabel("requestDate", request.getDateCreated()));
|
||||
item.add(new Label("authorLabel", authors));
|
||||
item.add(new Label("statusLabel", request.getStatus().toString()));
|
||||
if (request.getComment() != null)
|
||||
item.add(new MultiLineLabel("commentLabel", request.getComment()));
|
||||
else
|
||||
item.add(new MultiLineLabel("commentLabel", "No comment provided."));
|
||||
|
||||
final AjaxLink<Void> openReviewLink = new AjaxLink<Void>("openReviewLink") {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
setResponsePage(getPeerReviewPageClass(), pp);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if (pr.getId() == null)
|
||||
openReviewLink.setEnabled(false);
|
||||
|
||||
item.add(openReviewLink);
|
||||
|
||||
add(item);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
add(myRequestsList);
|
||||
PagingNavigator pagingNavigator = new PagingNavigator("bottomNavigator", myRequestsList) {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return myRequestsList.getPageCount() > 1;
|
||||
}
|
||||
};
|
||||
|
||||
add(pagingNavigator);
|
||||
|
||||
add(new Label("noRequestsMsg", "You don't have any peer requests."){
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isVisible(){
|
||||
return myRequestsList.size() == 0;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user