Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Max Mecklin
/
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 f9733a22
authored
Nov 04, 2013
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor fixes and localisations
1 parent
7602d5ca
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
25 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/ProductBean.java
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n.properties
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
code/MoyaWeb/src/fi/codecrew/moya/servlet/PlaceMap.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/shop/ProductShopView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserView.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
View file @
f9733a2
...
...
@@ -96,7 +96,6 @@ public class MenuBean implements MenuBeanLocal {
userEvent
.
setKey
(
"topnavi.userevent"
);
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/poll/index"
),
PollPermission
.
ANSWER
);
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/poll/answerToPoll"
),
PollPermission
.
ANSWER
).
setVisible
(
false
);
;
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/invite"
),
UserPermission
.
INVITE_USERS
);
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/feedback/index"
),
UserPermission
.
VITUTTAAKO
);
...
...
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/ProductBean.java
View file @
f9733a2
...
...
@@ -206,8 +206,7 @@ public class ProductBean implements ProductBeanLocal {
{
case
GLOBAL_BILLED:
BigDecimal
globBillTot
=
BigDecimal
.
ZERO
;
for
(
Product
p
:
limit
.
getProducts
())
{
for
(
Product
p
:
limit
.
getProducts
())
{
BillSummary
globBilledSummary
=
billLineFacade
.
getLineSummary
(
p
,
eventbean
.
getCurrentEvent
());
globBillTot
=
globBillTot
.
add
(
globBilledSummary
.
getTotal
());
}
...
...
@@ -216,8 +215,7 @@ public class ProductBean implements ProductBeanLocal {
break
;
case
GLOBAL_BILL_PAID:
BigDecimal
globBillPaid
=
BigDecimal
.
ZERO
;
for
(
Product
p
:
limit
.
getProducts
())
{
for
(
Product
p
:
limit
.
getProducts
())
{
BillSummary
billPaidSummary
=
billLineFacade
.
getLineSummary
(
p
,
eventbean
.
getCurrentEvent
());
globBillPaid
=
globBillPaid
.
add
(
billPaidSummary
.
getPaid
());
}
...
...
@@ -233,16 +231,14 @@ public class ProductBean implements ProductBeanLocal {
break
;
case
USER_ACCOUNTEVENTS:
BigDecimal
userProductCount
=
accounteventfacade
.
getProductCount
(
limit
.
getProducts
(),
user
);
if
(
userProductCount
!=
null
)
{
if
(
userProductCount
!=
null
)
{
count
=
count
.
add
(
userProductCount
);
}
ret
=
limit
.
getUpperLimit
().
subtract
(
count
);
break
;
case
USER_BILLED:
BigDecimal
userBillTot
=
BigDecimal
.
ZERO
;
for
(
Product
p
:
limit
.
getProducts
())
{
for
(
Product
p
:
limit
.
getProducts
())
{
BillSummary
userBilledSummary
=
billLineFacade
.
getLineSummary
(
p
,
eventbean
.
getCurrentEvent
(),
user
);
userBillTot
=
userBillTot
.
add
(
userBilledSummary
.
getTotal
());
}
...
...
@@ -251,8 +247,7 @@ public class ProductBean implements ProductBeanLocal {
break
;
case
USER_BILL_PAID:
BigDecimal
userBillPaid
=
BigDecimal
.
ZERO
;
for
(
Product
p
:
limit
.
getProducts
())
{
for
(
Product
p
:
limit
.
getProducts
())
{
BillSummary
userPaidSummary
=
billLineFacade
.
getLineSummary
(
p
,
eventbean
.
getCurrentEvent
(),
user
);
userBillPaid
=
userBillPaid
.
add
(
userPaidSummary
.
getPaid
());
}
...
...
@@ -364,15 +359,15 @@ public class ProductBean implements ProductBeanLocal {
@Override
public
List
<
Product
>
findPlaceProducts
()
{
ArrayList
<
Product
>
returnProducts
=
new
ArrayList
<
Product
>();
for
(
Product
product
:
findProductsForEvent
())
{
if
(
product
.
getPlaces
()
!=
null
&&
product
.
getPlaces
().
size
()
>
0
)
{
for
(
Product
product
:
findProductsForEvent
())
{
if
(
product
.
getPlaces
()
!=
null
&&
product
.
getPlaces
().
size
()
>
0
)
{
returnProducts
.
add
(
product
);
}
}
return
returnProducts
;
}
}
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n.properties
View file @
f9733a2
...
...
@@ -223,8 +223,8 @@ resetMail.username = Username
resetmailSent.body
=
Email has been sent containing a link where you can change the password.
resetmailSent.header
=
Email sent
submenu.NotImplementedYet
=
Not implemented
submenu.frontpage
=
Frontpage
submenu.NotImplementedYet
=
Not implemented
submenu.frontpage
=
Frontpage
subnavi.cards
=
\u0009\u0009
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
View file @
f9733a2
...
...
@@ -910,6 +910,7 @@ submenu.auth.sendResetMail = Password reset
submenu.bill.billSummary
=
Bill summary
submenu.bill.list
=
My bills
submenu.bill.listAll
=
All bills
submenu.eventorg.editEvent
=
Edit event
submenu.eventorg.list
=
Manage Event
submenu.feedback.index
=
U Mad?!
submenu.foodadmin.createTemplate
=
Create foodwave template
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
View file @
f9733a2
...
...
@@ -892,6 +892,7 @@ submenu.auth.sendResetMail = Salasanan palautus
submenu.bill.billSummary
=
Laskujen yhteenveto
submenu.bill.list
=
N
\u
00E4yt
\u
00E4 omat laskut
submenu.bill.listAll
=
Kaikki laskut
submenu.eventorg.editEvent
=
Tapahtuman tiedot
submenu.eventorg.list
=
Organisaation hallinta
submenu.feedback.index
=
Vituttaako?
submenu.foodadmin.createTemplate
=
Luo tilauspohja
...
...
code/MoyaWeb/src/fi/codecrew/moya/servlet/PlaceMap.java
View file @
f9733a2
...
...
@@ -246,6 +246,7 @@ public class PlaceMap extends HttpServlet {
}
Color
color
=
null
;
if
(!
p
.
isBuyable
())
{
logger
.
info
(
"Locking place."
);
color
=
LOCKED_COLOR
;
}
...
...
@@ -253,8 +254,7 @@ public class PlaceMap extends HttpServlet {
logger
.
debug
(
"Setting place selected {}"
,
p
);
color
=
SELECTED_COLOR
;
}
else
if
(
user
.
equals
(
p
.
getCurrentUser
())
||
(
p
.
getGroup
()
!=
null
&&
user
.
equals
(
p
.
getGroup
()
.
getCreator
()))
||
(
p
.
getGroup
()
!=
null
&&
user
.
equals
(
p
.
getGroup
().
getCreator
()))
||
(
p
.
getPlaceReserver
()
!=
null
&&
user
.
equals
(
p
.
getPlaceReserver
().
getUser
())))
{
color
=
OWNED_COLOR
;
...
...
@@ -271,6 +271,9 @@ public class PlaceMap extends HttpServlet {
}
catch
(
NumberFormatException
x
)
{
logger
.
error
(
"Cannot convert string {} to color."
,
p
.
getProduct
().
getColor
());
}
}
else
{
logger
.
info
(
"Nothing special for this place. Color should be default."
);
}
g
.
setColor
(
BORDER_COLOR
);
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/shop/ProductShopView.java
View file @
f9733a2
...
...
@@ -94,9 +94,7 @@ public class ProductShopView extends GenericCDIView {
public
void
initBillView
()
{
if
(
requirePermissions
(
ShopPermission
.
LIST_USERPRODUCTS
)
&&
shoppingcart
==
null
)
{
shoppingcart
=
new
ListDataModel
<
ProductShopItem
>(
ProductShopItem
.
productList
(
productBean
.
listUserShoppableProducts
()));
shoppingcart
=
new
ListDataModel
<
ProductShopItem
>(
ProductShopItem
.
productList
(
productBean
.
listUserShoppableProducts
()));
updateCartLimits
(
null
);
logger
.
debug
(
"Initialized billing shoppingcart to {}"
,
shoppingcart
);
this
.
beginConversation
();
...
...
@@ -193,8 +191,7 @@ public class ProductShopView extends GenericCDIView {
prodCounts
.
put
(
sc
.
getProduct
().
getId
(),
sc
.
getCount
());
}
HashMap
<
Integer
,
BigDecimal
>
limits
=
productBean
.
getProductLimit
(
prodCounts
,
user
);
HashMap
<
Integer
,
BigDecimal
>
limits
=
productBean
.
getProductLimit
(
prodCounts
,
user
);
// Update the updated cart first
if
(
item
!=
null
)
{
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserView.java
View file @
f9733a2
...
...
@@ -128,6 +128,7 @@ public class UserView extends GenericCDIView {
}
public
void
handleImageUpload
(
FileUploadEvent
event
)
{
logger
.
info
(
"Handling fileupload with event {} and file"
,
event
,
event
.
getFile
());
FacesMessage
msg
=
new
FacesMessage
(
"Succesful"
,
event
.
getFile
().
getFileName
()
+
" is uploaded."
);
FacesContext
.
getCurrentInstance
().
addMessage
(
null
,
msg
);
UploadedFile
f
=
event
.
getFile
();
...
...
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