Project level and credits active participations and opposition

Previously accessing the final seminar view for active participations students could only see the project title on the top of the page,
the project level (bachelor, master ...) and credits for the level where missing.

In other places of the application we are showing the title, project level and credits.

Now the title, project level and credits are shown in the view following the same pattern as in other places of the application
This commit is contained in:
Nico Athanassiadis 2025-04-14 10:10:24 +02:00
parent d2e5043c95
commit 727fe0f829
2 changed files with 18 additions and 2 deletions
view/src/main/java/se/su/dsv/scipro/finalseminar

@ -2,7 +2,11 @@
<html xmlns:wicket="http://wicket.apache.org">
<body>
<wicket:panel>
<h3>Final seminar for project: <span wicket:id="projectTitle">[Title]</span></h3>
<h3>Final seminar for project:
<span wicket:id="projectTitle">[Title]</span> (<span wicket:id="projectType"></span><wicket:enclosure>,
<span wicket:id="credits">30</span> hec </wicket:enclosure>)
</h3>
<br>
<div class="row">

@ -1,7 +1,7 @@
package se.su.dsv.scipro.finalseminar;
import jakarta.inject.Inject;
import java.util.*;
import java.util.Date;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.ExternalLink;
@ -18,6 +18,8 @@ import se.su.dsv.scipro.system.User;
public class SeminarPanel extends Panel {
public static final String PROJECT_TITLE = "projectTitle";
static final String PROJECT_TYPE = "projectType";
static final String CREDITS = "credits";
static final String CANCELLED = "cancelled";
static final String CRUD = "crud";
static final String CRUD_NOT_ALLOWED = "noCrud";
@ -69,6 +71,16 @@ public class SeminarPanel extends Panel {
);
add(new Label(PROJECT_TITLE, seminar.map(FinalSeminar::getProject).map(Project::getTitle)));
add(new Label(PROJECT_TYPE, seminar.map(FinalSeminar::getProject).map(Project::getProjectTypeName)));
add(
new Label(CREDITS, seminar.map(FinalSeminar::getProject).map(Project::getCredits)) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(seminar.getObject().getProject().getCredits() > 0);
}
}
);
add(new ScheduleFinalSeminarPanel("schedule", getProject()));
add(new SeminarCRUDPanel(CRUD, seminar));