added project status to projectdetailspanel

This commit is contained in:
Fredrik Friis 2012-02-20 19:59:38 +09:00
parent b5bc5affad
commit 02dc395304
2 changed files with 11 additions and 0 deletions
src/main/java/se/su/dsv/scipro/project/panels

@ -11,6 +11,8 @@
Project details
<!-- span class="right" wicket:id="helpDialog"></span -->
</h5>
<div><b>Project status: </b></div>
<div wicket:id="status"></div>
<div><b>Title: </b></div>
<div wicket:id="title"></div>
<div><b>Authors: </b></div>

@ -7,6 +7,7 @@ import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
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.Model;
@ -33,6 +34,14 @@ public class ProjectDetailsPanel extends Panel {
project = new Project();
}
if(project.getProjectStatus()==null){
add(new EmptyPanel("status"));
}
else if(project.getProjectStatus()!=null){
add(new Label("status", "This project is " + project.getProjectStatus().toString()));
}
add(new Label("title", new PropertyModel<Project>(project, "title")));
ListView<Student> slistview = new ListView<Student>("slistview", new ArrayList(project.getProjectParticipants())){