Commit 76178149 by Tuukka Kivilahti

minor fixes

1 parent 863f8f35
......@@ -143,9 +143,11 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation userkauppa = usermenu.addPage(null, null);
userkauppa.setKey("topnavi.usershop");
userkauppa.addPage(menuitemfacade.findOrCreate("/shop/createBill"), BillPermission.CREATE_BILL);
userkauppa.addPage(menuitemfacade.findOrCreate("/neomap/reserve"), MapPermission.BUY_PLACES);
userkauppa.addPage(menuitemfacade.findOrCreate("/neomap/notenoughslots"), UserPermission.ANYUSER).setVisible(false);
;
userkauppa.addPage(menuitemfacade.findOrCreate("/shop/shopClosed"), BillPermission.CREATE_BILL).setVisible(false);
userkauppa.addPage(menuitemfacade.findOrCreate("/foodwave/list"), ShopPermission.SHOP_FOODWAVE);
userkauppa.addPage(menuitemfacade.findOrCreate("/foodwave/listProducts"), ShopPermission.SHOP_FOODWAVE).setVisible(false);
userkauppa.addPage(menuitemfacade.findOrCreate("/foodwave/ThanksForOrderingFromCounter"), ShopPermission.SHOP_FOODWAVE).setVisible(false);
......
......@@ -2,10 +2,10 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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"
xmlns:p="http://primefaces.org/ui">
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:body>
......@@ -16,7 +16,16 @@
<h1>#{i18n['page.product.shopClosed.header']}</h1>
</ui:define>
<ui:define name="content">
Shop Closed!!
<c:choose>
<c:when test="#{productShopView.notOpenYet}">
#{i18n['page.product.shopClosed.notOpenYet']}
</c:when>
<c:otherwise>
#{i18n['page.product.shopClosed.alreadyClosed']}
</c:otherwise>
</c:choose>
</ui:define>
</ui:composition>
......
......@@ -120,6 +120,12 @@ public class ProductShopView extends GenericCDIView {
return null;
}
public boolean isNotOpenYet() {
LanEvent event = eventbean.getCurrentEvent();
return (event.getTicketSalesBegin() != null && (new Date()).before((event.getTicketSalesBegin())));
}
public void initBillView() {
if (requirePermissions(ShopPermission.LIST_USERPRODUCTS) && shoppingcart == null) {
......
......@@ -1579,3 +1579,6 @@ voting.create.voteEnd = Voting close
voting.create.voteStart = Voting start
yes = Yes
page.product.shopClosed.header=Shop is closed!
page.product.shopClosed.notOpenYet=Shop is not opened. Try again later.
page.product.shopClosed.alreadyClosed=Shop is closed, welcome back in next event!
......@@ -1857,3 +1857,6 @@ voting.create.voteEnd = Voting close
voting.create.voteStart = Voting start
yes = Yes
page.product.shopClosed.header=Shop is closed!
page.product.shopClosed.notOpenYet=Shop is not opened. Try again later.
page.product.shopClosed.alreadyClosed=Shop is closed, welcome back in next event!
......@@ -1844,3 +1844,6 @@ voting.create.voteEnd = \u00C4\u00E4nestys kiinni
voting.create.voteStart = \u00C4\u00E4nestys auki
yes = Kyll\u00E4
page.product.shopClosed.header=Kauppa on kiinni!
page.product.shopClosed.notOpenYet=Tapahtuman lipunmyynti ei ole viel\u00E4 alkanut, Kokeile uudelleen my\u00F6hemmin.
page.product.shopClosed.alreadyClosed=Kauppa on suljettu, tervetuloa uudelleen tuleviin tapahtumiin.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!