Commit 1c22d9ef by Tuukka Kivilahti

style rewert and participant remove stuff, Also one bugfix

1 parent 0d96f0c3
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
<ui:define name="content"> <ui:define name="content">
<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
<p:commandButton value="#{i18n['yes']}" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
<p:commandButton value="#{i18n['no']}" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
</p:confirmDialog>
<p:fieldset legend="#{lectureReportsView.currentLecture.name}"> <p:fieldset legend="#{lectureReportsView.currentLecture.name}">
<p:panelGrid columns="2"> <p:panelGrid columns="2">
<p:outputLabel value="#{i18n['lecture.description']}" /> <p:outputLabel value="#{i18n['lecture.description']}" />
...@@ -46,6 +51,12 @@ ...@@ -46,6 +51,12 @@
<p:column> <p:column>
<h:outputText value="#{user.user.firstnames}" /> <h:outputText value="#{user.user.firstnames}" />
</p:column> </p:column>
<p:column>
<p:commandButton value="#{i18n['lecture.unparticipate']}" actionListener="#{lectureReportsView.unParticipateCurrent}" update="participants :participants_count" onerror="location.reload(true)">
<f:attribute name="userid" value="#{user.id}" />
<p:confirm header="#{i18n['lecture.unparticipate.confirm.title']}" message="#{i18n['lecture.unparticipate.confirm.message']}" icon="ui-icon-alert" />
</p:commandButton>
</p:column>
</p:dataTable> </p:dataTable>
</h:form> </h:form>
<br /> <br />
......
.ui-widget,.ui-widget .ui-widget,.ui-button-text,.ui-wizard-step-title { .ui-widget,.ui-widget .ui-widget,.ui-button-text,.ui-wizard-step-title {
font-size: 10pt !important; /* Muutin takas -TKjne.
Syy: listoja yms. meni rikki kun sinne tarkoitettu sisältö ei enää mahtunutkaan paikoilleen -> jos tähän koskee kannattaa testata n. kaikki.
Fonttimuutoksen vois esmes yhdistää siihen kun säätää mahdollista uutta leiskaa käyttöön.
*/
font-size: 90% !important;
} }
.ui-panelmenu-header { .ui-panelmenu-header {
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import javax.ejb.EJB; import javax.ejb.EJB;
import javax.enterprise.context.ConversationScoped; import javax.enterprise.context.ConversationScoped;
import javax.faces.event.ActionEvent;
import javax.faces.model.ListDataModel; import javax.faces.model.ListDataModel;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
...@@ -104,6 +105,20 @@ public class LectureReportsView extends GenericCDIView { ...@@ -104,6 +105,20 @@ public class LectureReportsView extends GenericCDIView {
return lectures; return lectures;
} }
public void unParticipateCurrent(ActionEvent event) {
Integer userId = (Integer) event.getComponent().getAttributes().get("userid");
// sometimes you just are lazy
for(EventUser user : getCurrentLecture().getParticipants()) {
if(user.getId() == userId) {
lectureBean.unparticipate(user, getCurrentLecture());
break;
}
}
}
public int getCurrentGroupParticipateCount() { public int getCurrentGroupParticipateCount() {
......
...@@ -144,6 +144,10 @@ public class LectureUserView extends GenericCDIView { ...@@ -144,6 +144,10 @@ public class LectureUserView extends GenericCDIView {
} }
public void onLecureCalendarEventSelect(SelectEvent selectEvent) { public void onLecureCalendarEventSelect(SelectEvent selectEvent) {
if (!isParticipateActive()) {
return;
}
Lecture lecture = (Lecture) ((DefaultScheduleEvent) selectEvent.getObject()).getData(); Lecture lecture = (Lecture) ((DefaultScheduleEvent) selectEvent.getObject()).getData();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!