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 6987f98b
authored
Dec 26, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
now placecodes can be found under foodwaves
1 parent
09d7c4c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
7 deletions
code/moya-database/src/main/java/fi/codecrew/moya/model/EventUser.java
code/moya-web/WebContent/foodmanager/listOrders.xhtml
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
code/moya-database/src/main/java/fi/codecrew/moya/model/EventUser.java
View file @
6987f98
...
@@ -476,6 +476,37 @@ public class EventUser extends GenericEntity {
...
@@ -476,6 +476,37 @@ public class EventUser extends GenericEntity {
}
}
/**
* Get first place from user registered places
*
* If you want to get where user is possibly sitting,
* use this function.
*
* @return first found place, of null if no places at all
*/
public
Place
getFirstPlace
()
{
// first, check if there is some currentUser -mapping in use (vectorama)
if
(
getCurrentPlaces
()
!=
null
&&
getCurrentPlaces
().
size
()
>=
1
)
{
return
getCurrentPlaces
().
get
(
0
);
}
// no, there is not, so get places via old way
if
(
getGroupMemberships
()
==
null
)
{
return
null
;
}
for
(
GroupMembership
ship
:
getGroupMemberships
())
{
if
(
this
.
equals
(
ship
.
getUser
()))
{
if
(
ship
.
getPlaceReservation
()
!=
null
)
{
return
ship
.
getPlaceReservation
();
}
}
}
return
null
;
}
public
String
getShortUserDescriptor
()
{
public
String
getShortUserDescriptor
()
{
return
user
.
getShortUserDescriptor
();
return
user
.
getShortUserDescriptor
();
}
}
...
...
code/moya-web/WebContent/foodmanager/listOrders.xhtml
View file @
6987f98
...
@@ -42,18 +42,21 @@
...
@@ -42,18 +42,21 @@
</p:column>
</p:column>
<p:column
sortBy=
"#{acc_line.user.wholeName}"
>
<p:column
sortBy=
"#{acc_line.user.wholeName}"
>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['acc_line.eventuser']}"
/>
<h:outputLabel
value=
"#{i18n['acc_line.eventuser']}
(#{i18n['acc_line.nick']})
"
/>
</f:facet>
</f:facet>
<h:outputText
outcome=
"/useradmin/edit"
value=
"#{acc_line.user.wholeName}"
/>
<h:link
outcome=
"/useradmin/edit"
value=
"#{acc_line.user.wholeName} (#{acc_line.user.nick})"
>
<f:param
name=
"userid"
value=
"#{acc_line.user.user.id}"
/>
</h:link>
</p:column>
</p:column>
<p:column
s
ortBy=
"#{acc_line.user.nick}
"
>
<p:column
s
tyle=
"width: 80px;
"
>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['acc_line.
nick
']}"
/>
<h:outputLabel
value=
"#{i18n['acc_line.
place
']}"
/>
</f:facet>
</f:facet>
<h:link
outcome=
"/useradmin/edit"
value=
"#{acc_line.user.nick}"
>
<h:outputText
value=
"#{acc_line.user.firstPlace.name}"
/>
<f:param
name=
"userid"
value=
"#{acc_line.user.user.id}"
/>
</h:link>
</p:column>
</p:column>
<p:column
sortBy=
"#{acc_line.eventDelivered}"
>
<p:column
sortBy=
"#{acc_line.eventDelivered}"
>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['accountEvent.delivered']}"
/>
<h:outputLabel
value=
"#{i18n['accountEvent.delivered']}"
/>
...
...
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
View file @
6987f98
...
@@ -1675,3 +1675,4 @@ voting.create.voteEnd = \u00C4\u00E4nestys kiinni
...
@@ -1675,3 +1675,4 @@ voting.create.voteEnd = \u00C4\u00E4nestys kiinni
voting.create.voteStart
=
\u
00C4
\u
00E4nestys auki
voting.create.voteStart
=
\u
00C4
\u
00E4nestys auki
yes
=
Kyll
\u
00E4
yes
=
Kyll
\u
00E4
acc_line.place
=
Paikka
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