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 72327b43
authored
Dec 14, 2014
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Help menu view (quick and dirty)
1 parent
a392afcb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
2 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
code/moya-utils/src/main/java/fi/codecrew/moya/enums/apps/UserPermission.java
code/moya-web/WebContent/help.xhtml
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/content/PageOutputView.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/MenuBean.java
View file @
72327b4
...
...
@@ -110,6 +110,9 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation
usermenu
=
new
MenuNavigation
(
ev
,
"topmenu.user"
,
5
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/frontpage"
),
UserPermission
.
ANYUSER
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/help"
),
UserPermission
.
HELPPAGE
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/checkout/return"
),
null
).
setVisible
(
false
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/checkout/delayed"
),
null
).
setVisible
(
false
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/checkout/reject"
),
null
).
setVisible
(
false
);
...
...
@@ -124,6 +127,7 @@ public class MenuBean implements MenuBeanLocal {
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/resetmailSent"
),
null
).
setVisible
(
false
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/passwordChanged"
),
null
).
setVisible
(
false
);
usermenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/notauthorized"
),
null
).
setVisible
(
false
);
MenuNavigation
userEvent
=
usermenu
.
addPage
(
null
,
null
);
userEvent
.
setKey
(
"topnavi.userevent"
);
...
...
@@ -142,7 +146,9 @@ public class MenuBean implements MenuBeanLocal {
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodwave/listProducts"
),
ShopPermission
.
SHOP_FOODWAVE
).
setVisible
(
false
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodwave/ThanksForOrderingFromCounter"
),
ShopPermission
.
SHOP_FOODWAVE
).
setVisible
(
false
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/svm/success"
),
UserPermission
.
ANYUSER
).
setVisible
(
false
);
// landingpages are always "anyuser"
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/svm/notification"
),
UserPermission
.
ANYUSER
).
setVisible
(
false
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/svm/pending"
),
UserPermission
.
ANYUSER
).
setVisible
(
false
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/bill/list"
),
BillPermission
.
VIEW_OWN
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/bill/edit"
),
BillPermission
.
VIEW_OWN
).
setVisible
(
false
);
userkauppa
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/bill/showBill"
),
BillPermission
.
VIEW_OWN
).
setVisible
(
false
);
...
...
code/moya-utils/src/main/java/fi/codecrew/moya/enums/apps/UserPermission.java
View file @
72327b4
...
...
@@ -40,7 +40,8 @@ public enum UserPermission implements IAppPermission {
VITUTTAAKO
,
LOGGED_IN_USER
,
MODIFY_OWN_GAMEIDS
,
VIEW_ALL_GAMEIDS
;
VIEW_ALL_GAMEIDS
,
HELPPAGE
;
public
static
final
String
S_VIEW_ALL
=
"USER/VIEW_ALL"
;
public
static
final
String
S_MODIFY
=
"USER/MODIFY"
;
...
...
@@ -61,6 +62,7 @@ public enum UserPermission implements IAppPermission {
public
static
final
String
S_VITUTTAAKO
=
"USER/VITUTTAAKO"
;
public
static
final
String
S_MODIFY_OWN_GAMEIDS
=
"USER/MODIFY_OWN_GAMEIDS"
;
public
static
final
String
S_VIEW_ALL_GAMEIDS
=
"USER/VIEW_ALL_GAMEIDS"
;
public
static
final
String
S_HELPPAGE
=
"USER/HELPPAGE"
;
private
final
String
fullName
;
private
final
String
key
;
...
...
code/moya-web/WebContent/help.xhtml
0 → 100644
View file @
72327b4
<!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.initHelpView}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<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/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/content/PageOutputView.java
View file @
72327b4
...
...
@@ -52,6 +52,13 @@ public class PageOutputView extends GenericCDIView {
initView
();
}
public
void
initHelpView
()
{
name
=
"/help"
;
initView
();
}
public
void
initView
(
String
name
)
{
...
...
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