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 a28279e8
authored
Sep 01, 2013
by
Antti Tonkyra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stuffed chicken, more tournament
1 parent
c6e430ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
4 deletions
code/MoyaWeb/WebContent/WEB-INF/faces-config.xml
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/WEB-INF/faces-config.xml
View file @
a28279e
...
@@ -139,6 +139,24 @@
...
@@ -139,6 +139,24 @@
<redirect
/>
<redirect
/>
</navigation-case>
</navigation-case>
</navigation-rule>
</navigation-rule>
<navigation-rule>
<display-name>
tournaments/admin/move-to-creation-screen
</display-name>
<from-view-id>
/tournaments/admin/index.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
create
</from-outcome>
<to-view-id>
/tournaments/admin/createwizard.xhtml
</to-view-id>
<redirect
/>
</navigation-case>
</navigation-rule>
<navigation-rule>
<display-name>
tournaments/admin/tournament-created
</display-name>
<from-view-id>
/tournaments/admin/createwizard.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
success
</from-outcome>
<to-view-id>
/tournaments/admin/index.xhtml
</to-view-id>
<redirect
/>
</navigation-case>
</navigation-rule>
</faces-config>
</faces-config>
...
...
code/MoyaWeb/WebContent/tournaments/admin/createwizard.xhtml
View file @
a28279e
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
<br
/>
<br
/>
</p:panel>
</p:panel>
<div
style=
"float: right;"
>
<div
style=
"float: right;"
>
<p:commandButton
icon=
"apply"
value=
"#{i18n['tournaments.admin.create_tournament']}"
action
Listener
=
"#{tournamentCreateView.save}"
/>
<p:commandButton
icon=
"apply"
value=
"#{i18n['tournaments.admin.create_tournament']}"
action=
"#{tournamentCreateView.save}"
/>
</div>
</div>
</p:tab>
</p:tab>
</p:wizard>
</p:wizard>
...
...
code/MoyaWeb/WebContent/tournaments/admin/index.xhtml
View file @
a28279e
...
@@ -51,8 +51,9 @@
...
@@ -51,8 +51,9 @@
<h:outputText
value=
"#{tournament.rules.name}"
/>
<h:outputText
value=
"#{tournament.rules.name}"
/>
</p:column>
</p:column>
</p:dataTable>
</p:dataTable>
<h:form>
<p:commandButton
value=
"#{i18n['tournament.admin.create']}"
action=
"#{tournamentAdminView.create}"
/>
</h:form>
</ui:define>
</ui:define>
</ui:composition>
</ui:composition>
</h:body>
</h:body>
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentAdminView.java
View file @
a28279e
...
@@ -18,4 +18,8 @@ public class TournamentAdminView {
...
@@ -18,4 +18,8 @@ public class TournamentAdminView {
List
<
Tournament
>
tl
=
tournamentBean
.
getActiveTournaments
();
List
<
Tournament
>
tl
=
tournamentBean
.
getActiveTournaments
();
return
tl
;
return
tl
;
}
}
public
String
create
()
{
return
"create"
;
}
}
}
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentCreateView.java
View file @
a28279e
...
@@ -54,7 +54,7 @@ public class TournamentCreateView extends GenericCDIView {
...
@@ -54,7 +54,7 @@ public class TournamentCreateView extends GenericCDIView {
}
}
}
}
public
void
save
(
ActionEvent
actionEvent
)
{
public
String
save
(
)
{
tournament
.
setPlayersPerTeam
(
tournament
.
getPlayersPerMatch
()
+
backupPlayers
);
tournament
.
setPlayersPerTeam
(
tournament
.
getPlayersPerMatch
()
+
backupPlayers
);
tournament
.
setLanEvent
(
eventBean
.
getCurrentEvent
());
tournament
.
setLanEvent
(
eventBean
.
getCurrentEvent
());
tournament
.
setTournamentStatus
(
TournamentStatus
.
SETUP
);
tournament
.
setTournamentStatus
(
TournamentStatus
.
SETUP
);
...
@@ -62,6 +62,8 @@ public class TournamentCreateView extends GenericCDIView {
...
@@ -62,6 +62,8 @@ public class TournamentCreateView extends GenericCDIView {
tournament
.
setRules
(
rules
);
tournament
.
setRules
(
rules
);
tournamentBean
.
createTournament
(
tournament
);
tournamentBean
.
createTournament
(
tournament
);
return
"success"
;
}
}
public
List
<
TournamentGame
>
getTournamentGames
()
{
public
List
<
TournamentGame
>
getTournamentGames
()
{
...
...
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