@@ -1,60 +1,58 @@
< ui:composition xmlns ="http://www.w3.org/1999/xhtml "
xmlns:h ="http://xmlns.jcp.org/jsf/html "
xmlns:f ="http://java.sun.com/jsf/core "
xmlns:ui ="http://java.sun.com/jsf/facelets "
template ="/templates/general_template.xhtml "
xmlns:p ="http://primefaces.org/ui "
xmlns:c ="http://xmlns.jcp.org/jsp/jstl/core ">
xmlns:h ="http://xmlns.jcp.org/jsf/html "
xmlns:f ="http://java.sun.com/jsf/core "
xmlns:ui ="http://java.sun.com/jsf/facelets "
template ="/templates/general_template.xhtml "
xmlns:p ="http://primefaces.org/ui "
xmlns:c ="http://xmlns.jcp.org/jsp/jstl/core ">
< ui:define name ="metadata ">
< f:metadata >
< f:viewParam name ="id " value ="#{houseBean.houseID} " />
< f:viewAction action ="#{houseBean.loadData()} " />
</ f:metadata >
</ ui:define >
< f:metadata >
< f:viewParam name ="id " value ="#{houseBean.houseID} " />
< f:viewAction action ="#{houseBean.loadData()} " />
</ f:metadata >
</ ui:define >
< ui:define name ="general_content ">
< c:set var ="myHouse " value ="#{houseBean.findHouseByUrlId()} " scope ="session " />
< p:dialog header ="" widgetVar ="dlg1 " modal ="true " height ="100 " resizable ="false ">
< h:outputText value ="Ar tikrai norite ištrinti vasarnamį: #{myHouse .title} ? " />
< h:outputText value ="Ar tikrai norite ištrinti vasarnamį: #{houseBean .title} ? " />
< br />
< h:panelGrid columns ="2 " cellpadding ="10 " style ="margin-left: auto; margin-right: auto; ">
< p:commandButton value ="Taip " action ="#{houseBean.removeHouse()} ">
< f:param name ="id " value ="#{param.id} " />
</ p:commandButton >
< p:commandButton value ="Ne " onclick ="PF('dlg1').hide(); " />
</ h:panelGrid >
</ p:dialog >
< p:panel header ="Vasarnamis ">
< h:form >
< h:panelGrid columns ="3 " cellpadding ="10 ">
< p:commandButton value ="Pridėti paslaugą " action ="administration/add-extra.xhtml " rendered ="#{userSessionBean.user.isadmin} ">
< f:param name ="house " value ="#{param.id} "/>
</ p:commandButton >
< p:commandButton value ="Redaguoti " action ="house-edit.xhtml " rendered ="#{userSessionBean.user.isadmin} ">
< f:param name ="id " value ="#{param.id} "/>
</ p:commandButton >
< p:commandButton value ="Ištrinti " type ="button " onclick ="PF('dlg1').show(); " rendered ="#{userSessionBean.user.isadmin} " />
< p:commandButton value ="Pridėti paslaugą " action ="#{houseBean.RedirectAddMoreExtras()} " rendered ="#{userSessionBean.user.isadmin} " ajax ="false "/>
< p:commandButton value ="Redaguoti " action ="#{houseBean.RedirectToEdit()} " rendered ="#{userSessionBean.user.isadmin} " ajax ="false "/>
< p:commandButton value ="Ištrinti " type ="button " onclick ="PF('dlg1').show(); " rendered ="#{userSessionBean.user.isadmin} " ajax ="false " />
</ h:panelGrid >
< h1 > #{myHouse.title}</ h1 >
< h1 > #{houseBean.title}</ h1 >
< h4 > Aprašymas: </ h4 >
< p > #{myHouse .description}</ p >
< p > #{houseBean .description}</ p >
< h4 > Adresas: </ h4 >
#{myHouse .address}
#{houseBean .address}
< h4 > Vietų skaičius: </ h4 >
< p > #{myHouse .capacity}</ p >
< p > #{houseBean .capacity}</ p >
< h4 > Nauodjimosi laikotarpis:</ h4 >
< p > #{houseBean.intToMonthName(myHouse .availablefrom)} - #{houseBean.intToMonthName(myHouse .availableto)}</ p >
< p > #{houseBean.intToMonthName(houseBean .availablefrom)} - #{houseBean.intToMonthName(houseBean .availableto)}</ p >
< h4 > Papildomos paslaugos:</ h4 >
< p:dataTable var ="extra " value ="#{myHouse .extrasList} " tableStyle ="width:auto ">
< p:dataTable var ="extra " value ="#{houseBean .extrasList} " tableStyle ="width:auto ">
< p:column headerText ="Pavadinimas ">
#{extra.title}
</ p:column >
@@ -74,7 +72,7 @@
</ h:outputText >
</ p:column >
</ p:dataTable >
< h4 > Nuomos kaina savaitei:</ h4 >
< h:outputText value ="#{houseBean.costInPoints} ">
< f:convertNumber type ="number " groupingUsed ="true "
@@ -86,14 +84,14 @@
maxFractionDigits ="2 " pattern ="#0.00 "/>
</ h:outputText > EUR
< br />
< p:commandButton value ="Rezervuoti " action ="#{houseBean.navigateToReservation()} "
ajax ="false " rendered ="#{houseBean.canReserve()} "
styleClass ="butt "/>
< br />
< h:outputText value ="Jūs negalite rezervuoti šio vasarnamio. Priežastis: #{houseBean.canReserveMessage} "
rendered ="#{!houseBean.canReserve()} "/>
</ h:form >
</ p:panel >
</ ui:define >