Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fc4dfef2
authored
Mar 01, 2017
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'shopClosedFix' into 'master'
minor fixes See merge request !361
2 parents
863f8f35
76178149
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
3 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
code/moya-web/WebContent/shop/shopClosed.xhtml
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/shop/ProductShopView.java
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n.properties
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_en.properties
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
code/moya-beans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
View file @
fc4dfef
...
@@ -143,9 +143,11 @@ public class MenuBean implements MenuBeanLocal {
...
@@ -143,9 +143,11 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation
userkauppa
=
usermenu
.
addPage
(
null
,
null
);
MenuNavigation
userkauppa
=
usermenu
.
addPage
(
null
,
null
);
userkauppa
.
setKey
(
"topnavi.usershop"
);
userkauppa
.
setKey
(
"topnavi.usershop"
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/shop/createBill"
),
BillPermission
.
CREATE_BILL
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/shop/createBill"
),
BillPermission
.
CREATE_BILL
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/neomap/reserve"
),
MapPermission
.
BUY_PLACES
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/neomap/reserve"
),
MapPermission
.
BUY_PLACES
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/neomap/notenoughslots"
),
UserPermission
.
ANYUSER
).
setVisible
(
false
);
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/list"
),
ShopPermission
.
SHOP_FOODWAVE
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodwave/listProducts"
),
ShopPermission
.
SHOP_FOODWAVE
).
setVisible
(
false
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodwave/listProducts"
),
ShopPermission
.
SHOP_FOODWAVE
).
setVisible
(
false
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodwave/ThanksForOrderingFromCounter"
),
ShopPermission
.
SHOP_FOODWAVE
).
setVisible
(
false
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodwave/ThanksForOrderingFromCounter"
),
ShopPermission
.
SHOP_FOODWAVE
).
setVisible
(
false
);
...
...
code/moya-web/WebContent/shop/shopClosed.xhtml
View file @
fc4dfef
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:p=
"http://primefaces.org/ui
"
>
xmlns:p=
"http://primefaces.org/ui"
xmlns:c=
"http://java.sun.com/jsp/jstl/core
"
>
<h:body>
<h:body>
...
@@ -16,7 +16,16 @@
...
@@ -16,7 +16,16 @@
<h1>
#{i18n['page.product.shopClosed.header']}
</h1>
<h1>
#{i18n['page.product.shopClosed.header']}
</h1>
</ui:define>
</ui:define>
<ui:define
name=
"content"
>
<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:define>
</ui:composition>
</ui:composition>
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/shop/ProductShopView.java
View file @
fc4dfef
...
@@ -120,6 +120,12 @@ public class ProductShopView extends GenericCDIView {
...
@@ -120,6 +120,12 @@ public class ProductShopView extends GenericCDIView {
return
null
;
return
null
;
}
}
public
boolean
isNotOpenYet
()
{
LanEvent
event
=
eventbean
.
getCurrentEvent
();
return
(
event
.
getTicketSalesBegin
()
!=
null
&&
(
new
Date
()).
before
((
event
.
getTicketSalesBegin
())));
}
public
void
initBillView
()
{
public
void
initBillView
()
{
if
(
requirePermissions
(
ShopPermission
.
LIST_USERPRODUCTS
)
&&
shoppingcart
==
null
)
{
if
(
requirePermissions
(
ShopPermission
.
LIST_USERPRODUCTS
)
&&
shoppingcart
==
null
)
{
...
...
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n.properties
View file @
fc4dfef
...
@@ -1579,3 +1579,6 @@ voting.create.voteEnd = Voting close
...
@@ -1579,3 +1579,6 @@ voting.create.voteEnd = Voting close
voting.create.voteStart
=
Voting start
voting.create.voteStart
=
Voting start
yes
=
Yes
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!
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_en.properties
View file @
fc4dfef
...
@@ -1857,3 +1857,6 @@ voting.create.voteEnd = Voting close
...
@@ -1857,3 +1857,6 @@ voting.create.voteEnd = Voting close
voting.create.voteStart
=
Voting start
voting.create.voteStart
=
Voting start
yes
=
Yes
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!
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
View file @
fc4dfef
...
@@ -1844,3 +1844,6 @@ voting.create.voteEnd = \u00C4\u00E4nestys kiinni
...
@@ -1844,3 +1844,6 @@ voting.create.voteEnd = \u00C4\u00E4nestys kiinni
voting.create.voteStart
=
\u
00C4
\u
00E4nestys auki
voting.create.voteStart
=
\u
00C4
\u
00E4nestys auki
yes
=
Kyll
\u
00E4
yes
=
Kyll
\u
00E4
page.product.shopClosed.header
=
Kauppa on kiinni!
page.product.shopClosed.notOpenYet
=
Tapahtuman lipunmyynti ei ole viel
\u
00E4 alkanut, Kokeile uudelleen my
\u
00F6hemmin.
page.product.shopClosed.alreadyClosed
=
Kauppa on suljettu, tervetuloa uudelleen tuleviin tapahtumiin.
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment