Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
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 21974dc8
authored
Oct 09, 2013
by
Antti Tonkyra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tournament admin views
1 parent
05a25dbb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
136 additions
and
0 deletions
code/MoyaWeb/WebContent/tournaments/admin/index.xhtml
code/MoyaWeb/WebContent/tournaments/admin/view_tournament_single.xhtml
code/MoyaWeb/WebContent/tournaments/admin/view_tournament_team.xhtml
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/TournamentParticipantsView.java
code/MoyaWeb/WebContent/tournaments/admin/index.xhtml
View file @
21974dc
...
...
@@ -71,6 +71,7 @@
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['tournament.admin.control']}"
/>
</f:facet>
<p:commandButton
value=
"#{i18n['tournament.admin.view']}"
action=
"#{tournamentParticipantsView.showView(tournament.id)}"
/>
<p:commandButton
value=
"#{i18n['tournament.admin.edit']}"
action=
"#{tournamentEditView.showEdit(tournament.id)}"
/>
<p:commandButton
value=
"#{i18n['tournament.admin.delete']}"
action=
"#{tournamentDeleteView.showConfirm(tournament.id)}"
/>
</p:column>
...
...
code/MoyaWeb/WebContent/tournaments/admin/view_tournament_single.xhtml
0 → 100644
View file @
21974dc
<!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:metadata>
<ui:define
name=
"content"
>
<h1>
#{i18n['tournaments.admin.view_tournament_title']} #{tournamentParticipantsView.tournament.tournamentName}
</h1>
<p>
#{i18n['tournaments.admin.view_tournament_description']}
</p>
<h:form>
<p:dataTable
value=
"#{tournamentParticipantsView.tournament.participants}"
var=
"participant"
>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['tournament.participant_nick']}"
/>
</f:facet>
<h:outputText
value=
"#{participant.participator.nick}"
/>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['tournament.participant_gameid']}"
/>
</f:facet>
<h:outputText
value=
"derp"
/>
</p:column>
</p:dataTable>
</h:form>
<h:form>
<p:commandButton
value=
"#{i18n['tournament.admin.back_to_index']}"
action=
"#{tournamentParticipantsView.cancel}"
/>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/MoyaWeb/WebContent/tournaments/admin/view_tournament_team.xhtml
0 → 100644
View file @
21974dc
<!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:metadata>
<ui:define
name=
"content"
>
<h1>
#{i18n['tournaments.admin.view_tournament_title']} #{tournamentParticipantsView.tournament.tournamentName}
</h1>
<p>
#{i18n['tournaments.admin.view_tournament_description']}
</p>
<p>
#{i18n['tournaments.admin.view_tournament_description_teamview_addition']}
</p>
<h:form>
<p:dataTable
value=
"#{tournamentParticipantsView.tournament.participants}"
var=
"participant"
>
<p:column
style=
"width:2%"
>
<p:rowToggler
/>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['tournament.team_name']}"
/>
</f:facet>
<h:outputText
value=
"#{participant.teamName}"
/>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['tournament.participant_captain']}"
/>
</f:facet>
<h:outputText
value=
"#{participant.participator.nick}"
/>
</p:column>
<p:rowExpansion>
<h:panelGrid
id=
"display"
columns=
"2"
cellpadding=
"4"
styleClass=
" ui-widget-content grid"
>
<h:outputText
value=
"#{i18n['tournament.team_members']}"
/>
<h:panelGroup>
<ul>
<ui:repeat
var=
"member"
value=
"#{participant.teamMembers}"
>
<li>
<h:outputText
value=
"#{member.eventUser.nick}"
/>
(
<h:outputText
value=
"GAMEID"
/>
)
</li>
</ui:repeat>
</ul>
</h:panelGroup>
</h:panelGrid>
</p:rowExpansion>
</p:dataTable>
</h:form>
<h:form>
<p:commandButton
value=
"#{i18n['tournament.admin.back_to_index']}"
action=
"#{tournamentParticipantsView.cancel}"
/>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
View file @
21974dc
This diff is collapsed.
Click to expand it.
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
View file @
21974dc
This diff is collapsed.
Click to expand it.
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentParticipantsView.java
0 → 100644
View file @
21974dc
package
fi
.
codecrew
.
moya
.
web
.
cdiview
.
tournaments
;
import
javax.ejb.EJB
;
import
javax.enterprise.context.ConversationScoped
;
import
javax.inject.Named
;
import
fi.codecrew.moya.beans.TournamentBeanLocal
;
import
fi.codecrew.moya.model.Tournament
;
import
fi.codecrew.moya.web.cdiview.GenericCDIView
;
@Named
@ConversationScoped
public
class
TournamentParticipantsView
extends
GenericCDIView
{
private
static
final
long
serialVersionUID
=
-
6066216858686165211L
;
@EJB
private
TournamentBeanLocal
tournamentBean
;
private
Tournament
tournament
=
null
;
public
String
showView
(
Integer
tournamentId
)
{
this
.
beginConversation
();
this
.
setTournament
(
tournamentBean
.
getTournamentById
(
tournamentId
));
if
(
this
.
tournament
.
getPlayersPerTeam
()
==
1
)
return
"/tournaments/admin/view_tournament_single.xhtml"
;
else
return
"/tournaments/admin/view_tournament_team.xhtml"
;
}
public
String
cancel
()
{
this
.
endConversation
();
return
"/tournaments/admin/index.xhtml"
;
}
public
Tournament
getTournament
()
{
return
tournament
;
}
public
void
setTournament
(
Tournament
tournament
)
{
this
.
tournament
=
tournament
;
}
}
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