Merge branch 'develop' of ssh://git.dsv.su.se/git/scipro/scipro into develop
This commit is contained in:
commit
1eaf2a733c
src
main
java/se/su/dsv/scipro
admin/pages
basepages
checklists/panels
components
conference/panels
data/controllers
opponent/panels
FinalSeminarDetailsPanel.htmlFinalSeminarDetailsPanel.javaOpponentListViewPanel.htmlOpponentListViewPanel.javaProjectFinalSeminarContainerPanel.javaProjectFinalSeminarPanel.java
peer/panels
project/pages
webapp
test/java/se/su/dsv/scipro/dao/jpa
@ -34,7 +34,7 @@ public abstract class AbstractAdminSettingsPage extends AbstractAdminPage {
|
|||||||
items.add(new MenuItem("Server Environment", AdminServerEnvironmentSettingsPage.class));
|
items.add(new MenuItem("Server Environment", AdminServerEnvironmentSettingsPage.class));
|
||||||
items.add(new MenuItem("Final seminar general settings", AdminFinalSeminarSettingsPage.class));
|
items.add(new MenuItem("Final seminar general settings", AdminFinalSeminarSettingsPage.class));
|
||||||
items.add(new MenuItem("Final seminar project level settings", AdminFinalSeminarSettingsPerProjectClassPage.class));
|
items.add(new MenuItem("Final seminar project level settings", AdminFinalSeminarSettingsPerProjectClassPage.class));
|
||||||
items.add(new MenuItem("Level settings", AdminPeerSettingsPage.class));
|
items.add(new MenuItem("Peer portal settings", AdminPeerSettingsPage.class));
|
||||||
items.add(new MenuItem("Edit levels", AdminProjectClassSettingsPage.class));
|
items.add(new MenuItem("Edit levels", AdminProjectClassSettingsPage.class));
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
|
@ -19,7 +19,7 @@ import se.su.dsv.scipro.security.auth.roles.Roles;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Authorization(authorizedRoles={Roles.SYSADMIN})
|
@Authorization(authorizedRoles={Roles.SYSADMIN, Roles.ADMIN})
|
||||||
public class AdminProjectPartnerPage extends AbstractAdminPage {
|
public class AdminProjectPartnerPage extends AbstractAdminPage {
|
||||||
|
|
||||||
@SpringBean
|
@SpringBean
|
||||||
|
@ -25,10 +25,6 @@
|
|||||||
<link href='http://fonts.googleapis.com/css?family=Ubuntu:regular,bold' rel='stylesheet' type='text/css' /> -->
|
<link href='http://fonts.googleapis.com/css?family=Ubuntu:regular,bold' rel='stylesheet' type='text/css' /> -->
|
||||||
<!--<link rel="stylesheet" href="css/scipro.css" media="screen,projection" />-->
|
<!--<link rel="stylesheet" href="css/scipro.css" media="screen,projection" />-->
|
||||||
|
|
||||||
<!-- <link type="text/css" href="css/smoothness/jquery-ui-1.8.10.custom.css" rel="stylesheet" />
|
|
||||||
<script type="text/javascript" src="js/jquery-1.5.2.min.js"></script>
|
|
||||||
<script type="text/javascript" src="js/jquery-ui-1.8.10.custom.min.js"></script> -->
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var _gaq = _gaq || [];
|
var _gaq = _gaq || [];
|
||||||
|
@ -6,11 +6,13 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<wicket:panel>
|
<wicket:panel>
|
||||||
<div wicket:id="stateOfMindContainer">
|
<div wicket:id="trafficLightContainer">
|
||||||
<form wicket:id="form">
|
<div wicket:id="group">
|
||||||
<table wicket:id="group">
|
<div wicket:id="lights">
|
||||||
<tr wicket:id="persons">
|
<table >
|
||||||
|
<tr >
|
||||||
<td><input type="radio" wicket:id="radio" /></td>
|
<td><input type="radio" wicket:id="radio" /></td>
|
||||||
|
<!--
|
||||||
<td><img wicket:id="image" /></td>
|
<td><img wicket:id="image" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -24,6 +26,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
|
<td><img wicket:id="image"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</wicket:panel>
|
</wicket:panel>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
<!--
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html
|
||||||
|
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<wicket:panel>
|
||||||
|
<div wicket:id="trafficLightContainer">
|
||||||
|
<table wicket:id="group">
|
||||||
|
<tr wicket:id="lights">
|
||||||
|
<td><input type="radio" wicket:id="radio" /></td>
|
||||||
|
<td> <img wicket:id="image"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
>>>>>>> checklists
|
||||||
|
</wicket:panel>
|
||||||
|
</body>
|
||||||
|
</html> -->
|
@ -4,9 +4,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.wicket.markup.html.WebMarkupContainer;
|
import org.apache.wicket.markup.html.WebMarkupContainer;
|
||||||
import org.apache.wicket.markup.html.WebPage;
|
|
||||||
import org.apache.wicket.markup.html.basic.Label;
|
import org.apache.wicket.markup.html.basic.Label;
|
||||||
import org.apache.wicket.markup.html.form.Form;
|
|
||||||
import org.apache.wicket.markup.html.form.Radio;
|
import org.apache.wicket.markup.html.form.Radio;
|
||||||
import org.apache.wicket.markup.html.form.RadioGroup;
|
import org.apache.wicket.markup.html.form.RadioGroup;
|
||||||
import org.apache.wicket.markup.html.list.ListItem;
|
import org.apache.wicket.markup.html.list.ListItem;
|
||||||
@ -24,9 +22,7 @@ import se.su.dsv.scipro.data.dataobjects.CheckList;
|
|||||||
import se.su.dsv.scipro.data.dataobjects.CheckListAnswer;
|
import se.su.dsv.scipro.data.dataobjects.CheckListAnswer;
|
||||||
import se.su.dsv.scipro.data.dataobjects.CheckListQuestion;
|
import se.su.dsv.scipro.data.dataobjects.CheckListQuestion;
|
||||||
import se.su.dsv.scipro.data.enums.CheckListQuestionAnswer;
|
import se.su.dsv.scipro.data.enums.CheckListQuestionAnswer;
|
||||||
import se.su.dsv.scipro.data.enums.StateOfMind;
|
|
||||||
import se.su.dsv.scipro.knol.resource.page.StaticImage;
|
import se.su.dsv.scipro.knol.resource.page.StaticImage;
|
||||||
import edu.emory.mathcs.backport.java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fnorbe@dsv.su.se
|
* @author fnorbe@dsv.su.se
|
||||||
@ -34,6 +30,12 @@ import edu.emory.mathcs.backport.java.util.Arrays;
|
|||||||
|
|
||||||
public class TrafficLightPanel extends Panel {
|
public class TrafficLightPanel extends Panel {
|
||||||
|
|
||||||
|
private List<TrafficLight> lights;
|
||||||
|
|
||||||
|
enum TrafficLight{
|
||||||
|
GREEN, YELLOW, RED, NOT
|
||||||
|
}
|
||||||
|
|
||||||
private static final long serialVersionUID = 8862892008428526067L;
|
private static final long serialVersionUID = 8862892008428526067L;
|
||||||
|
|
||||||
@SpringBean
|
@SpringBean
|
||||||
@ -50,37 +52,51 @@ public class TrafficLightPanel extends Panel {
|
|||||||
|
|
||||||
public TrafficLightPanel(String id) {
|
public TrafficLightPanel(String id) {
|
||||||
super(id);
|
super(id);
|
||||||
WebMarkupContainer stateOfMindContainer = new WebMarkupContainer("stateOfMindContainer");
|
|
||||||
add(stateOfMindContainer);
|
|
||||||
|
|
||||||
Form<StateOfMind> f = new Form<StateOfMind>("form");
|
WebMarkupContainer trafficLightContainer = new WebMarkupContainer(
|
||||||
stateOfMindContainer.add(f);
|
"trafficLightContainer");
|
||||||
RadioGroup<StateOfMind> group = new RadioGroup<StateOfMind>("group");
|
add(trafficLightContainer);
|
||||||
f.add(group);
|
lights = new ArrayList<TrafficLight>();
|
||||||
|
lights.add(TrafficLight.GREEN);lights.add(TrafficLight.YELLOW);lights.add(TrafficLight.RED);lights.add(TrafficLight.NOT);
|
||||||
|
RadioGroup<TrafficLight> group = new RadioGroup<TrafficLight>("group");
|
||||||
|
trafficLightContainer.add(group);
|
||||||
|
|
||||||
|
|
||||||
ListView<StateOfMind> persons = new ListView<StateOfMind>("persons",
|
|
||||||
Arrays.asList(StateOfMind.values())) {
|
ListView<TrafficLight> lightList = new ListView<TrafficLight>("lights", lights) {
|
||||||
protected void populateItem(ListItem<StateOfMind> item) {
|
|
||||||
StateOfMind stateOfMind = item.getModelObject();
|
private static final long serialVersionUID = 1L;
|
||||||
item.add(new Radio<StateOfMind>("radio", item.getModel()));
|
|
||||||
|
protected void populateItem(ListItem<TrafficLight> item) {
|
||||||
|
TrafficLight trafficLight = item.getModelObject();
|
||||||
|
item.add(new Radio<TrafficLight>("radio", item.getModel()));
|
||||||
StaticImage image = null;
|
StaticImage image = null;
|
||||||
if (stateOfMind.equals(StateOfMind.FINE)) {
|
if (trafficLight.equals(TrafficLight.GREEN)) {
|
||||||
image = new StaticImage("image", new Model<String>(
|
image = new StaticImage("image", new Model<String>(
|
||||||
"images/icons/green_ball_32.png"));
|
"images/icons/green_ball_32.png"));
|
||||||
} else if (stateOfMind.equals(StateOfMind.NEEDHELP)) {
|
} else if (trafficLight.equals(TrafficLight.YELLOW)) {
|
||||||
image = new StaticImage("image", new Model<String>(
|
image = new StaticImage("image", new Model<String>(
|
||||||
"images/icons/red_ball_32.png"));
|
|
||||||
} else if (stateOfMind.equals(StateOfMind.NEUTRAL)) {
|
"images/icons/red_ball_32.png"));
|
||||||
|
} else if (trafficLight.equals(TrafficLight.RED)) {
|
||||||
|
|
||||||
image = new StaticImage("image", new Model<String>(
|
image = new StaticImage("image", new Model<String>(
|
||||||
"images/icons/yellow_ball_32.png"));
|
"images/icons/yellow_ball_32.png"));
|
||||||
}
|
}
|
||||||
|
else if (trafficLight.equals(TrafficLight.NOT)) {
|
||||||
|
image = new StaticImage("image", new Model<String>(
|
||||||
|
"images/icons/grey_ball_32.png"));
|
||||||
|
}
|
||||||
item.add(image);
|
item.add(image);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
group.add(persons);
|
|
||||||
|
group.add(lightList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
List<CheckList> checkLists = checkListDao.findCheckLists(SciProSession.get()
|
List<CheckList> checkLists = checkListDao.findCheckLists(SciProSession.get()
|
||||||
.getActiveProject());
|
.getActiveProject());{
|
||||||
if (checkLists.size() < 1) {
|
if (checkLists.size() < 1) {
|
||||||
CheckList checkList = new CheckList("Test", SciProSession.get().getActiveProject());
|
CheckList checkList = new CheckList("Test", SciProSession.get().getActiveProject());
|
||||||
CheckListQuestion checkListQuestion = new CheckListQuestion("Testquestion?");
|
CheckListQuestion checkListQuestion = new CheckListQuestion("Testquestion?");
|
||||||
|
@ -56,7 +56,7 @@ public abstract class AbstractMenuPanel extends Panel {
|
|||||||
protected void populateItem( ListItem<MenuItem> item ) {
|
protected void populateItem( ListItem<MenuItem> item ) {
|
||||||
final MenuItem mi = item.getModelObject();
|
final MenuItem mi = item.getModelObject();
|
||||||
boolean highLightAsCurrentByInterface = false;
|
boolean highLightAsCurrentByInterface = false;
|
||||||
Class<?> menuItemInterface = mi.getMenuHilightInterface();
|
Class<?> menuItemInterface = mi.getMenuHighlightInterface();
|
||||||
if( menuItemInterface != null ){
|
if( menuItemInterface != null ){
|
||||||
for( Class<?> actualPageInterface : containerClass.getInterfaces() ){
|
for( Class<?> actualPageInterface : containerClass.getInterfaces() ){
|
||||||
if( actualPageInterface.equals(menuItemInterface) ){
|
if( actualPageInterface.equals(menuItemInterface) ){
|
||||||
@ -72,7 +72,7 @@ public abstract class AbstractMenuPanel extends Panel {
|
|||||||
&&
|
&&
|
||||||
mi.getTargetClass().getSuperclass() != menuContainerCommonSuperClass
|
mi.getTargetClass().getSuperclass() != menuContainerCommonSuperClass
|
||||||
)
|
)
|
||||||
){
|
){
|
||||||
//item.setMarkupId("current");
|
//item.setMarkupId("current");
|
||||||
//item.setOutputMarkupId(true);
|
//item.setOutputMarkupId(true);
|
||||||
//Replaced the above because it generates invalid markup if two menus are added to the same page (id no longer unique)
|
//Replaced the above because it generates invalid markup if two menus are added to the same page (id no longer unique)
|
||||||
@ -99,7 +99,8 @@ public abstract class AbstractMenuPanel extends Panel {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* May not rely on anything in the implementing class's constructor as this will not have been initialized yet.
|
* May not rely on anything in the implementing class's constructor as this will not have been initialized yet.
|
||||||
* Items are rendered from left to right as you might expect, first item in the list will be first tab item on the left.
|
* Items are rendered from left to right (or top to bottom depending on type of menu) as you might expect,
|
||||||
|
* the first item in the list will be the first menu item on the left/top.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected abstract List<MenuItem> getItemList();
|
protected abstract List<MenuItem> getItemList();
|
||||||
@ -118,7 +119,7 @@ public abstract class AbstractMenuPanel extends Panel {
|
|||||||
private Class<? extends Page> targetClass;
|
private Class<? extends Page> targetClass;
|
||||||
private PageParameters pp;
|
private PageParameters pp;
|
||||||
private String iconName;
|
private String iconName;
|
||||||
private Class<? extends MenuHighlight> menuHilightInterface;
|
private Class<? extends MenuHighlight> menuHighlightInterface;
|
||||||
|
|
||||||
public MenuItem(final String name, final Class<? extends Page> targetClass) {
|
public MenuItem(final String name, final Class<? extends Page> targetClass) {
|
||||||
this(name, targetClass, null, null, null);
|
this(name, targetClass, null, null, null);
|
||||||
@ -148,7 +149,7 @@ public abstract class AbstractMenuPanel extends Panel {
|
|||||||
public MenuItem(final String name, final Class<? extends Page> targetClass, final Class<? extends MenuHighlight> menuHilightInterface, PageParameters pp, String iconName) {
|
public MenuItem(final String name, final Class<? extends Page> targetClass, final Class<? extends MenuHighlight> menuHilightInterface, PageParameters pp, String iconName) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.targetClass = targetClass;
|
this.targetClass = targetClass;
|
||||||
this.menuHilightInterface = menuHilightInterface;
|
this.menuHighlightInterface = menuHilightInterface;
|
||||||
this.pp = pp;
|
this.pp = pp;
|
||||||
this.iconName = iconName == null ? ImageIcon.ICON_EMPTY : iconName;
|
this.iconName = iconName == null ? ImageIcon.ICON_EMPTY : iconName;
|
||||||
}
|
}
|
||||||
@ -169,13 +170,13 @@ public abstract class AbstractMenuPanel extends Panel {
|
|||||||
return iconName;
|
return iconName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MenuItem setMenuHilightInterface(Class<? extends MenuHighlight> menuHilightInterface) {
|
public MenuItem setMenuHighlightInterface(Class<? extends MenuHighlight> menuHighlightInterface) {
|
||||||
this.menuHilightInterface = menuHilightInterface;
|
this.menuHighlightInterface = menuHighlightInterface;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class<? extends MenuHighlight> getMenuHilightInterface() {
|
public Class<? extends MenuHighlight> getMenuHighlightInterface() {
|
||||||
return menuHilightInterface;
|
return menuHighlightInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -92,10 +92,8 @@ public class ConferencePanel extends Panel {
|
|||||||
webMarkupContainer.setOutputMarkupId(true);
|
webMarkupContainer.setOutputMarkupId(true);
|
||||||
webMarkupContainer.add(new PagingNavigator("pagingNavigator", dataView));
|
webMarkupContainer.add(new PagingNavigator("pagingNavigator", dataView));
|
||||||
add(webMarkupContainer);
|
add(webMarkupContainer);
|
||||||
if (boardMessageModel != null) {
|
if (boardMessageModel != null) {
|
||||||
|
|
||||||
int index = boardMessageDao.getBoardMessageSortOrderIndex(boardMessageModel.getObject());
|
int index = boardMessageDao.getBoardMessageSortOrderIndex(boardMessageModel.getObject());
|
||||||
System.out.println(index);
|
|
||||||
dataView.setCurrentPage(index/BOARDMESSAGESPERPAGE);
|
dataView.setCurrentPage(index/BOARDMESSAGESPERPAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,10 @@ import org.apache.wicket.markup.html.form.upload.FileUpload;
|
|||||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminar;
|
import se.su.dsv.scipro.data.dataobjects.FinalSeminar;
|
||||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminarOpposition;
|
import se.su.dsv.scipro.data.dataobjects.FinalSeminarOpposition;
|
||||||
import se.su.dsv.scipro.data.dataobjects.User;
|
import se.su.dsv.scipro.data.dataobjects.User;
|
||||||
|
import se.su.dsv.scipro.repository.util.FileStorageException;
|
||||||
|
|
||||||
public interface FinalSeminarUploadController extends IClusterable {
|
public interface FinalSeminarUploadController extends IClusterable {
|
||||||
|
|
||||||
void deleteSeminarFilesRecursive(FinalSeminar seminar);
|
|
||||||
|
|
||||||
void deleteOpponentFiles(FinalSeminarOpposition opp);
|
void deleteOpponentFiles(FinalSeminarOpposition opp);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -20,6 +19,15 @@ public interface FinalSeminarUploadController extends IClusterable {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
FinalSeminar deleteSeminarReport(FinalSeminar seminar) throws Exception;
|
FinalSeminar deleteSeminarReport(FinalSeminar seminar) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete the upload report for the seminar, adminOverrideMode = true means no intentional exceptions will be thrown
|
||||||
|
* @param seminar
|
||||||
|
* @param adminOverrideMode
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
FinalSeminar deleteSeminarReport(FinalSeminar seminar, boolean adminOverrideMode) throws Exception;
|
||||||
|
|
||||||
void storeSeminarDocument(FileUpload upload, User uploader, FinalSeminar seminar) throws Exception;
|
void storeSeminarDocument(FileUpload upload, User uploader, FinalSeminar seminar) throws Exception;
|
||||||
|
|
||||||
|
@ -78,17 +78,9 @@ public class FinalSeminarUploadControllerImpl implements FinalSeminarUploadContr
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void delete(String path) {
|
private void delete(String path) {
|
||||||
|
|
||||||
fileRepository.delete(path);
|
fileRepository.delete(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteSeminarFilesRecursive(final FinalSeminar seminar) throws FileStorageException {
|
|
||||||
if (seminar.getDocument() != null) {
|
|
||||||
//delete(getRepositorySeminarPath(seminar)); Use of deprecated path/method
|
|
||||||
delete(seminar.getDocument().getPath());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void deleteOpponentFiles(final FinalSeminarOpposition opp) throws FileStorageException {
|
public void deleteOpponentFiles(final FinalSeminarOpposition opp) throws FileStorageException {
|
||||||
if (opp.getOpponentReport() != null) {
|
if (opp.getOpponentReport() != null) {
|
||||||
//delete(getRepositoryOppositionPath(opp)); Use of deprecated path/method
|
//delete(getRepositoryOppositionPath(opp)); Use of deprecated path/method
|
||||||
@ -103,18 +95,31 @@ public class FinalSeminarUploadControllerImpl implements FinalSeminarUploadContr
|
|||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public FinalSeminar deleteSeminarReport(FinalSeminar seminar) throws Exception {
|
public FinalSeminar deleteSeminarReport(FinalSeminar seminar) throws Exception{
|
||||||
|
return deleteSeminarReport(seminar, false);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Delete the upload report for the seminar, adminOverrideMode = true means no intentional exceptions will be thrown
|
||||||
|
* @param seminar
|
||||||
|
* @param adminOverrideMode
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public FinalSeminar deleteSeminarReport(FinalSeminar seminar, boolean adminOverrideMode) throws Exception {
|
||||||
seminar = finalSeminarDao.reLoad(seminar);
|
seminar = finalSeminarDao.reLoad(seminar);
|
||||||
if (!seminar.getOppositions().isEmpty() || !seminar.getActiveParticipations().isEmpty()) {
|
if( !adminOverrideMode ){
|
||||||
throw new Exception(
|
if (!seminar.getOppositions().isEmpty() || !seminar.getActiveParticipations().isEmpty()) {
|
||||||
"Cannot delete seminar report, seminar has opponents or active participants");
|
throw new Exception(
|
||||||
|
"Cannot delete seminar report, seminar has opponents or active participants");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (CheckPlagiarismEvent cpe : checkPlagiarismEventDao.getWithFileDescription(seminar
|
for (CheckPlagiarismEvent cpe : checkPlagiarismEventDao.getWithFileDescription(seminar
|
||||||
.getDocument())) {
|
.getDocument())) {
|
||||||
checkPlagiarismEventDao.delete(cpe);
|
checkPlagiarismEventDao.delete(cpe);
|
||||||
}
|
}
|
||||||
|
if(seminar.getDocument() != null)
|
||||||
fileRepository.delete(seminar.getDocument().getPath());
|
if(seminar.getDocument().getPath() != null)
|
||||||
|
fileRepository.delete(seminar.getDocument().getPath());
|
||||||
seminar.setDocument(null);
|
seminar.setDocument(null);
|
||||||
return finalSeminarDao.save(seminar);
|
return finalSeminarDao.save(seminar);
|
||||||
}
|
}
|
||||||
|
@ -2,78 +2,73 @@
|
|||||||
<html
|
<html
|
||||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd">
|
||||||
<body>
|
<body>
|
||||||
<wicket:panel>
|
<wicket:panel>
|
||||||
<div wicket:id="titleContainer">
|
<div wicket:id="feedback"></div>
|
||||||
<strong>Project Title: </strong> <span wicket:id="projectTitle"></span>
|
<div wicket:id="titleContainer"><strong>Project Title: </strong>
|
||||||
<div>
|
<span wicket:id="projectTitle"></span>
|
||||||
<strong>Room: </strong> <span wicket:id="room"></span>
|
<div><strong>Room: </strong> <span wicket:id="room"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="append-bottom">
|
||||||
<div class="append-bottom">
|
<div><strong>Head supervisor:</strong></div>
|
||||||
<div>
|
<span wicket:id="headSupervisor"></span></div>
|
||||||
<strong>Head supervisor:</strong>
|
<div><strong>Author(s): </strong>
|
||||||
</div>
|
<ul class="no-list-style">
|
||||||
<span wicket:id="headSupervisor"></span>
|
<li wicket:id="authorsList"><span wicket:id="author"></span></li>
|
||||||
</div>
|
</ul>
|
||||||
<div>
|
</div>
|
||||||
<strong>Author(s): </strong>
|
|
||||||
<ul class="no-list-style">
|
|
||||||
<li wicket:id="authorsList"><span wicket:id="author"></span></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div><strong>Co-supervisor(s): </strong>
|
||||||
<strong>Co-supervisor(s): </strong>
|
<ul class="no-list-style">
|
||||||
<ul class="no-list-style">
|
<li wicket:id="coSupervisorsList"><span wicket:id="coSupervisor"></span></li>
|
||||||
<li wicket:id="coSupervisorsList"><span
|
</ul>
|
||||||
wicket:id="coSupervisor"></span></li>
|
</div>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div><strong>Reviewer(s): </strong>
|
||||||
<strong>Reviewer(s): </strong>
|
<ul class="no-list-style">
|
||||||
<ul class="no-list-style">
|
<li wicket:id="reviewersList"><span wicket:id="reviewer"></span>
|
||||||
<li wicket:id="reviewersList"><span wicket:id="reviewer"></span>
|
</li>
|
||||||
</li>
|
</ul>
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div wicket:id="detailsContainer">
|
<div wicket:id="detailsContainer">
|
||||||
<div>
|
<div><strong>Opponent(s): </strong>
|
||||||
<strong>Opponent(s): </strong>
|
<ul class="no-list-style">
|
||||||
<ul class="no-list-style">
|
<li wicket:id="opponentsList"><span wicket:id="opponent"></span>
|
||||||
<li wicket:id="opponentsList"><span wicket:id="opponent"></span>
|
<div wicket:id="oppositionContainer"><strong>Report:</strong> <span wicket:id="oppositionReportTitle"></span> <a href="#"
|
||||||
</li>
|
wicket:id="open"><img
|
||||||
</ul>
|
src="images/icons/document-preview_16x16.png" alt="Open/Preview" />
|
||||||
</div>
|
</a> <a href="#" wicket:id="download"><img
|
||||||
|
src="images/icons/download_16x16.png" alt="Download" /> </a> <a href="#"
|
||||||
<div>
|
wicket:id="deleteOppositionReport"><img
|
||||||
<strong>Active participant(s): </strong>
|
src="images/icons/delete_16x16.png" alt="delete" /> </a>
|
||||||
<ul class="no-list-style">
|
|
||||||
<li wicket:id="activeParticipantsList"><span
|
|
||||||
wicket:id="activeParticipant"></span></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong>Presentation Language: </strong>
|
|
||||||
<div wicket:id="seminarLanguage"></div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong>Thesis/Report Language: </strong>
|
|
||||||
<div wicket:id="thesisLanguage"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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> </span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</wicket:panel>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div><strong>Active participant(s): </strong>
|
||||||
|
<ul class="no-list-style">
|
||||||
|
<li wicket:id="activeParticipantsList"><span
|
||||||
|
wicket:id="activeParticipant"></span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div><strong>Presentation Language: </strong>
|
||||||
|
<div wicket:id="seminarLanguage"></div>
|
||||||
|
</div>
|
||||||
|
<div><strong>Thesis/Report Language: </strong>
|
||||||
|
<div wicket:id="thesisLanguage"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</wicket:panel>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -3,16 +3,21 @@ package se.su.dsv.scipro.opponent.panels;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||||
|
import org.apache.wicket.ajax.markup.html.AjaxLink;
|
||||||
import org.apache.wicket.markup.html.WebMarkupContainer;
|
import org.apache.wicket.markup.html.WebMarkupContainer;
|
||||||
import org.apache.wicket.markup.html.basic.Label;
|
import org.apache.wicket.markup.html.basic.Label;
|
||||||
import org.apache.wicket.markup.html.list.ListItem;
|
import org.apache.wicket.markup.html.list.ListItem;
|
||||||
import org.apache.wicket.markup.html.list.ListView;
|
import org.apache.wicket.markup.html.list.ListView;
|
||||||
import org.apache.wicket.markup.html.panel.EmptyPanel;
|
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.markup.html.panel.Panel;
|
||||||
import org.apache.wicket.model.Model;
|
import org.apache.wicket.model.Model;
|
||||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||||
|
|
||||||
|
import se.su.dsv.scipro.data.controllers.FinalSeminarUploadController;
|
||||||
import se.su.dsv.scipro.data.dao.interfaces.FinalSeminarDao;
|
import se.su.dsv.scipro.data.dao.interfaces.FinalSeminarDao;
|
||||||
|
import se.su.dsv.scipro.data.dao.interfaces.FinalSeminarOppositionDao;
|
||||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminar;
|
import se.su.dsv.scipro.data.dataobjects.FinalSeminar;
|
||||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminarActiveParticipation;
|
import se.su.dsv.scipro.data.dataobjects.FinalSeminarActiveParticipation;
|
||||||
import se.su.dsv.scipro.data.dataobjects.FinalSeminarOpposition;
|
import se.su.dsv.scipro.data.dataobjects.FinalSeminarOpposition;
|
||||||
@ -23,6 +28,9 @@ import se.su.dsv.scipro.data.dataobjects.User;
|
|||||||
import se.su.dsv.scipro.data.enums.ProjectTeamMemberRoles;
|
import se.su.dsv.scipro.data.enums.ProjectTeamMemberRoles;
|
||||||
import se.su.dsv.scipro.repository.components.FileDownloadLink;
|
import se.su.dsv.scipro.repository.components.FileDownloadLink;
|
||||||
import se.su.dsv.scipro.repository.components.FileOpenLink;
|
import se.su.dsv.scipro.repository.components.FileOpenLink;
|
||||||
|
import se.su.dsv.scipro.security.auth.MetaDataActionStrategy;
|
||||||
|
import se.su.dsv.scipro.security.auth.roles.Roles;
|
||||||
|
import se.su.dsv.scipro.util.JavascriptEventConfirmation;
|
||||||
|
|
||||||
public class FinalSeminarDetailsPanel extends Panel {
|
public class FinalSeminarDetailsPanel extends Panel {
|
||||||
|
|
||||||
@ -30,11 +38,15 @@ public class FinalSeminarDetailsPanel extends Panel {
|
|||||||
|
|
||||||
@SpringBean
|
@SpringBean
|
||||||
private FinalSeminarDao finalSeminarDao;
|
private FinalSeminarDao finalSeminarDao;
|
||||||
|
@SpringBean
|
||||||
|
private FinalSeminarOppositionDao finalSeminarOppositionDao;
|
||||||
|
@SpringBean
|
||||||
|
private FinalSeminarUploadController finalSeminarUploadController;
|
||||||
|
|
||||||
public FinalSeminarDetailsPanel(final String id, final FinalSeminar seminar2,
|
public FinalSeminarDetailsPanel(final String id, final FinalSeminar seminar2, final boolean details) {
|
||||||
final boolean details) {
|
|
||||||
super(id);
|
super(id);
|
||||||
|
this.setOutputMarkupId(true);
|
||||||
|
add(new FeedbackPanel("feedback"));
|
||||||
final FinalSeminar seminar = finalSeminarDao.reLoad(seminar2);
|
final FinalSeminar seminar = finalSeminarDao.reLoad(seminar2);
|
||||||
final Project project = seminar.getProject();
|
final Project project = seminar.getProject();
|
||||||
WebMarkupContainer titleContainer = new WebMarkupContainer("titleContainer") {
|
WebMarkupContainer titleContainer = new WebMarkupContainer("titleContainer") {
|
||||||
@ -53,8 +65,7 @@ public class FinalSeminarDetailsPanel extends Panel {
|
|||||||
});
|
});
|
||||||
titleContainer.add(new Label("room", seminar.getRoom()));
|
titleContainer.add(new Label("room", seminar.getRoom()));
|
||||||
add(titleContainer);
|
add(titleContainer);
|
||||||
add(new ListView<Student>("authorsList", new ArrayList<Student>(
|
add(new ListView<Student>("authorsList", new ArrayList<Student>(project.getProjectParticipants())) {
|
||||||
project.getProjectParticipants())) {
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -111,41 +122,77 @@ public class FinalSeminarDetailsPanel extends Panel {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
detailsContainer.add(new ListView<FinalSeminarOpposition>("opponentsList", seminar
|
detailsContainer.add(new ListView<FinalSeminarOpposition>("opponentsList", seminar.getOppositions()) {
|
||||||
.getOppositions()) {
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void populateItem(ListItem<FinalSeminarOpposition> item) {
|
protected void populateItem(final ListItem<FinalSeminarOpposition> item) {
|
||||||
item.add(item.getModelObject().getOpponent().getUser()
|
item.add(item.getModelObject().getOpponent().getUser().getDisplayComponent("opponent", true));
|
||||||
.getDisplayComponent("opponent", true));
|
WebMarkupContainer oppCon = new WebMarkupContainer("oppositionContainer"){
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isVisible(){
|
||||||
|
return item.getModelObject().getOpponentReport() != null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//Students are not allowed to view other students opposition reports
|
||||||
|
MetaDataActionStrategy.authorize(oppCon, Roles.EMPLOYEE);
|
||||||
|
item.add(oppCon);
|
||||||
|
|
||||||
|
String reportTitle = "";
|
||||||
|
if(item.getModelObject().getOpponentReport() != null)
|
||||||
|
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"){
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
{
|
||||||
|
MetaDataActionStrategy.authorize(this, Roles.ADMIN);
|
||||||
|
this.add(new JavascriptEventConfirmation("onclick", "Do you really want to delete this user-uploaded report?"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(AjaxRequestTarget target) {
|
||||||
|
try{
|
||||||
|
finalSeminarUploadController.deleteOpponentFiles(item.getModelObject());
|
||||||
|
FinalSeminarOpposition opp = item.getModelObject();
|
||||||
|
opp.setOpponentReport(null);
|
||||||
|
opp = finalSeminarOppositionDao.save(opp);
|
||||||
|
item.setModelObject(opp);
|
||||||
|
info("Opposition report deleted");
|
||||||
|
} catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
error("Something went wrong, see log files for stacktrace");
|
||||||
|
}
|
||||||
|
target.addComponent(FinalSeminarDetailsPanel.this);
|
||||||
|
}
|
||||||
|
});
|
||||||
add(item);
|
add(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
detailsContainer.add(new ListView<FinalSeminarActiveParticipation>(
|
detailsContainer.add(new ListView<FinalSeminarActiveParticipation>("activeParticipantsList", seminar.getActiveParticipations()) {
|
||||||
"activeParticipantsList", seminar.getActiveParticipations()) {
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void populateItem(ListItem<FinalSeminarActiveParticipation> item) {
|
protected void populateItem(ListItem<FinalSeminarActiveParticipation> item) {
|
||||||
item.add(item.getModelObject().getUser()
|
item.add(item.getModelObject().getUser().getDisplayComponent("activeParticipant", true));
|
||||||
.getDisplayComponent("activeParticipant", true));
|
|
||||||
add(item);
|
add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
detailsContainer.add(new Label("seminarLanguage", seminar.getPresentationLanguage()
|
detailsContainer.add(new Label("seminarLanguage", seminar.getPresentationLanguage().toString()));
|
||||||
.toString()));
|
|
||||||
detailsContainer.add(new Label("thesisLanguage", seminar.getReportLanguage().toString()));
|
detailsContainer.add(new Label("thesisLanguage", seminar.getReportLanguage().toString()));
|
||||||
detailsContainer.add(new Label("seminarReportTitle", new Model<String>() {
|
detailsContainer.add(new Label("seminarReportTitle", new Model<String>() {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getObject() {
|
public String getObject() {
|
||||||
return seminar.getDocument() == null ? "No thesis/report uploaded" : seminar
|
return seminar.getDocument() == null ? "No thesis/report uploaded" : seminar.getDocument().getName();
|
||||||
.getDocument().getName();
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -161,6 +208,27 @@ public class FinalSeminarDetailsPanel extends Panel {
|
|||||||
uploadInfoContainer.add(new FileDownloadLink("download", seminar.getDocument()));
|
uploadInfoContainer.add(new FileDownloadLink("download", seminar.getDocument()));
|
||||||
uploadInfoContainer.add(new FileOpenLink("open", seminar.getDocument()));
|
uploadInfoContainer.add(new FileOpenLink("open", seminar.getDocument()));
|
||||||
|
|
||||||
|
uploadInfoContainer.add(new AjaxLink<Void>("deleteSeminarReport") {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
{
|
||||||
|
MetaDataActionStrategy.authorize(this, Roles.ADMIN);
|
||||||
|
this.add(new JavascriptEventConfirmation("onclick", "Do you really want to delete this user-uploaded report?"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(AjaxRequestTarget target) {
|
||||||
|
try {
|
||||||
|
finalSeminarUploadController.deleteSeminarReport(seminar, true);
|
||||||
|
seminar.setDocument(null); //Only to repaint the ajax call without the document icons
|
||||||
|
info("Report deleted");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
error("Deletion failed");
|
||||||
|
}
|
||||||
|
target.addComponent(FinalSeminarDetailsPanel.this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
detailsContainer.add(uploadInfoContainer);
|
detailsContainer.add(uploadInfoContainer);
|
||||||
add(detailsContainer);
|
add(detailsContainer);
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<wicket:panel>
|
<wicket:panel>
|
||||||
|
|
||||||
<div class="span-22 prepend-top last">
|
<div class="span-22 prepend-top last">
|
||||||
|
<div wicket:id="feedback"></div>
|
||||||
<table class="rounded-table seminar-table even-rows">
|
<table class="rounded-table seminar-table even-rows">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
|
@ -47,8 +47,8 @@ import se.su.dsv.scipro.opponent.models.OpponentModel;
|
|||||||
public class OpponentListViewPanel extends Panel {
|
public class OpponentListViewPanel extends Panel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 4988253889884804250L;
|
private static final long serialVersionUID = 4988253889884804250L;
|
||||||
|
|
||||||
@SpringBean
|
@SpringBean
|
||||||
@ -76,6 +76,10 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
super(id);
|
super(id);
|
||||||
this.adminView = adminView;
|
this.adminView = adminView;
|
||||||
loadListView(seminarList);
|
loadListView(seminarList);
|
||||||
|
feedbackPanel = new FeedbackPanel("feedback");
|
||||||
|
add(feedbackPanel);
|
||||||
|
this.setOutputMarkupId(true);
|
||||||
|
|
||||||
editSeminarDialogContainer = new WebMarkupContainer("dialogContainer");
|
editSeminarDialogContainer = new WebMarkupContainer("dialogContainer");
|
||||||
editSeminarDialog = new Dialog("dialog");
|
editSeminarDialog = new Dialog("dialog");
|
||||||
editSeminarDialog.setModal(true);
|
editSeminarDialog.setModal(true);
|
||||||
@ -96,7 +100,7 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
add(contactsSeminarDialog);
|
add(contactsSeminarDialog);
|
||||||
contactsDialogContainer.setOutputMarkupId(true);
|
contactsDialogContainer.setOutputMarkupId(true);
|
||||||
contactsDialogContainer.add(contactsSeminarForm = new ContactsSeminarForm(
|
contactsDialogContainer.add(contactsSeminarForm = new ContactsSeminarForm(
|
||||||
"contactsSeminarForm"));
|
"contactsSeminarForm"));
|
||||||
contactsSeminarForm.setOutputMarkupId(true);
|
contactsSeminarForm.setOutputMarkupId(true);
|
||||||
|
|
||||||
add(linkListView);
|
add(linkListView);
|
||||||
@ -125,7 +129,7 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
User headSupervisor = seminar.getProject().getHeadSupervisor().getUser();
|
User headSupervisor = seminar.getProject().getHeadSupervisor().getUser();
|
||||||
|
|
||||||
headSupervisorString += headSupervisor.getFirstName() + " "
|
headSupervisorString += headSupervisor.getFirstName() + " "
|
||||||
+ headSupervisor.getLastName();
|
+ headSupervisor.getLastName();
|
||||||
item.add(new Label("headSupervisor", headSupervisorString));
|
item.add(new Label("headSupervisor", headSupervisorString));
|
||||||
|
|
||||||
item.add(new Label("projectClass", seminar.getProject().getProjectClass().getName()));
|
item.add(new Label("projectClass", seminar.getProject().getProjectClass().getName()));
|
||||||
@ -191,20 +195,25 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(AjaxRequestTarget target) {
|
public void onClick(AjaxRequestTarget target) {
|
||||||
FinalSeminar seminar2 = finalSeminarDao.reLoad(seminar);
|
FinalSeminar seminar2 = finalSeminarDao.reLoad(seminar);
|
||||||
seminarUploadController.deleteSeminarFilesRecursive(seminar2);
|
try{
|
||||||
for (FinalSeminarActiveParticipation al : seminar2
|
seminarUploadController.deleteSeminarReport(seminar2, true);
|
||||||
.getActiveParticipations()) {
|
for (FinalSeminarActiveParticipation al : seminar2
|
||||||
finalSeminarActiveParticipationDao.delete(al);
|
.getActiveParticipations()) {
|
||||||
}
|
finalSeminarActiveParticipationDao.delete(al);
|
||||||
|
}
|
||||||
|
|
||||||
for (FinalSeminarOpposition fso : seminar2
|
for (FinalSeminarOpposition fso : seminar2
|
||||||
.getOppositions()) {
|
.getOppositions()) {
|
||||||
seminarUploadController.deleteOpponentFiles(fso);
|
seminarUploadController.deleteOpponentFiles(fso);
|
||||||
finalSeminarOppositionDao.delete(fso);
|
finalSeminarOppositionDao.delete(fso);
|
||||||
|
}
|
||||||
|
finalSeminarDao.delete(seminar2);
|
||||||
|
info("Final seminar deleted");
|
||||||
|
} catch (Exception e){
|
||||||
|
error("Something went wrong, see logs for stacktrace");
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
finalSeminarDao.delete(seminar2);
|
target.addComponent(OpponentListViewPanel.this);
|
||||||
setResponsePage(AdminFinalSeminarPage.class);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -227,7 +236,7 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
@Override
|
@Override
|
||||||
public CharSequence decorateScript(CharSequence script) {
|
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; "
|
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; "
|
||||||
+ script;
|
+ script;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -243,8 +252,8 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
private class EditSeminarForm extends Form<OpponentModel> {
|
private class EditSeminarForm extends Form<OpponentModel> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -5004827722926732419L;
|
private static final long serialVersionUID = -5004827722926732419L;
|
||||||
|
|
||||||
public EditSeminarForm(String name) {
|
public EditSeminarForm(String name) {
|
||||||
@ -257,8 +266,8 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
private class EditForm extends Form<Void> {
|
private class EditForm extends Form<Void> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 5882957818616996808L;
|
private static final long serialVersionUID = 5882957818616996808L;
|
||||||
|
|
||||||
public EditForm(String name, final FinalSeminar seminar) {
|
public EditForm(String name, final FinalSeminar seminar) {
|
||||||
@ -290,8 +299,8 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
private class ContactsSeminarForm extends Form<OpponentModel> {
|
private class ContactsSeminarForm extends Form<OpponentModel> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -5004827722926732419L;
|
private static final long serialVersionUID = -5004827722926732419L;
|
||||||
|
|
||||||
public ContactsSeminarForm(String name) {
|
public ContactsSeminarForm(String name) {
|
||||||
@ -306,8 +315,8 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
private class ContactsForm extends Form<Void> {
|
private class ContactsForm extends Form<Void> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -8271761600388217566L;
|
private static final long serialVersionUID = -8271761600388217566L;
|
||||||
|
|
||||||
public ContactsForm(String name, final FinalSeminar seminar) {
|
public ContactsForm(String name, final FinalSeminar seminar) {
|
||||||
@ -316,8 +325,8 @@ public class OpponentListViewPanel extends Panel {
|
|||||||
add(new AjaxButton("contacts", new Model<String>("Details")) {
|
add(new AjaxButton("contacts", new Model<String>("Details")) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1211337464815824507L;
|
private static final long serialVersionUID = 1211337464815824507L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -23,22 +23,15 @@ public class ProjectFinalSeminarContainerPanel extends Panel {
|
|||||||
public ProjectFinalSeminarContainerPanel(final String id, final Project project, final boolean isSupervisorView){
|
public ProjectFinalSeminarContainerPanel(final String id, final Project project, final boolean isSupervisorView){
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
final List<FinalSeminar> seminars = finalSeminarDao.findFinalSeminarsByProject(project);
|
List<FinalSeminar> seminars = finalSeminarDao.findFinalSeminarsByProject(project);
|
||||||
|
|
||||||
if(isSupervisorView && !seminars.isEmpty() ){
|
if(isSupervisorView && seminars.isEmpty() ){
|
||||||
add(new OpponentPanel("addSeminar", project));
|
add(new OpponentPanel("addSeminar", project));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
add(new EmptyPanel("addSeminar"));
|
add(new EmptyPanel("addSeminar"));
|
||||||
}
|
}
|
||||||
add(new Label("noSeminarsMessage", "No final seminar has been created for this project"){
|
add(new Label("noSeminarsMessage", "No final seminar has been created for this project").setVisible(seminars.isEmpty()));
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isVisible(){
|
|
||||||
return seminars.size() == 0;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
add(new ListView<FinalSeminar>("seminarList", seminars){
|
add(new ListView<FinalSeminar>("seminarList", seminars){
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -221,7 +221,7 @@ public class ProjectFinalSeminarPanel extends Panel {
|
|||||||
public boolean isVisible() {
|
public boolean isVisible() {
|
||||||
|
|
||||||
return !isSupervisorView && seminar.getActiveParticipations().isEmpty()
|
return !isSupervisorView && seminar.getActiveParticipations().isEmpty()
|
||||||
&& seminar.getOppositions().isEmpty() && seminar.getTurnitinId() != null;
|
&& seminar.getOppositions().isEmpty() && seminar.getTurnitinId() == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
<span class="box-title">Best rated reviewers</span>
|
<span class="box-title">Best rated reviewers</span>
|
||||||
<div wicket:id="bestRatedPanel" class="append-bottom"></div>
|
<div wicket:id="bestRatedPanel" class="append-bottom"></div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div wicket:id="statsTimespanContainer">
|
||||||
<i><span class="small right">Last 12 months</span></i>
|
<i><span class="small right">Last 12 months</span></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -221,16 +221,23 @@ public class PeerPortalPanel extends Panel {
|
|||||||
int displayedReviews = gsettings.getNumberOfLatestReviewsDisplayed();
|
int displayedReviews = gsettings.getNumberOfLatestReviewsDisplayed();
|
||||||
|
|
||||||
|
|
||||||
|
boolean showStatsTimespan = false;
|
||||||
if(gsettings.isPeerDisplayNumberOfReviewsPerformed()){
|
if(gsettings.isPeerDisplayNumberOfReviewsPerformed()){
|
||||||
add(new MostFrequentReviewersPanel(mostFrequentPanel));
|
add(new MostFrequentReviewersPanel(mostFrequentPanel));
|
||||||
|
showStatsTimespan = true;
|
||||||
} else {
|
} else {
|
||||||
add(new InvisiblePanel(mostFrequentPanel));
|
add(new InvisiblePanel(mostFrequentPanel));
|
||||||
}
|
}
|
||||||
if( gsettings.isPeerRatingsEnabled() ){
|
if( gsettings.isPeerRatingsEnabled() ){
|
||||||
add(new WebMarkupContainer(bestRatedContainer).add(new BestRatedReviewersPanel("bestRatedPanel") ) );
|
add(new WebMarkupContainer(bestRatedContainer).add(new BestRatedReviewersPanel("bestRatedPanel") ) );
|
||||||
|
showStatsTimespan = true;
|
||||||
} else {
|
} else {
|
||||||
add(new InvisiblePanel(bestRatedContainer));
|
add(new InvisiblePanel(bestRatedContainer));
|
||||||
}
|
}
|
||||||
|
WebMarkupContainer statsTimespanContainer = new WebMarkupContainer("statsTimespanContainer");
|
||||||
|
statsTimespanContainer.setVisible(showStatsTimespan);
|
||||||
|
add(statsTimespanContainer);
|
||||||
|
|
||||||
if(gsettings.isPeerDisplayLatestReviews()) {
|
if(gsettings.isPeerDisplayLatestReviews()) {
|
||||||
// Checkbox on the AdminPeerSettingsPage is not visible since it's
|
// Checkbox on the AdminPeerSettingsPage is not visible since it's
|
||||||
// not decided what kind of info that should be public for students.
|
// not decided what kind of info that should be public for students.
|
||||||
|
@ -27,6 +27,7 @@ public abstract class ProjectPage extends MenuPage implements FilePanelContainer
|
|||||||
public ProjectPage(PageParameters pp) {
|
public ProjectPage(PageParameters pp) {
|
||||||
|
|
||||||
Project activeProject = SciProSession.get().getActiveProject();
|
Project activeProject = SciProSession.get().getActiveProject();
|
||||||
|
User u = SciProSession.get().getUser();
|
||||||
|
|
||||||
if(activeProject == null && (this.getClass() != NoActiveProjectPage.class && this.getClass() != ProjectPartnerPage.class)){
|
if(activeProject == null && (this.getClass() != NoActiveProjectPage.class && this.getClass() != ProjectPartnerPage.class)){
|
||||||
User user = SciProSession.get().getUser();
|
User user = SciProSession.get().getUser();
|
||||||
|
@ -64,8 +64,8 @@
|
|||||||
<!-- Use deployment for production, development for development -->
|
<!-- Use deployment for production, development for development -->
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>configuration</param-name>
|
<param-name>configuration</param-name>
|
||||||
<!-- <param-value>development</param-value> -->
|
<!--<param-value>development</param-value> -->
|
||||||
<param-value>deployment</param-value>
|
<param-value>deployment</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
|
|
||||||
|
BIN
src/main/webapp/images/icons/grey_ball_32.png
Normal file
BIN
src/main/webapp/images/icons/grey_ball_32.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.1 KiB |
@ -1,230 +0,0 @@
|
|||||||
@CHARSET "UTF-8";
|
|
||||||
|
|
||||||
html, body {
|
|
||||||
font-family: Calibri, Tahoma, Verdana, sans-serif;
|
|
||||||
margin: 0 0 0 0;
|
|
||||||
padding: 0 0 0 0;
|
|
||||||
font-size: 0.94em;
|
|
||||||
line-height: 1.5em;
|
|
||||||
padding-top: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3 {
|
|
||||||
font-family: Cambria, Tahoma, Verdana, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container {
|
|
||||||
width: 960px;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ajax-loader {
|
|
||||||
z-index:9999;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 80px;
|
|
||||||
height: 30px;
|
|
||||||
background-color: #FFFF80;
|
|
||||||
border-bottom: 1px solid black;
|
|
||||||
border-right: 1px solid black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#veil {
|
|
||||||
opacity:0.3;
|
|
||||||
filter:alpha(opacity=50);
|
|
||||||
position:absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index:9998;
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#veil-loader {
|
|
||||||
z-index:9999;
|
|
||||||
position: absolute;
|
|
||||||
top: 30%;
|
|
||||||
left: 45%;
|
|
||||||
width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
background: url(../images/ajax-loader.gif) center no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.inline {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.connectedSortable {
|
|
||||||
cursor: move;
|
|
||||||
}
|
|
||||||
|
|
||||||
.float-right {
|
|
||||||
float:right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.float-left {
|
|
||||||
float:left;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon,
|
|
||||||
span.icon {
|
|
||||||
padding-left: 20px;
|
|
||||||
line-height: 20px; /* To center the text vertically with the icon */
|
|
||||||
}
|
|
||||||
|
|
||||||
span.floating-icon {
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-button,
|
|
||||||
span.icon-button {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-user,
|
|
||||||
span.icon-user { /*The background image*/
|
|
||||||
background: url(../images/user.png) no-repeat left center;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-project,
|
|
||||||
span.icon-project { /*The background image*/
|
|
||||||
background: url(../images/project.png) no-repeat left center;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-arrowDown,
|
|
||||||
span.icon-arrowDown {
|
|
||||||
background: url(../images/icons/arrow-down.png) no-repeat left center;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-plus,
|
|
||||||
span.icon-plus {
|
|
||||||
background: url(../images/icons/add.gif) no-repeat left center;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-minus,
|
|
||||||
span.icon-minus {
|
|
||||||
background: url(../images/icons/minus.gif) no-repeat left center;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-check,
|
|
||||||
span.icon-check {
|
|
||||||
background: url(../images/icons/circle-check.png) no-repeat left center;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-pencil,
|
|
||||||
span.icon-pencil { /*The background image*/
|
|
||||||
background: url(../images/icons/pencil.png) no-repeat left center;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-delete,
|
|
||||||
span.icon-delete { /*The background image*/
|
|
||||||
background: url(../images/icons/circle-delete.png) no-repeat left center;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.icon-zoom-in,
|
|
||||||
span.icon-zoom-in { /*The background image*/
|
|
||||||
background: url(../images/icons/zoom-in.png) no-repeat left center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bordered-box {
|
|
||||||
border: 1px solid #CCE6FF;
|
|
||||||
padding: 0.5em 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.float-left {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.float-right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.boxContent {
|
|
||||||
margin: 0.5em 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.boxContent h4 {
|
|
||||||
border: 1px solid #0099CC;
|
|
||||||
background-color: #CCE6FF;
|
|
||||||
padding: 0.3em 0.3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboardBox {
|
|
||||||
border: 1px solid #3300CC;
|
|
||||||
width: 50em;
|
|
||||||
min-height: 10em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboardBox h3 {
|
|
||||||
border-bottom: 1px solid #3300CC;
|
|
||||||
background-color: blue;
|
|
||||||
color: white;
|
|
||||||
padding: 0.2em;
|
|
||||||
margin: 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
form.div {
|
|
||||||
display:block;
|
|
||||||
}
|
|
||||||
|
|
||||||
form.formRow {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
#schedulePlannerCtrlContainer {
|
|
||||||
border: 1px solid #CCE6FF;
|
|
||||||
}
|
|
||||||
|
|
||||||
#schedulePlannerCtrlContainer ul {
|
|
||||||
list-style-type: none;
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scheduleEventList {
|
|
||||||
margin: 1em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scheduleEvent {
|
|
||||||
padding: 0.2em 0.2em;
|
|
||||||
-webkit-border-radius: 3px;
|
|
||||||
background-color: #E5F3FF;
|
|
||||||
border: 1px solid #B3DBFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scheduleEventHeader {
|
|
||||||
padding: 0.4em 0.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scheduleEventHeaderBar {
|
|
||||||
margin-left: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scheduleEventHeaderBar img {
|
|
||||||
float:left;
|
|
||||||
margin-right: 1em;
|
|
||||||
margin-left: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scheduleEventHeaderBar span {
|
|
||||||
display: inline;
|
|
||||||
margin-left: 0.1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scheduleEventIconbar {
|
|
||||||
margin: 0.4em 1em;
|
|
||||||
padding: 0.3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scheduleEventContent {
|
|
||||||
padding: 0.3em 0.5em;
|
|
||||||
width: 45em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scheduleEventFooter {
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
form.dialogForm {
|
|
||||||
font-size: 0.9em;
|
|
||||||
}
|
|
@ -110,7 +110,7 @@ public class TestBoardMessageDaoJPA {
|
|||||||
|
|
||||||
messageBoard = new MessageBoard(presenterProject);
|
messageBoard = new MessageBoard(presenterProject);
|
||||||
messageBoard.setTitle("test");
|
messageBoard.setTitle("test");
|
||||||
messageBoard.getBoardMessages().add(boardMessage);
|
messageBoard.addToBoardMessages(boardMessage);
|
||||||
messageBoard = messageBoardDao.save(messageBoard);
|
messageBoard = messageBoardDao.save(messageBoard);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user