Commit 17c05c7a by Juho Salli

compolist muutoksia

1 parent 0bdb53ee
...@@ -93,6 +93,15 @@ ...@@ -93,6 +93,15 @@
<f:convertDateTime type="both" pattern="dd.MM.yyyy HH:mm" /> <f:convertDateTime type="both" pattern="dd.MM.yyyy HH:mm" />
</h:outputText> </h:outputText>
</h:column> </h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Submit entry" />
</f:facet>
<h:link outcome="addentry">
<f:param name="compoId" value="#{compo.id}" />
Submit entry
</h:link>
</h:column>
</h:dataTable> </h:dataTable>
</div> </div>
......
...@@ -526,6 +526,8 @@ userview.userExists = Username already exists! please select another. ...@@ -526,6 +526,8 @@ userview.userExists = Username already exists! please select another.
viewexpired.body = Please login again. viewexpired.body = Please login again.
viewexpired.title = Login expired. Please login again. viewexpired.title = Login expired. Please login again.
voting.allcompos.description = List of all compos and NIIDEN information.
voting.allcompos.header = All compos
voting.create.compoEnd = End time voting.create.compoEnd = End time
voting.create.compoStart = Start time voting.create.compoStart = Start time
voting.create.createButton = Create voting.create.createButton = Create
......
...@@ -516,6 +516,8 @@ userview.userExists = K\u00E4ytt\u00E4j\u00E4tunnus on jo olemassa. Ole ...@@ -516,6 +516,8 @@ userview.userExists = K\u00E4ytt\u00E4j\u00E4tunnus on jo olemassa. Ole
viewexpired.body = Ole hyv\u00E4 ja kirjaudu sis\u00E4\u00E4n uudelleen. viewexpired.body = Ole hyv\u00E4 ja kirjaudu sis\u00E4\u00E4n uudelleen.
viewexpired.title = N\u00E4kym\u00E4 on vanhentunut viewexpired.title = N\u00E4kym\u00E4 on vanhentunut
voting.allcompos.description = Compojen informaatiot.
voting.allcompos.header = Kaikki compot
voting.create.compoEnd = Lopetusaika voting.create.compoEnd = Lopetusaika
voting.create.compoStart = Aloitusaika voting.create.compoStart = Aloitusaika
voting.create.createButton = Luo voting.create.createButton = Luo
......
...@@ -7,6 +7,8 @@ import javax.enterprise.context.RequestScoped; ...@@ -7,6 +7,8 @@ import javax.enterprise.context.RequestScoped;
import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedBean;
import javax.inject.Named; import javax.inject.Named;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fi.insomnia.bortal.beans.VotingBeanLocal; import fi.insomnia.bortal.beans.VotingBeanLocal;
import fi.insomnia.bortal.model.Compo; import fi.insomnia.bortal.model.Compo;
...@@ -29,6 +31,8 @@ public class VotingCompoListView extends GenericCDIView { ...@@ -29,6 +31,8 @@ public class VotingCompoListView extends GenericCDIView {
boolean curEntries; boolean curEntries;
boolean maxParts; boolean maxParts;
private static final Logger logger = LoggerFactory.getLogger(VotingCompoListView.class);
public boolean isCurEntries() { public boolean isCurEntries() {
return curEntries; return curEntries;
} }
...@@ -55,10 +59,12 @@ public class VotingCompoListView extends GenericCDIView { ...@@ -55,10 +59,12 @@ public class VotingCompoListView extends GenericCDIView {
if(requirePermissions(CompoPermission.VIEW_COMPOS) && role == null) { if(requirePermissions(CompoPermission.VIEW_COMPOS) && role == null) {
curEntries = true; curEntries = true;
maxParts = true; maxParts = true;
logger.info("Permission to view full compo listing.");
} }
else { else {
curEntries = false; curEntries = false;
maxParts = false; maxParts = false;
logger.info("Not enough rights to view full compo listing.");
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!