[ofbiz-plugins] branch trunk updated: Improved: Add 'controlPath' attribute to 'ofbizUrl' freemarker macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-plugins] branch trunk updated: Improved: Add 'controlPath' attribute to 'ofbizUrl' freemarker macro

James Yong-2
This is an automated email from the ASF dual-hosted git repository.

jamesyong pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 7cbc4b6  Improved: Add 'controlPath' attribute to 'ofbizUrl' freemarker macro
7cbc4b6 is described below

commit 7cbc4b6d79a59662679f3bc2f98d9efe2e303b23
Author: James Yong <[hidden email]>
AuthorDate: Sun Jan 12 22:34:39 2020 +0800

    Improved: Add 'controlPath' attribute to 'ofbizUrl' freemarker macro
   
    (OFBIZ-11317)
   
    Adding the controlPath attribute to allow the controls by ofbizUrl to support uri to other OFBiz web application.
   
    Thanks: Jacques for the review
---
 ecommerce/template/request/ViewRequestItemInfo.ftl |  2 +-
 ecommerce/template/survey/GenericResult.ftl        |  2 +-
 projectmgr/template/survey/ListSurveys.ftl         |  2 +-
 scrum/template/includes/DemoTest.ftl               | 20 ++++++++++----------
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/ecommerce/template/request/ViewRequestItemInfo.ftl b/ecommerce/template/request/ViewRequestItemInfo.ftl
index 0adfc34..eaef562 100644
--- a/ecommerce/template/request/ViewRequestItemInfo.ftl
+++ b/ecommerce/template/request/ViewRequestItemInfo.ftl
@@ -51,7 +51,7 @@ under the License.
                         <div>
                             ${(product.internalName)!}&nbsp;
                             <#if showRequestManagementLinks??>
-                                <a href="/catalog/control/EditProduct?productId=${requestItem.productId!}" class="buttontext">${requestItem.productId!}</a>
+                                <a href="<@ofbizUrl controlPath="/catalog/control">EditProduct?productId=${requestItem.productId!}</@ofbizUrl>" class="buttontext">${requestItem.productId!}</a>
                             <#else>
                                 <a href="<@ofbizUrl>product?product_id=${requestItem.productId!}</@ofbizUrl>" class="buttontext">${requestItem.productId!}</a>
                             </#if>
diff --git a/ecommerce/template/survey/GenericResult.ftl b/ecommerce/template/survey/GenericResult.ftl
index 5c978a0..d7bdef7 100644
--- a/ecommerce/template/survey/GenericResult.ftl
+++ b/ecommerce/template/survey/GenericResult.ftl
@@ -99,7 +99,7 @@ under the License.
           <#elseif "CONTENT" == surveyQuestionAndAppl.surveyQuestionTypeId>
             <#if answer.contentId?has_content>
               <#assign content = answer.getRelatedOne("Content", false)>
-              <a href="/content/control/img?imgId=${content.dataResourceId}" class="buttontext">${answer.contentId}</a>&nbsp;-&nbsp;${content.contentName!}
+              <a href="<@ofbizUrl controlPath="/content/control">img?imgId=${content.dataResourceId}</@ofbizUrl>" class="buttontext">${answer.contentId}</a>&nbsp;-&nbsp;${content.contentName!}
             </#if>
           <#elseif "OPTION" == surveyQuestionAndAppl.surveyQuestionTypeId>
             <#assign options = surveyQuestionAndAppl.getRelated("SurveyQuestionOption", null, sequenceSort, false)!>
diff --git a/projectmgr/template/survey/ListSurveys.ftl b/projectmgr/template/survey/ListSurveys.ftl
index 49abce2..ee027fc 100644
--- a/projectmgr/template/survey/ListSurveys.ftl
+++ b/projectmgr/template/survey/ListSurveys.ftl
@@ -41,7 +41,7 @@ under the License.
                 <#assign survey = productStoreSurveyAppl.getRelatedOne("Survey", false)>
                 <tr>
                   <form method="post" action="<@ofbizUrl>updateWorkEffortSurveyAppl</@ofbizUrl>" name="editWorkEffortSurveyAppl_${workEffortSurveyAppl_index}">
