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 ff9f9aad
authored
Oct 07, 2012
by
Petri Järvisalo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Menustuff
1 parent
f1577fdc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
58 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/MenuBean.java
code/LanBortalWeb/WebContent/resources/cditools/user/edit.xhtml
code/LanBortalWeb/WebContent/resources/cditools/user/list.xhtml
code/LanBortalWeb/WebContent/resources/style/template1/css/general.css
code/LanBortalWeb/WebContent/shop/shopToUser.xhtml
code/LanBortalWeb/WebContent/user/create.xhtml
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/MenuBean.java
View file @
ff9f9aa
...
...
@@ -99,14 +99,24 @@ public class MenuBean implements MenuBeanLocal {
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/resetmailSent"
),
null
).
setVisible
(
false
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/passwordChanged"
),
null
).
setVisible
(
false
);
frontTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/auth/notauthorized"
),
null
).
setVisible
(
false
);
MenuNavigation
adminnavi
=
new
MenuNavigation
(
ev
,
"supernavi.admin"
);
navifacade
.
create
(
adminnavi
);
MenuNavigation
adminuser
=
frontTopnavi
.
addPage
(
null
,
null
);
adminuser
.
setKey
(
"topnavi.usermgmt"
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/useradmin/list"
),
UserPermission
.
VIEW_ALL
).
setHeader
(
"submenu.user.manageuserlinks"
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/useradmin/create"
),
UserPermission
.
VIEW_ALL
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/role/list"
),
UserPermission
.
READ_ROLES
).
setHeader
(
"submenu.user.rolelinks"
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/role/create"
),
UserPermission
.
WRITE_ROLES
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/role/edit"
),
null
).
setVisible
(
false
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/orgrole/list"
),
UserPermission
.
READ_ORGROLES
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/orgrole/create"
),
UserPermission
.
WRITE_ORGROLES
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/useradmin/listCardTemplates"
),
UserPermission
.
READ_ROLES
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/useradmin/createCardTemplate"
),
UserPermission
.
WRITE_ROLES
);
MenuNavigation
userTopnavi
=
usernavi
.
addPage
(
null
,
null
);
userTopnavi
.
setKey
(
"topnavi.user"
);
userTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/edit"
),
UserPermission
.
VIEW_SELF
).
setHeader
(
"submenu.user.userlinks"
);
userTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/changePassword"
),
UserPermission
.
VIEW_SELF
);
userTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/accountEvents"
),
UserPermission
.
VIEW_SELF
);
userTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/place/myGroups"
),
UserPermission
.
VIEW_SELF
);
userTopnavi
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/sendPicture"
),
UserPermission
.
VIEW_SELF
);
MenuNavigation
placemapTopmenu
=
usernavi
.
addPage
(
null
,
null
);
placemapTopmenu
.
setKey
(
"topnavi.placemap"
);
...
...
@@ -115,6 +125,7 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation
shopTopmenu
=
usernavi
.
addPage
(
null
,
null
);
shopTopmenu
.
setKey
(
"topnavi.shop"
);
shopTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/shop/createBill"
),
BillPermission
.
CREATE_BILL
);
shopTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/user/accountEvents"
),
UserPermission
.
VIEW_SELF
);
shopTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/bill/list"
),
BillPermission
.
VIEW_OWN
);
shopTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/bill/edit"
),
null
).
setVisible
(
false
);
shopTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/bill/showBill"
),
null
).
setVisible
(
false
);
...
...
@@ -127,32 +138,24 @@ public class MenuBean implements MenuBeanLocal {
shopTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/checkout/delayed"
),
null
).
setVisible
(
false
);
shopTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/checkout/reject"
),
null
).
setVisible
(
false
);
shopTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/checkout/return"
),
null
).
setVisible
(
false
);
MenuNavigation
pollTopmenu
=
usernavi
.
addPage
(
null
,
null
);
pollTopmenu
.
setKey
(
"topnavi.poll"
);
pollTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/poll/index"
),
PollPermission
.
ANSWER
);
MenuNavigation
compoMenu
=
usernavi
.
addPage
(
null
,
null
);
compoMenu
.
setKey
(
"topnavi.compos"
);
compoMenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/voting/compolist"
),
CompoPermission
.
VIEW_COMPOS
);
compoMenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/voting/myEntries"
),
CompoPermission
.
VIEW_COMPOS
);
compoMenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/voting/create"
),
CompoPermission
.
MANAGE
);
compoMenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/voting/submitEntry"
),
null
).
setVisible
(
false
);
compoMenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/voting/details"
),
null
).
setVisible
(
false
);
MenuNavigation
adminnavi
=
new
MenuNavigation
(
ev
,
"supernavi.admin"
);
navifacade
.
create
(
adminnavi
);
MenuNavigation
adminuser
=
adminnavi
.
addPage
(
null
,
null
);
adminuser
.
setKey
(
"topnavi.usermgmt"
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/useradmin/list"
),
UserPermission
.
VIEW_ALL
).
setHeader
(
"submenu.user.manageuserlinks"
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/useradmin/create"
),
UserPermission
.
VIEW_ALL
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/role/list"
),
UserPermission
.
READ_ROLES
).
setHeader
(
"submenu.user.rolelinks"
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/role/create"
),
UserPermission
.
WRITE_ROLES
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/role/edit"
),
null
).
setVisible
(
false
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/orgrole/list"
),
UserPermission
.
READ_ORGROLES
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/orgrole/create"
),
UserPermission
.
WRITE_ORGROLES
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/useradmin/listCardTemplates"
),
UserPermission
.
READ_ROLES
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/useradmin/createCardTemplate"
),
UserPermission
.
WRITE_ROLES
);
compoMenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/poll/index"
),
PollPermission
.
ANSWER
);
MenuNavigation
compoSub1
=
compoMenu
.
addPage
(
null
,
null
);
compoSub1
.
setKey
(
"compos.admin"
);
compoSub1
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/voting/create"
),
CompoPermission
.
MANAGE
);
compoSub1
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/voting/submitEntry"
),
null
).
setVisible
(
false
);
compoSub1
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/voting/details"
),
null
).
setVisible
(
false
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/useradmin/editCardTemplate"
),
null
).
setVisible
(
false
);
adminuser
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/shop/shopToUser"
),
null
).
setVisible
(
false
);
...
...
code/LanBortalWeb/WebContent/resources/cditools/user/edit.xhtml
View file @
ff9f9aa
...
...
@@ -21,7 +21,7 @@
</h2>
-->
<h:form
id=
"userform"
enctype=
"multipart/form-data"
styleClass=
"ui-widget"
>
<h:form
id=
"userform"
enctype=
"multipart/form-data"
>
<h:panelGrid
columns=
"2"
>
<h:panelGroup>
...
...
@@ -141,8 +141,6 @@
</h:panelGrid>
</h:form>
</composite:implementation>
</html>
code/LanBortalWeb/WebContent/resources/cditools/user/list.xhtml
View file @
ff9f9aa
...
...
@@ -2,14 +2,15 @@
<!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:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:composite=
"http://java.sun.com/jsf/composite"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:tools=
"http://java.sun.com/jsf/composite/tools"
>
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:
p=
"http://primefaces.org/ui"
xmlns:
tools=
"http://java.sun.com/jsf/composite/tools"
>
<composite:interface>
</composite:interface>
<composite:implementation>
<h:outputScript
library=
"primefaces"
name=
"jquery/jquery.js"
target=
"head"
/>
<h:dataTable
styleClass=
"bordertable"
id=
"user"
value=
"#{userSearchView.results}"
var=
"user"
>
<h:column>
<p:dataTable
id=
"user"
value=
"#{userSearchView.results}"
var=
"user"
dynamic=
"true"
>
<p:column>
<f:facet
name=
"header"
>
<h:link
value=
"#{i18n['user.nick']}"
includeViewParams=
"true"
>
<f:param
name=
"sort"
value=
"nick"
/>
...
...
@@ -34,8 +35,8 @@
</h:panelGrid>
</div>
</
h
:column>
<
h
:column>
</
p
:column>
<
p
:column>
<f:facet
name=
"header"
>
<h:link
value=
"#{i18n['user.firstNames']}"
includeViewParams=
"true"
>
<f:param
name=
"sort"
value=
"firstnames"
/>
...
...
@@ -43,8 +44,8 @@
</h:link>
</f:facet>
<h:outputText
value=
"#{user.firstnames}"
/>
</
h
:column>
<
h
:column>
</
p
:column>
<
p
:column>
<f:facet
name=
"header"
>
<h:link
value=
"#{i18n['user.lastName']}"
includeViewParams=
"true"
>
<f:param
name=
"sort"
value=
"lastname"
/>
...
...
@@ -52,16 +53,16 @@
</h:link>
</f:facet>
<h:outputText
value=
"#{user.lastname}"
/>
</
h
:column>
</
p
:column>
<
h
:column>
<
button
onClick=
"location.replace('#{request.contextPath}/useradmin/edit.jsf?userid=#{user.id}')"
>
#{i18n['user.edit']}
</b
utton>
</
h
:column>
<
p
:column>
<
p:commandButton
onClick=
"location.replace('#{request.contextPath}/useradmin/edit.jsf?userid=#{user.id}')"
>
#{i18n['user.edit']}
</p:commandB
utton>
</
p
:column>
<!-- <h:column>
<h:commandButton action="#{userView.shop()}" value="#{i18n['user.shop']}" />
</h:column> -->
</
h
:dataTable>
</
p
:dataTable>
<script>
jQuery
(
function
()
{
jQuery
(
".hoverable"
).
hover
(
function
()
{
...
...
code/LanBortalWeb/WebContent/resources/style/template1/css/general.css
View file @
ff9f9aa
...
...
@@ -27,26 +27,17 @@ height: 150px;
}
#shopItems
{}
.ui-panel-title
{
text-overflow
:
clip
;
}
.shopItem
{
position
:
relative
;
width
:
72px
;
height
:
72px
;
float
:
left
;
width
:
64px
;
height
:
64px
;
background
:
gold
;
border
:
1px
solid
black
;
margin
:
2px
;
}
.shopItem
:hover
{
background
:
goldenrod
;
}
.shopItem
a
{
display
:
block
;
width
:
100%
;
height
:
100%
;
color
:
black
;
text-decoration
:
none
;
background
:
#ddd
;
}
code/LanBortalWeb/WebContent/shop/shopToUser.xhtml
View file @
ff9f9aa
...
...
@@ -24,11 +24,14 @@
<h:panelGroup>
<div
id=
"shopItems"
>
<ui:repeat
value=
"#{productShopView.shoppingcart}"
var=
"cart"
>
<div
class=
"shopItem"
>
<h:commandLink
action=
"#{productShopView.addOne}"
value=
"#{cart.product.name}"
>
<h:commandLink
action=
"#{productShopView.addOne}"
>
<f:ajax
render=
"@form"
/>
</h:commandLink>
</div>
<p:panel
header=
"#{cart.product.name}"
styleClass=
"shopItem"
>
<p:panelGrid>
#{cart.product.price()}
</p:panelGrid>
</p:panel>
</h:commandLink>
</ui:repeat>
</div>
...
...
code/LanBortalWeb/WebContent/user/create.xhtml
View file @
ff9f9aa
...
...
@@ -11,7 +11,7 @@
<f:event
type=
"preRenderView"
listener=
"#{userView.initCreateView}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<users:
edit
creating=
"true"
commitaction=
"#{userView.createUser()}"
commitvalue=
"#{i18n['user.create']}"
/>
<users:
create
creating=
"true"
commitaction=
"#{userView.createUser()}"
commitvalue=
"#{i18n['user.create']}"
/>
</ui:define>
</ui:composition>
...
...
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