Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4aaf3008
authored
Oct 24, 2012
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of codecrew.fi:bortal
2 parents
12f812d8
e82919b4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
111 additions
and
16 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
code/LanBortalWeb/WebContent/card/massprint.xhtml
code/LanBortalWeb/WebContent/useradmin/userCartShow.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en_ST.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
code/LanBortalWeb/src/fi/insomnia/bortal/web/ErrorPageView.java
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
View file @
4aaf300
...
...
@@ -89,6 +89,10 @@ public class FoodWave extends GenericEntity {
return
closed
;
}
public
boolean
isClosed
()
{
return
closed
;
}
public
void
setClosed
(
boolean
waveClosed
)
{
this
.
closed
=
waveClosed
;
}
...
...
@@ -108,5 +112,39 @@ public class FoodWave extends GenericEntity {
public
FoodWaveTemplate
getTemplate
()
{
return
template
;
}
public
boolean
isFull
()
{
return
false
;
}
/**
* Check if foodwave is orderable
*
* That means that it's not closed, full and it's in future
* @return
*/
public
boolean
isOrderable
()
{
if
(
isClosed
())
{
return
false
;
}
if
(
getTime
().
before
(
Calendar
.
getInstance
()))
{
return
false
;
}
if
(
isFull
())
{
return
false
;
}
return
true
;
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
View file @
4aaf300
...
...
@@ -4,6 +4,7 @@
*/
package
fi
.
insomnia
.
bortal
.
model
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Column
;
...
...
@@ -100,5 +101,26 @@ public class FoodWaveTemplate extends GenericEntity {
public
void
setEvent
(
LanEvent
event
)
{
this
.
event
=
event
;
}
public
List
<
FoodWave
>
getOrderableFoodwaves
()
{
List
<
FoodWave
>
returnList
=
new
ArrayList
<
FoodWave
>();
for
(
FoodWave
wave
:
getFoodwaves
())
{
if
(
wave
.
isOrderable
())
{
returnList
.
add
(
wave
);
}
}
return
returnList
;
}
}
code/LanBortalWeb/WebContent/card/massprint.xhtml
0 → 100755
View file @
4aaf300
<!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/cditools/user"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
xmlns:account=
"http://java.sun.com/jsf/composite/cditools/account"
xmlns:c=
"http://java.sun.com/jsp/jstl/core"
xmlns:p=
"http://primefaces.org/ui"
>
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<f:event
type=
"preRenderView"
listener=
"#{cardMassPrintView.initView}"
/>
</f:metadata>
<ui:define
name=
"title"
>
<h1>
#{i18n['card.massprint.title']}
</h1>
</ui:define>
<ui:define
name=
"content"
>
<h:form>
<p:commandButton
rendered=
"#{cardMassPrintView.file!=null}"
id=
"downloadLink"
value=
"Download"
ajax=
"false"
onclick=
"PrimeFaces.monitorDownload(start, stop)"
icon=
"ui-icon-arrowthichk-s"
>
<p:fileDownload
value=
"#{cardMassPrintView.file}"
/>
</p:commandButton>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/useradmin/userCartShow.xhtml
View file @
4aaf300
...
...
@@ -20,7 +20,9 @@
<h:commandButton
action=
"#{userCartView.removeCurrent()}"
value=
"#{i18n['usercart.removeCurrent']}"
/>
<h:commandButton
action=
"#{userCartView.next()}"
value=
"#{i18n['usercart.next']}"
rendered=
"#{userCartView.userCartSize > (userCartView.current+1)}"
/></h:form>
<h:link
includeViewParams=
"true"
outcome=
"/card/massprint"
value=
"#{i18n['usercard.massprint']}"
/>
<h:link
outcome=
"/card/massprint"
value=
"yarr"
>
<f:param
name=
"cid"
value=
"#{javax.enterprise.context.conversation.id}"
/>
</h:link>
<p>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en_ST.properties
View file @
4aaf300
...
...
@@ -21,6 +21,7 @@ bill.billMarkedPaidMail.message = Your deposit number {0} has been marked as pai
bill.billMarkedPaidMail.subject
=
[Streamparty] Your credits have been updated
eventorg.create
=
Create
eventorg.edit
=
Edit
global.cancel
=
Cancel
global.copyright
=
Codecrew Ry
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
View file @
4aaf300
...
...
@@ -155,6 +155,7 @@ eventorg.bundleCountry = Kieli-bundle
eventorg.create
=
Luo
eventorg.createEvent
=
Luo tapahtuma
eventorg.createevent
=
Luo uusi tapahtuma
eventorg.edit
=
Muokkaa
eventorg.events
=
Organisaation tapahtumat
eventorg.organisation
=
Organisaation nimi
eventorg.save
=
Tallenna
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/ErrorPageView.java
View file @
4aaf300
package
fi
.
insomnia
.
bortal
.
web
;
import
javax.enterprise.context.RequestScoped
;
import
javax.faces.application.FacesMessage
;
import
javax.enterprise.context.SessionScoped
;
import
javax.faces.context.FacesContext
;
import
javax.inject.Inject
;
import
javax.inject.Named
;
import
fi.insomnia.bortal.beans.CardPrintBeanLocal
;
import
fi.insomnia.bortal.model.EventUser
;
import
fi.insomnia.bortal.web.cdiview.user.UserCartView
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
sun.misc.Queue
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.InputStream
;
import
java.io.PrintWriter
;
import
java.io.Serializable
;
import
java.io.StringWriter
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.Map
;
@Named
@
Request
Scoped
public
class
ErrorPageView
{
@
Session
Scoped
public
class
ErrorPageView
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
// private static final long serialVersionUID = -2179309061036632342L;
String
trace
;
// maintain a trail of pages visited (10?)
Queue
trail
=
new
Queue
();
@SuppressWarnings
(
"unused"
)
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ErrorPageView
.
class
);
public
String
getStackTrace
()
{
FacesContext
context
=
FacesContext
.
getCurrentInstance
();
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
View file @
4aaf300
...
...
@@ -113,7 +113,7 @@ public class FoodWaveView extends GenericCDIView {
public
String
selectTemplate
()
{
if
(
templates
.
isRowAvailable
())
{
foodWaves
=
new
ListDataModel
<
FoodWave
>(
templates
.
getRowData
()
.
getFoodwaves
());
.
get
Orderable
Foodwaves
());
}
return
"/foodwave/list"
;
...
...
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