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 36d97681
authored
Aug 20, 2010
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Done for the day... Added sidebars, fixed links, etc
1 parent
f45cf0d0
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
420 additions
and
67 deletions
code/LanBortalBeans/as3/fi/insomnia/bortal/beans/RoleBeanBase.as
code/LanBortalBeans/as3/fi/insomnia/bortal/beans/UserBeanBase.as
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/BillBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/RoleBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/UserBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/facade/BillFacade.java
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/AccessRightBeanLocal.java
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/BillBeanLocal.java
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/RoleBeanLocal.java
code/LanBortalWeb/WebContent/auth/notauthorized.jsf → code/LanBortalWeb/WebContent/auth/notauthorized.xhtml
code/LanBortalWeb/WebContent/bill/list.xhtml
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-admin.xhtml
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-frontpage.xhtml
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-shop.xhtml
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-user.xhtml
code/LanBortalWeb/WebContent/layout/insomnia1/sidebartemplate.xhtml
code/LanBortalWeb/WebContent/layout/insomnia1/template.xhtml
code/LanBortalWeb/WebContent/tests/placemap.xhtml → code/LanBortalWeb/WebContent/map/placemap.xhtml
code/LanBortalWeb/WebContent/resources/style/insomnia1/style.css
code/LanBortalWeb/WebContent/resources/tools/bills/list.xhtml
code/LanBortalWeb/WebContent/resources/tools/loginLogout.xhtml
code/LanBortalWeb/WebContent/resources/tools/products/list.xhtml
code/LanBortalWeb/WebContent/resources/tools/user/edit.xhtml
code/LanBortalWeb/WebContent/user/create.xhtml
code/LanBortalWeb/WebContent/user/editself.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/handler/SessionHandler.java
code/LanBortalWeb/src/fi/insomnia/bortal/view/BillView.java
code/LanBortalWeb/src/fi/insomnia/bortal/view/UserView.java
code/LanBortalWeb/src/resources/i18n.properties
code/LanBortalWeb/src/resources/i18n_en.properties
code/LanBortalWeb/src/resources/i18n_en_ST.properties
code/LanBortalWeb/src/resources/i18n_fi.properties
code/LanBortalWeb/src/resources/i18n_fi_IN.properties
code/LanBortalBeans/as3/fi/insomnia/bortal/beans/RoleBeanBase.as
View file @
36d9768
...
...
@@ -16,14 +16,14 @@ package fi.insomnia.bortal.beans {
[
Bindable
]
public
class
RoleBeanBase
implements
IExternalizable
{
private
var
_accessRightBean
:
AccessRightBean
;
private
var
_eventBean
:
EventBean
;
private
var
_accessRightBean
:
AccessRightBean
Local
;
private
var
_eventBean
:
EventBean
Local
;
private
var
_roleFacade
:
RoleFacade
;
private
var
_rrfacade
:
RoleRightFacade
;
public
function
readExternal
(
input
:
IDataInput
)
:
void
{
_accessRightBean
=
input
.
readObject
()
as
AccessRightBean
;
_eventBean
=
input
.
readObject
()
as
EventBean
;
_accessRightBean
=
input
.
readObject
()
as
AccessRightBean
Local
;
_eventBean
=
input
.
readObject
()
as
EventBean
Local
;
_roleFacade
=
input
.
readObject
()
as
RoleFacade
;
_rrfacade
=
input
.
readObject
()
as
RoleRightFacade
;
}
...
...
code/LanBortalBeans/as3/fi/insomnia/bortal/beans/UserBeanBase.as
View file @
36d9768
...
...
@@ -19,7 +19,7 @@ package fi.insomnia.bortal.beans {
private
var
_accessRightBeanLocal
:
AccessRightBeanLocal
;
private
var
_context
:
SessionContext
;
private
var
_eventBean
:
EventBeanLocal
;
private
var
_rolebean
:
RoleBean
;
private
var
_rolebean
:
RoleBean
Local
;
private
var
_secubean
:
SecurityBeanLocal
;
private
var
_userFacade
:
UserFacade
;
...
...
@@ -27,7 +27,7 @@ package fi.insomnia.bortal.beans {
_accessRightBeanLocal
=
input
.
readObject
()
as
AccessRightBeanLocal
;
_context
=
input
.
readObject
()
as
SessionContext
;
_eventBean
=
input
.
readObject
()
as
EventBeanLocal
;
_rolebean
=
input
.
readObject
()
as
RoleBean
;
_rolebean
=
input
.
readObject
()
as
RoleBean
Local
;
_secubean
=
input
.
readObject
()
as
SecurityBeanLocal
;
_userFacade
=
input
.
readObject
()
as
UserFacade
;
}
...
...
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/BillBean.java
View file @
36d9768
...
...
@@ -2,6 +2,7 @@ package fi.insomnia.bortal.beans;
import
java.io.ByteArrayOutputStream
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.ejb.Stateless
;
...
...
@@ -128,4 +129,5 @@ public class BillBean implements BillBeanLocal {
return
line
;
}
}
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/RoleBean.java
View file @
36d9768
...
...
@@ -33,13 +33,13 @@ public class RoleBean implements RoleBeanLocal {
private
static
final
String
PUBLIC_ROLE_NAME
=
BeanRole
.
ANONYMOUS
.
toString
();
@EJB
private
EventBean
eventBean
;
private
EventBean
Local
eventBean
;
@EJB
private
RoleFacade
roleFacade
;
@EJB
private
RoleRightFacade
rrfacade
;
@EJB
private
AccessRightBean
accessRightBean
;
private
AccessRightBean
Local
accessRightBean
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
RoleBean
.
class
);
...
...
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/UserBean.java
View file @
36d9768
...
...
@@ -46,7 +46,7 @@ public class UserBean implements UserBeanLocal {
private
SessionContext
context
;
@EJB
private
RoleBean
rolebean
;
private
RoleBean
Local
rolebean
;
@EJB
private
AccessRightBeanLocal
accessRightBeanLocal
;
...
...
@@ -103,7 +103,7 @@ public class UserBean implements UserBeanLocal {
public
boolean
isLoggedIn
()
{
return
!
isCurrentUser
(
getAnon
User
());
return
!
getAnonUser
().
equals
(
getCurrent
User
());
}
@Override
public
User
getCurrentUser
()
{
...
...
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/facade/BillFacade.java
View file @
36d9768
package
fi
.
insomnia
.
bortal
.
facade
;
import
java.util.List
;
import
javax.ejb.LocalBean
;
import
javax.ejb.Stateless
;
import
javax.persistence.EntityManager
;
...
...
@@ -8,6 +10,7 @@ import javax.persistence.TypedQuery;
import
fi.insomnia.bortal.model.Bill
;
import
fi.insomnia.bortal.model.LanEvent
;
import
fi.insomnia.bortal.model.User
;
@Stateless
@LocalBean
...
...
@@ -30,4 +33,6 @@ public class BillFacade extends EventChildGenericFacade<Bill> {
return
q
.
getSingleResult
();
}
}
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/AccessRightBeanLocal.java
View file @
36d9768
...
...
@@ -5,6 +5,8 @@
package
fi
.
insomnia
.
bortal
.
beans
;
import
java.util.List
;
import
fi.insomnia.bortal.enums.Permission
;
import
fi.insomnia.bortal.model.AccessRight
;
import
javax.ejb.Local
;
...
...
@@ -16,4 +18,6 @@ import javax.ejb.Local;
@Local
public
interface
AccessRightBeanLocal
{
public
AccessRight
findOrCreate
(
Permission
permission
);
public
List
<
AccessRight
>
findAll
();
}
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/BillBeanLocal.java
View file @
36d9768
package
fi
.
insomnia
.
bortal
.
beans
;
import
java.io.ByteArrayOutputStream
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
javax.ejb.Local
;
...
...
@@ -23,5 +24,4 @@ public interface BillBeanLocal {
}
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/RoleBeanLocal.java
View file @
36d9768
...
...
@@ -31,6 +31,8 @@ public interface RoleBeanLocal {
public
RoleRight
mergeChanges
(
RoleRight
row
);
public
Role
getOrCreatePublicRole
();
}
code/LanBortalWeb/WebContent/auth/notauthorized.
jsf
→
code/LanBortalWeb/WebContent/auth/notauthorized.
xhtml
View file @
36d9768
File moved
code/LanBortalWeb/WebContent/bill/list.xhtml
0 → 100644
View file @
36d9768
<!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:bills=
"http://java.sun.com/jsf/composite/tools/bills"
xmlns:f=
"http://java.sun.com/jsf/core"
>
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<ui:param
name=
"thispage"
value=
"page.bill.list"
/>
<ui:define
name=
"content"
>
Bill list!
<bills:list
/>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-admin.xhtml
0 → 100644
View file @
36d9768
<!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:f=
"http://java.sun.com/jsf/core"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
<h:body>
<ui:composition
template=
"/layout/insomnia1/sidebartemplate.xhtml"
>
<ui:define
name=
"sidebarcontent"
>
<ul>
<li><h:link
outcome=
"/role/create"
value=
"#{i18n['sidebar.role.create']}"
/></li>
<li><h:link
outcome=
"/role/list"
value=
"#{i18n['sidebar.role.list']}"
/></li>
<li><h:link
outcome=
"/role/create"
value=
"#{i18n['sidebar.role.create']}"
/></li>
</ul>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-frontpage.xhtml
0 → 100644
View file @
36d9768
<!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:f=
"http://java.sun.com/jsf/core"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
<h:body>
<ui:component
/>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-shop.xhtml
0 → 100644
View file @
36d9768
<!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:f=
"http://java.sun.com/jsf/core"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
<h:body>
<ui:composition
template=
"/layout/insomnia1/sidebartemplate.xhtml"
>
<ui:define
name=
"sidebarcontent"
>
<ul>
<li><h:link
outcome=
"/product/create"
value=
"#{i18n['sidebar.product.create']}"
/></li>
<li><h:link
outcome=
"/user/create"
value=
"#{i18n['sidebar.product.list']}"
/></li>
<li><h:link
outcome=
"/user/createBill"
value=
"#{i18n['sidebar.product.createBill']}"
/></li>
<li><h:link
outcome=
"/map/placemap"
value=
"#{i18n['sidebar.map.placemap']}"
/></li>
</ul>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/layout/insomnia1/sidebar-user.xhtml
0 → 100644
View file @
36d9768
<!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:f=
"http://java.sun.com/jsf/core"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
<h:body>
<ui:composition
template=
"/layout/insomnia1/sidebartemplate.xhtml"
>
<ui:define
name=
"sidebarcontent"
>
<ul>
<li><h:link
outcome=
"/user/editself.xhtml"
value=
"#{i18n['sidebar.user.editself']}"
/></li>
<li><h:link
outcome=
"/user/list.xhtml"
value=
"#{i18n['sidebar.user.list']}"
/></li>
<li><h:link
outcome=
"/user/create.xhtml"
value=
"#{i18n['sidebar.user.create']}"
/></li>
<li><h:link
outcome=
"/bill/list"
value=
"#{i18n['sidebar.bill.list']}"
/></li>
</ul>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/layout/insomnia1/sidebartemplate.xhtml
0 → 100644
View file @
36d9768
<!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:component>
<div
id=
"sidebar"
><ui:insert
name=
"sidebarcontent"
/></div>
</ui:component>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/layout/insomnia1/template.xhtml
View file @
36d9768
...
...
@@ -19,17 +19,17 @@
<div
style=
"float: left"
>
<div
id=
"headerbox"
><tools:loginLogout
/></div>
<div>
<div
class=
"link#{i18n[util.concat(thispage,'.pagegroup')] == 'frontpage'?'a':''}"
>
<h:link
outcome=
"
frontpage
"
value=
"#{i18n['topmenu.frontpage']}"
/></div>
<div
class=
"link#{i18n[util.concat(thispage,'.pagegroup')] == 'user'?'a':''}"
>
<h:link
outcome=
"
userprefs
"
value=
"#{i18n['topmenu.usersPreferences']}"
/></div>
<div
class=
"link#{i18n[util.concat(thispage,'.pagegroup')] == 'shop'?'a': ''}"
>
<h:link
outcome=
"
shopfrontpage
"
value=
"#{i18n['topmenu.shoppings']}"
/></div>
<div
class=
"link#{i18n[util.concat(thispage,'.pagegroup')] == 'admin'?'a':''}"
>
<h:link
outcome=
"
adminfron
t"
value=
"#{i18n['topmenu.adminfront']}"
/></div>
<div
class=
"link#{i18n[util.concat(thispage,'.pagegroup')] == 'frontpage'?'a':''}"
>
<h:link
outcome=
"
/index
"
value=
"#{i18n['topmenu.frontpage']}"
/></div>
<div
class=
"link#{i18n[util.concat(thispage,'.pagegroup')] == 'user'?'a':''}"
>
<h:link
outcome=
"
/user/editself
"
value=
"#{i18n['topmenu.usersPreferences']}"
/></div>
<div
class=
"link#{i18n[util.concat(thispage,'.pagegroup')] == 'shop'?'a': ''}"
>
<h:link
outcome=
"
/product/createBill
"
value=
"#{i18n['topmenu.shoppings']}"
/></div>
<div
class=
"link#{i18n[util.concat(thispage,'.pagegroup')] == 'admin'?'a':''}"
>
<h:link
outcome=
"
/product/lis
t"
value=
"#{i18n['topmenu.adminfront']}"
/></div>
</div>
</div>
</div>
<div
id=
"content"
>
<div
id=
"cwrap"
>
<!-- <ui:include src="/insomnia1/#{i18n[concat['#thispage,.pagegroup'] ]
}.xhtml" />
-->
<ui:include
src=
"/layout/insomnia1/sidebar-#{i18n[util.concat(thispage,'.pagegroup')]
}.xhtml"
/>
<h:messages
globalOnly=
"true"
/>
<h:messages
/>
<ui:insert
name=
"content"
/>
...
...
code/LanBortalWeb/WebContent/
tests
/placemap.xhtml
→
code/LanBortalWeb/WebContent/
map
/placemap.xhtml
View file @
36d9768
...
...
@@ -8,7 +8,7 @@
>
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<ui:param
name=
"thispage"
value=
"page.
test
.placemap"
/>
<ui:param
name=
"thispage"
value=
"page.
map
.placemap"
/>
<ui:define
name=
"content"
>
<map:placeSelect
/>
</ui:define>
...
...
code/LanBortalWeb/WebContent/resources/style/insomnia1/style.css
View file @
36d9768
...
...
@@ -29,7 +29,7 @@ body {
background-image
:
url('img/top.gif')
;
background-repeat
:
no-repeat
;
background-color
:
#FFF
;
padding-top
:
3
px
;
padding-top
:
10px
20
px
;
}
#headerbox
{
height
:
33px
;
...
...
@@ -38,9 +38,28 @@ body {
color
:
#FFFFFF
;
}
#headerbox
:a
{
text-decoration
:
none
;
#headerbox
a
{
color
:
#FFFFFF
;
}
#headerbox
input
{
margin
:
0
;
padding
0;
border-style
:
solid
;
border-width
:
1px
;
}
#sidebar
{
float
:
right
;
border-width
:
1px
;
border-style
:
solid
;
border-color
:
#000000
;
background-color
:
#FFFFDD
;
margin
:
10px
15px
;
padding
:
0
1em
0
0
;
}
.linka
{
background-image
:
url('img/linka2.gif')
;
width
:
117px
;
...
...
code/LanBortalWeb/WebContent/resources/tools/bills/list.xhtml
0 → 100644
View file @
36d9768
<?xml version='1.0' encoding='UTF-8' ?>
<!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"
>
<composite:interface>
</composite:interface>
<composite:implementation>
<h:form>
<h:dataTable
border=
"1"
id=
"billList"
value=
"#{billView.usersBills}"
var=
"bill"
>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"${i18n['bill.billNumber']}"
/>
</f:facet>
<h:outputText
value=
"#{bill.billNumber}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"${i18n['bill.totalPrice']}"
/>
</f:facet>
<h:outputText
value=
"#{bill.totalPrice()}"
/>
</h:column>
<h:column>
<a
href=
"#{request.contextPath}/PrintBill?billid=#{bill.id.id}"
target=
"_blank"
>
#{i18n['bill.printBill']}
</a>
</h:column>
</h:dataTable>
</h:form>
</composite:implementation>
</html>
code/LanBortalWeb/WebContent/resources/tools/loginLogout.xhtml
View file @
36d9768
...
...
@@ -15,12 +15,14 @@
</composite:interface>
<composite:implementation>
<tools:canRead
target=
"LOGIN"
>
<f:facet
name=
"errorMessage"
>
<c:choose
>
<c:when
test=
'#{sessionHandler.isLoggedIn() }'
>
<login:logout
/>
</f:facet>
</c:when>
<c:otherwise>
<login:login
isOneliner=
"true"
/>
</tools:canRead>
</c:otherwise>
</c:choose>
</composite:implementation>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/resources/tools/products/list.xhtml
View file @
36d9768
...
...
@@ -36,7 +36,7 @@
<f:facet
name=
"header"
>
<h:outputText
value=
"Edit"
/>
</f:facet>
<h:commandButton
action=
"#{productView.edit()}"
value=
"#{i18n[
product.edit
]}"
/>
<h:commandButton
action=
"#{productView.edit()}"
value=
"#{i18n[
'product.edit'
]}"
/>
</h:column>
</h:dataTable>
...
...
code/LanBortalWeb/WebContent/resources/tools/user/edit.xhtml
View file @
36d9768
...
...
@@ -28,9 +28,9 @@
<h:outputLabel
value=
"#{i18n['user.town']}:"
/><h:inputText
value=
"#{userView.user.town}"
/>
<h:outputLabel
value=
"#{i18n['user.sex']}:"
/>
<h:selectOneRadio
id=
"sex"
value=
"#{userView.user.gender}"
>
<f:selectItem
id=
"undefined"
itemLabel=
"#{i18n['user.
gender
.UNDEFINED']}"
itemValue=
"UNDEFINED"
/>
<f:selectItem
id=
"male"
itemLabel=
"#{i18n['user.
gender
.MALE']}"
itemValue=
"MALE"
/>
<f:selectItem
id=
"female"
itemLabel=
"#{i18n['user.
gender
.FEMALE']}"
itemValue=
"FEMALE"
/>
<f:selectItem
id=
"undefined"
itemLabel=
"#{i18n['user.
sex
.UNDEFINED']}"
itemValue=
"UNDEFINED"
/>
<f:selectItem
id=
"male"
itemLabel=
"#{i18n['user.
sex
.MALE']}"
itemValue=
"MALE"
/>
<f:selectItem
id=
"female"
itemLabel=
"#{i18n['user.
sex
.FEMALE']}"
itemValue=
"FEMALE"
/>
</h:selectOneRadio>
<h:commandButton
action=
"#{userView.saveUser()}"
value=
"#{i18n['user.save']}"
/>
</h:panelGrid>
...
...
code/LanBortalWeb/WebContent/user/create.xhtml
View file @
36d9768
...
...
@@ -12,9 +12,9 @@
<ui:define
name=
"content"
>
<h:form>
<h:panelGrid
columns=
"2"
>
<h:outputLabel
value=
"#{
user.username
}:"
/><h:inputText
value=
"#{userView.login}"
/>
<h:outputLabel
value=
"#{
user.password
}:"
/><h:inputSecret
value=
"#{userView.password}"
/>
<h:commandButton
action=
"#{userView.createUser()}"
value=
"#{
global.create
}"
/>
<h:outputLabel
value=
"#{
i18n['user.username']
}:"
/><h:inputText
value=
"#{userView.login}"
/>
<h:outputLabel
value=
"#{
i18n['user.password']
}:"
/><h:inputSecret
value=
"#{userView.password}"
/>
<h:commandButton
action=
"#{userView.createUser()}"
value=
"#{
i18n['user.create']
}"
/>
</h:panelGrid>
</h:form>
</ui:define>
...
...
code/LanBortalWeb/WebContent/user/editself.xhtml
0 → 100644
View file @
36d9768
<!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:f=
"http://java.sun.com/jsf/core"
xmlns:users=
"http://java.sun.com/jsf/composite/tools/user"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
>
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<ui:param
name=
"thispage"
value=
"page.user.editself"
/>
<ui:define
name=
"content"
>
#{userView.initSelfedit()}
<users:edit
/>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/src/fi/insomnia/bortal/handler/SessionHandler.java
View file @
36d9768
...
...
@@ -146,4 +146,12 @@ public class SessionHandler {
return
"logout"
;
}
public
boolean
isLoggedIn
()
{
boolean
ret
=
userbean
.
isLoggedIn
();
logger
.
info
(
"Is logged in: {}"
,
ret
);
return
ret
;
}
}
code/LanBortalWeb/src/fi/insomnia/bortal/view/BillView.java
0 → 100644
View file @
36d9768
package
fi
.
insomnia
.
bortal
.
view
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.faces.bean.ManagedBean
;
import
javax.faces.bean.SessionScoped
;
import
javax.faces.model.ListDataModel
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
fi.insomnia.bortal.beans.BillBeanLocal
;
import
fi.insomnia.bortal.beans.UserBeanLocal
;
import
fi.insomnia.bortal.model.Bill
;
@ManagedBean
(
name
=
"billView"
)
@SessionScoped
public
class
BillView
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
BillView
.
class
);
@EJB
private
UserBeanLocal
userbean
;
@EJB
private
BillBeanLocal
billbean
;
private
ListDataModel
<
Bill
>
billList
;
public
ListDataModel
<
Bill
>
getUsersBills
()
{
List
<
Bill
>
bills
=
userbean
.
getCurrentUser
().
getBills
();
logger
.
debug
(
"found {} bills for user {}"
,
bills
.
size
(),
userbean
.
getCurrentUser
().
getLogin
());
billList
=
new
ListDataModel
<
Bill
>(
bills
);
return
billList
;
}
}
code/LanBortalWeb/src/fi/insomnia/bortal/view/UserView.java
View file @
36d9768
...
...
@@ -51,6 +51,10 @@ public class UserView {
return
"userEdit"
;
}
public
void
initSelfedit
()
{
user
=
userBean
.
getCurrentUser
();
}
public
String
createUser
()
{
...
...
code/LanBortalWeb/src/resources/i18n.properties
View file @
36d9768
...
...
@@ -12,11 +12,15 @@ page.auth.login.header=Login
page.auth.login.header
=
Login error
page.auth.login.title
=
Login error
page.index.pagegroup
=
frontpage
page.auth.login.pagegroup
=
frontpage
page.auth.loginerror.pagegroup
=
frontpage
page.auth.logout.pagegroup
=
frontpage
page.auth.notauthorized.pagegroup
=
frontpage
page.bill.list.pagegroup
=
user
page.product.create.pagegroup
=
admin
page.product.createBill.pagegroup
=
shop
page.product.edit.pagegroup
=
admin
...
...
@@ -26,12 +30,12 @@ page.role.create.pagegroup=admin
page.role.edit.pagegroup
=
admin
page.role.list.pagegroup
=
admin
page.
tests
.placemap.pagegroup
=
shop
page.
map
.placemap.pagegroup
=
shop
page.user.create.pagegroup
=
user
page.user.edit.pagegroup
=
user
page.user.list.pagegroup
=
user
page.user.editself.pagegroup
=
user
page.auth.login.loginerror
=
frontpage
page.auth.login.logout
=
frontpage
...
...
code/LanBortalWeb/src/resources/i18n_en.properties
View file @
36d9768
...
...
@@ -4,27 +4,96 @@
#
global.cancel
=
Cancel
global.copyright
=
Insomnia Ry, Stream Ry
global.infomail
=
global.notauthorized
=
You don't have enought rights to view this information.
global.productname
=
Omnia
global.save
=
Save
global.webpage
=
login.login
=
Login
login.logout
=
Logout
login.logoutmessage
=
You have logged out of the system.
login.password
=
Password
login.submit
=
Login
login.username
=
User
login.username
=
User
name
nasty.user
=
Hax attempt! Go away!
page.auth.login.header
=
Login error
page.auth.login.loginerror
=
frontpage
page.auth.login.logout
=
frontpage
page.auth.login.pagegroup
=
frontpage
page.auth.login.title
=
Login error
page.auth.loginerror.pagegroup
=
frontpage
page.auth.logout.pagegroup
=
frontpage
page.auth.notauthorized.pagegroup
=
frontpage
page.index.pagegroup
=
frontpage
page.product.create.pagegroup
=
admin
page.product.createBill.pagegroup
=
shop
page.product.edit.pagegroup
=
admin
page.product.list.pagegroup
=
admin
page.role.create.pagegroup
=
admin
page.role.edit.pagegroup
=
admin
page.role.list.pagegroup
=
admin
page.tests.placemap.pagegroup
=
shop
page.user.create.pagegroup
=
user
page.user.edit.pagegroup
=
user
page.user.editself.pagegroup
=
user
page.user.list.pagegroup
=
user
page.viewexpired
=
frontpage
placeSelect.placesleft
=
Places left
product.barcode
=
Barcode
product.create
=
Create product
product.edit
=
Edit
product.name
=
Name
product.prepaid
=
Prepaid
product.price
=
Product price
product.save
=
Save
product.sort
=
Sort
product.unitName
=
Product unit
product.vat
=
VAT
role.create
=
Create role
role.edit
=
Edit
role.name
=
Name
role.parents
=
Parents
topmenu.adminfront
=
Adminstuff
topmenu.frontpage
=
Frontpage
topmenu.shoppings
=
Shop
topmenu.usersPreferences
=
Preferences
user.bank
=
Bank
user.bankaccount
=
Bank account
user.edit
=
Edit
user.email
=
Email address
user.nick
=
Nickname
user.password
=
Password
user.phone
=
Phone
user.realname
=
Name
user.login
=
Login name
user.firstNames
=
First names
user.lastName
=
Last name
user.address
=
Address
user.zipCode
=
Zip code
user.town
=
Town
user.sex
=
Sex
user.save
=
Save
user.sex.FEMALE
=
Female
user.sex.MALE
=
Male
user.sex.UNDEFINED
=
Undefined
user.username
=
Username
user.validate.notUniqueUsername
=
Username already exists. Please select another.
bill.printBill
=
Print
bill.billnumber
=
Bill number
bill.referencenumber
=
Referencenumber
bill.paidDate
=
Paid
bill.sentDate
=
Sent
bill.totalPrice
=
Total price
sidebar.user.editself
=
My preferences
sidebar.user.list
=
List users
sidebar.user.create
=
Create new user
sidebar.product.create
=
New product
sidebar.product.list
=
List products
sidebar.product.createBill
=
Create bill
sidebar.role.create
=
Create role
sidebar.role.list
=
List roles
sidebar.map.placemap
=
Select places
\ No newline at end of file
code/LanBortalWeb/src/resources/i18n_en_ST.properties
View file @
36d9768
...
...
@@ -4,4 +4,5 @@
#
global.infomail
=
info@streamparty.org
global.webpage
=
http://www.streamparty.org
code/LanBortalWeb/src/resources/i18n_fi.properties
View file @
36d9768
...
...
@@ -4,57 +4,64 @@
#
global.cancel
=
Peruuta
global.copyright
=
global.infomail
=
global.notauthorized
=
Sinulla ei ole riitt
\u
00e4vi
\u
00e4 oikeuksia t
\u
00e4lle sivulle.
global.productname
=
global.save
=
Tallenna
global.webpage
=
global.viewexpired
=
<h1>Nkym on vanhentunut</h1><p></p>
global.notauthorized
=
Sinulla ei ole riittvi oikeuksia tlle sivulle.
login.login
=
Kirjaudu sisn
login.login
=
Kirjaudu sis
\u
00e4
\u
00e4n
login.logout
=
Kirjaudu ulos
login.logoutmessage
=
Olet kirjautunut ulos j
\u
00e4rjestelm
\u
00e4st
\u
00e4.
login.password
=
Salasana
login.submit
=
Kirjaudu sis
\u
00e4
\u
00e4n
login.username
=
K
\u
00e4ytt
\u
00e4j
\u
00e4tunnus
login.logoutmessage
=
Olet kirjautunut ulos jrjestelmst
placeSelect.placesleft
=
Paikkoja jljell
nasty.user
=
Wait, wot! Mene pois!
page.auth.login.header
=
page.auth.login.loginerror
=
page.auth.login.logout
=
page.auth.login.pagegroup
=
page.auth.login.title
=
page.index.pagegroup
=
page.viewexpired
=
placeSelect.placesleft
=
Paikkoja j
\u
00e4ljell
\u
00e4
product.barcode
=
Viivakoodi
product.create
=
Luo tuote
product.edit
=
Muokkaa
product.name
=
Tuotteen nimi
product.prepaid
=
Prepaid
product.price
=
Tuotteen hinta
product.save
=
Tallenna
product.sort
=
J
\u
00e4rjestys luku
product.unitName
=
Tuoteyksikk
\u
00f6
product.vat
=
ALV
role.create
=
Luo rooli
role.edit
=
Muokkaa
role.name
=
Nimi
role.parents
=
Periytyy
topmenu.adminfront
=
Admintavaraa
topmenu.frontpage
=
Etusivu
topmenu.shoppings
=
Kauppa
topmenu.usersPreferences
=
Omat asetukset
user.bank
=
Pankki
user.bankaccount
=
Pankkitili
user.edit
=
Muokkaa
user.email
=
S
\u
00e4hk
\u
00f6posti
user.nick
=
Nick
user.password
=
Salasana
user.phone
=
Puhelin
user.realname
=
Nimi
user.save
=
Tallenna
user.login
=
Kyttjtunnus
user.firstNames
=
Etunimet
user.lastName
=
Sukunimi
user.address
=
Osoite
user.zipCode
=
Postinumero
user.town
=
Kaupunki
user.sex
=
Sukupuoli
user.sex.FEMALE
=
Nainen
user.sex.MALE
=
Mies
user.sex.UNDEFINED
=
M
\u
00e4
\u
00e4rittelem
\u
00e4tt
\u
00e4
user.username
=
K
\u
00e4ytt
\u
00e4j
\u
00e4tunnus
user.validate.notUniqueUsername
=
K
\u
00e4ytt
\u
00e4j
\u
00e4tunnus on jo olemassa. Ole hyv
\u
00e4 ja valitse toinen tunnus
user.edit
=
Muokkaa
user.save
=
Tallenna
product.create
=
Luo tuote
product.name
=
Tuotteen nimi
product.price
=
Tuotteen hinta
product.unitName
=
Tuoteyksikk
product.vat
=
ALV
product.sort
=
Jrjestysluku
product.barcode
=
Viivakoodi
product.prepaid
=
Prepaid
product.save
=
Tallenna
product.edit
=
Muokkaa
role.create
=
Luo rooli
role.name
=
Nimi
role.parents
=
Periytyy
role.edit
=
Muokkaa
code/LanBortalWeb/src/resources/i18n_fi_IN.properties
View file @
36d9768
...
...
@@ -5,4 +5,3 @@
global.infomail
=
info@insomnia.fi
global.webpage
=
http://www.insomnia.fi
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