diff --git a/view/src/main/java/se/su/dsv/scipro/finalseminar/SeminarOppositionReportPanel.html b/view/src/main/java/se/su/dsv/scipro/finalseminar/SeminarOppositionReportPanel.html index b490fdc9db..a7bdd8a3f3 100644 --- a/view/src/main/java/se/su/dsv/scipro/finalseminar/SeminarOppositionReportPanel.html +++ b/view/src/main/java/se/su/dsv/scipro/finalseminar/SeminarOppositionReportPanel.html @@ -9,6 +9,10 @@ <wicket:container wicket:id="newReport"/> <span wicket:id="oppositionReportLabel"></span> <span wicket:id="noOppositionReportYet"></span> <a href="#" wicket:id="oppositionReportLink">Fill out opposition report</a> + <div class="alert alert-info mt-1" wicket:id="improvements_requested"> + The supervisor has requested improvements to your opposition report. + Click the link above to see detailed comments from the supervisor and to make the requested changes. + </div> <span wicket:id="downloadPdfPanel"></span><br /> <wicket:enclosure child="downloadAttachment"> Report attachment: <span wicket:id="downloadAttachment"></span> diff --git a/view/src/main/java/se/su/dsv/scipro/finalseminar/SeminarOppositionReportPanel.java b/view/src/main/java/se/su/dsv/scipro/finalseminar/SeminarOppositionReportPanel.java index fd975f51ad..38fc6aeb41 100644 --- a/view/src/main/java/se/su/dsv/scipro/finalseminar/SeminarOppositionReportPanel.java +++ b/view/src/main/java/se/su/dsv/scipro/finalseminar/SeminarOppositionReportPanel.java @@ -70,6 +70,19 @@ public class SeminarOppositionReportPanel extends GenericPanel<FinalSeminarOppos wmc.add(getDeleteOpponentReportLink(model)); wmc.add(getDeleteOppositionReportLink(model)); + + wmc.add( + new WebMarkupContainer("improvements_requested") { + @Override + protected void onConfigure() { + super.onConfigure(); + FinalSeminarOpposition opp = model.getObject(); + boolean notGraded = opp.getGrade() == null; + boolean improvementsRequested = opp.getImprovementsRequestedAt() != null; + setVisible(isOpponentAndNotSubmitted(opp) && notGraded && improvementsRequested); + } + } + ); } private Component getNewReportContainer(ViewAttachmentPanel oldReport) {