-                  <td><a href="/content/control/EditSurvey?surveyId=${workEffortSurveyAppl.surveyId!}" class="buttontext">${workEffortSurveyAppl.surveyId!} - ${survey.surveyName!}</a></td>
+                  <td><a href="<@ofbizUrl controlPath="/content/control">EditSurvey?surveyId=${workEffortSurveyAppl.surveyId!}</@ofbizUrl>" class="buttontext">${workEffortSurveyAppl.surveyId!} - ${survey.surveyName!}</a></td>
                   <td>${workEffortSurveyAppl.fromDate!}</td>
                   <td>
                     <@htmlTemplate.renderDateTimeField name="thruDate" event="" action="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="${(workEffortSurveyAppl.thruDate)!}" size="25" maxlength="30" id="thruDate_${workEffortSurveyAppl_index}" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmNam [...]
diff --git a/scrum/template/includes/DemoTest.ftl b/scrum/template/includes/DemoTest.ftl
index ee2ffd7..36c5121 100644
--- a/scrum/template/includes/DemoTest.ftl
+++ b/scrum/template/includes/DemoTest.ftl
@@ -35,7 +35,7 @@ When you click on the User Login ID,the system will login to the Scrum Component
     </tr>
     <tr>
         <td>
-        <a href="/scrum/control/main?USERNAME=scrumadmin&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">Scrum Admin</a><br/>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=scrumadmin&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">Scrum Admin</a><br/>
         </td>
         <td>
             <b>Scrum Admin</b><br/>
@@ -44,7 +44,7 @@ When you click on the User Login ID,the system will login to the Scrum Component
     </tr>
     <tr>
         <td>
-        <a href="/scrum/control/main?USERNAME=scrummaster&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">Scrum Master</td>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=scrummaster&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">Scrum Master</td>
         <td>
             <b>Scrum Master</b><br/>
             The Scrummaster can create the project and sprint and will put the product backlog into the sprint,<br/>
@@ -53,8 +53,8 @@ When you click on the User Login ID,the system will login to the Scrum Component
     </tr>
     <tr>
         <td>
-        <a href="/scrum/control/main?USERNAME=productowner&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">Product Owner</a><br/>
-        <a href="/scrum/control/main?USERNAME=productowner2&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">Product Owner2</a><br/>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=productowner&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">Product Owner</a><br/>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=productowner2&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">Product Owner2</a><br/>
         </td>
         <td>
             <b>Product Owner</b><br/>
@@ -64,10 +64,10 @@ When you click on the User Login ID,the system will login to the Scrum Component
     </tr>
     <tr>
         <td>
-        <a href="/scrum/control/main?USERNAME=scrumteam1&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">Scrumteam1</a><br/>
-        <a href="/scrum/control/main?USERNAME=scrumteam2&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">Scrumteam2</a><br/>
-        <a href="/scrum/control/main?USERNAME=scrumteam3&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">Scrumteam3</a><br/>
-        <a href="/scrum/control/main?USERNAME=scrumteam4&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">Scrumteam4</a><br/>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=scrumteam1&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">Scrumteam1</a><br/>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=scrumteam2&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">Scrumteam2</a><br/>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=scrumteam3&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">Scrumteam3</a><br/>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=scrumteam4&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">Scrumteam4</a><br/>
         </td>
         <td>
             <b>Scrumteam</b><br/>
@@ -77,7 +77,7 @@ When you click on the User Login ID,the system will login to the Scrum Component
     </tr>
     <tr>
         <td>
-        <a href="/scrum/control/main?USERNAME=testadmin&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">Testadmin</a>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=testadmin&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">Testadmin</a>
         </td>
         <td>
             <b>Opentest</b><br/>
@@ -88,7 +88,7 @@ When you click on the User Login ID,the system will login to the Scrum Component
     </tr>
     <tr>
         <td>
-        <a href="/scrum/control/main?USERNAME=DemoStakeholder&PASSWORD=ofbiz&JavaScriptEnabled=Y" class="buttontext">DemoStakeholder</a>
+        <a href="<@ofbizUrl controlPath="/scrum/control">main?USERNAME=DemoStakeholder&PASSWORD=ofbiz&JavaScriptEnabled=Y</@ofbizUrl>" class="buttontext">DemoStakeholder</a>
         </td>
         <td>
             <b>The Stakeholder</b><br/>