Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
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 863ae773
authored
Sep 01, 2013
by
Antti Tonkyra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tournament stuffation
1 parent
1dec9471
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
4 deletions
code/MoyaWeb/WebContent/tournaments/admin/createwizard.xhtml
code/MoyaWeb/WebContent/tournaments/admin/index.xhtml
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentAdminView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentCreateView.java
code/MoyaWeb/WebContent/tournaments/admin/createwizard.xhtml
View file @
863ae77
...
...
@@ -54,7 +54,14 @@
<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>
...
...
@@ -70,7 +77,7 @@
<br
/>
<h:selectOneMenu
value=
"#{tournamentCreateView.tournament.tournamentType}"
>
<f:selectItems
value=
"#{tournamentCreateView.tournamentTypes}"
var=
"val"
itemLabel=
"
val
"
/>
<f:selectItems
value=
"#{tournamentCreateView.tournamentTypes}"
var=
"val"
itemLabel=
"
#{val}
"
/>
</h:selectOneMenu>
<h:outputText
value=
"#{i18n['tournaments.players_per_match']}"
/>
...
...
@@ -100,11 +107,12 @@
<h:outputText
value=
"Start time"
/>
<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']}"
actionListener=
"#{tournamentCreateView.save}"
/>
</div>
</p:tab>
</p:tab>
</p:wizard>
</h:form>
...
...
code/MoyaWeb/WebContent/tournaments/admin/index.xhtml
0 → 100644
View file @
863ae77
<!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/web/cdiview/tournaments/TournamentAdminView.java
0 → 100644
View file @
863ae77
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 @
863ae77
...
...
@@ -37,6 +37,7 @@ public class TournamentCreateView extends GenericCDIView {
private
String
rulesetName
;
private
String
rulesetDescription
;
private
String
rulesetRules
;
private
Integer
backupPlayers
;
...
...
@@ -100,7 +101,8 @@ public class TournamentCreateView extends GenericCDIView {
if
(
rulesetName
!=
null
&&
rulesetName
.
length
()
>
0
)
{
TournamentRule
tr
=
new
TournamentRule
();
tr
.
setName
(
rulesetName
);
tr
.
setRules
(
rulesetDescription
);
tr
.
setDescription
(
rulesetDescription
);
tr
.
setRules
(
rulesetRules
);
tr
.
setTournamentGame
(
game
);
rules
=
tournamentBean
.
createRule
(
tr
);
...
...
@@ -174,4 +176,12 @@ public class TournamentCreateView extends GenericCDIView {
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