Commit 81f2aa0b by Juho Salli

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

Conflicts:
	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
2 parents 499a5b25 f4d8f93b
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import fi.codecrew.moya.facade.TournamentGameFacade;
import fi.codecrew.moya.facade.TournamentRuleFacade;
import fi.codecrew.moya.model.Tournament;
import fi.codecrew.moya.model.TournamentGame;
import fi.codecrew.moya.model.TournamentRule;
/**
* Session Bean implementation class TournamentBean
*/
......@@ -10,6 +19,9 @@ import javax.ejb.Stateless;
@LocalBean
public class TournamentBean implements TournamentBeanLocal {
@EJB private TournamentRuleFacade tournamentRuleFacade;
@EJB private TournamentGameFacade tournamentGameFacade;
/**
* Default constructor.
*/
......@@ -17,4 +29,33 @@ public class TournamentBean implements TournamentBeanLocal {
// TODO Auto-generated constructor stub
}
@Override
public List<TournamentRule> getRulesByGame(TournamentGame tg) {
return tournamentRuleFacade.getRulesByGame(tg);
}
@Override
public List<TournamentGame> getGames() {
return tournamentGameFacade.getGames();
}
@Override
public void createGame(TournamentGame tg) {
tournamentGameFacade.create(tg);
}
@Override
public void createRule(TournamentRule tr) {
tournamentRuleFacade.create(tr);
}
@Override
public TournamentGame findGame(Integer id) {
return tournamentGameFacade.find(id);
}
@Override
public TournamentRule findRule(Integer id) {
return tournamentRuleFacade.find(id);
}
}
package fi.codecrew.moya.facade;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import fi.codecrew.moya.beans.EventBean;
import fi.codecrew.moya.model.TournamentGame;
import fi.codecrew.moya.model.TournamentGame_;
import fi.codecrew.moya.model.TournamentRule;
import fi.codecrew.moya.model.TournamentRule_;
@Stateless
@LocalBean
public class TournamentGameFacade extends IntegerPkGenericFacade<TournamentGame> {
@EJB private EventBean eventBean;
public TournamentGameFacade() {
super(TournamentGame.class);
}
public List<TournamentGame> getGames() {
CriteriaBuilder cb = getEm().getCriteriaBuilder();
CriteriaQuery<TournamentGame> cq = cb.createQuery(TournamentGame.class);
Root<TournamentGame> root = cq.from(TournamentGame.class);
cq.where(cb.equal(root.get(TournamentGame_.lanEvent), eventBean.getCurrentEvent()));
return getEm().createQuery(cq).getResultList();
}
}
package fi.codecrew.moya.facade;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import fi.codecrew.moya.beans.EventBean;
import fi.codecrew.moya.model.Role;
import fi.codecrew.moya.model.Role_;
import fi.codecrew.moya.model.TournamentGame;
import fi.codecrew.moya.model.TournamentRule;
import fi.codecrew.moya.model.TournamentRule_;
@Stateless
@LocalBean
public class TournamentRuleFacade extends IntegerPkGenericFacade<TournamentRule> {
public TournamentRuleFacade() {
super(TournamentRule.class);
}
public List<TournamentRule> getRulesByGame(TournamentGame tg) {
CriteriaBuilder cb = getEm().getCriteriaBuilder();
CriteriaQuery<TournamentRule> cq = cb.createQuery(TournamentRule.class);
Root<TournamentRule> root = cq.from(TournamentRule.class);
cq.where(cb.equal(root.get(TournamentRule_.tournamentGame), tg));
return getEm().createQuery(cq).getResultList();
}
}
package fi.codecrew.moya.beans;
import java.util.List;
import javax.ejb.Local;
import fi.codecrew.moya.model.TournamentGame;
import fi.codecrew.moya.model.TournamentRule;
@Local
public interface TournamentBeanLocal {
List<TournamentGame> getGames();
List<TournamentRule> getRulesByGame(TournamentGame tg);
void createGame(TournamentGame tg);
void createRule(TournamentRule tr);
TournamentGame findGame(Integer id);
TournamentRule findRule(Integer id);
}
......@@ -59,4 +59,20 @@ public class TournamentGame extends GenericEntity implements Serializable {
public void setAvailableRules(List<TournamentRule> availableRules) {
this.availableRules = availableRules;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public LanEvent getLanEvent() {
return lanEvent;
}
public void setLanEvent(LanEvent lanEvent) {
this.lanEvent = lanEvent;
}
}
......@@ -50,6 +50,7 @@
<h:commandButton id="commitbtn" action="#{eventorgView.saveEvent()}" value="#{i18n['event.save']}" />
</h:form>
<h2>#{i18n['event.domains.title']}</h2>
<h:form>
<h:inputText value="#{eventorgView.newdomain}" />
......@@ -67,7 +68,7 @@
</h:dataTable>
</h:form>
<h2>Properties</h2>
<h2>#{i18n['event.properties.title']}</h2>
<h:form>
<h:dataTable var="prop" value="#{eventPropertyView.properties}">
<h:column>
......@@ -137,7 +138,7 @@
<ui:fragment rendered="#{eventPropertyView.privatePropertyPermission}">
<h2>Private Properties</h2>
<h2>#{i18n['event.privateProperties.title']}</h2>
<h:form>
<h:dataTable var="prop" value="#{eventPropertyView.privateProperties}">
<h:column>
......
......@@ -58,25 +58,25 @@
<h:outputLabel rendered="#{licenseView.currentLicense.id == null}" value="#{i18n['game.create']}" />
<h:outputLabel rendered="#{licenseView.currentLicense.id != null}" value="#{i18n['game.edit']}" />
</f:facet>
<h:outputLabel value="service" />
<h:outputLabel value="#{i18n['license.service']}" />
<p:inputText value="#{licenseView.currentLicense.service}" />
<h:outputLabel value="name" />
<h:outputLabel value="#{i18n['license.name']}" />
<p:inputText value="#{licenseView.currentLicense.name}" />
<h:outputLabel value="description" />
<h:outputLabel value="#{i18n['license.description']}" />
<p:inputText value="#{licenseView.currentLicense.description}" />
<h:outputLabel value="url" />
<h:outputLabel value="#{i18n['license.url']}" />
<p:inputText value="#{licenseView.currentLicense.codeUrl}" />
<h:outputLabel value="active" />
<h:outputLabel value="#{i18n['license.active']}" />
<p:selectBooleanCheckbox value="#{licenseView.currentLicense.active}" />
<h:outputLabel value="product" />
<h:outputLabel value="#{i18n['license.product']}" />
<h:selectOneMenu converter="#{productConverter}" value="#{licenseView.currentLicense.product}">
<f:selectItems var="product" itemLabel="#{product.name}" value="#{licenseView.productsForLicenses}" />
</h:selectOneMenu>
<p:commandButton action="#{licenseView.saveCurrentLicense}" update=":licenseForm" value="save" />
<p:commandButton action="#{licenseView.saveCurrentLicense}" update=":licenseForm" value="#{i18n['license.save']}" />
</p:panelGrid>
</h:form>
......
......@@ -9,82 +9,78 @@
</f:metadata>
<ui:define name="content">
<h1>#{i18n['actionlog.tournaments.admin.create_tournament']}</h1>
<h1>#{i18n['tournaments.admin.create_tournament']}</h1>
<h:form>
<p:wizard widgetVar="wiz" flowListener="#{tournamentCreateView.onFlowProcess}">
<p:tab id="selectGame" title="#{i18n['actionlog.tournaments.admin.select_a_game']}">
<p:tab id="selectGame" title="#{i18n['tournaments.admin.select_a_game']}">
<p:panel>
<h:messages errorClass="error" />
<h2>#{i18n['actionlog.tournaments.admin.select_a_game']}</h2>
<p:selectOneMenu>
<f:selectItem itemLabel="" />
<f:selectItem itemLabel="spurdo spärde" />
<f:selectItem itemLabel="cockmaster" />
</p:selectOneMenu>
<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}" />
</h:selectOneMenu>
</h:panelGroup>
<h2>#{i18n['actionlog.tournaments.admin.create_a_game']}</h2>
<h2>#{i18n['tournaments.admin.create_a_game']}</h2>
<h:panelGrid columns="2">
<h:outputText value="#{i18n['actionlog.tournaments.admin.game_name']}" />
<h:outputText value="#{i18n['actionlog.tournaments.admin.game_description']}" />
<h:outputText value="#{i18n['tournaments.admin.game_name']}" />
<h:outputText value="#{i18n['tournaments.admin.game_description']}" />
<p:inputText />
<p:inputText />
<h:outputText value="#{i18n['actionlog.tournaments.admin.upload_game_image']}" />
<h:outputText value="" />
<p:fileUpload mode="simple" />
<p:inputText value="#{tournamentCreateView.tournamentGameName}" />
<p:inputText value="#{tournamentCreateView.tournamentGameDescription}" />
</h:panelGrid>
</p:panel>
</p:tab>
<p:tab id="selectRuleset" title="#{i18n['actionlog.tournaments.admin.rules']}">
<p:tab id="selectRuleset" title="#{i18n['tournaments.admin.rules']}">
<p:panel>
<h:messages errorClass="error" />
<h2>#{i18n['actionlog.tournaments.admin.select_a_ruleset']}</h2>
<p:selectOneMenu>
<f:selectItem itemLabel="" />
<f:selectItem itemLabel="Pro-rules" />
<f:selectItem itemLabel="N00b-rules" />
</p:selectOneMenu>
<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}" />
</h:selectOneMenu>
</h:panelGroup>
<br />
<h2>#{i18n['actionlog.tournaments.admin.create_new_ruleset']}</h2>
<h:outputText value="#{i18n['actionlog.tournaments.ruleset_name']}" />
<h2>#{i18n['tournaments.admin.create_new_ruleset']}</h2>
<h:outputText value="#{i18n['tournaments.ruleset_name']}" />
<br />
<p:inputText />
<p:inputText value="#{tournamentCreateView.rulesetName}" />
<br />
<h:outputText value="#{i18n['actionlog.tournaments.ruleset_description']}" />
<h:outputText value="#{i18n['tournaments.ruleset_description']}" />
<br />
<p:inputTextarea />
<p:inputTextarea value="#{tournamentCreateView.rulesetDescription}"/>
</p:panel>
</p:tab>
<p:tab id="selectRegTimes" title="#{i18n['actionlog.tournaments.admin.set_time_constraints']}">
<p:tab id="selectRegTimes" title="#{i18n['tournaments.admin.set_time_constraints']}">
<p:panel>
<h:messages errorClass="error" />
<h2>#{i18n['actionlog.tournaments.admin.registration_time_constraints']}</h2>
<h2>#{i18n['tournaments.admin.registration_time_constraints']}</h2>
<h:panelGrid columns="2">
<h:outputText value="#{i18n['actionlog.tournaments.registration_opens']}" />
<h:outputText value="#{i18n['actionlog.tournaments.registration_closes']}" />
<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" />
</h:panelGrid>
<h2>#{i18n['actionlog.tournaments.admin.begin_time_constraints']}</h2>
<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" />
</h:panelGrid>
</p:panel>
<div style="float: right;">
<p:commandButton icon="apply" value="#{i18n['actionlog.tournaments.admin.create_tournament']}" />
<p:commandButton icon="apply" value="#{i18n['tournaments.admin.create_tournament']}" />
</div>
</p:tab>
</p:wizard>
......
......@@ -107,6 +107,24 @@ cardTemplate.emptyCardTemplate = ----
error.contact = If this happens again, contact Info with the following code:
error.error = You have encountered an error.
event.domains.title = Domain
event.edit = Edit
event.endTime = End time
event.id = Event ID
event.name = Event name
event.nextBillNumber = Initial bill number
event.privateProperties.title = Private Properties
event.properties.title = Properties
event.referenceNumberBase = Reference number base
event.save = Save
event.startTime = Start time
eventdomain.add = Add event domain
eventdomain.domainname = Domain
eventdomain.remove = Remove
eventmap.active = Active
eventorg.create = Create
game.active = Aktiivinen
......@@ -173,9 +191,9 @@ poll.edit = edit
print = Print
product.providedRole = Tuote tarjoaa roolin
product.returnProductEdit = Palaa tuotteeseen:
product.saved = Tuote tallennettu
product.providedRole = Product defines role
product.returnProductEdit = Return to product:
product.saved = Product saved
productshop.minusOne = -1
productshop.minusTen = -10
......
......@@ -241,14 +241,19 @@ error.contact = If this happens again, contact Info with the following code:
error.error = You have encountered an error.
event.defaultRole = Default user role
event.domains.title = Domain
event.edit = Edit
event.endTime = End time
event.id = Event ID
event.name = Event name
event.nextBillNumber = Initial bill number
event.privateProperties.title = Private Properties
event.properties.title = Properties
event.referenceNumberBase = Reference number base
event.save = Save
event.startTime = Start time
eventdomain.add = Add event domain
eventdomain.domainname = Domain
eventdomain.remove = Remove
......@@ -274,6 +279,7 @@ eventorg.createEvent = Create event
eventorg.createevent = Create new event
eventorg.edit = Edit
eventorg.events = Event of the organisation
eventorg.id = Event ID
eventorg.organisation = Organisation name
eventorg.save = Save
......@@ -416,10 +422,28 @@ javax.validation.constraints.Past.message = must be in the past
javax.validation.constraints.Pattern.message = must match "{regexp}"
javax.validation.constraints.Size.message = size must be between {min} and {max}
lanEventPrivateProperty.createProperty = Create private property
lanEventPrivateProperty.key = Private propery key
lanEventPrivateProperty.value = Private property value
lanEventProperty.createProperty = Create property
lanEventProperty.editProperty = Edit property
lanEventProperty.key = Property key
lanEventProperty.value = Property value
lanEventProperty.valueIsRawdataWarning = Raw data warning
layout.editBottom = Edit bottom content
layout.editContent = Edit center
layout.editTop = Edit topcontent
license.active = Active
license.description = Description
license.name = Name
license.product = Product
license.save = Save
license.service = Service
license.url = Url
login.login = Login
login.logout = Logout
login.logoutmessage = You have logged out of the system
......@@ -431,6 +455,8 @@ loginerror.header = Login failed
loginerror.message = Username of password incorrect.
loginerror.resetpassword = Reset password
map.create = Create map
map.createTimeMap = Create tilemap
map.edit = Edit
map.generate = Generate places
map.height = Place height (px)
......@@ -460,8 +486,13 @@ mapView.errorWhenReservingPlace = Error when reserving place!
mapView.errorWhileBuyingPlaces = Error when buying places. Please try again. If error reoccurs please contact organizers.
mapView.notEnoughCreditsToReserve = You don't have enough credits to reserve this place.
mapedit.save = Save map changes
menu.index = Index
menu.item = Item
menu.name = Name
menu.place.placemap = Placemap
menu.poll.index = Polls
menu.select = Select
menu.sort = Sort
menu.toAdmin = Adminview
......@@ -471,6 +502,20 @@ menuitem.navigation.key = Product flag
nasty.user = Go away!
news.abstract = Abstract
news.expire = Expire
news.publish = Publish
news.save = Save
news.title = Title
newsgroup.edit = Edit
newsgroup.name = Newsgroup name
newsgroup.priority = Priority
newsgroup.readerRole = Reader roles
newsgroup.writerRole = Writer roles
newslist.header = Newsgroups
org.hibernate.validator.constraints.Email.message = not a well-formed email address
org.hibernate.validator.constraints.Length.message = length must be between {min} and {max}
org.hibernate.validator.constraints.NotEmpty.message = may not be empty
......@@ -484,15 +529,17 @@ page.account.edit.header = Edit account events
page.account.list.header = Account events
page.admin.sendimage.header = Send image
page.auth.login.header = Login error
page.auth.login.loginerror.header = Kirjautumisvirhe
page.auth.login.loginerror.header = Login error
page.auth.login.loginerror.pagegroup = frontpage
page.auth.login.logout.header = Uloskirjautuminen
page.auth.login.logout.header = Logout
page.auth.login.logout.pagegroup = frontpage
page.auth.login.pagegroup = frontpage
page.auth.login.title = Login error
page.auth.loginerror.header = Login failed
page.auth.loginerror.pagegroup = frontpage
page.auth.logout.header = Logout
page.auth.logout.pagegroup = frontpage
page.auth.logoutsuccess.header = Logout
page.auth.notauthorized.pagegroup = frontpage
page.auth.resetPassword.header = Reset password
page.bill.billSummary.header = Summary of bills
......@@ -628,6 +675,7 @@ poll.end = Close poll
poll.name = Poll name
poll.save = Send answers
<<<<<<< HEAD
print = Print
product.barcode = Barcode
......@@ -654,6 +702,41 @@ product.totalPrice = Total
product.unitName = Unit name
product.vat = VAT
=======
product.barcode = Barcode
product.billed = Billed
product.boughtTotal = Products billed
product.buyInPrice = Buy in price
product.cart.count = To shoppingcart
product.cashed = Cashpaid
product.color = Color in UI
product.create = Create product
product.createDiscount = Add volumediscount
product.edit = edit
product.inventoryQuantity = Inventory count
product.name = Name of product
product.paid = Paid
product.prepaid = Prepaid
product.prepaidInstant = Created when prepaid is paid
product.price = Price of product
product.providedRole = Product defines role
product.returnProductEdit = Return to product:
product.save = Save
product.saved = Product saved
product.shopInstant = Create automatic cashpayment
product.sort = Sort nr
product.totalPrice = Total
product.unitName = Unit name
product.vat = VAT
productFlag.CREATE_NEW_PLACE_WHEN_BOUGHT = Create new place bought
productFlag.PREPAID_CREDIT = Prepaid credit
productFlag.PREPAID_INSTANT_CREATE = Prepaid instant create
productFlag.RESERVE_PLACE_WHEN_BOUGHT = Reserve place when bought
productFlag.USER_SHOPPABLE = User shoppable
products.create = Create product
>>>>>>> f4d8f93b7bc34f8ccc2a5df9f9ab5f8db5e3b11e
products.save = Save
productsShopView.readBarcode = Read
......@@ -714,8 +797,11 @@ role.name = Name
role.parents = Parents
role.permissionheader = Role permissions
role.read = (R)
role.savePermissions = Save permissions
role.write = (W)
roleView.save = Save changes
salespoint.edit = Edit
salespoint.name = Name
salespoint.noSalesPoints = Amount
......@@ -794,6 +880,8 @@ submenu.foodmanager.listFoodwaves = List active foodwaves
submenu.foodwave.list = Foodwaves
submenu.foodwave.listTemplates = Food provides
submenu.index = Frontpage
submenu.license.manageCodes = Manage codes
submenu.license.viewCodes = View codes
submenu.map.create = Create map
submenu.map.list = List maps
submenu.orgrole.create = Create organisationrole
......
......@@ -242,15 +242,20 @@ error.contact = Jos t\u00E4m\u00E4 toistuu, ota seuraava koodi talteen ja ota yh
error.error = Olet kohdannut virheen.
event.defaultRole = K\u00E4ytt\u00E4jien oletusrooli
event.domains.title = Verkkotunnus
event.edit = Muokkaa
event.endTime = Lopetusp\u00E4iv\u00E4
event.id = Eventin id
event.name = Tapahtuman nimi
event.nextBillNumber = Seuraavan laskun numero
event.privateProperties.title = Yksityiset ominaisuudet
event.properties.title = Ominaisuudet
event.referenceNumberBase = Viitenumeron pohja
event.save = Tallenna
event.startTime = Aloitusp\u00E4iv\u00E4
eventdomain.domainname = Domain
eventdomain.add = Lis\u00E4\u00E4 verkkotunnus tapahtumalle
eventdomain.domainname = Verkkotunnus
eventdomain.remove = Poista
eventmap.active = Aktiivinen\u0009
......@@ -275,6 +280,7 @@ eventorg.createEvent = Luo tapahtuma
eventorg.createevent = Luo uusi tapahtuma
eventorg.edit = Muokkaa
eventorg.events = Organisaation tapahtumat
eventorg.id = Tapahtuman ID
eventorg.organisation = Organisaation nimi
eventorg.save = Tallenna
......@@ -426,10 +432,28 @@ javax.validation.constraints.Past.message = must be in the past
javax.validation.constraints.Pattern.message = must match "{regexp}"
javax.validation.constraints.Size.message = size must be between {min} and {max}
lanEventPrivateProperty.createProperty = Luo yksityinen ominaisuus
lanEventPrivateProperty.key = Ominaisuuden avain
lanEventPrivateProperty.value = Ominaisuuden arvo
lanEventProperty.createProperty = Luo ominaisuus
lanEventProperty.editProperty = Muokkaa arvoa
lanEventProperty.key = Ominaisuuden avain
lanEventProperty.value = Ominaisuuden arvo
lanEventProperty.valueIsRawdataWarning = Varoitus raakadatasta
layout.editBottom = Muokkaa alasis\u00E4lt\u00F6\u00E4
layout.editContent = Muokkaa sis\u00E4lt\u00F6\u00E4
layout.editTop = Muokkaa yl\u00E4sis\u00E4lt\u00F6\u00E4
license.active = Aktiivinen
license.description = Kuvaus
license.name = Nimi
license.product = Tuote
license.save = Tallenna
license.service = Palvelu
license.url = Osoite
login.login = Kirjaudu sis\u00E4\u00E4n
login.logout = Kirjaudu ulos
login.logoutmessage = Olet kirjautunut ulos j\u00E4rjestelm\u00E4st\u00E4.
......@@ -441,6 +465,8 @@ loginerror.header = Kirjautuminen ep\u00E4onnistui
loginerror.message = K\u00E4ytt\u00E4j\u00E4tunnus tai salasana ei ollut oikein.
loginerror.resetpassword = Salasana unohtunut?
map.create = Luo kartta
map.createTimeMap = Luo tilekartta
map.edit = Muokkaa
map.generate = Generoi paikat
map.height = Paikan korkeus (px)
......@@ -470,6 +496,8 @@ mapView.errorWhenReservingPlace = Paikkaa varatessa tapahtui virhe.
mapView.errorWhileBuyingPlaces = Virhe paikkojen ostossa. Ole hyv\u00E4 ja yrit\u00E4 uudelleen. Jos virhe toistuu ota yhteytt\u00E4 j\u00E4rjest\u00E4jiin.
mapView.notEnoughCreditsToReserve = Sinulla ei ole riitt\u00E4v\u00E4sti suoritettuja konepaikkamaksuja t\u00E4m\u00E4n paikan varaamiseen.
mapedit.save = Tallenna muutokset
menu.index = Etusivu
menu.name = Nimi
menu.place.placemap = Paikkakartta
......@@ -481,6 +509,8 @@ menu.toAdmin = Yll\u00E4piton\u00E4kym\u00E4
menu.toUser = K\u00E4ytt\u00E4j\u00E4n\u00E4kym\u00E4
menu.user.edit = Omat tiedot
nasty.user = Mene pois!
news.abstract = Lyhennelm\u00E4
news.expire = Lopeta julkaisu
news.publish = Julkaise
......@@ -489,13 +519,13 @@ news.title = Otsikko
newsgroup.edit = Muokkaa
newsgroup.name = Uutisryhm\u00E4n nimi
newsgroup.priority = J\u00E4rjestysnumero
newsgroup.priority = Painoarvo
newsgroup.readerRole = Lukijoiden roolit
newsgroup.writerRole = Kirjoittajaryhm\u00E4
newslist.header = Uutisryhm\u00E4t
org.hibernate.validator.constraints.Email.message = not a well-formed email address
org.hibernate.validator.constraints.Email.message = V\u00E4\u00E4rin muotoiltu s\u00E4hk\u00F6postiosoite
org.hibernate.validator.constraints.Length.message = length must be between {min} and {max}
org.hibernate.validator.constraints.NotEmpty.message = may not be empty
org.hibernate.validator.constraints.Range.message = must be between {min} and {max}
......@@ -504,10 +534,22 @@ orgrole.create = Luo
orgrole.name = Nimi
orgrole.parents = Periytyy
page.account.edit.header = Muokkaa tilitapahtumia
page.account.list.header = Tilitapahtumat
page.admin.sendimage.header = L\u00E4het\u00E4 kuva
page.auth.login.header = Kirjautumisvirhe
page.auth.login.loginerror.header = Kirjautumisvirhe
page.auth.login.loginerror.pagegroup = Etusivu
page.auth.login.logout.header = Uloskirjautuminen
page.auth.login.logout.pagegroup = Etusivu
page.auth.login.pagegroup = Etusivu
page.auth.login.title = Kirjautumisvirhe
page.auth.loginerror.header = kirjautuminen ep\u00E4onnistui
page.auth.loginerror.pagegroup = etusivu
page.auth.logout.header = Uloskirjautuminen
page.auth.logoutsuccess.header = Logout
page.auth.logout.pagegroup = Etusivu
page.auth.logoutsuccess.header = Uloskirjauduttu
page.auth.notauthorized.pagegroup = etusivu
page.auth.resetPassword.header = Nollaa salasana
page.bill.billSummary.header = Laskujen yhteenveto
page.bill.edit.header = Muokkaa laskua
......@@ -617,6 +659,7 @@ poll.end = Sulje kysely
poll.name = Kyselyn nimi
poll.save = L\u00E4het\u00E4 vastauksesi
<<<<<<< HEAD
print = Tulosta
product.barcode = Viivakoodi
......@@ -640,9 +683,43 @@ product.sort = J\u00E4rjestys luku
product.totalPrice = Summa
product.unitName = Tuoteyksikk\u00F6
product.vat = ALV
=======
product.barcode = Viivakoodi
product.billed = Laskutettu
product.boughtTotal = Tuotteita laskutettu
product.buyInPrice = Sis\u00E4\u00E4nostohinta
product.cart.count = Ostoskoriin
product.cashed = Ostettu k\u00E4teisell\u00E4
product.color = V\u00E4ri k\u00E4ytt\u00F6liittym\u00E4ss\u00E4
product.create = Luo tuote
product.createDiscount = Lis\u00E4\u00E4 m\u00E4\u00E4r\u00E4alennus
product.edit = Muokkaa
product.inventoryQuantity = Varastotilanne
product.name = Tuotteen nimi
product.paid = Maksettu
product.prepaid = Prepaid
product.prepaidInstant = Luodaan kun prepaid maksetaan
product.price = Tuotteen hinta
product.providedRole = Tuote tarjoaa roolin
product.returnProductEdit = Palaa tuotteeseen:
product.save = Tallenna
product.saved = Tuote tallennettu
product.shopInstant = Luo k\u00E4teismaksu tuotteille
product.sort = J\u00E4rjestys luku
product.totalPrice = Summa
product.unitName = Tuoteyksikk\u00F6
product.vat = ALV
productFlag.CREATE_NEW_PLACE_WHEN_BOUGHT = Luo uusi paikka ostettaessa
productFlag.PREPAID_CREDIT = Prepaid credit
productFlag.PREPAID_INSTANT_CREATE = Ostettaessa luotava tuote
productFlag.RESERVE_PLACE_WHEN_BOUGHT = Varaa paikka ostettaessa
productFlag.USER_SHOPPABLE = K\u00E4ytt\u00E4jien ostettavissa
>>>>>>> f4d8f93b7bc34f8ccc2a5df9f9ab5f8db5e3b11e
productShopView.readBarcode = Lue viivakoodi
products.create = Luo tuote
products.save = Tallenna
productsShopView.readBarcode = Lue
......@@ -700,8 +777,11 @@ role.edit = Muokkaa
role.edit.save = Tallenna
role.name = Nimi
role.parents = Periytyy
role.permissionheader = Roolin oikeudet
role.savePermissions = Tallenna oikeudet
roleView.save = Tallenna muutokset
salespoint.edit = Muokkaa
salespoint.name = Nimi
salespoint.noSalesPoints = M\u00E4\u00E4r\u00E4
......@@ -777,6 +857,8 @@ submenu.foodadmin.listTemplates = Muokkaa tilauspohjia
submenu.foodmanager.listFoodwaves = Aktiiviset ruokatilaukset
submenu.foodwave.list = Ruokailu
submenu.index = Etusivu
submenu.license.manageCodes = Hallinnoi lisenssej\u00E4
submenu.license.viewCodes = N\u00E4yt\u00E4 koodit
submenu.map.create = Uusi kartta
submenu.map.list = N\u00E4yt\u00E4 kartat
submenu.orgrole.create = Luo j\u00E4rjest\u00E4j\u00E4rooli
......
package fi.codecrew.moya.web.cdiview.tournaments;
import java.io.Serializable;
import java.util.List;
import fi.codecrew.moya.beans.EventBeanLocal;
import fi.codecrew.moya.beans.TournamentBeanLocal;
import fi.codecrew.moya.model.Role;
import fi.codecrew.moya.model.Tournament;
......@@ -21,16 +23,28 @@ import org.primefaces.event.FlowEvent;
public class TournamentCreateView extends GenericCDIView {
private static final long serialVersionUID = 2547358764980373797L;
private List<TournamentGame> tournamentGames;
private List<TournamentRule> tournamentRules;
private TournamentRule rules = null;
private TournamentGame game = null;
private Tournament tournament = null;
private String tournamentGameName;
private String tournamentGameDescription;
private String rulesetName;
private String rulesetDescription;
@EJB TournamentBeanLocal tournamentBean;
@EJB EventBeanLocal eventBean;
public void initView() {
if(tournament == null) {
this.beginConversation();
tournament = new Tournament();
tournamentGames = tournamentBean.getGames();
}
}
......@@ -38,9 +52,92 @@ public class TournamentCreateView extends GenericCDIView {
}
public List<TournamentGame> getTournamentGames() {
return tournamentGames;
}
public List<TournamentRule> getTournamentRules() {
return tournamentRules;
}
public void uploadListener(org.primefaces.event.FileUploadEvent event) {
System.out.println("ZZ");
}
public String onFlowProcess(FlowEvent event) {
switch(event.getOldStep()) {
case "selectGame":
if(tournamentGameName.length() > 0) {
// oh lurd, we want to create a new gamy now
TournamentGame tg = new TournamentGame();
tg.setName(tournamentGameName);
tg.setDescription(tournamentGameDescription);
tg.setLanEvent(eventBean.getCurrentEvent());
tournamentBean.createGame(tg);
}
tournamentRules = tournamentBean.getRulesByGame(this.getGame());
break;
case "selectRuleset":
if(rulesetName != null && rulesetName.length() > 0) {
TournamentRule tr = new TournamentRule();
tr.setName(rulesetName);
tr.setDescription(rulesetDescription);
tournamentBean.createRule(tr);
}
break;
}
System.out.println(event.getOldStep());
return event.getNewStep();
}
public TournamentGame getGame() {
return game;
}
public void setGame(TournamentGame game) {
this.game = game;
}
public TournamentRule getRules() {
return rules;
}
public void setRules(TournamentRule rules) {
this.rules = rules;
}
public String getTournamentGameName() {
return tournamentGameName;
}
public void setTournamentGameName(String tournamentGameName) {
this.tournamentGameName = tournamentGameName;
}
public String getTournamentGameDescription() {
return tournamentGameDescription;
}
public void setTournamentGameDescription(String tournamentGameDescription) {
this.tournamentGameDescription = tournamentGameDescription;
}
public String getRulesetName() {
return rulesetName;
}
public void setRulesetName(String rulesetName) {
this.rulesetName = rulesetName;
}
public String getRulesetDescription() {
return rulesetDescription;
}
public void setRulesetDescription(String rulesetDescription) {
this.rulesetDescription = rulesetDescription;
}
}
package fi.codecrew.moya.web.converter;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
import fi.codecrew.moya.beans.TournamentBeanLocal;
import fi.codecrew.moya.beans.UserBeanLocal;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.TournamentGame;
import fi.codecrew.moya.utilities.jsf.GenericIntegerEntityConverter;
@Named
@RequestScoped
public class TournamentGameConverter extends GenericIntegerEntityConverter<TournamentGame> {
@EJB private TournamentBeanLocal tournamentBean;
@Override
protected TournamentGame find(Integer id) {
return tournamentBean.findGame(id);
}
}
package fi.codecrew.moya.web.converter;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
import fi.codecrew.moya.beans.TournamentBeanLocal;
import fi.codecrew.moya.beans.UserBeanLocal;
import fi.codecrew.moya.model.EventUser;
import fi.codecrew.moya.model.TournamentGame;
import fi.codecrew.moya.model.TournamentRule;
import fi.codecrew.moya.utilities.jsf.GenericIntegerEntityConverter;
@Named
@RequestScoped
public class TournamentRuleConverter extends GenericIntegerEntityConverter<TournamentRule> {
@EJB private TournamentBeanLocal tournamentBean;
@Override
protected TournamentRule find(Integer id) {
return tournamentBean.findRule(id);
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!