Author: hansbak
Date: Sat Jul 5 19:50:32 2008 New Revision: 674250 URL: http://svn.apache.org/viewvc?rev=674250&view=rev Log: make the profile (and the whole mypage component) viewable to a user without any security settings Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml 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=674250&r1=674249&r2=674250&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Sat Jul 5 19:50:32 2008 @@ -106,10 +106,12 @@ <response name="success" type="view" value="main"/> <response name="error" type="view" value="preferences"/> </request-map> - - - - + + <request-map uri="viewprofile"> + <security https="true" auth="true"/> + <response name="success" type="view" value="viewprofile"/> + <response name="error" type="view" value="main"/> + </request-map> <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"/> @@ -118,4 +120,6 @@ <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"/> + <view-map name="viewprofile" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#viewprofile"/> + </site-conf> Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=674250&r1=674249&r2=674250&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Sat Jul 5 19:50:32 2008 @@ -51,11 +51,45 @@ <set field="applicationMenuLocation" value="component://mypage/widget/MyPageMenus.xml" global="true"/> </actions> <widgets> + <section> + <condition><not><if-empty field-name="userLogin"/></not></condition> + <actions> + <service service-name="getUserPreferenceGroup" result-map-name="preferences"> + <field-map field-name="userPrefGroupId" value="MyPage" /> + </service> + </actions> + <widgets/> + </section> <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/> </widgets> </section> </screen> + <screen name="CommonPartyDecorator"> + <section> + <actions> + <set field="headerItem" value="viewprofile"/> + <set field="partyId" from-field="userLogin.partyId"/> + <set field="parameters.partyId" from-field="userLogin.partyId"/> + <entity-one entity-name="Party" value-name="party"/> + <entity-one entity-name="Person" value-name="lookupPerson"/> + <entity-one entity-name="PartyGroup" value-name="lookupGroup"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <widgets> + <label style="h1" text="${uiLabelMap.PartyTheProfileOf} ${lookupPerson.personalTitle} ${lookupPerson.firstName} ${lookupPerson.middleName} ${lookupPerson.lastName} ${lookupPerson.suffix} ${lookupGroup.groupName} [${partyId}]"/> + <decorator-section-include name="body"/> + </widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="CommonCalendarDecorator"> <section> <widgets> @@ -112,6 +146,7 @@ <if-compare field-name="communicationEvent.partyIdTo" operator="equals" value="${userLogin.partyId}"/> </or> </and> + <if-empty field-name="communicationEvent"/><!-- new one --> </or> </condition> <widgets> @@ -241,9 +276,10 @@ <section> <actions> <set field="headerItem" value="preferences"/> - <service service-name="getUserPreferenceGroup" result-map-name="preferences"> - <field-map field-name="userPrefGroupId" value="MyPage"/> - </service> + <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}"> @@ -260,10 +296,6 @@ <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" @@ -280,10 +312,6 @@ <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" @@ -300,10 +328,6 @@ <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" @@ -320,10 +344,6 @@ <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" Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml?rev=674250&r1=674249&r2=674250&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Sat Jul 5 19:50:32 2008 @@ -27,11 +27,11 @@ </condition> <link target="main"/> </menu-item> - <menu-item name="myProfile" title="${uiLabelMap.MyProfile}"> + <menu-item name="viewprofile" title="${uiLabelMap.MyProfile}"> <condition> <not><if-empty field-name="userLogin"/></not> </condition> - <link target="/partymgr/control/viewprofile?partyId=${userLogin.partyId}" url-mode="inter-app" target-window="_BLANK"/> + <link target="viewprofile?partyId=${userLogin.partyId}"/> </menu-item> <menu-item name="myCommunications" title="${uiLabelMap.MyCommunications}"> <condition> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=674250&r1=674249&r2=674250&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Sat Jul 5 19:50:32 2008 @@ -40,7 +40,7 @@ </actions> <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"> + navigation-menu-name="MyTimesheetMenu" collapsible="true" name="timesheet"> <include-menu name="MyTimesheetMenu" location="component://mypage/widget/MyPageMenus.xml"/> <section> <condition> |
Free forum by Nabble | Edit this page |