Author: hansbak
Date: Fri Jul 4 22:46:18 2008 New Revision: 674154 URL: http://svn.apache.org/viewvc?rev=674154&view=rev Log: show buttons when not on main page and renaming of screens and forms Modified: ofbiz/trunk/specialpurpose/mypage/ofbiz-component.xml ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Modified: ofbiz/trunk/specialpurpose/mypage/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/ofbiz-component.xml?rev=674154&r1=674153&r2=674154&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/ofbiz-component.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/ofbiz-component.xml Fri Jul 4 22:46:18 2008 @@ -31,7 +31,6 @@ title="MyPage" server="default-server" location="webapp/mypage" - base-permission="OFBTOOLS" mount-point="/mypage" app-bar-display="true"/> </ofbiz-component> Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml?rev=674154&r1=674153&r2=674154&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Fri Jul 4 22:46:18 2008 @@ -84,6 +84,22 @@ <security https="true" auth="true"/> <response name="success" type="view" value="preferences"/> </request-map> + <request-map uri="myTasks"> + <security https="true" auth="true"/> + <response name="success" type="view" value="myTasks"/> + </request-map> + <request-map uri="myTimesheet"> + <security https="true" auth="true"/> + <response name="success" type="view" value="myTimesheet"/> + </request-map> + <request-map uri="myCommunications"> + <security https="true" auth="true"/> + <response name="success" type="view" value="myCommunications"/> + </request-map> + <request-map uri="myCompanyComms"> + <security https="true" auth="true"/> + <response name="success" type="view" value="myCompanyComms"/> + </request-map> <request-map uri="updatePreferences"> <security https="true" auth="true"/> <event invoke="updatePreferences" path="org/ofbiz/mypage/Events.xml" type="simple"/> @@ -97,5 +113,9 @@ <view-map name="main" type="screen" page="component://mypage/widget/CommonScreens.xml#main"/> <view-map name="preferences" type="screen" page="component://mypage/widget/CommonScreens.xml#preferences"/> + <view-map name="myTasks" type="screen" page="component://mypage/widget/CommonScreens.xml#MyTasks"/> + <view-map name="myCommunications" type="screen" page="component://mypage/widget/CommonScreens.xml#MyCommunications"/> + <view-map name="myCompanyComms" type="screen" page="component://mypage/widget/CommonScreens.xml#MyCompanyComms"/> + <view-map name="myTimesheet" type="screen" page="component://mypage/widget/CommonScreens.xml#MyTimesheet"/> <view-map name="newEvent" type="screen" page="component://mypage/widget/MyPageScreens.xml#newEvent"/> </site-conf> Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=674154&r1=674153&r2=674154&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Fri Jul 4 22:46:18 2008 @@ -100,23 +100,19 @@ <widgets/> </section> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="pre-body"> - <section> - <condition> - <and> - <if-has-permission permission="PARTYMGR" action="_VIEW"/> - <not><if-empty field-name="communicationEvent"/></not> - </and> - </condition> - <widgets> - <include-menu location="component://party/webapp/partymgr/communication/CommMenus.xml" name="CommEventTabBar"/> - </widgets> - </section> - </decorator-section> <decorator-section name="body"> <section> <condition> - <if-has-permission action="_VIEW" permission="PARTYMGR"/> + <or> + <if-has-permission action="_VIEW" permission="PARTYMGR"/> + <and><!-- everybody can see his own communication events --> + <not><if-empty field-name="communicationEvent"/></not> + <or> + <if-compare field-name="communicationEvent.partyIdFrom" operator="equals" value="${userLogin.partyId}"/> + <if-compare field-name="communicationEvent.partyIdTo" operator="equals" value="${userLogin.partyId}"/> + </or> + </and> + </or> </condition> <widgets> <section> @@ -202,7 +198,7 @@ operator="equals" value="Y" /> </condition> <widgets> - <include-screen name="MyMessages" + <include-screen name="MyCommunications" location="component://mypage/widget/MyPageScreens.xml" /> </widgets> </section> @@ -212,7 +208,7 @@ operator="equals" value="Y" /> </condition> <widgets> - <include-screen name="CalendarUpcoming" + <include-screen name="MyCompanyComms" location="component://mypage/widget/MyPageScreens.xml" /> </widgets> </section> @@ -222,7 +218,7 @@ operator="equals" value="Y" /> </condition> <widgets> - <include-screen name="MyTaskList" + <include-screen name="MyTasks" location="component://mypage/widget/MyPageScreens.xml" /> </widgets> </section> @@ -232,7 +228,7 @@ operator="equals" value="Y" /> </condition> <widgets> - <include-screen name="CurrentTimesheet" + <include-screen name="MyTimesheet" location="component://mypage/widget/MyPageScreens.xml" /> </widgets> </section> @@ -260,6 +256,86 @@ </widgets> </section> </screen> + <screen name="MyTasks"> + <section> + <actions> + <set field="headerItem" value="myTasks" /> + <service service-name="getUserPreferenceGroup" + result-map-name="preferences"> + <field-map field-name="userPrefGroupId" value="MyPage" /> + </service> + </actions> + <widgets> + <decorator-screen name="main-decorator" + location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <include-screen name="MyTasks" + location="component://mypage/widget/MyPageScreens.xml" /> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="MyCommunications"> + <section> + <actions> + <set field="headerItem" value="myCommunications" /> + <service service-name="getUserPreferenceGroup" + result-map-name="preferences"> + <field-map field-name="userPrefGroupId" value="MyPage" /> + </service> + </actions> + <widgets> + <decorator-screen name="main-decorator" + location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <include-screen name="MyCommunications" + location="component://mypage/widget/MyPageScreens.xml" /> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="MyCompanyComms"> + <section> + <actions> + <set field="headerItem" value="myCompanyComms" /> + <service service-name="getUserPreferenceGroup" + result-map-name="preferences"> + <field-map field-name="userPrefGroupId" value="MyPage" /> + </service> + </actions> + <widgets> + <decorator-screen name="main-decorator" + location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <include-screen name="MyCompanyComms" + location="component://mypage/widget/MyPageScreens.xml" /> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="MyTimesheet"> + <section> + <actions> + <set field="headerItem" value="myTimesheet" /> + <service service-name="getUserPreferenceGroup" + result-map-name="preferences"> + <field-map field-name="userPrefGroupId" value="MyPage" /> + </service> + </actions> + <widgets> + <decorator-screen name="main-decorator" + location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <include-screen name="MyTimesheet" + location="component://mypage/widget/MyPageScreens.xml" /> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=674154&r1=674153&r2=674154&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Fri Jul 4 22:46:18 2008 @@ -44,7 +44,7 @@ <field name="updateButton"><submit/></field> </form> - <form name="CalendarUpcoming" type="list" list-name="events" target="deleteEvent" paginate-target="FindTask" + <form name="MyCompanyComms" type="list" list-name="events" target="deleteEvent" paginate-target="FindTask" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> <actions> <set field="nowDate" value="${bsh:org.ofbiz.base.util.UtilDateTime.nowDateString("yyyy-MM-dd HH:mm:ss.S")}" type="String"/> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml?rev=674154&r1=674153&r2=674154&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Fri Jul 4 22:46:18 2008 @@ -33,6 +33,42 @@ </condition> <link target="/partymgr/control/viewprofile?partyId=${userLogin.partyId}" url-mode="inter-app" target-window="_BLANK"/> </menu-item> + <menu-item name="myCommunications" title="${uiLabelMap.MyCommunications}"> + <condition> + <and> + <not><if-empty field-name="userLogin"/></not> + <if-compare field-name="preferences.userPrefMap.myCommunications" operator="not-equals" value="Y"/> + </and> + </condition> + <link target="myCommunications"/> + </menu-item> + <menu-item name="myCompanyComms" title="${uiLabelMap.MyCompanyComms}"> + <condition> + <and> + <not><if-empty field-name="userLogin"/></not> + <if-compare field-name="preferences.userPrefMap.myCompanyComms" operator="not-equals" value="Y"/> + </and> + </condition> + <link target="myCompanyComms"/> + </menu-item> + <menu-item name="myTimesheet" title="${uiLabelMap.myTimesheet}"> + <condition> + <and> + <not><if-empty field-name="userLogin"/></not> + <if-compare field-name="preferences.userPrefMap.myTimesheet" operator="not-equals" value="Y"/> + </and> + </condition> + <link target="myTimesheet"/> + </menu-item> + <menu-item name="myTasks" title="${uiLabelMap.myTasks}"> + <condition> + <and> + <not><if-empty field-name="userLogin"/></not> + <if-compare field-name="preferences.userPrefMap.myTasks" operator="not-equals" value="Y"/> + </and> + </condition> + <link target="myTasks"/> + </menu-item> <!--menu-item name="help" title="${uiLabelMap.CommonHelp}" align-style="opposed"> <condition><not><if-empty field-name="userLogin"/></not></condition> <link target="http://docs.ofbiz.org/display/OFBENDUSER/Project+Manager+Application+Roles?decorator=printable" url-mode="plain" target-window="new"/> @@ -46,25 +82,28 @@ <link target="${checkLoginUrl}"/> </menu-item> <menu-item name="preferences" title="${uiLabelMap.CommonPreferences}" align-style="opposed"> + <condition> + <not><if-empty field-name="userLogin"/></not> + </condition> <link target="preferences"/> </menu-item> </menu> - <menu name="EventMenu"> + <menu name="MyCompanyCommsMenu"> <menu-item name="newEvent" title="${uiLabelMap.WorkEffortNewEvent}"><link target="newEvent"/></menu-item> </menu> - <menu name="MessageMenu"> + <menu name="MyCommunicationsMenu"> <menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}"><link target="newEmail"/></menu-item> <menu-item name="newNote" title="${uiLabelMap.PartyNewInternalNote}"><link target="newInternalNote"/></menu-item> </menu> - <menu name="TaskMenu"> + <menu name="MyTasksMenu"> <menu-item name="myTasks" title="myTasks"><link target="/projectmgr/control/MyTasks" url-mode="inter-app"/></menu-item> </menu> - <menu name="TimesheetMenu" extends="TimesheetBar" extends-resource="component://projectmgr/widget/Menus.xml"> - <menu-item name="myTime" title="myTime"><link target="/projectmgr/control/MyTimeSheet" url-mode="inter-app"/></menu-item> + <menu name="MyTimesheetMenu" extends="TimesheetBar" extends-resource="component://projectmgr/widget/Menus.xml"> + <menu-item name="myTime" title="myTime"><link target="/projectmgr/control/MyTimesheet" url-mode="inter-app"/></menu-item> </menu> </menus> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=674154&r1=674153&r2=674154&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Fri Jul 4 22:46:18 2008 @@ -33,7 +33,7 @@ </widgets> </section> </screen> - <screen name="CurrentTimesheet"> + <screen name="MyTimesheet"> <section> <actions> <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh"/> @@ -41,7 +41,7 @@ <widgets> <screenlet title="${uiLabelMap.PageTitleCurrentTimesheet} ${uiLabelMap.CommonNbr} ${timesheet.timesheetId} ${uiLabelMap.ProjectMgrWeek}: ${weekNumber} ${uiLabelMap.CommonFrom} ${bsh:timesheet.get("fromDate").toString().substring(0,10)} ${uiLabelMap.CommonTo} ${bsh:timesheet.get("thruDate").toString().substring(0,10)}" navigation-menu-name="TimesheetMenu" collapsible="true" name="timesheet"> - <include-menu name="TimesheetMenu" location="component://mypage/widget/MyPageMenus.xml"/> + <include-menu name="MyTimesheetMenu" location="component://mypage/widget/MyPageMenus.xml"/> <section> <condition> <if-compare field-name="timesheet.statusId" operator="equals" value="TIMESHEET_COMPLETED"/> @@ -57,7 +57,7 @@ </widgets> </section> </screen> - <screen name="MyTaskList"> + <screen name="MyTasks"> <section> <actions> <entity-and entity-name="WorkEffortAndPartyAssign" list-name="tasks" filter-by-date="true"> @@ -67,8 +67,8 @@ </entity-and> </actions> <widgets> - <screenlet title="${uiLabelMap.PageTitleTaskAssignedToMe}" name="mytasks" collapsible="true" navigation-menu-name="TaskMenu"> - <include-menu name="TaskMenu" location="component://mypage/widget/MyPageMenus.xml"/> + <screenlet title="${uiLabelMap.PageTitleTaskAssignedToMe}" name="mytasks" collapsible="true" navigation-menu-name="MyTasksMenu"> + <include-menu name="MyTasksMenu" location="component://mypage/widget/MyPageMenus.xml"/> <section> <condition> <not><if-empty field-name="tasks"/></not> @@ -90,26 +90,26 @@ </section> </screen> - <screen name="CalendarUpcoming"> + <screen name="MyCompanyComms"> <section> <widgets> - <screenlet title="Company events" navigation-menu-name="EventMenu" name="companyEvents" collapsible="true"> - <include-menu name="EventMenu" location="component://mypage/widget/MyPageMenus.xml"/> - <include-form name="CalendarUpcoming" location="component://mypage/widget/MyPageForms.xml"/> + <screenlet title="Company events" navigation-menu-name="MyCompanyCommsMenu" name="companyEvents" collapsible="true"> + <include-menu name="MyCompanyCommsMenu" location="component://mypage/widget/MyPageMenus.xml"/> + <include-form name="MyCompanyComms" location="component://mypage/widget/MyPageForms.xml"/> </screenlet> </widgets> </section> </screen> - <screen name="MyMessages"> + <screen name="MyCommunications"> <section> <actions> <set field="partyId" from-field="userLogin.partyId"/> </actions> <widgets> - <screenlet title="Communications" navigation-menu-name="MessageMenu" navigation-form-name="ListPartyCommEvents" name="comms"> - <include-menu name="MessageMenu" location="component://mypage/widget/MyPageMenus.xml"/> + <screenlet title="MyCommunications" navigation-menu-name="MyCommunicationsMenu" navigation-form-name="ListPartyCommEvents" name="comms"> + <include-menu name="MyCommunicationsMenu" location="component://mypage/widget/MyPageMenus.xml"/> <include-form name="ListPartyCommEvents" location="component://party/webapp/partymgr/communication/CommForms.xml"/> </screenlet> <!--container style="righthalf"> @@ -122,7 +122,7 @@ </section> </screen> - <screen name="CompanyMessages"> + <screen name="MyCompanyComms1"> <section> <actions> <set field="partyId" from-field="userLogin.partyId"/> |
Free forum by Nabble | Edit this page |