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 91226116
authored
Oct 27, 2012
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
foodwave can now be full
1 parent
c781ec17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
code/LanBortalWeb/WebContent/foodmanager/listFoodwaves.xhtml
code/LanBortalWeb/WebContent/resources/cditools/foodwave/list.xhtml
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
View file @
9122611
...
...
@@ -126,6 +126,14 @@ public class FoodWave extends GenericEntity {
}
public
boolean
isFull
()
{
if
(
getMaximumFoods
()
<=
0
)
{
return
false
;
}
if
(
getReservedCount
()
>=
getMaximumFoods
())
{
return
true
;
}
return
false
;
}
...
...
@@ -174,6 +182,12 @@ public class FoodWave extends GenericEntity {
}
public
Integer
getMaximumFoods
()
{
if
(
maximumFoods
==
null
)
{
return
0
;
}
return
maximumFoods
;
}
...
...
code/LanBortalWeb/WebContent/foodmanager/listFoodwaves.xhtml
View file @
9122611
...
...
@@ -14,7 +14,6 @@
<ui:define
name=
"content"
>
<h:form>
<p:dataTable
styleClass=
"bordertable"
value=
"#{foodWaveView.foodWaves}"
sortBy=
"#{foodwave.time}"
sortOrder=
"ascending"
var=
"foodwave"
editable=
"true"
rowStyleClass=
"#{not foodwave.isOrderable() ? foodwave.isDelivered() ? 'hidden' : 'closed' : null}"
>
<!-- rowStyleClass="#{foodWave.closed ? 'old' : null} -->
<p:ajax
event=
"rowEdit"
listener=
"#{foodWaveView.onEditFoodWave}"
/>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['foodWave.activeFoodWaves']}"
/>
...
...
code/LanBortalWeb/WebContent/resources/cditools/foodwave/list.xhtml
View file @
9122611
...
...
@@ -15,16 +15,18 @@
<!-- <h:outputScript target="head" library="script" name="shopscript.js" /> -->
<h:outputScript
library=
"primefaces"
name=
"jquery/jquery.js"
/>
<p:dataTable
columnClasses=
"nowrap,numalign,numalign,nowrap,numalign"
styleClass=
"bordertable"
value=
"#{foodWaveView.foodWaves}"
var=
"foodwave"
sortBy=
"#{foodwave.time.time}"
>
<p:dataTable
columnClasses=
"nowrap,numalign,numalign,nowrap,numalign"
styleClass=
"bordertable"
value=
"#{foodWaveView.foodWaves}"
var=
"foodwave"
sortBy=
"#{foodwave.time.time}"
rowStyleClass=
"#{foodwave.isFull() ? 'closed' : null}"
>
<p:column
sortBy=
"#{i18n['foodWave.name']}"
>
<f:facet
name=
"header"
>
<h:outputLabel
id=
"name"
value=
"#{i18n['foodWave.name']}"
/>
</f:facet>
<h:link
outcome=
"#{cc.attrs.outcome}"
value=
"#{foodwave.name}"
>
<h:link
rendered=
"#{not foodwave.isFull()}"
outcome=
"#{cc.attrs.outcome}"
value=
"#{foodwave.name}"
>
<f:param
name=
"foodwaveid"
value=
"#{foodwave.id}"
/>
<f:param
name=
"userid"
value=
"#{userView.user.user.id}"
/>
</h:link>
<h:outputText
rendered=
"#{foodwave.isFull()}"
value=
"#{foodwave.name}"
/>
</p:column>
<p:column
sortBy=
"#{foodwave.template.name}"
>
<f:facet
name=
"header"
>
...
...
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