Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
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 a4ddde17
authored
Sep 01, 2013
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'devel' of codecrew.fi:bortal into devel
2 parents
a248c335
d3bda6e2
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
322 additions
and
41 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/BootstrapBean.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/TournamentBean.java
code/MoyaBeansClient/ejbModule/fi/codecrew/moya/beans/TournamentBeanLocal.java
code/MoyaDatabase/src/fi/codecrew/moya/model/Tournament.java
code/MoyaDatabase/src/fi/codecrew/moya/model/TournamentRule.java
code/MoyaWeb/WebContent/resources/cditools/products/shop.xhtml
code/MoyaWeb/WebContent/resources/templates/template1/css/style.css
code/MoyaWeb/WebContent/tournaments/admin/createwizard.xhtml
code/MoyaWeb/WebContent/tournaments/admin/index.xhtml
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/web/cdiview/tournaments/TournamentAdminView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentCreateView.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/BootstrapBean.java
View file @
a4ddde1
...
...
@@ -28,6 +28,7 @@ public class BootstrapBean implements BootstrapBeanLocal {
// {"Query1","Query2",...}
dbUpdates
.
add
(
new
String
[]
{
""
});
// first version, no changes
dbUpdates
.
add
(
new
String
[]
{
"ALTER TABLE tournaments ADD COLUMN game integer NOT NULL REFERENCES tournament_games(id)"
});
dbUpdates
.
add
(
new
String
[]
{
"ALTER TABLE tournaments ADD COLUMN rules integer NOT NULL REFERENCES tournament_rules(id)"
});
// dbUpdates.add(new String[] { "ALTER TABLE users ALTER COLUMN birthday TYPE date" });
}
...
...
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/TournamentBean.java
View file @
a4ddde1
...
...
@@ -6,6 +6,7 @@ import javax.ejb.EJB;
import
javax.ejb.LocalBean
;
import
javax.ejb.Stateless
;
import
fi.codecrew.moya.facade.TournamentFacade
;
import
fi.codecrew.moya.facade.TournamentGameFacade
;
import
fi.codecrew.moya.facade.TournamentRuleFacade
;
import
fi.codecrew.moya.model.Tournament
;
...
...
@@ -21,6 +22,7 @@ public class TournamentBean implements TournamentBeanLocal {
@EJB
private
TournamentRuleFacade
tournamentRuleFacade
;
@EJB
private
TournamentGameFacade
tournamentGameFacade
;
@EJB
private
TournamentFacade
tournamentFacade
;
/**
* Default constructor.
...
...
@@ -45,8 +47,8 @@ public class TournamentBean implements TournamentBeanLocal {
}
@Override
public
void
createRule
(
TournamentRule
tr
)
{
tournamentRuleFacade
.
create
(
tr
);
public
TournamentRule
createRule
(
TournamentRule
tr
)
{
return
tournamentRuleFacade
.
create
(
tr
);
}
@Override
...
...
@@ -58,4 +60,9 @@ public class TournamentBean implements TournamentBeanLocal {
public
TournamentRule
findRule
(
Integer
id
)
{
return
tournamentRuleFacade
.
find
(
id
);
}
@Override
public
void
createTournament
(
Tournament
tournament
)
{
tournamentFacade
.
create
(
tournament
);
}
}
code/MoyaBeansClient/ejbModule/fi/codecrew/moya/beans/TournamentBeanLocal.java
View file @
a4ddde1
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
javax.ejb.Local
;
import
fi.codecrew.moya.model.Tournament
;
import
fi.codecrew.moya.model.TournamentGame
;
import
fi.codecrew.moya.model.TournamentRule
;
...
...
@@ -13,8 +14,9 @@ public interface TournamentBeanLocal {
List
<
TournamentGame
>
getGames
();
List
<
TournamentRule
>
getRulesByGame
(
TournamentGame
tg
);
void
createGame
(
TournamentGame
tg
);
void
createRule
(
TournamentRule
tr
);
TournamentRule
createRule
(
TournamentRule
tr
);
TournamentGame
findGame
(
Integer
id
);
TournamentRule
findRule
(
Integer
id
);
void
createTournament
(
Tournament
tournament
);
}
code/MoyaDatabase/src/fi/codecrew/moya/model/Tournament.java
View file @
a4ddde1
...
...
@@ -63,6 +63,17 @@ public class Tournament extends GenericEntity implements Serializable {
@JoinColumn
(
name
=
"game"
,
nullable
=
false
)
private
TournamentGame
tournamentGame
;
@JoinColumn
(
name
=
"rules"
,
nullable
=
false
)
private
TournamentRule
rules
;
public
TournamentRule
getRules
()
{
return
rules
;
}
public
void
setRules
(
TournamentRule
rules
)
{
this
.
rules
=
rules
;
}
@OneToMany
@OrderBy
(
"id ASC"
)
private
List
<
Tournament
>
subTournaments
;
...
...
@@ -116,4 +127,60 @@ public class Tournament extends GenericEntity implements Serializable {
public
void
setTournamentGame
(
TournamentGame
tournamentGame
)
{
this
.
tournamentGame
=
tournamentGame
;
}
public
LanEvent
getLanEvent
()
{
return
lanEvent
;
}
public
void
setLanEvent
(
LanEvent
lanEvent
)
{
this
.
lanEvent
=
lanEvent
;
}
public
Date
getBeginsAt
()
{
return
beginsAt
;
}
public
void
setBeginsAt
(
Date
beginsAt
)
{
this
.
beginsAt
=
beginsAt
;
}
public
TournamentStatus
getTournamentStatus
()
{
return
tournamentStatus
;
}
public
void
setTournamentStatus
(
TournamentStatus
tournamentStatus
)
{
this
.
tournamentStatus
=
tournamentStatus
;
}
public
TournamentMatch
getTournamentRoot
()
{
return
tournamentRoot
;
}
public
void
setTournamentRoot
(
TournamentMatch
tournamentRoot
)
{
this
.
tournamentRoot
=
tournamentRoot
;
}
public
Integer
getPlayersPerMatch
()
{
return
playersPerMatch
;
}
public
void
setPlayersPerMatch
(
Integer
playersPerMatch
)
{
this
.
playersPerMatch
=
playersPerMatch
;
}
public
Integer
getPlayersPerTeam
()
{
return
playersPerTeam
;
}
public
void
setPlayersPerTeam
(
Integer
playersPerTeam
)
{
this
.
playersPerTeam
=
playersPerTeam
;
}
public
List
<
Tournament
>
getSubTournaments
()
{
return
subTournaments
;
}
public
void
setSubTournaments
(
List
<
Tournament
>
subTournaments
)
{
this
.
subTournaments
=
subTournaments
;
}
}
code/MoyaDatabase/src/fi/codecrew/moya/model/TournamentRule.java
View file @
a4ddde1
...
...
@@ -62,6 +62,14 @@ public class TournamentRule extends GenericEntity implements Serializable {
public
void
setRules
(
String
rules
)
{
this
.
rules
=
rules
;
}
public
TournamentGame
getTournamentGame
()
{
return
tournamentGame
;
}
public
void
setTournamentGame
(
TournamentGame
tournamentGame
)
{
this
.
tournamentGame
=
tournamentGame
;
}
}
code/MoyaWeb/WebContent/resources/cditools/products/shop.xhtml
View file @
a4ddde1
...
...
@@ -98,8 +98,8 @@
<
p:inputTextarea
cols=
"50"
rendered=
"#{productShopView.gatherBillInfo}"
value=
"#{productShopView.otherInfo}"
label=
"#{i18n['otherInfo']}"
/
>
<
!-- <p:inputTextarea cols="50" rendered="#{productShopView.gatherBillInfo}" value="#{productShopView.otherInfo}" label="#{i18n['otherInfo']}" /> --
>
<br
/>
...
...
code/MoyaWeb/WebContent/resources/templates/template1/css/style.css
View file @
a4ddde1
...
...
@@ -69,6 +69,7 @@ label {
font-weight
:
100
;
font-family
:
Oxygen
;
font-size
:
10pt
;
padding-left
:
10px
;
}
input
,
textarea
{
...
...
@@ -190,4 +191,8 @@ aside {
#header_right
{
text-align
:
right
;
}
\ No newline at end of file
}
th
,
td
{
padding
:
5px
;
}
code/MoyaWeb/WebContent/tournaments/admin/createwizard.xhtml
View file @
a4ddde1
...
...
@@ -16,13 +16,11 @@
<p:tab
id=
"selectGame"
title=
"#{i18n['tournaments.admin.select_a_game']}"
>
<p:panel>
<h:messages
errorClass=
"error"
/>
<h:panelGroup
rendered=
"#{tournamentCreateView.tournamentGames.isEmpty() eq false}"
>
<h2>
#{i18n['tournaments.admin.select_a_game']}
</h2>
<h:selectOneMenu
value=
"#{tournamentCreateView.game}"
converter=
"#{tournamentGameConverter}"
>
<f:selectItems
var=
"game"
itemLabel=
"#{game.name}"
value=
"#{tournamentCreateView.tournamentGames}"
itemValue=
"#{game
.id
}"
/>
<f:selectItems
var=
"game"
itemLabel=
"#{game.name}"
value=
"#{tournamentCreateView.tournamentGames}"
itemValue=
"#{game}"
/>
</h:selectOneMenu>
</h:panelGroup>
...
...
@@ -40,15 +38,13 @@
<p:tab
id=
"selectRuleset"
title=
"#{i18n['tournaments.admin.rules']}"
>
<p:panel>
<h:messages
errorClass=
"error"
/>
<h:messages
errorClass=
"error"
/>
<h:panelGroup
rendered=
"#{tournamentCreateView.tournamentRules.isEmpty() eq false}"
>
<h2>
#{i18n['tournaments.admin.select_a_ruleset']}
</h2>
<h:selectOneMenu
value=
"#{tournamentCreateView.rules}"
converter=
"#{tournamentRuleConverter}"
>
<f:selectItems
var=
"rule"
itemLabel=
"#{rule.name}"
value=
"#{tournamentCreateView.tournamentRules}"
itemValue=
"#{rule
.id
}"
/>
<f:selectItems
var=
"rule"
itemLabel=
"#{rule.name}"
value=
"#{tournamentCreateView.tournamentRules}"
itemValue=
"#{rule}"
/>
</h:selectOneMenu>
</h:panelGroup>
<br
/>
<h2>
#{i18n['tournaments.admin.create_new_ruleset']}
</h2>
<h:outputText
value=
"#{i18n['tournaments.ruleset_name']}"
/>
...
...
@@ -58,31 +54,65 @@
<br
/>
<h:outputText
value=
"#{i18n['tournaments.ruleset_description']}"
/>
<br
/>
<p:inputTextarea
value=
"#{tournamentCreateView.rulesetDescription}"
/>
<p:inputText
value=
"#{tournamentCreateView.rulesetDescription}"
/>
<br
/>
<h:outputText
value=
"#{i18n['tournaments.ruleset_rules']}"
/>
<br
/>
<p:inputTextarea
value=
"#{tournamentCreateView.rulesetRules}"
/>
<br
/>
</p:panel>
</p:tab>
<p:tab
id=
"selectRegTimes"
title=
"#{i18n['tournaments.admin.set_time_constraints']}"
>
<p:panel>
<h:messages
errorClass=
"error"
/>
<h2>
#{i18n['tournaments.admin.registration_time_constraints']}
</h2>
<h2>
#{i18n['tournaments.tournament_details']}
</h2>
<h:outputText
value=
"#{i18n['tournaments.tournament_name']}"
/>
<br
/>
<p:inputText
value=
"#{tournamentCreateView.tournament.tournamentName}"
/>
<br
/>
<h:outputText
value=
"#{i18n['tournaments.tournament_type']}"
/>
<br
/>
<h:selectOneMenu
value=
"#{tournamentCreateView.tournament.tournamentType}"
>
<f:selectItems
value=
"#{tournamentCreateView.tournamentTypes}"
var=
"val"
itemLabel=
"#{val}"
/>
</h:selectOneMenu>
<h:outputText
value=
"#{i18n['tournaments.players_per_match']}"
/>
<h:panelGrid
columns=
"1"
style=
"margin-bottom:10px"
>
<p:inputText
id=
"playerSlider"
value=
"#{tournamentCreateView.tournament.playersPerMatch}"
/>
<p:slider
for=
"playerSlider"
/>
</h:panelGrid>
<h:outputText
value=
"#{i18n['tournaments.backup_players']}"
/>
<h:panelGrid
columns=
"1"
style=
"margin-bottom:10px"
>
<p:inputText
id=
"playerBackupSlider"
value=
"#{tournamentCreateView.backupPlayers}"
/>
<p:slider
for=
"playerBackupSlider"
/>
</h:panelGrid>
<h2>
#{i18n['tournaments.admin.registration_time_constraints']}
</h2>
<h:panelGrid
columns=
"2"
>
<h:outputText
value=
"#{i18n['tournaments.registration_opens']}"
/>
<h:outputText
value=
"#{i18n['tournaments.registration_closes']}"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
value=
"#{tournamentCreateView.tournament.registrationOpensAt}"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
value=
"#{tournamentCreateView.tournament.registrationClosesAt}"
/>
</h:panelGrid>
<h2>
#{i18n['tournaments.admin.begin_time_constraints']}
</h2>
<h:panelGrid>
<h:outputText
value=
"Start time"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
/>
<p:calendar
stepHour=
"1"
stepMinute=
"10"
pattern=
"dd.MM.yyyy hh:mm"
value=
"#{tournamentCreateView.tournament.beginsAt}"
/>
</h:panelGrid>
<br
/>
</p:panel>
<div
style=
"float: right;"
>
<p:commandButton
icon=
"apply"
value=
"#{i18n['tournaments.admin.create_tournament']}"
/>
<p:commandButton
icon=
"apply"
value=
"#{i18n['tournaments.admin.create_tournament']}"
actionListener=
"#{tournamentCreateView.save}"
/>
</div>
</p:tab>
</p:tab>
</p:wizard>
</h:form>
...
...
code/MoyaWeb/WebContent/tournaments/admin/index.xhtml
0 → 100644
View file @
a4ddde1
<!DOCTYPE html
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:users=
"http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
xmlns:p=
"http://primefaces.org/ui"
xmlns:f=
"http://java.sun.com/jsf/core"
>
<h:body>
<ui:composition
template=
"#{sessionHandler.template}"
>
<f:metadata>
<!-- <f:event type="preRenderView" listener="#{userOverviewView.initView()}" /> -->
</f:metadata>
<ui:define
name=
"content"
>
<h1>
#{i18n['tournaments.admin.title']}
</h1>
<p>
#{i18n['tournaments.admin.description']}
</p>
<h2>
#{i18n['tournaments.active_tournaments']}
</h2>
<!-- <p:dataTable styleClass="bordertable" id="actionlogtable" value="#{actionLogMessageView.messages}" var="message" paginator="true" rows="30" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,30,50,100" > -->
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n.properties
View file @
a4ddde1
...
...
@@ -226,8 +226,8 @@ subnavi.cards = \u0009\u0009
topnavi.license
=
Lisenssikoodit
user.cropImage
=
Crop
user.unauthenticated
=
Kirjautumaton
user.cropImage
=
Crop
user.unauthenticated
=
Kirjautumaton
usercart.downloadCsv
=
CSV
usercart.showoverview
=
Vie tarkastusn
\u
00E4kym
\u
00E4
\u
00E4n
usercart.downloadCsv
=
CSV
usercart.showoverview
=
Vie tarkastusn
\u
00E4kym
\u
00E4
\u
00E4n
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
View file @
a4ddde1
...
...
@@ -299,6 +299,7 @@ foodWave.activeFoodWaves = Active Foodwaves
foodWave.billLines
=
Pending Online Payments
foodWave.closeNow
=
Close now
foodWave.deliveredFoodWaves
=
Delivered Foodwaves
foodWave.description
=
Foodwave description
foodWave.list
=
Active Foodwaves
foodWave.name
=
Foodwave
foodWave.openNow
=
Open now
...
...
@@ -593,6 +594,7 @@ page.role.edit.pagegroup = admin
page.role.list.pagegroup
=
admin
page.shop.readerevents.header
=
RFID shop
page.svm.failure.header
=
Payment error
page.svm.notification.header
=
Suomen verkkomaksut notification
page.svm.pending.header
=
Payment pending
page.svm.success.header
=
Payment successfull
page.tests.placemap.pagegroup
=
shop
...
...
@@ -805,21 +807,26 @@ sendPicture.header = S
shop.accountBalance
=
Credits
shop.actions
=
Actions
shop.afterBalance
=
Balance after action
shop.barcode
=
Barcode
shop.buy
=
Buy
shop.buyCash
=
Buy by Cash
shop.buyCredit
=
Buy Credit
shop.calcsubtotal
=
Calc Subtotal
shop.cartPrice
=
Cart price
shop.cash
=
Cash
shop.cashBack
=
Back
shop.cashGiven
=
Cash given
shop.cashback
=
Cashback
shop.confirmCreditBuy
=
Are You sure ?
shop.count
=
Q
shop.currentBalance
=
Current balance
shop.price
=
price
shop.product
=
Product
shop.readBarcode
=
Read
shop.shop
=
Shop
shop.totalPrice
=
Total
shop.transactionTotal
=
Transaction total
shop.user
=
Selling to
sidebar.bill.list
=
My bills
...
...
@@ -883,6 +890,7 @@ submenu.orgrole.create = Create organisationrole
submenu.orgrole.list
=
Organisation roles
submenu.pages.create
=
Create content
submenu.pages.list
=
List pages
submenu.place.adminGroups
=
Account places
submenu.place.adminPlacemap
=
Placemap
submenu.place.editGroup
=
Edit group
submenu.place.insertToken
=
Insert placecode
...
...
@@ -895,6 +903,7 @@ submenu.role.create = Create role
submenu.role.list
=
Show Roles
submenu.shop.createBill
=
Purchase
submenu.shop.listReaders
=
List readers
submenu.shop.shopToUser
=
Shop to user
submenu.shop.showReaderEvents
=
Reader events
submenu.user.accountEvents
=
Account events
submenu.user.changePassword
=
Change password
...
...
@@ -908,10 +917,14 @@ submenu.user.rolelinks = Manage roles
submenu.user.sendPicture
=
Send picture
submenu.user.shop
=
Shop
submenu.user.userlinks
=
User information
submenu.useradmin.accountEvents
=
Account events
submenu.useradmin.create
=
Create user
submenu.useradmin.createCardTemplate
=
Create cardtemplate
submenu.useradmin.edit
=
Edit user
submenu.useradmin.foodwaveshop
=
Food wave shop
submenu.useradmin.list
=
Search Users
submenu.useradmin.listCardTemplates
=
Card templates
submenu.useradmin.sendPicture
=
Send a picture
submenu.useradmin.showTakePicture
=
Show webcam
submenu.useradmin.validateUser
=
Validate user
submenu.voting.compolist
=
Compos
...
...
@@ -928,12 +941,14 @@ subnavi.roles = Roles
supernavi.admin
=
Adminview
supernavi.user
=
Userview
svm.failure.errorMessage
=
Payment error.
svm.failure.successMessage
=
Payment error successfull
\u2026
( Possibly already marked paid )
svm.pending.errorMessage
=
Unknown error! If payment was successfull email will be sent after verification.
svm.pending.successMessage
=
Payment pending. You will receive email after payment verification.
svm.success.errorMessage
=
Payment could not be verified!
svm.success.successMessage
=
Payment was successfull. You can now your credits in the system.
svm.failure.errorMessage
=
Payment error.
svm.failure.successMessage
=
Payment error successfull
\u2026
( Possibly already marked paid )
svm.notification.errorMessage
=
Payment failed
svm.notification.successMessage
=
Payment notification received
svm.pending.errorMessage
=
Unknown error! If payment was successfull email will be sent after verification.
svm.pending.successMessage
=
Payment pending. You will receive email after payment verification.
svm.success.errorMessage
=
Payment could not be verified!
svm.success.successMessage
=
Payment was successfull. You can now your credits in the system.
template.loggedInAs
=
Logged in as
...
...
@@ -967,6 +982,22 @@ topnavi.usermgmt = Users
topnavi.userplaces
=
Computer Places
topnavi.usershop
=
Shop
tournaments.admin.begin_time_constraints
=
Tournament begin time
tournaments.admin.create_a_game
=
Create a game
tournaments.admin.create_new_ruleset
=
Create a new ruleset
tournaments.admin.create_tournament
=
Create a tournament
tournaments.admin.game_description
=
Game description
tournaments.admin.game_name
=
Game name
tournaments.admin.registration_time_constraints
=
Registration time constraints
tournaments.admin.rules
=
Rules
tournaments.admin.select_a_game
=
Select a game
tournaments.admin.select_a_ruleset
=
Select a ruleset
tournaments.admin.set_time_constraints
=
Set time constraints
tournaments.registration_closes
=
Set registration closing time
tournaments.registration_opens
=
Set registration opening time
tournaments.ruleset_description
=
Ruleset description
tournaments.ruleset_name
=
Ruleset name
user.accountBalance
=
Account balance
user.accountEventHeader
=
Account events
user.accountevents
=
Account events
...
...
@@ -981,6 +1012,7 @@ user.changepassword.title = Change password
user.create
=
Create user
user.createdmessage
=
User has been created successfully. You can now login.
user.cropImage
=
Crop image
user.cropUserImage
=
Crop image
user.defaultImage
=
Default picture
user.edit
=
Edit
user.edit.title
=
My information
...
...
@@ -991,6 +1023,7 @@ user.foodwave.products.title = Choose Products
user.foodwavelist.title
=
Choose Foodwave
user.hasImage
=
Image
user.image
=
Image
user.imageTooBig
=
Image is too big
user.imagelist
=
Saved images
user.imagesubmit
=
Send image
user.insert
=
Insert
...
...
@@ -1021,6 +1054,7 @@ user.roles = Roles
user.rolesave
=
Save roles
user.save
=
Save
user.saveFailed
=
Save failed, Not enough permissions!
user.saveRoles
=
Save roles
user.saveSuccessfull
=
Changes saved successfully
user.search
=
Search
user.searchUser
=
Search user
...
...
@@ -1050,6 +1084,9 @@ userView.image = Image
usercart.addSearchedUsers
=
Add searched users
usercart.cartsize
=
Size
usercart.clear
=
Clear Cart
usercart.next
=
Next user
usercart.prev
=
Previous user
usercart.removeCurrent
=
Remove from usercart
usercart.showCart
=
Show usercart
usercart.traverse
=
Traverse
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
View file @
a4ddde1
...
...
@@ -300,6 +300,7 @@ foodWave.activeFoodWaves = Aktiiviset Ruokatilaukset
foodWave.billLines
=
Maksamattomat Verkkomaksut
foodWave.closeNow
=
Sulje nyt
foodWave.deliveredFoodWaves
=
Toimitetut Ruokatilaukset
foodWave.description
=
Ruokatilauksen kuvaus
foodWave.list
=
Ruokatilaukset
foodWave.name
=
Ruokatilaus
foodWave.openNow
=
Avaa nyt
...
...
@@ -585,6 +586,7 @@ page.place.placemap.header = Paikkakartta
page.product.createBill.header
=
Osta tuotteita
page.product.validateBillProducts.header
=
Lasku luotu
page.svm.failure.header
=
Verkkomaksuvirhe
page.svm.notification.header
=
Maksutapahtuman rekister
\u
00F6inti
page.svm.pending.header
=
Maksukuittausta odotetaan
page.svm.success.header
=
Verkkomaksu onnistui
page.user.create.header
=
Luo uusi k
\u
00E4ytt
\u
00E4j
\u
00E4
...
...
@@ -787,20 +789,26 @@ sendPicture.header = L\u00E4het\u00E4 kuva
shop.accountBalance
=
Credits
shop.actions
=
Hallinta
shop.afterBalance
=
Saldo tapahtuman j
\u
00E4lkeen
shop.barcode
=
Viivakoodi
shop.buy
=
Osta
shop.buyCash
=
K
\u
00E4teismaksu
shop.buyCredit
=
Credit
shop.calcsubtotal
=
Laske v
\u
00E4lisumma
shop.cartPrice
=
Korin hinta
shop.cash
=
K
\u
00E4teinen
shop.cashBack
=
Vaihtoraha palautettu
shop.cashGiven
=
K
\u
00E4teist
\u
00E4 saatu
shop.cashback
=
Takaisin
shop.confirmCreditBuy
=
Varmastikko ?
shop.count
=
Lkm
shop.currentBalance
=
T
\u
00E4m
\u
00E4nhetkinen saldo
shop.price
=
Hinta
shop.product
=
Tuote
shop.readBarcode
=
Lue
shop.toAccountValue
=
Tilille
shop.totalPrice
=
Yhteens
\u
00E4
shop.transactionTotal
=
Tapahtuma yhteens
\u
00E4
shop.user
=
Myyd
\u
00E4
\u
00E4n
sidebar.bill.list
=
Omat laskut
...
...
@@ -862,6 +870,7 @@ submenu.orgrole.create = Luo j\u00E4rjest\u00E4j\u00E4rooli
submenu.orgrole.list
=
J
\u
00E4rjest
\u
00E4j
\u
00E4roolit
submenu.pages.create
=
Luo sis
\u
00E4lt
\u
00F6
\u
00E4
submenu.pages.list
=
N
\u
00E4yt
\u
00E4 sis
\u
00E4ll
\u
00F6t
submenu.place.adminGroups
=
Omat paikat
submenu.place.adminPlacemap
=
Konepaikat
submenu.place.editGroup
=
Muokkaa ryhm
\u
00E4
\u
00E4
submenu.place.insertToken
=
Sy
\u
00F6t
\u
00E4 paikkakoodi
...
...
@@ -874,6 +883,7 @@ submenu.role.create = Luo rooli
submenu.role.list
=
N
\u
00E4yt
\u
00E4 roolit
submenu.shop.createBill
=
Osta tuotteita
submenu.shop.listReaders
=
N
\u
00E4yt
\u
00E4 lukijat
submenu.shop.shopToUser
=
Osta k
\u
00E4ytt
\u
00E4j
\u
00E4lle
submenu.shop.showReaderEvents
=
Lukijan tapahtumat
submenu.user.accountEvents
=
Tilitapahtumat
submenu.user.changePassword
=
Vaihda salasana
...
...
@@ -890,10 +900,14 @@ submenu.user.rolelinks = Hallitse rooleja
submenu.user.sendPicture
=
L
\u
00E4het
\u
00E4 kuva
submenu.user.shop
=
Kauppaan
submenu.user.userlinks
=
Muokkaa tietoja
submenu.useradmin.accountEvents
=
Tunnuksen tapahtumat
submenu.useradmin.create
=
Luo uusi k
\u
00E4ytt
\u
00E4j
\u
00E4
submenu.useradmin.createCardTemplate
=
Luo uusi korttipohja
submenu.useradmin.edit
=
Muokkaa k
\u
00E4ytt
\u
00E4j
\u
00E4
\u
00E4
submenu.useradmin.foodwaveshop
=
Ruokatilauskauppa
submenu.useradmin.list
=
Etsi K
\u
00E4ytt
\u
00E4ji
\u
00E4
submenu.useradmin.listCardTemplates
=
Listaa korttipohjat
submenu.useradmin.sendPicture
=
L
\u
00E4het
\u
00E4 kuva
submenu.useradmin.showTakePicture
=
N
\u
00E4yt
\u
00E4 webcam
submenu.useradmin.validateUser
=
Validoi k
\u
00E4ytt
\u
00E4j
\u
00E4
submenu.voting.compolist
=
Kilpailut
...
...
@@ -910,12 +924,14 @@ subnavi.roles = Roolit
supernavi.admin
=
Yll
\u
00E4piton
\u
00E4kym
\u
00E4
supernavi.user
=
K
\u
00E4ytt
\u
00E4j
\u
00E4n
\u
00E4kym
\u
00E4
svm.failure.errorMessage
=
Verkkomaksuvirhe.
svm.failure.successMessage
=
Maksuvirhe onnistunut. ( Maksu mahdollisesti merkitty jo maksetuksi )
svm.pending.errorMessage
=
Maksukuittausta odotetaan. Kuittauksesta l
\u
00E4hetet
\u
00E4
\u
00E4n ilmoitus s
\u
00E4hk
\u
00F6postitse.
svm.pending.successMessage
=
Maksukuittausta odotetaan. Kuittauksesta l
\u
00E4hetet
\u
00E4
\u
00E4n ilmoitus s
\u
00E4hk
\u
00F6postitse.
svm.success.errorMessage
=
Verkkomaksua ei voitu verifioida! Virheest
\u
00E4 on raportoitu eteenp
\u
00E4in.
svm.success.successMessage
=
Verkkomaksu onnistui.
svm.failure.errorMessage
=
Verkkomaksuvirhe.
svm.failure.successMessage
=
Maksuvirhe onnistunut. ( Maksu mahdollisesti merkitty jo maksetuksi )
svm.notification.errorMessage
=
Maksutapahtuma ep
\u
00E4onnistui
svm.notification.successMessage
=
Maksutapahtuma vastaanotettu
svm.pending.errorMessage
=
Maksukuittausta odotetaan. Kuittauksesta l
\u
00E4hetet
\u
00E4
\u
00E4n ilmoitus s
\u
00E4hk
\u
00F6postitse.
svm.pending.successMessage
=
Maksukuittausta odotetaan. Kuittauksesta l
\u
00E4hetet
\u
00E4
\u
00E4n ilmoitus s
\u
00E4hk
\u
00F6postitse.
svm.success.errorMessage
=
Verkkomaksua ei voitu verifioida! Virheest
\u
00E4 on raportoitu eteenp
\u
00E4in.
svm.success.successMessage
=
Verkkomaksu onnistui.
template.loggedInAs
=
Kirjautunut tunnuksella
...
...
@@ -949,6 +965,22 @@ topnavi.usermgmt = K\u00E4ytt\u00E4j\u00E4t
topnavi.userplaces
=
Konepaikat
topnavi.usershop
=
Kauppa
tournaments.admin.begin_time_constraints
=
Turnauksen aloitusaika
tournaments.admin.create_a_game
=
Luo peli
tournaments.admin.create_new_ruleset
=
Luo uusi s
\u
00E4
\u
00E4nn
\u
00F6st
\u
00F6
tournaments.admin.create_tournament
=
Luo turnaus
tournaments.admin.game_description
=
Pelin kuvaus
tournaments.admin.game_name
=
Pelin nimi
tournaments.admin.registration_time_constraints
=
Rekister
\u
00F6itymisaika
tournaments.admin.rules
=
S
\u
00E4
\u
00E4nn
\u
00F6t
tournaments.admin.select_a_game
=
Valitse peli
tournaments.admin.select_a_ruleset
=
Valitse s
\u
00E4
\u
00E4nn
\u
00F6st
\u
00F6
tournaments.admin.set_time_constraints
=
Aseta aikarajat
tournaments.registration_closes
=
Rekister
\u
00F6itymisen sulkeutumisaika
tournaments.registration_opens
=
Rekister
\u
00F6itymisen aukeamisaika
tournaments.ruleset_description
=
S
\u
00E4
\u
00E4nn
\u
00F6st
\u
00F6n kuvaus
tournaments.ruleset_name
=
S
\u
00E4
\u
00E4nn
\u
00F6st
\u
00F6n nimi
user.accountBalance
=
Tilin saldo
user.accountEventHeader
=
Tilitapahtumat
user.accountevents
=
Tilitapahtumat
...
...
@@ -963,6 +995,7 @@ user.changepassword.title = Vaihda salasana
user.create
=
Luo k
\u
00E4ytt
\u
00E4j
\u
00E4
user.createdmessage
=
K
\u
00E4ytt
\u
00E4j
\u
00E4tunnus on luotu onnistuneesti. Voit nyt kirjautua sis
\u
00E4
\u
00E4n.
user.cropImage
=
Rajaa
user.cropUserImage
=
Crop image
user.defaultImage
=
Oletukuva
user.edit
=
Muokkaa
user.edit.title
=
Omat tiedot
...
...
@@ -972,6 +1005,7 @@ user.food.title = Valitse Menu
user.foodwave.products.title
=
Valitse tuotteet
user.foodwavelist.title
=
Valitse Ruokatilaus
user.hasImage
=
Kuva
user.imageTooBig
=
Kuva on liian suuri
user.imageUploaded
=
Kuva l
\u
00E4hetetty.
user.imagelist
=
Tallennetut kuvat
user.imagesubmit
=
L
\u
00E4het
\u
00E4 kuva
...
...
@@ -1001,6 +1035,7 @@ user.realname = Nimi
user.roles
=
Roolit
user.rolesave
=
Tallenna roolit
user.save
=
Tallenna
user.saveRoles
=
Tallenna roolit
user.search
=
Hae
user.searchUser
=
Hae k
\u
00E4ytt
\u
00E4j
\u
00E4
\u
00E4
user.sendPicture
=
Kuvan l
\u
00E4hetys
...
...
@@ -1029,6 +1064,9 @@ userView.image = Kuva
usercart.addSearchedUsers
=
Lis
\u
00E4
\u
00E4 haetut k
\u
00E4ytt
\u
00E4j
\u
00E4t
usercart.cartsize
=
Koko
usercart.clear
=
Tyhjenn
\u
00E4 k
\u
00E4ytt
\u
00E4j
\u
00E4kori
usercart.next
=
Seuraava k
\u
00E4vij
\u
00E4
usercart.prev
=
Edellinen k
\u
00E4vij
\u
00E4
usercart.removeCurrent
=
Poista k
\u
00E4ytt
\u
00E4j
\u
00E4korista
usercart.showCart
=
K
\u
00E4ytt
\u
00E4j
\u
00E4kori
usercart.traverse
=
K
\u
00E4y l
\u
00E4pi
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentAdminView.java
0 → 100644
View file @
a4ddde1
package
fi
.
codecrew
.
moya
.
web
.
cdiview
.
tournaments
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.enterprise.context.RequestScoped
;
import
javax.inject.Named
;
import
fi.codecrew.moya.beans.TournamentBeanLocal
;
import
fi.codecrew.moya.model.Tournament
;
@RequestScoped
@Named
public
class
TournamentAdminView
{
@EJB
private
TournamentBeanLocal
tournamentBean
;
public
List
<
Tournament
>
getActiveTournaments
()
{
return
null
;
}
}
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentCreateView.java
View file @
a4ddde1
...
...
@@ -5,6 +5,8 @@ import java.util.List;
import
fi.codecrew.moya.beans.EventBeanLocal
;
import
fi.codecrew.moya.beans.TournamentBeanLocal
;
import
fi.codecrew.moya.enums.TournamentStatus
;
import
fi.codecrew.moya.enums.TournamentType
;
import
fi.codecrew.moya.model.Role
;
import
fi.codecrew.moya.model.Tournament
;
import
fi.codecrew.moya.model.TournamentGame
;
...
...
@@ -35,6 +37,9 @@ public class TournamentCreateView extends GenericCDIView {
private
String
rulesetName
;
private
String
rulesetDescription
;
private
String
rulesetRules
;
private
Integer
backupPlayers
;
@EJB
TournamentBeanLocal
tournamentBean
;
@EJB
EventBeanLocal
eventBean
;
...
...
@@ -43,13 +48,20 @@ public class TournamentCreateView extends GenericCDIView {
if
(
tournament
==
null
)
{
this
.
beginConversation
();
tournament
=
new
Tournament
();
tournament
.
setPlayersPerMatch
(
0
);
backupPlayers
=
0
;
tournamentGames
=
tournamentBean
.
getGames
();
}
}
public
void
save
(
ActionEvent
actionEvent
)
{
tournament
.
setPlayersPerTeam
(
tournament
.
getPlayersPerMatch
()
+
backupPlayers
);
tournament
.
setLanEvent
(
eventBean
.
getCurrentEvent
());
tournament
.
setTournamentStatus
(
TournamentStatus
.
SETUP
);
tournament
.
setTournamentGame
(
game
);
tournament
.
setRules
(
rules
);
tournamentBean
.
createTournament
(
tournament
);
}
public
List
<
TournamentGame
>
getTournamentGames
()
{
...
...
@@ -63,6 +75,11 @@ public class TournamentCreateView extends GenericCDIView {
public
void
uploadListener
(
org
.
primefaces
.
event
.
FileUploadEvent
event
)
{
System
.
out
.
println
(
"ZZ"
);
}
public
TournamentType
[]
getTournamentTypes
()
{
TournamentType
[]
items
=
TournamentType
.
values
();
return
items
;
}
public
String
onFlowProcess
(
FlowEvent
event
)
{
switch
(
event
.
getOldStep
())
{
...
...
@@ -77,19 +94,22 @@ public class TournamentCreateView extends GenericCDIView {
tournamentBean
.
createGame
(
tg
);
}
tournamentRules
=
tournamentBean
.
getRulesByGame
(
this
.
getGame
());
tournamentRules
=
tournamentBean
.
getRulesByGame
(
game
);
System
.
out
.
println
(
tournamentRules
);
break
;
case
"selectRuleset"
:
if
(
rulesetName
!=
null
&&
rulesetName
.
length
()
>
0
)
{
TournamentRule
tr
=
new
TournamentRule
();
tr
.
setName
(
rulesetName
);
tr
.
setDescription
(
rulesetDescription
);
tr
.
setRules
(
rulesetRules
);
tr
.
setTournamentGame
(
game
);
rules
=
tournamentBean
.
createRule
(
tr
);
tournament
Bean
.
createRule
(
tr
);
tournament
Rules
=
tournamentBean
.
getRulesByGame
(
game
);
}
break
;
}
System
.
out
.
println
(
event
.
getOldStep
());
return
event
.
getNewStep
();
}
...
...
@@ -140,4 +160,28 @@ public class TournamentCreateView extends GenericCDIView {
public
void
setRulesetDescription
(
String
rulesetDescription
)
{
this
.
rulesetDescription
=
rulesetDescription
;
}
public
Tournament
getTournament
()
{
return
tournament
;
}
public
void
setTournament
(
Tournament
tournament
)
{
this
.
tournament
=
tournament
;
}
public
Integer
getBackupPlayers
()
{
return
backupPlayers
;
}
public
void
setBackupPlayers
(
Integer
backupPlayers
)
{
this
.
backupPlayers
=
backupPlayers
;
}
public
String
getRulesetRules
()
{
return
rulesetRules
;
}
public
void
setRulesetRules
(
String
rulesetRules
)
{
this
.
rulesetRules
=
rulesetRules
;
}
}
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