Commit 1e3b77f3 by Tuukka Kivilahti

Merge branch 'rnd' into 'master'

Random minor fixes and improvements

See merge request !321
2 parents 0b8e3237 d2f887ff
...@@ -51,7 +51,7 @@ public class PlaceSlot extends GenericEntity { ...@@ -51,7 +51,7 @@ public class PlaceSlot extends GenericEntity {
this.created = Calendar.getInstance().getTime(); this.created = Calendar.getInstance().getTime();
} }
public boolean isUsed() { public boolean isSlotUsed() {
return used != null || place != null; return used != null || place != null;
} }
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
moyaurl : "#{request.contextPath}", moyaurl : "#{request.contextPath}",
map_id : #{ajaxMapView.map.id}, map_id : #{ajaxMapView.map.id},
}); });
px.toggleaction = #{ajaxMapView.queueEnabled?'undefined':'px.toggle_place'}, px.toggleaction = #{ajaxMapView.queueEnabled?'undefined':'px.toggle_place'};
</script> </script>
......
<!DOCTYPE html <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "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:c="http://java.sun.com/jsp/jstl/core" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" <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:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
<h:body> <h:body>
<ui:composition template="#{sessionHandler.template}"> <ui:composition template="#{sessionHandler.template}">
<ui:param name="thispage" value="page.place.mygroups" /> <ui:param name="thispage" value="page.place.mygroups" />
...@@ -28,26 +28,31 @@ ...@@ -28,26 +28,31 @@
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{i18n['placegroupview.reservationName']}" /> <h:outputText value="#{i18n['placegroupview.reservationName']}" />
</f:facet> </f:facet>
<h:outputText value="#{member.placeReservation.name}" /> <h:link value="#{member.placeReservation.name}" outcome="/place/edit">
<f:param name="placeid" value="#{member.placeReservation.id}" />
</h:link>
</h:column> </h:column>
<h:column> <h:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{i18n['placegroupview.token']}" /> <h:outputText value="#{i18n['placegroupview.token']}" />
</f:facet> </f:facet>
<h:outputText rendered="#{empty member.user}" value="#{member.inviteToken}" /> <h:outputText rendered="#{empty member.user}" value="#{member.inviteToken}" />
<h:outputText rendered="#{!empty member.user}" value="#{member.user.firstnames} #{member.user.lastname} (#{member.user.nick})" /> <h:link rendered="#{!empty member.user}" value="#{member.user.firstnames} #{member.user.lastname} (#{member.user.nick})" outcome="/place/adminGroups">
<f:param name="userid" value="#{member.user.user.id}" />
</h:link>
</h:column> </h:column>
<h:column> <h:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{i18n['placegroupview.groupCreator']}" /> <h:outputText value="#{i18n['placegroupview.groupCreator']}" />
</f:facet> </f:facet>
<h:outputText value="#{member.placeGroup.creator.firstnames} #{member.placeGroup.creator.lastname} (#{member.placeGroup.creator.nick})" /> <h:link value="#{member.placeGroup.creator.firstnames} #{member.placeGroup.creator.lastname} (#{member.placeGroup.creator.nick})" outcome="/place/adminGroups">
<f:param name="userid" value="#{member.placeGroup.creator.user.id}" />
</h:link>
</h:column> </h:column>
<h:column> <h:column>
<h:commandButton rendered="#{placeGroupView.canModifyCurrent and placeGroupView.currentMemberUserNotNull}" action="#{placeGroupView.releasePlace()}" value="#{i18n['placegroupview.releasePlace']}" /> <h:commandButton rendered="#{placeGroupView.canModifyCurrent and placeGroupView.currentMemberUserNotNull}" action="#{placeGroupView.releasePlace()}"
value="#{i18n['placegroupview.releasePlace']}" />
</h:column> </h:column>
</h:dataTable> </h:dataTable>
...@@ -78,7 +83,9 @@ ...@@ -78,7 +83,9 @@
<h:outputText value="#{slot.product.name}" /> <h:outputText value="#{slot.product.name}" />
</p:column> </p:column>
<p:column headerText="#{i18n['placeslot.place']}"> <p:column headerText="#{i18n['placeslot.place']}">
<h:outputText rendered="#{!empty slot.place}" value="#{slot.place.name}" /> <h:link value="#{slot.place.name}" rendered="#{!empty slot.place}" outcome="/place/edit">
<f:param name="placeid" value="#{slot.place.id}" />
</h:link>
</p:column> </p:column>
<p:column headerText="#{i18n['placeslot.used']}"> <p:column headerText="#{i18n['placeslot.used']}">
<h:outputText value="#{slot.used}"> <h:outputText value="#{slot.used}">
...@@ -90,7 +97,7 @@ ...@@ -90,7 +97,7 @@
<f:param name="billid" value="#{slot.bill.id}" /> <f:param name="billid" value="#{slot.bill.id}" />
</h:link> </h:link>
</p:column> </p:column>
<p:column > <p:column>
<p:commandButton rendered="#{empty slot.place and empty slot.used}" value="#{i18n['placeslot.lockSlot']}" actionListener="#{placeGroupView.lockSlot}" update="placeslots" /> <p:commandButton rendered="#{empty slot.place and empty slot.used}" value="#{i18n['placeslot.lockSlot']}" actionListener="#{placeGroupView.lockSlot}" update="placeslots" />
<p:commandButton rendered="#{empty slot.place and not empty slot.used}" value="#{i18n['placeslot.releaseSlot']}" actionListener="#{placeGroupView.releaseSlot}" update="placeslots" /> <p:commandButton rendered="#{empty slot.place and not empty slot.used}" value="#{i18n['placeslot.releaseSlot']}" actionListener="#{placeGroupView.releaseSlot}" update="placeslots" />
</p:column> </p:column>
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
<h1>#{i18n['userlist.header']}</h1> <h1>#{i18n['userlist.header']}</h1>
<h:form id="pageform" styleClass="useradmin_list"> <h:form id="pageform" styleClass="useradmin_list">
<!-- This is here, so that pressing enter works correctly. -->
<p:commandButton style="display: none;" action="#{userSearchView.newSearch()}" ajax="false" />
<p:panelGrid style="width: 100%;"> <p:panelGrid style="width: 100%;">
<p:row> <p:row>
...@@ -52,9 +54,7 @@ ...@@ -52,9 +54,7 @@
<f:selectItems value="#{userSearchView.searchQuery.cardStates}" var="r" itemLabel="#{r}" /> <f:selectItems value="#{userSearchView.searchQuery.cardStates}" var="r" itemLabel="#{r}" />
</p:selectManyCheckbox> </p:selectManyCheckbox>
<h3> <h3>Muut</h3>
Muut
</h3>
<p:selectBooleanCheckbox id="placeassoc" value="#{userSearchView.searchQuery.placeAssoc}" /> <p:selectBooleanCheckbox id="placeassoc" value="#{userSearchView.searchQuery.placeAssoc}" />
<p:outputLabel for="placeassoc" value="#{i18n['userlist.placeassoc']}" /> <p:outputLabel for="placeassoc" value="#{i18n['userlist.placeassoc']}" />
......
...@@ -136,7 +136,7 @@ public class AjaxMapView extends GenericCDIView { ...@@ -136,7 +136,7 @@ public class AjaxMapView extends GenericCDIView {
Slotcounter pm = prodmap.get(p.getProduct()); Slotcounter pm = prodmap.get(p.getProduct());
pm.increment(); pm.increment();
logger.info("got used {} for slot {} with place {}", p.getUsed(), p, p.getPlace()); logger.info("got used {} for slot {} with place {}", p.getUsed(), p, p.getPlace());
if (!p.isUsed()) { if (!p.isSlotUsed()) {
pm.incrementUnused(); pm.incrementUnused();
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!