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 f942451c
authored
Sep 01, 2013
by
Antti Jaakkola
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'devel' of codecrew.fi:bortal into devel
2 parents
13919d2c
0eec5be6
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
59 additions
and
35 deletions
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
code/MoyaDatabase/src/fi/codecrew/moya/model/TournamentRule.java
code/MoyaWeb/WebContent/frontpage.xhtml
code/MoyaWeb/WebContent/index.xhtml
code/MoyaWeb/WebContent/tournaments/admin/index.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/GenericCDIView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentCreateView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/AuthView.java
code/MoyaWeb/src/fi/codecrew/moya/web/helper/LayoutView.java
code/MoyaBeans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
View file @
f942451
...
@@ -75,7 +75,7 @@ public class MenuBean implements MenuBeanLocal {
...
@@ -75,7 +75,7 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation
usermenu
=
new
MenuNavigation
(
ev
,
"topnavi.usernavi"
,
menusort
=
+
10
);
MenuNavigation
usermenu
=
new
MenuNavigation
(
ev
,
"topnavi.usernavi"
,
menusort
=
+
10
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/
index
"
),
UserPermission
.
ANYUSER
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/
frontpage
"
),
UserPermission
.
ANYUSER
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/permissionDenied"
),
null
).
setVisible
(
false
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/permissionDenied"
),
null
).
setVisible
(
false
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/login"
),
null
).
setVisible
(
false
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/login"
),
null
).
setVisible
(
false
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/loginError"
),
null
).
setVisible
(
false
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/loginError"
),
null
).
setVisible
(
false
);
...
@@ -89,8 +89,8 @@ public class MenuBean implements MenuBeanLocal {
...
@@ -89,8 +89,8 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation
userEvent
=
usermenu
.
addPage
(
null
,
null
);
MenuNavigation
userEvent
=
usermenu
.
addPage
(
null
,
null
);
userEvent
.
setKey
(
"topnavi.userevent"
);
userEvent
.
setKey
(
"topnavi.userevent"
);
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/poll/index"
),
PollPermission
.
ANSWER
);
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/poll/index"
),
PollPermission
.
ANSWER
);
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/
feedback/index"
),
UserPermission
.
ANYUSER
);
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/
user/invite"
),
UserPermission
.
INVITE_USERS
);
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/
user/invite"
),
UserPermission
.
ANYUSER
);
userEvent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/
feedback/index"
),
UserPermission
.
VITUTTAAKO
);
MenuNavigation
userkauppa
=
usermenu
.
addPage
(
null
,
null
);
MenuNavigation
userkauppa
=
usermenu
.
addPage
(
null
,
null
);
userkauppa
.
setKey
(
"topnavi.usershop"
);
userkauppa
.
setKey
(
"topnavi.usershop"
);
...
@@ -229,8 +229,12 @@ public class MenuBean implements MenuBeanLocal {
...
@@ -229,8 +229,12 @@ public class MenuBean implements MenuBeanLocal {
gamenavi
.
setKey
(
"topnavi.license"
);
gamenavi
.
setKey
(
"topnavi.license"
);
gamenavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/license/manageCodes"
),
LicensePermission
.
MANAGE
);
gamenavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/license/manageCodes"
),
LicensePermission
.
MANAGE
);
adminevent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/eventorg/list"
),
EventPermission
.
MANAGE_PROPERTIES
);
adminevent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/eventorg/list"
),
EventPermission
.
MANAGE_PROPERTIES
);
adminevent
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/feedback/index"
),
UserPermission
.
VITUTTAAKO
);
navifacade
.
create
(
adminmenu
);
navifacade
.
create
(
adminmenu
);
MenuNavigation
shopmenu
=
new
MenuNavigation
(
ev
,
"topnavi.shopnavi"
,
menusort
=
+
10
);
MenuNavigation
shopmenu
=
new
MenuNavigation
(
ev
,
"topnavi.shopnavi"
,
menusort
=
+
10
);
...
@@ -309,7 +313,7 @@ public class MenuBean implements MenuBeanLocal {
...
@@ -309,7 +313,7 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation
frontTopnavi
=
usernavi
.
addPage
(
null
,
null
);
MenuNavigation
frontTopnavi
=
usernavi
.
addPage
(
null
,
null
);
frontTopnavi
.
setKey
(
"topnavi.frontpage"
);
frontTopnavi
.
setKey
(
"topnavi.frontpage"
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/
index
"
),
UserPermission
.
ANYUSER
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/
frontpage
"
),
UserPermission
.
ANYUSER
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/create"
),
UserPermission
.
CREATE_NEW
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/create"
),
UserPermission
.
CREATE_NEW
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/sendResetMail"
),
UserPermission
.
LOGIN
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/sendResetMail"
),
UserPermission
.
LOGIN
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/invite"
),
UserPermission
.
INVITE_USERS
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/invite"
),
UserPermission
.
INVITE_USERS
);
...
...
code/MoyaDatabase/src/fi/codecrew/moya/model/TournamentRule.java
View file @
f942451
...
@@ -21,7 +21,7 @@ import org.eclipse.persistence.annotations.OptimisticLockingType;
...
@@ -21,7 +21,7 @@ import org.eclipse.persistence.annotations.OptimisticLockingType;
@OptimisticLocking
(
type
=
OptimisticLockingType
.
CHANGED_COLUMNS
)
@OptimisticLocking
(
type
=
OptimisticLockingType
.
CHANGED_COLUMNS
)
public
class
TournamentRule
extends
GenericEntity
implements
Serializable
{
public
class
TournamentRule
extends
GenericEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Column
(
name
=
"name"
)
@Column
(
name
=
"name"
)
private
String
name
;
private
String
name
;
...
@@ -70,6 +70,4 @@ public class TournamentRule extends GenericEntity implements Serializable {
...
@@ -70,6 +70,4 @@ public class TournamentRule extends GenericEntity implements Serializable {
public
void
setTournamentGame
(
TournamentGame
tournamentGame
)
{
public
void
setTournamentGame
(
TournamentGame
tournamentGame
)
{
this
.
tournamentGame
=
tournamentGame
;
this
.
tournamentGame
=
tournamentGame
;
}
}
}
}
code/MoyaWeb/WebContent/frontpage.xhtml
0 → 100644
View file @
f942451
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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:f=
"http://java.sun.com/jsf/core"
>
<h:head>
<title></title>
</h:head>
<h:body>
<ui:composition
template=
"#{sessionHandler.template}"
>
<f:metadata>
<f:event
type=
"preRenderView"
listener=
"#{pageOutputView.initIndexView}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<h:outputLabel
rendered=
"#{sessionHandler.isInDevelopmentMode()}"
>
Development-tilassa.
Täällä voit huoletta rikkoa.
</h:outputLabel>
<ui:fragment
rendered=
"#{layoutView.manageContent}"
>
<h:link
value=
"#{i18n['layout.editContent']}"
outcome=
"/pages/manage"
>
<f:param
name=
"pagename"
value=
"#{layoutView.pagepath}"
/>
</h:link>
<br
/>
</ui:fragment>
<ui:repeat
var=
"cont1"
value=
"#{pageOutputView.contents}"
>
<h:outputText
value=
"#{cont1.content}"
escape=
"false"
/>
</ui:repeat>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/MoyaWeb/WebContent/index.xhtml
View file @
f942451
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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:f=
"http://java.sun.com/jsf/core"
>
<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:f=
"http://java.sun.com/jsf/core"
>
<h:head>
<h:head>
<meta
http-equiv=
"refresh"
content=
"1;url=frontpage.jsf"
/>
<script
type=
"text/javascript"
>
window
.
location
.
href
=
"frontpage.jsf"
</script>
<title></title>
<title></title>
</h:head>
</h:head>
<h:body>
<h:body>
<ui:composition
template=
"#{sessionHandler.template}"
>
Redirecting to
<a
href=
"frontpage.jsf"
>
Frontpage
</a>
<f:metadata>
<f:event
type=
"preRenderView"
listener=
"#{pageOutputView.initIndexView}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<h:outputLabel
rendered=
"#{sessionHandler.isInDevelopmentMode()}"
>
Development-tilassa.
Täällä voit huoletta rikkoa.
</h:outputLabel>
<ui:fragment
rendered=
"#{layoutView.manageContent}"
>
<h:link
value=
"#{i18n['layout.editContent']}"
outcome=
"/pages/manage"
>
<f:param
name=
"pagename"
value=
"#{layoutView.pagepath}"
/>
</h:link>
<br
/>
</ui:fragment>
<ui:repeat
var=
"cont1"
value=
"#{pageOutputView.contents}"
>
<h:outputText
value=
"#{cont1.content}"
escape=
"false"
/>
</ui:repeat>
</ui:define>
</ui:composition>
</h:body>
</h:body>
</html>
</html>
\ No newline at end of file
code/MoyaWeb/WebContent/tournaments/admin/index.xhtml
View file @
f942451
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
</p:column>
</p:column>
</p:dataTable>
</p:dataTable>
<h:form>
<h:form>
<p:commandButton
value=
"#{i18n['tournament.admin.create']}"
action=
"#{tournamentAdminView.create}"
/>
<p:commandButton
value=
"#{i18n['tournament.admin.create']}"
action=
"#{tournamentAdminView.create}"
/>
</h:form>
</h:form>
</ui:define>
</ui:define>
</ui:composition>
</ui:composition>
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_en.properties
View file @
f942451
...
@@ -875,7 +875,7 @@ submenu.bill.billSummary = Bill summary
...
@@ -875,7 +875,7 @@ submenu.bill.billSummary = Bill summary
submenu.bill.list
=
My bills
submenu.bill.list
=
My bills
submenu.bill.listAll
=
All bills
submenu.bill.listAll
=
All bills
submenu.eventorg.list
=
Manage Event
submenu.eventorg.list
=
Manage Event
submenu.feedback.index
=
Feedback
submenu.feedback.index
=
U Mad?!
submenu.foodadmin.createTemplate
=
Create foodwave template
submenu.foodadmin.createTemplate
=
Create foodwave template
submenu.foodadmin.listTemplates
=
List foodwave templates
submenu.foodadmin.listTemplates
=
List foodwave templates
submenu.foodmanager.listFoodwaves
=
List active foodwaves
submenu.foodmanager.listFoodwaves
=
List active foodwaves
...
...
code/MoyaWeb/src/fi/codecrew/moya/resources/i18n_fi.properties
View file @
f942451
...
@@ -856,7 +856,7 @@ submenu.bill.billSummary = Laskujen yhteenveto
...
@@ -856,7 +856,7 @@ submenu.bill.billSummary = Laskujen yhteenveto
submenu.bill.list
=
N
\u
00E4yt
\u
00E4 omat laskut
submenu.bill.list
=
N
\u
00E4yt
\u
00E4 omat laskut
submenu.bill.listAll
=
Kaikki laskut
submenu.bill.listAll
=
Kaikki laskut
submenu.eventorg.list
=
Organisaation hallinta
submenu.eventorg.list
=
Organisaation hallinta
submenu.feedback.index
=
Palaute
submenu.feedback.index
=
Vituttaako?
submenu.foodadmin.createTemplate
=
Luo tilauspohja
submenu.foodadmin.createTemplate
=
Luo tilauspohja
submenu.foodadmin.listTemplates
=
Muokkaa tilauspohjia
submenu.foodadmin.listTemplates
=
Muokkaa tilauspohjia
submenu.foodmanager.listFoodwaves
=
Aktiiviset ruokatilaukset
submenu.foodmanager.listFoodwaves
=
Aktiiviset ruokatilaukset
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/GenericCDIView.java
View file @
f942451
...
@@ -41,6 +41,10 @@ public abstract class GenericCDIView implements Serializable {
...
@@ -41,6 +41,10 @@ public abstract class GenericCDIView implements Serializable {
}
}
}
}
public
void
endConversation
()
{
if
(!
conversation
.
isTransient
())
conversation
.
end
();
}
public
boolean
hasPermission
(
IAppPermission
perm
)
{
public
boolean
hasPermission
(
IAppPermission
perm
)
{
// boolean ret =
// boolean ret =
// FacesContext.getCurrentInstance().getExternalContext().isUserInRole(perm.getFullName());
// FacesContext.getCurrentInstance().getExternalContext().isUserInRole(perm.getFullName());
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/tournaments/TournamentCreateView.java
View file @
f942451
...
@@ -14,6 +14,7 @@ import fi.codecrew.moya.model.TournamentRule;
...
@@ -14,6 +14,7 @@ import fi.codecrew.moya.model.TournamentRule;
import
fi.codecrew.moya.web.cdiview.GenericCDIView
;
import
fi.codecrew.moya.web.cdiview.GenericCDIView
;
import
javax.ejb.EJB
;
import
javax.ejb.EJB
;
import
javax.ejb.Remove
;
import
javax.enterprise.context.ConversationScoped
;
import
javax.enterprise.context.ConversationScoped
;
import
javax.faces.event.ActionEvent
;
import
javax.faces.event.ActionEvent
;
import
javax.inject.Named
;
import
javax.inject.Named
;
...
@@ -63,6 +64,7 @@ public class TournamentCreateView extends GenericCDIView {
...
@@ -63,6 +64,7 @@ public class TournamentCreateView extends GenericCDIView {
tournamentBean
.
createTournament
(
tournament
);
tournamentBean
.
createTournament
(
tournament
);
this
.
endConversation
();
return
"success"
;
return
"success"
;
}
}
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/AuthView.java
View file @
f942451
...
@@ -53,8 +53,10 @@ public class AuthView extends GenericCDIView {
...
@@ -53,8 +53,10 @@ public class AuthView extends GenericCDIView {
logger
.
warn
(
"Error executing logout"
,
e
);
logger
.
warn
(
"Error executing logout"
,
e
);
}
}
}
}
req
.
getSession
().
invalidate
();
req
.
getSession
().
invalidate
();
navihandler
.
forward
(
"/index"
);
}
}
...
...
code/MoyaWeb/src/fi/codecrew/moya/web/helper/LayoutView.java
View file @
f942451
...
@@ -156,8 +156,7 @@ public class LayoutView {
...
@@ -156,8 +156,7 @@ public class LayoutView {
LanEventProperty
logo
=
eventbean
.
getProperty
(
LanEventPropertyKey
.
EVENT_LOGO
);
LanEventProperty
logo
=
eventbean
.
getProperty
(
LanEventPropertyKey
.
EVENT_LOGO
);
if
(
logo
!=
null
)
if
(
logo
!=
null
)
{
{
if
(
logo
.
getByteMime
()
==
null
)
if
(
logo
.
getByteMime
()
==
null
||
logo
.
getByteValue
()
==
null
)
{
{
headertext
=
logo
.
getTextvalue
();
headertext
=
logo
.
getTextvalue
();
}
else
{
}
else
{
headerimage
=
new
DefaultStreamedContent
(
new
ByteArrayInputStream
(
logo
.
getByteValue
()),
logo
.
getByteMime
());
headerimage
=
new
DefaultStreamedContent
(
new
ByteArrayInputStream
(
logo
.
getByteValue
()),
logo
.
getByteMime
());
...
...
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