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 fbb90699
authored
Dec 09, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
barcode stuff
1 parent
b56a335e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
100 additions
and
13 deletions
code/moya-beans-client/ejbModule/fi/codecrew/moya/beans/EventBeanLocal.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/EventBean.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/PlaceGroupBean.java
code/moya-database/src/main/java/fi/codecrew/moya/model/LanEventPropertyKey.java
code/moya-web/WebContent/place/myEtickets.xhtml
code/moya-web/pom.xml
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n.properties
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_en.properties
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
code/moya-beans-client/ejbModule/fi/codecrew/moya/beans/EventBeanLocal.java
View file @
fbb9069
...
...
@@ -46,6 +46,8 @@ public interface EventBeanLocal {
String
getPropertyString
(
LanEventPropertyKey
property
);
boolean
getPropertyBoolean
(
LanEventPropertyKey
property
);
LanEventProperty
saveOrCreateProperty
(
LanEventProperty
property
);
EventOrganiser
mergeChanges
(
EventOrganiser
eventorg
);
...
...
code/moya-beans/ejbModule/fi/codecrew/moya/beans/EventBean.java
View file @
fbb9069
...
...
@@ -206,6 +206,8 @@ public class EventBean implements EventBeanLocal {
return
eventPropertyFacade
.
find
(
getCurrentEvent
(),
property
);
}
@Override
public
long
getPropertyLong
(
LanEventPropertyKey
property
)
{
...
...
@@ -233,6 +235,24 @@ public class EventBean implements EventBeanLocal {
}
@Override
public
boolean
getPropertyBoolean
(
LanEventPropertyKey
property
)
{
LanEventProperty
retProp
=
eventPropertyFacade
.
find
(
getCurrentEvent
(),
property
);
boolean
ret
=
false
;
if
(
retProp
==
null
)
{
String
def
=
property
.
getDefaultvalue
();
if
(
def
!=
null
&&
!
def
.
trim
().
isEmpty
()
&&
!
def
.
trim
().
equals
(
"0"
))
ret
=
true
;
}
else
{
ret
=
retProp
.
isBooleanValue
();
}
return
ret
;
}
@Override
@RolesAllowed
({
SpecialPermission
.
S_SUPERADMIN
,
EventPermission
.
S_MANAGE_EVENT
})
public
LanEventProperty
saveOrCreateProperty
(
LanEventProperty
property
)
{
LanEventProperty
ret
=
null
;
...
...
code/moya-beans/ejbModule/fi/codecrew/moya/beans/PlaceGroupBean.java
View file @
fbb9069
...
...
@@ -161,20 +161,11 @@ public class PlaceGroupBean implements PlaceGroupBeanLocal {
public
void
getGroupMembershipPdf
(
EventUser
usr
,
OutputStream
ostream
)
{
List
<
GroupMembership
>
memberships
=
getMembershipsAndCreations
(
usr
);
LanEventProperty
tmpProperty
=
eventbean
.
getProperty
(
LanEventPropertyKey
.
PLACECODE_FROM_USER
);
boolean
placecodeFromUser
=
false
;
if
(
tmpProperty
!=
null
&&
tmpProperty
.
isBooleanValue
())
{
placecodeFromUser
=
true
;
}
boolean
placecodeFromUser
=
eventbean
.
getPropertyBoolean
(
LanEventPropertyKey
.
PLACECODE_FROM_USER
);
boolean
printOnlyOwn
=
eventbean
.
getPropertyBoolean
(
LanEventPropertyKey
.
PLACECODE_PRINT_ONLY_OWN
);
tmpProperty
=
eventbean
.
getProperty
(
LanEventPropertyKey
.
PLACECODE_PRINT_ONLY_OWN
);
boolean
printOnlyOwn
=
false
;
if
(
tmpProperty
!=
null
&&
tmpProperty
.
isBooleanValue
())
{
printOnlyOwn
=
true
;
}
try
{
PDF
pdf
=
new
PDF
(
ostream
);
...
...
code/moya-database/src/main/java/fi/codecrew/moya/model/LanEventPropertyKey.java
View file @
fbb9069
...
...
@@ -36,13 +36,14 @@ public enum LanEventPropertyKey {
GATHER_OTHER_BILL_INFO
(
Type
.
BOOL
,
null
),
GATHER_SHIRT_SIZE
(
Type
.
BOOL
,
null
),
ALLOW_BILLING
(
Type
.
BOOL
,
null
),
BILL_EXPIRE_HOURS
(
Type
.
LONG
,
"1
68
"
),
BILL_EXPIRE_HOURS
(
Type
.
LONG
,
"1"
),
TEMPLATE_PROPERTY1
(
Type
.
TEXT
,
null
),
TEMPLATE_PROPERTY2
(
Type
.
TEXT
,
null
),
TEMPLATE_PROPERTY3
(
Type
.
TEXT
,
null
),
TEMPLATE_PROPERTY4
(
Type
.
TEXT
,
null
),
TEMPLATE_PROPERTY5
(
Type
.
TEXT
,
null
),
INVITE_ONLY_EVENT
(
Type
.
BOOL
,
null
),
USE_ETICKET
(
Type
.
BOOL
,
null
),
;
...
...
code/moya-web/WebContent/place/myEtickets.xhtml
0 → 100644
View file @
fbb9069
<!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:products=
"http://java.sun.com/jsf/composite/cditools/products"
xmlns:users=
"http://java.sun.com/jsf/composite/cditools/user"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:p=
"http://primefaces.org/ui"
>
<h:body>
<ui:composition
template=
"#{sessionHandler.template}"
>
<f:metadata>
<f:viewParam
name=
"lecturegroupid"
value=
"#{lectureView.lectureGroupId}"
/>
<f:event
type=
"preRenderView"
listener=
"#{lectureUserView.initView()}"
/>
</f:metadata>
<ui:define
rendered=
"#{lectureUserView.lectureGroupsVisible}"
name=
"title"
>
<h1>
#{i18n['etickets.title']}
</h1>
</ui:define>
<ui:define
name=
"content"
>
<h:form
id=
"etickets"
>
<p:commandButton
value=
"Print"
type=
"button"
icon=
"ui-icon-print"
style=
"display:block;margin-bottom: 20px"
>
<p:printer
target=
"placestable"
/>
</p:commandButton>
<p:dataTable
value=
"#{placeGroupView.groupMemberships}"
var=
"member"
id=
"placestable"
>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['etickets.place']}"
/>
</f:facet>
<h:outputText
value=
"#{member.placeReservation.name}"
/>
</p:column>
<p:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['etickets.code']}"
/>
</f:facet>
<p:barcode
value=
"#{member.inviteToken}"
type=
"qr"
/>
</p:column>
</p:dataTable>
<h:outputText
value=
"QR"
/>
<p:barcode
value=
"0123456789"
type=
"qr"
/>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/moya-web/pom.xml
View file @
fbb9069
...
...
@@ -35,12 +35,22 @@
<version>
5.1
</version>
</dependency>
<dependency>
<groupId>
net.glxn
</groupId>
<artifactId>
qrgen
</artifactId>
<version>
1.4
</version>
</dependency>
<dependency>
<groupId>
org.primefaces.extensions
</groupId>
<artifactId>
all-themes
</artifactId>
<version>
1.0.8
</version>
<type>
pom
</type>
</dependency>
<dependency>
<groupId>
net.sf.barcode4j
</groupId>
<artifactId>
barcode4j
</artifactId>
<version>
2.1
</version>
</dependency>
<dependency>
<groupId>
net.matlux
</groupId>
<artifactId>
jvm-breakglass
</artifactId>
<version>
0.0.7
</version>
...
...
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n.properties
View file @
fbb9069
...
...
@@ -446,3 +446,5 @@ invite.permissionDenied=Sinulla ei ole oikeutta luovuttaa paikkaa eteenp\u00E4in
invite.userLoginSuccessfull
=
Kutsu vastaanotettu onnistuneesti
invite.userLoginUnSuccessfull
=
Kirjautuminen ep
\u
00E4onnistui
placegroupview.placetransferred
=
Paikka annettu eteenp
\u
00E4in
product.expired
=
Vanhentuneet
product.edit
=
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_en.properties
View file @
fbb9069
...
...
@@ -1644,3 +1644,4 @@ invite.permissionDenied=You don't have permission to regive this place.
invite.userLoginSuccessfull
=
Invite accepted successfully
invite.userLoginUnSuccessfull
=
Login unsuccessfull
placegroupview.placetransferred
=
Place is transferred
product.expired
=
Expired
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
View file @
fbb9069
...
...
@@ -1625,3 +1625,4 @@ invite.permissionDenied=Sinulla ei ole oikeutta luovuttaa paikkaa eteenp\u00E4in
invite.userLoginSuccessfull
=
Kutsu vastaanotettu onnistuneesti
invite.userLoginUnSuccessfull
=
Kirjautuminen ep
\u
00E4onnistui
placegroupview.placetransferred
=
Paikka on annettu eteenp
\u
00E4in.
product.expired
=
Vanhentuneet
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