Author: JirkaM Date: 2010-02-25 19:36:43 +0100 (Thu, 25 Feb 2010) New Revision: 1882 Modified: trunk/server/webServer2/WebContent/secured/companyrel/listOfCompanies.xhtml trunk/server/webServer2/WebContent/secured/elvysrel/editElvysForm.xhtml trunk/server/webServer2/WebContent/secured/elvysrel/listOfElvyses.xhtml trunk/server/webServer2/WebContent/secured/filerel/fileList.xhtml trunk/server/webServer2/WebContent/secured/filerel/fileUpload.xhtml trunk/server/webServer2/WebContent/secured/layoutrel/layoutList.xhtml trunk/server/webServer2/WebContent/secured/reportrel/reportFilter.xhtml trunk/server/webServer2/WebContent/secured/reportrel/reportResult.xhtml trunk/server/webServer2/WebContent/secured/userrel/editUserForm.xhtml trunk/server/webServer2/WebContent/secured/userrel/listOfUsers.xhtml trunk/server/webServer2/WebContent/template/elvys-template.xhtml Log: * add user competency to xhtml modified WebContent/secured/companyrel/listOfCompanies.xhtml modified WebContent/secured/elvysrel/editElvysForm.xhtml modified WebContent/secured/elvysrel/listOfElvyses.xhtml modified WebContent/secured/filerel/fileList.xhtml modified WebContent/secured/filerel/fileUpload.xhtml modified WebContent/secured/layoutrel/layoutList.xhtml modified WebContent/secured/reportrel/reportFilter.xhtml modified WebContent/secured/reportrel/reportResult.xhtml modified WebContent/secured/userrel/editUserForm.xhtml modified WebContent/secured/userrel/listOfUsers.xhtml modified WebContent/template/elvys-template.xhtml Modified: trunk/server/webServer2/WebContent/secured/companyrel/listOfCompanies.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/companyrel/listOfCompanies.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/companyrel/listOfCompanies.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -4,7 +4,8 @@ xmlns:f="http://java.sun.com/jsf/core"; xmlns:ui="http://java.sun.com/jsf/facelets"; xmlns:a4j="http://richfaces.org/a4j"; - xmlns:rich="http://richfaces.org/rich";> + xmlns:rich="http://richfaces.org/rich"; + xmlns:elvys="http://www.elvys.farm.particle.cz";> <ui:composition template="/template/elvys-template.xhtml"> @@ -14,7 +15,7 @@ <ui:define name="contentBody"> <h:form> - <rich:panel id="listOfCompaniesPanel"> + <rich:panel id="listOfCompaniesPanel" rendered="#{user.competency.canListCompanies}"> <f:facet name="header">#{lbl['company.list.body.title']}</f:facet> <h:panelGrid id="listOfCompanies"> <rich:dataTable @@ -22,7 +23,8 @@ var="company" rows="10" sortMode="single" reRender="listOfCompanies" - columnsWidth="180,200,130,130,150,100" + columnsWidth="180,200,130,130,150,100" + align="center" > @@ -132,6 +134,9 @@ </rich:dataTable> </h:panelGrid> </rich:panel> + <rich:panel rendered="#{!user.competency.canListCompanies}"> + <elvys:notAuthorized/> + </rich:panel> </h:form> Modified: trunk/server/webServer2/WebContent/secured/elvysrel/editElvysForm.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/elvysrel/editElvysForm.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/elvysrel/editElvysForm.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -20,7 +20,7 @@ <ui:define name="contentSubTitle"></ui:define> <ui:define name="contentBody"> - <rich:panel> + <rich:panel rendered="#{user.competency.canManageElvyses}"> <f:facet name="header">#{(elvysEditBean.updating)? lbl['elvys.edit.form.title.modify'] : lbl['elvys.edit.form.title.create']}</f:facet> <h:form id="editUserForm"> <h:panelGrid columns="2"> @@ -84,6 +84,9 @@ immediate="true" action="#{elvysesBean.prepareListBeforeUC}" /> </h:form> </rich:panel> + <rich:panel rendered="#{!user.competency.canManageElvyses}"> + <elvys:notAuthorized/> + </rich:panel> </ui:define> Modified: trunk/server/webServer2/WebContent/secured/elvysrel/listOfElvyses.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/elvysrel/listOfElvyses.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/elvysrel/listOfElvyses.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -24,7 +24,7 @@ <ui:define name="contentBody"> <h:form id="ElvysesForm"> - <rich:panel id="listOfElvyses"> + <rich:panel id="listOfElvyses" rendered="#{user.competency.canManageElvyses or user.competency.canPlan}"> <f:facet name="header">#{lbl['elvys.list.table.header']}</f:facet> <h:panelGroup id="JHDebugPanel" rendered="false"> @@ -49,14 +49,11 @@ reRender="listOfElvyses"> </h:commandButton> </h:panelGroup> - - <rich:extendedDataTable id="ElvysesList" value="#{elvysesBean.elvyses}" var="record" - rows="10" height="370px;" - enableContextMenu="false" + <rich:dataTable id="ElvysesList" value="#{elvysesBean.elvyses}" var="record" + rows="10" reRender="datascroller" sortMode="single" - noDataLabel="#{lbl['list.empty']}" - width="#{(4+(user.user.system?1:0))*170}px" - align="center" > + width="#{(4+(user.user.system?1:0))*170}px" + align="center"> <f:facet name="header"> <rich:columnGroup> @@ -260,8 +257,12 @@ operation="show"> <f:param name="name" value="elvys.city"/> </rich:componentControl> - </rich:extendedDataTable> + </rich:dataTable> </rich:panel> + <rich:panel rendered="#{!(user.competency.canManageElvyses or user.competency.canPlan)}"> + <elvys:notAuthorized/> + </rich:panel> + </h:form> Modified: trunk/server/webServer2/WebContent/secured/filerel/fileList.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/filerel/fileList.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/filerel/fileList.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -24,15 +24,18 @@ <ui:define name="contentSubTitle"></ui:define> <ui:define name="contentBody"> - <rich:panel> + <rich:panel rendered="#{user.competency.canManageFiles}"> <f:facet name="header">#{lbl['file.manager.list.header']}</f:facet> - <elvys:fileListComponent id="FileListComponent" - showUploadIcon="true" - showDownloadIcon="true" - showDeleteIcon="true" - showSelectButton1="false"/> + <elvys:fileListComponent id="FileListComponent" + showUploadIcon="true" + showDownloadIcon="true" + showDeleteIcon="true" + showSelectButton1="false"/> </rich:panel> + <rich:panel rendered="#{!user.competency.canManageFiles}"> + <elvys:notAuthorized/> + </rich:panel> </ui:define> Modified: trunk/server/webServer2/WebContent/secured/filerel/fileUpload.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/filerel/fileUpload.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/filerel/fileUpload.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -5,7 +5,8 @@ xmlns:ui="http://java.sun.com/jsf/facelets"; xmlns:a4j="http://richfaces.org/a4j"; xmlns:rich="http://richfaces.org/rich"; - xmlns:s="http://jboss.com/products/seam/taglib";> + xmlns:s="http://jboss.com/products/seam/taglib"; + xmlns:elvys="http://www.elvys.farm.particle.cz";> <ui:composition template="/template/elvys-template.xhtml"> @@ -23,7 +24,7 @@ <ui:define name="contentBody"> <h:form id="fileUploadForm"> - <rich:panel> + <rich:panel rendered="#{user.competency.canManageFiles}"> <f:facet name="header">#{lbl['file.manager.upload.body.title']}</f:facet> <!-- LINKS --> @@ -71,6 +72,9 @@ ajaxSingle="true" immediate="true" bypassUpdates="true" /> </rich:fileUpload> </rich:panel> + <rich:panel rendered="#{!user.competency.canManageFiles}"> + <elvys:notAuthorized/> + </rich:panel> </h:form> </ui:define> Modified: trunk/server/webServer2/WebContent/secured/layoutrel/layoutList.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/layoutrel/layoutList.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/layoutrel/layoutList.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -14,7 +14,7 @@ <ui:define name="contentSubTitle"></ui:define> <ui:define name="contentBody"> - <rich:panel id="listOfLayoutsPanel"> + <rich:panel id="listOfLayoutsPanel" rendered="#{user.competency.canRunLD}"> <f:facet name="header">#{lbl['layout.list.body.title']}</f:facet> <!-- list of layouts component --> @@ -28,6 +28,10 @@ </rich:panel> + + <rich:panel rendered="#{!user.competency.canRunLD}"> + <elvys:notAuthorized/> + </rich:panel> </ui:define> Modified: trunk/server/webServer2/WebContent/secured/reportrel/reportFilter.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/reportrel/reportFilter.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/reportrel/reportFilter.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -4,7 +4,8 @@ xmlns:f="http://java.sun.com/jsf/core"; xmlns:ui="http://java.sun.com/jsf/facelets"; xmlns:a4j="http://richfaces.org/a4j"; - xmlns:rich="http://richfaces.org/rich";> + xmlns:rich="http://richfaces.org/rich"; + xmlns:elvys="http://www.elvys.farm.particle.cz";> <ui:composition template="/template/elvys-template.xhtml"> <ui:define name="script"> <script type="text/javascript"> @@ -47,7 +48,7 @@ <ui:define name="contentBody"> <h:form> - <rich:panel styleClass="reportPanel"> + <rich:panel styleClass="reportPanel" rendered="#{user.competency.canUseStatistics}"> <f:facet name="header">#{lbl['report.filter.title']}</f:facet> <h:panelGrid class="reportFilter" columns="6" columnClasses="all,button,choice,choice,button,all" id="filterPanel"> <rich:extendedDataTable value="#{reportBean.files}" @@ -177,6 +178,9 @@ <a4j:commandButton action="#{reportBean.prepareReportResult}" value="#{lbl['report.filter.submit']}" /> </rich:panel> + <rich:panel rendered="#{!user.competency.canUseStatistics}"> + <elvys:notAuthorized/> + </rich:panel> </h:form> </ui:define> </ui:composition> Modified: trunk/server/webServer2/WebContent/secured/reportrel/reportResult.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/reportrel/reportResult.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/reportrel/reportResult.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -4,7 +4,8 @@ xmlns:f="http://java.sun.com/jsf/core"; xmlns:ui="http://java.sun.com/jsf/facelets"; xmlns:a4j="http://richfaces.org/a4j"; - xmlns:rich="http://richfaces.org/rich";> + xmlns:rich="http://richfaces.org/rich"; + xmlns:elvys="http://www.elvys.farm.particle.cz";> <ui:composition template="/template/elvys-template.xhtml"> <ui:define name="contentSubTitle"></ui:define> @@ -144,7 +145,7 @@ <ui:define name="contentBody"> <h:form> - <rich:panel styleClass="reportPanel"> + <rich:panel styleClass="reportPanel" rendered="#{user.competency.canUseStatistics}"> <f:facet name="header">#{lbl['report.result.title']} #{lbl['report.result.date.from']} #{reportBean.dateFromString} #{lbl['report.result.date.to']} #{reportBean.dateToString}</f:facet> <h:panelGrid> <a4j:repeat id="report" value="#{reportBean.reports}" var="report"> @@ -265,6 +266,9 @@ </h:panelGrid> </rich:panel> + <rich:panel rendered="#{!user.competency.canUseStatistics}"> + <elvys:notAuthorized/> + </rich:panel> </h:form> </ui:define> Modified: trunk/server/webServer2/WebContent/secured/userrel/editUserForm.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/userrel/editUserForm.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/userrel/editUserForm.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -133,6 +133,7 @@ immediate="true" action="#{usersBean.prepareListOfUsers}" /> </h:form> </rich:panel> + </ui:define> Modified: trunk/server/webServer2/WebContent/secured/userrel/listOfUsers.xhtml =================================================================== --- trunk/server/webServer2/WebContent/secured/userrel/listOfUsers.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/secured/userrel/listOfUsers.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -4,7 +4,8 @@ xmlns:f="http://java.sun.com/jsf/core"; xmlns:ui="http://java.sun.com/jsf/facelets"; xmlns:a4j="http://richfaces.org/a4j"; - xmlns:rich="http://richfaces.org/rich";> + xmlns:rich="http://richfaces.org/rich"; + xmlns:elvys="http://www.elvys.farm.particle.cz";> <ui:composition template="/template/elvys-template.xhtml"> @@ -14,15 +15,14 @@ <ui:define name="contentBody"> <h:form> - <rich:panel id="listOfUsersPanel"> + <rich:panel id="listOfUsersPanel" rendered="#{user.competency.canListUsersOwnCompany}"> <f:facet name="header">#{lbl['user.list.body.title']}</f:facet> <h:panelGrid id="listOfUsers"> - <rich:extendedDataTable value="#{usersBean.userRecords}" - var="user_iterator" rows="10" height="370px;" - enableContextMenu="false" id="tableListOfUsers" - reRender="datascroller" sortMode="single" - noDataLabel="#{lbl['list.empty']}" - width="#{(6+(user.user.system?1:0))*110}px" + <rich:dataTable value="#{usersBean.userRecords}" + var="user_iterator" rows="10" + id="tableListOfUsers" + reRender="datascroller" sortMode="single" + width="#{(6+(user.user.system?1:0))*130}px" align="center" > @@ -57,7 +57,7 @@ </rich:columnGroup> </f:facet> - <rich:column sortBy="#{user_iterator.user.company.name}" width="110px" + <rich:column sortBy="#{user_iterator.user.company.name}" width="130px" rendered="#{user.user.system}"> <f:facet name="header"> #{lbl['user.list.body.company']} @@ -65,14 +65,14 @@ <h:outputText value="#{user_iterator.user.company.name}" /> </rich:column> - <rich:column width="140px" + <rich:column width="150px" filterMethod="#{usersBean.filterByValue}" sortBy="#{user_iterator.user.surname}"> <f:facet name="header">#{lbl['user.list.body.firstname']}</f:facet> <h:outputText value="#{user_iterator.user.surname} #{user_iterator.user.realname}" /> </rich:column> - <rich:column width="60px" sortBy="#{user_iterator.user.role.role}"> + <rich:column width="100px" sortBy="#{user_iterator.user.role.role}"> <f:facet name="header">#{lbl['user.list.body.role']}</f:facet> <h:outputText value="#{user_iterator.user.role.role}" > <f:converter converterId="localizedRoleConverter"/> @@ -88,7 +88,7 @@ <h:outputText value="#{user_iterator.user.email}" /> </rich:column> - <rich:column width="90px" sortBy="#{user_iterator.user.phone}"> + <rich:column width="110px" sortBy="#{user_iterator.user.phone}"> <f:facet name="header">#{lbl['user.list.body.phone']}</f:facet> <h:outputText value="#{user_iterator.user.phone}" /> </rich:column> @@ -97,21 +97,6 @@ <rich:column width="90px"> <f:facet name="header">#{lbl['user.list.body.edit']}</f:facet> <div class="list-operations-main"> - <div class="list-operations-item"> - <h:commandButton id="EditUser" image="/images/icons/edit.png" - action="#{userEditBean.prepareUpdateUserForm}" - rendered="#{user_iterator.canBeModified}"> - <f:setPropertyActionListener target="#{userEditBean.selectedUser}" value="#{user_iterator.user}"/> - <f:setPropertyActionListener target="#{userEditBean.updating}" - value="#{(user_iterator.user.id == user.user.id) ? false : true}"/> - <f:setPropertyActionListener target="#{userEditBean.updatingProfile}" - value="#{(user_iterator.user.id == user.user.id) ? true : false}"/> - </h:commandButton> - <rich:toolTip for="EditUser" direction="bottom-left"> - <h:outputText value="#{lbl['user.list.body.edit.tooltip']}" /> - </rich:toolTip> - </div> - <!-- DELETE --> <div class="list-operations-item"> @@ -127,6 +112,22 @@ <h:outputText value="#{lbl['user.list.body.delete.tooltip']}" /> </rich:toolTip> </div> + + + <div class="list-operations-item"> + <h:commandButton id="EditUser" image="/images/icons/edit.png" + action="#{userEditBean.prepareUpdateUserForm}" + rendered="#{user_iterator.canBeModified}"> + <f:setPropertyActionListener target="#{userEditBean.selectedUser}" value="#{user_iterator.user}"/> + <f:setPropertyActionListener target="#{userEditBean.updating}" + value="#{(user_iterator.user.id == user.user.id) ? false : true}"/> + <f:setPropertyActionListener target="#{userEditBean.updatingProfile}" + value="#{(user_iterator.user.id == user.user.id) ? true : false}"/> + </h:commandButton> + <rich:toolTip for="EditUser" direction="bottom-left"> + <h:outputText value="#{lbl['user.list.body.edit.tooltip']}" /> + </rich:toolTip> + </div> </div> </rich:column> @@ -137,10 +138,13 @@ <rich:datascroller id="datascroller" renderIfSinglePage="false" immediate="true" /> </f:facet> - </rich:extendedDataTable> + </rich:dataTable> </h:panelGrid> - </rich:panel> + </rich:panel> + <rich:panel rendered="#{!user.competency.canListUsersOwnCompany}"> + <elvys:notAuthorized/> + </rich:panel> </h:form> Modified: trunk/server/webServer2/WebContent/template/elvys-template.xhtml =================================================================== --- trunk/server/webServer2/WebContent/template/elvys-template.xhtml 2010-02-25 17:07:20 UTC (rev 1881) +++ trunk/server/webServer2/WebContent/template/elvys-template.xhtml 2010-02-25 18:36:43 UTC (rev 1882) @@ -118,10 +118,10 @@ submitMode="server"/> <rich:menuItem value="#{lbl['template.menu.elvys.new']}" - action="#{elvysesBean.prepareCreateElvysForm}" + action="#{elvysEditBean.prepareCreateElvysForm}" submitMode="server" rendered="#{user.competency.canManageElvyses}"> - <f:setPropertyActionListener value="${false}" target="#{elvysesBean.updating}" /> + <f:setPropertyActionListener value="${false}" target="#{elvysEditBean.updating}" /> </rich:menuItem> </rich:dropDownMenu>