Commit f942451c by Antti Jaakkola

Merge branch 'devel' of codecrew.fi:bortal into devel

2 parents 13919d2c 0eec5be6
......@@ -75,7 +75,7 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation usermenu = new MenuNavigation(ev, "topnavi.usernavi", menusort = +10);
usermenu.addPage(menuitemfacade.findOrCreate("/index"), UserPermission.ANYUSER);
usermenu.addPage(menuitemfacade.findOrCreate("/frontpage"), UserPermission.ANYUSER);
usermenu.addPage(menuitemfacade.findOrCreate("/permissionDenied"), null).setVisible(false);
usermenu.addPage(menuitemfacade.findOrCreate("/auth/login"), null).setVisible(false);
usermenu.addPage(menuitemfacade.findOrCreate("/auth/loginError"), null).setVisible(false);
......@@ -89,8 +89,8 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation userEvent = usermenu.addPage(null, null);
userEvent.setKey("topnavi.userevent");
userEvent.addPage(menuitemfacade.findOrCreate("/poll/index"), PollPermission.ANSWER);
userEvent.addPage(menuitemfacade.findOrCreate("/feedback/index"), UserPermission.ANYUSER);
userEvent.addPage(menuitemfacade.findOrCreate("/user/invite"), UserPermission.ANYUSER);
userEvent.addPage(menuitemfacade.findOrCreate("/user/invite"), UserPermission.INVITE_USERS);
userEvent.addPage(menuitemfacade.findOrCreate("/feedback/index"), UserPermission.VITUTTAAKO);
MenuNavigation userkauppa = usermenu.addPage(null, null);
userkauppa.setKey("topnavi.usershop");
......@@ -229,8 +229,12 @@ public class MenuBean implements MenuBeanLocal {
gamenavi.setKey("topnavi.license");
gamenavi.addPage(menuitemfacade.findOrCreate("/license/manageCodes"), LicensePermission.MANAGE);
adminevent.addPage(menuitemfacade.findOrCreate("/eventorg/list"), EventPermission.MANAGE_PROPERTIES);
adminevent.addPage(menuitemfacade.findOrCreate("/feedback/index"), UserPermission.VITUTTAAKO);
navifacade.create(adminmenu);
MenuNavigation shopmenu = new MenuNavigation(ev, "topnavi.shopnavi", menusort = +10);
......@@ -309,7 +313,7 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation frontTopnavi = usernavi.addPage(null, null);
frontTopnavi.setKey("topnavi.frontpage");
frontTopnavi.addPage(menuitemfacade.findOrCreate("/index"), UserPermission.ANYUSER);
frontTopnavi.addPage(menuitemfacade.findOrCreate("/frontpage"), UserPermission.ANYUSER);
frontTopnavi.addPage(menuitemfacade.findOrCreate("/user/create"), UserPermission.CREATE_NEW);
frontTopnavi.addPage(menuitemfacade.findOrCreate("/auth/sendResetMail"), UserPermission.LOGIN);
frontTopnavi.addPage(menuitemfacade.findOrCreate("/user/invite"), UserPermission.INVITE_USERS);
......
......@@ -21,7 +21,7 @@ import org.eclipse.persistence.annotations.OptimisticLockingType;
@OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS)
public class TournamentRule extends GenericEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Column(name="name")
private String name;
......@@ -70,6 +70,4 @@ public class TournamentRule extends GenericEntity implements Serializable {
public void setTournamentGame(TournamentGame tournamentGame) {
this.tournamentGame = tournamentGame;
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title></title>
</h:head>
<h:body>
<ui:composition template="#{sessionHandler.template}">
<f:metadata>
<f:event type="preRenderView" listener="#{pageOutputView.initIndexView}" />
</f:metadata>
<ui:define name="content">
<h:outputLabel rendered="#{sessionHandler.isInDevelopmentMode()}">
Development-tilassa.
Täällä voit huoletta rikkoa.
</h:outputLabel>
<ui:fragment rendered="#{layoutView.manageContent}">
<h:link value="#{i18n['layout.editContent']}" outcome="/pages/manage">
<f:param name="pagename" value="#{layoutView.pagepath}" />
</h:link>
<br />
</ui:fragment>
<ui:repeat var="cont1" value="#{pageOutputView.contents}">
<h:outputText value="#{cont1.content}" escape="false" />
</ui:repeat>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<meta http-equiv="refresh" content="1;url=frontpage.jsf" />
<script type="text/javascript">
window.location.href = "frontpage.jsf"
</script>
<title></title>
</h:head>
<h:body>
<ui:composition template="#{sessionHandler.template}">
<f:metadata>
<f:event type="preRenderView" listener="#{pageOutputView.initIndexView}" />
</f:metadata>
<ui:define name="content">
<h:outputLabel rendered="#{sessionHandler.isInDevelopmentMode()}">
Development-tilassa.
Täällä voit huoletta rikkoa.
</h:outputLabel>
<ui:fragment rendered="#{layoutView.manageContent}">
<h:link value="#{i18n['layout.editContent']}" outcome="/pages/manage">
<f:param name="pagename" value="#{layoutView.pagepath}" />
</h:link>
<br />
</ui:fragment>
<ui:repeat var="cont1" value="#{pageOutputView.contents}">
<h:outputText value="#{cont1.content}" escape="false" />
</ui:repeat>
</ui:define>
</ui:composition>
Redirecting to <a href="frontpage.jsf">Frontpage</a>
</h:body>
</html>
\ No newline at end of file
......@@ -52,7 +52,7 @@
</p:column>
</p:dataTable>
<h:form>
<p:commandButton value="#{i18n['tournament.admin.create']}" action="#{tournamentAdminView.create}"/>
<p:commandButton value="#{i18n['tournament.admin.create']}" action="#{tournamentAdminView.create}" />
</h:form>
</ui:define>
</ui:composition>
......
......@@ -875,7 +875,7 @@ submenu.bill.billSummary = Bill summary
submenu.bill.list = My bills
submenu.bill.listAll = All bills
submenu.eventorg.list = Manage Event
submenu.feedback.index = Feedback
submenu.feedback.index = U Mad?!
submenu.foodadmin.createTemplate = Create foodwave template
submenu.foodadmin.listTemplates = List foodwave templates
submenu.foodmanager.listFoodwaves = List active foodwaves
......
......@@ -856,7 +856,7 @@ submenu.bill.billSummary = Laskujen yhteenveto
submenu.bill.list = N\u00E4yt\u00E4 omat laskut
submenu.bill.listAll = Kaikki laskut
submenu.eventorg.list = Organisaation hallinta
submenu.feedback.index = Palaute
submenu.feedback.index = Vituttaako?
submenu.foodadmin.createTemplate = Luo tilauspohja
submenu.foodadmin.listTemplates = Muokkaa tilauspohjia
submenu.foodmanager.listFoodwaves = Aktiiviset ruokatilaukset
......
......@@ -41,6 +41,10 @@ public abstract class GenericCDIView implements Serializable {
}
}
public void endConversation() {
if(!conversation.isTransient()) conversation.end();
}
public boolean hasPermission(IAppPermission perm) {
// boolean ret =
// FacesContext.getCurrentInstance().getExternalContext().isUserInRole(perm.getFullName());
......
......@@ -14,6 +14,7 @@ import fi.codecrew.moya.model.TournamentRule;
import fi.codecrew.moya.web.cdiview.GenericCDIView;
import javax.ejb.EJB;
import javax.ejb.Remove;
import javax.enterprise.context.ConversationScoped;
import javax.faces.event.ActionEvent;
import javax.inject.Named;
......@@ -63,6 +64,7 @@ public class TournamentCreateView extends GenericCDIView {
tournamentBean.createTournament(tournament);
this.endConversation();
return "success";
}
......
......@@ -53,8 +53,10 @@ public class AuthView extends GenericCDIView {
logger.warn("Error executing logout", e);
}
}
req.getSession().invalidate();
req.getSession().invalidate();
navihandler.forward("/index");
}
......
......@@ -156,8 +156,7 @@ public class LayoutView {
LanEventProperty logo = eventbean.getProperty(LanEventPropertyKey.EVENT_LOGO);
if (logo != null)
{
if (logo.getByteMime() == null)
{
if (logo.getByteMime() == null || logo.getByteValue() == null) {
headertext = logo.getTextvalue();
} else {
headerimage = new DefaultStreamedContent(new ByteArrayInputStream(logo.getByteValue()), logo.getByteMime());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!