3134 show approved/failed in the attending list for authors under the "Opposition and Active participation" tab
This commit is contained in:
parent
9f10421b76
commit
d128048c13
view/src/main/java/se/su/dsv/scipro/finalseminar
@ -7,14 +7,20 @@
|
||||
<div wicket:id="oppositions">
|
||||
<div>
|
||||
<span wicket:id="date"></span> <a wicket:id="seminarLink"><span wicket:id="seminarLabel"></span></a>
|
||||
<wicket:enclosure>
|
||||
(<span wicket:id="grade"></span>)
|
||||
</wicket:enclosure>
|
||||
</div>
|
||||
</div>
|
||||
<p wicket:id="noOppositions"></p>
|
||||
<h4>My active participations</h4>
|
||||
<div wicket:id="wmc">
|
||||
<div wicket:id="participations">
|
||||
<a wicket:id="seminarLink"><span wicket:id="seminarLabel"></span></a>
|
||||
<span wicket:id="date"></span>
|
||||
<a wicket:id="seminarLink"><span wicket:id="seminarLabel"></span></a>
|
||||
<wicket:enclosure>
|
||||
(<span wicket:id="grade"></span>)
|
||||
</wicket:enclosure>
|
||||
<span wicket:id="remove"><span class="fa fa-times"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,6 +3,7 @@ package se.su.dsv.scipro.finalseminar;
|
||||
import org.apache.wicket.Component;
|
||||
import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||
import org.apache.wicket.markup.html.WebMarkupContainer;
|
||||
import org.apache.wicket.markup.html.basic.EnumLabel;
|
||||
import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
||||
import org.apache.wicket.markup.html.list.ListItem;
|
||||
@ -44,6 +45,13 @@ public class AttendingPanel extends GenericPanel<Project> {
|
||||
item.add(link);
|
||||
link.add(new Label("seminarLabel", finalSeminarModel.map(FinalSeminar::getProject).map(Project::getTitle)));
|
||||
item.add(new DateLabel("date", finalSeminarModel.map(FinalSeminar::getStartDate), DateStyle.DATETIME));
|
||||
item.add(new EnumLabel<>("grade", item.getModel().map(FinalSeminarParticipation::getGrade)) {
|
||||
@Override
|
||||
protected void onConfigure() {
|
||||
super.onConfigure();
|
||||
setVisible(getModelObject() != null);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
add(new Label("noOppositions", "No oppositions"){
|
||||
@ -79,6 +87,13 @@ public class AttendingPanel extends GenericPanel<Project> {
|
||||
removeParticipation.setVisible(!finalSeminarActiveParticipationService.findByFinalSeminarUser(
|
||||
seminarModel.getObject(), SciProSession.get().getUser()).hasGrade());
|
||||
item.add(removeParticipation);
|
||||
item.add(new EnumLabel<>("grade", item.getModel().map(FinalSeminarParticipation::getGrade)) {
|
||||
@Override
|
||||
protected void onConfigure() {
|
||||
super.onConfigure();
|
||||
setVisible(getModelObject() != null);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
wmc.add(participations);
|
||||
|
@ -0,0 +1,2 @@
|
||||
FinalSeminarGrade.APPROVED=approved
|
||||
FinalSeminarGrade.NOT_APPROVED=failed
|
Loading…
x
Reference in New Issue
Block a user