Modified: ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/SearchLabels.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/SearchLabels.ftl?rev=776988&r1=776987&r2=776988&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/SearchLabels.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/SearchLabels.ftl Thu May 21 07:26:22 2009 @@ -20,16 +20,16 @@ <form action="<@ofbizUrl>SearchLabels</@ofbizUrl>" method="post"> <table class="basic-table"> <tr> - <td align="right" class="label"> + <td class="label"> ${uiLabelMap.WebtoolsLabelManagerKey} </td> - <td align="left"> + <td> <input type="text" name="labelKey" size="30" maxlength="70" value="${parameters.labelKey?if_exists}"> </td> - <td align="right" class="label"> + <td class="label"> ${uiLabelMap.WebtoolsLabelManagerComponentName} </td> - <td align="left"> + <td> <select name="labelComponentName"> <option value="">${uiLabelMap.WebtoolsLabelManagerAllComponents}</option> <#list componentNamesFound as componentNameFound> @@ -39,22 +39,22 @@ </td> </tr> <tr> - <td align="right" class="label"> + <td class="label"> ${uiLabelMap.WebtoolsLabelManagerFileName} </td> - <td align="left"> + <td> <select name="labelFileName"> <option value="">${uiLabelMap.WebtoolsLabelManagerAllFiles}</option> - <#assign fileNames = fileNamesFound.keySet()> - <#list fileNames as fileName> + <#list filesFound as fileInfo> + <#assign fileName = fileInfo.getFileName()/> <option <#if parameters.labelFileName?exists && parameters.labelFileName == fileName>selected="selected"</#if> value="${fileName}">${fileName}</option> </#list> </select> </td> - <td align="right" class="label"> + <td class="label"> ${uiLabelMap.WebtoolsLabelManagerLocale} </td> - <td align="left"> + <td> <select name="labelLocaleName"> <option value="">${uiLabelMap.WebtoolsLabelManagerAllLocales}</option> <#list localesFound as localeFound> @@ -70,16 +70,16 @@ </td> </tr> <tr> - <td align="right" class="label"> + <td class="label"> ${uiLabelMap.WebtoolsLabelManagerOnlyNotUsedLabels} </td> - <td align="left"> + <td> <input type="checkbox" name="onlyNotUsedLabels" value="Y" <#if parameters.onlyNotUsedLabels?exists && parameters.onlyNotUsedLabels == "Y">checked</#if>> </td> - <td align="right" class="label"> + <td class="label"> ${uiLabelMap.WebtoolsLabelManagerOnlyMissingTranslations} </td> - <td align="left"> + <td> <input type="checkbox" name="onlyMissingTranslations" value="Y" <#if parameters.onlyMissingTranslations?exists && parameters.onlyMissingTranslations == "Y">checked</#if>> </td> </tr> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/UpdateLabel.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/UpdateLabel.ftl?rev=776988&r1=776987&r2=776988&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/UpdateLabel.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/UpdateLabel.ftl Thu May 21 07:26:22 2009 @@ -18,19 +18,19 @@ --> <script language="JavaScript" type="text/javascript"> function updateAndSaveLabel() { - document.UpdateLabelForm.action="<@ofbizUrl>UpdateAndSaveLabelKey</@ofbizUrl>"; + document.UpdateLabelForm.action="<@ofbizUrl>SaveLabelsToXmlFile</@ofbizUrl>"; document.UpdateLabelForm.submit(); } </script> <div class="screenlet-body"> - <form method="post" action="<@ofbizUrl>UpdateLabelKey</@ofbizUrl>" name="UpdateLabelForm"> + <form method="post" action="<@ofbizUrl>SaveLabelsToXmlFile</@ofbizUrl>" name="UpdateLabelForm"> <table class="basic-table" cellspacing="3"> <tr> <td colspan="2"> </td> </tr> <tr> - <td align="right"><b>${uiLabelMap.WebtoolsLabelManagerKey}</b></td> - <td align="left"> + <td class="label">${uiLabelMap.WebtoolsLabelManagerKey}</td> + <td> <#if parameters.sourceKey?exists> ${parameters.sourceKey} <input type="hidden" name="key" value="${parameters.sourceKey}"> @@ -42,21 +42,21 @@ </td> </tr> <tr> - <td align="right"><b>${uiLabelMap.WebtoolsLabelManagerKeyComment}</b></td> - <td align="left"> + <td class="label">${uiLabelMap.WebtoolsLabelManagerKeyComment}</td> + <td> <input type="text" name="keyComment" size="70" value="${parameters.sourceKeyComment?if_exists}"> </td> </tr> <tr> - <td align="right"><b>${uiLabelMap.WebtoolsLabelManagerFileName}</b></td> - <td align="left"> + <td class="label">${uiLabelMap.WebtoolsLabelManagerFileName}</td> + <td> <#if parameters.sourceFileName?exists> ${parameters.sourceFileName} <input type="hidden" name="fileName" value="${parameters.sourceFileName}"> <#else> <select name="fileName"> - <#assign fileNames = fileNamesFound.keySet()> - <#list fileNames as fileName> + <#list filesFound as fileInfo> + <#assign fileName = fileInfo.file.getName()/> <option <#if parameters.fileName?exists && parameters.fileName == fileName>selected="selected"</#if> value="${fileName}">${fileName}</option> </#list> </select> @@ -67,9 +67,8 @@ <td colspan="2" align="center"> <input type="submit" value="${uiLabelMap.CommonBack}"/> <#if parameters.sourceKey?exists> - <input type="submit" value="${uiLabelMap.CommonUpdate}" name="confirm"/> <input type="submit" value="${uiLabelMap.WebtoolsLabelManagerRemove}" name="removeLabel"/> - <input type="submit" value="${uiLabelMap.WebtoolsLabelManagerUpdateAndSave}" name="confirm" onclick="javascript:updateAndSaveLabel()"/> + <input type="submit" value="${uiLabelMap.CommonUpdate}" name="confirm" onclick="javascript:updateAndSaveLabel()"/> <#else> <input type="submit" value="${uiLabelMap.CommonAdd}" name="confirm"/> <input type="submit" value="${uiLabelMap.WebtoolsLabelManagerUpdateAndSave}" name="confirm" onclick="javascript:updateAndSaveLabel()"/> @@ -99,13 +98,13 @@ <#if "ar.iw"?contains(langAttr?substring(0, 2))> <#assign langDir = "rtl"> </#if> - <td align="right" lang="${langAttr}" dir="${langDir}"> - <b>${locale.getDisplayName(locale)}</b> + <td lang="${langAttr}" dir="${langDir}" class="label"> + ${locale.getDisplayName(locale)} </td> <#else> - <td align="right"><b>${localeFound}</b></td> + <td class="label">${localeFound}</td> </#if> - <td align="left"> + <td> <input type="hidden" name="localeNames" value="${localeFound}"> <input type="text" name="localeValues" size="70" value="${labelValue?if_exists}"> <input type="text" name="localeComments" size="70" value="${labelComment?if_exists}"> @@ -117,9 +116,8 @@ <td colspan="2" align="center"> <input type="submit" value="${uiLabelMap.CommonBack}"/> <#if parameters.sourceKey?exists> - <input type="submit" value="${uiLabelMap.CommonUpdate}" name="confirm"/> <input type="submit" value="${uiLabelMap.WebtoolsLabelManagerRemove}" name="removeLabel"/> - <input type="submit" value="${uiLabelMap.WebtoolsLabelManagerUpdateAndSave}" name="confirm" onclick="javascript:updateAndSaveLabel()"/> + <input type="submit" value="${uiLabelMap.CommonUpdate}" name="confirm" onclick="javascript:updateAndSaveLabel()"/> <#else> <input type="submit" value="${uiLabelMap.CommonAdd}" name="confirm"/> <input type="submit" value="${uiLabelMap.WebtoolsLabelManagerUpdateAndSave}" name="confirm" onclick="javascript:updateAndSaveLabel()"/> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewFile.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewFile.ftl?rev=776988&r1=776987&r2=776988&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewFile.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewFile.ftl Thu May 21 07:26:22 2009 @@ -19,18 +19,18 @@ <div class="screenlet-body"> <table class="basic-table" cellspacing="3"> <tr> - <td colspan="2"><b>${uiLabelMap.WebtoolsLabelManagerKey}</b> ${parameters.sourceKey?if_exists}</td> + <td class="label">${uiLabelMap.WebtoolsLabelManagerKey}</td> + <td>${parameters.sourceKey?if_exists}</td> </tr> <tr> - <td colspan="2"><b>${uiLabelMap.WebtoolsLabelManagerFileName}</b> ${parameters.fileName?if_exists}</td> + <td class="label">${uiLabelMap.WebtoolsLabelManagerFileName}</td> + <td>${parameters.fileName?if_exists}</td> </tr> <tr> <td colspan="2"> </td> </tr> - <#list rows as row> - <tr> - <td colspan="2">${row?if_exists}</td> - </tr> - </#list> </table> + <textarea rows="${rows}}" cols="150" disabled="disabled"> +${fileString} + </textarea> </div> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewHardcodedLabels.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewHardcodedLabels.ftl?rev=776988&r1=776987&r2=776988&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewHardcodedLabels.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewHardcodedLabels.ftl Thu May 21 07:26:22 2009 @@ -1,3 +1,21 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> <div class="screenlet-body"> <#if parameters.searchLabels?exists> <table class="basic-table hover-bar" cellspacing="3"> @@ -10,7 +28,7 @@ <#assign rowNum = "2"> <#list referencesList as reference> <#assign labelFound = 'N'> - <#assign refNum = Static["org.ofbiz.webtools.labelmanager.LabelManagerFactory"].getLabelReferenceFile(reference)> + <#assign refNum = factory.getLabelReferenceFile(reference)> <#if (refNum > 0)> <tr <#if rowNum == "1">class="alternate-row"</#if>> <td>${rowNumber}</td> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewLabels.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewLabels.ftl?rev=776988&r1=776987&r2=776988&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewLabels.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewLabels.ftl Thu May 21 07:26:22 2009 @@ -17,9 +17,8 @@ under the License. --> <div class="screenlet-body"> - <a href="<@ofbizUrl>UpdateLabel?fileName=${parameters.labelFileName?if_exists}</@ofbizUrl>" class="buttontext">${uiLabelMap.WebtoolsLabelManagerAddNew}</a> <form name= "SaveLabelsToXmlFile" method= "post" action= "<@ofbizUrl>SaveLabelsToXmlFile</@ofbizUrl>"> - <input type= "hidden" name= "labelFileName" value= "${parameters.labelFileName?if_exists}"> + <input type= "hidden" name= "fileName" value= "${parameters.labelFileName?if_exists}"> <a href="javascript:document.SaveLabelsToXmlFile.submit()" class="buttontext">${uiLabelMap.WebtoolsLabelManagerUpdateFile}</a> </form> <table class="basic-table hover-bar" cellspacing="3"> @@ -57,10 +56,12 @@ <#list labelsList as labelList> <#assign label = labels.get(labelList)> <#assign labelKey = label.labelKey> - <#assign referenceNum = 0> - <#assign reference = references.get(labelKey)?if_exists> - <#if reference?exists && reference?has_content> - <#assign referenceNum = reference.size()> + <#if references?exists> + <#assign referenceNum = 0> + <#assign reference = references.get(labelKey)?if_exists> + <#if reference?exists && reference?has_content> + <#assign referenceNum = reference.size()> + </#if> </#if> <#assign showLabel = true> <#if parameters.onlyMissingTranslations?exists && parameters.onlyMissingTranslations == "Y" @@ -94,7 +95,7 @@ <td>${rowNumber}</td> <td><a href="<@ofbizUrl>UpdateLabel?sourceKey=${labelKey}&sourceFileName=${label.fileName}&sourceKeyComment=${label.labelKeyComment?if_exists}</@ofbizUrl>" <#if previousKey == labelKey>class="submenutext"</#if>>${label.labelKey}</a></td> <td>${label.fileName}</td> - <td align="center"><#if (referenceNum > 0)><a href="<@ofbizUrl>ViewReferences?sourceKey=${labelKey}</@ofbizUrl>">${referenceNum}</a><#else>${referenceNum}</#if></td> + <td><a href="<@ofbizUrl>ViewReferences?sourceKey=${labelKey}&labelFileName=${label.fileName}</@ofbizUrl>">${uiLabelMap.WebtoolsLabelManagerReferences}</a></td> <#list localesFound as localeFound> <#assign labelVal = label.getLabelValue(localeFound)?if_exists> <#assign showLocale = true> Modified: ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewReferences.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewReferences.ftl?rev=776988&r1=776987&r2=776988&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewReferences.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/labelmanager/ViewReferences.ftl Thu May 21 07:26:22 2009 @@ -16,14 +16,14 @@ specific language governing permissions and limitations under the License. --> -<div class="screenlet-body"> - <form method="post" action="<@ofbizUrl></@ofbizUrl>" name="ViewReferencesForm"> - <table class="basic-table" cellspacing="3"> +<h1>${uiLabelMap.WebtoolsLabelManagerViewReferences}</h1> + <table class="basic-table" cellspacing="0"> <tr> - <td colspan="2"><b>${uiLabelMap.WebtoolsLabelManagerKey}</b> ${parameters.sourceKey?if_exists}</td> + <td class="label">${uiLabelMap.WebtoolsLabelManagerKey}</td> + <td colspan="2">${parameters.sourceKey?if_exists}</td> </tr> <tr> - <td colspan="2"> </td> + <td colspan="3"> </td> </tr> <tr class="header-row"> <td>${uiLabelMap.WebtoolsLabelManagerRow}</td> @@ -33,15 +33,17 @@ <#if parameters.sourceKey?exists && parameters.sourceKey?has_content> <#assign rowNum = "2"> <#assign rowNumber = 1> + <#assign totalRefs = 0/> <#assign reference = references.get(parameters.sourceKey)?if_exists> <#if reference?exists && reference?has_content> <#assign entries = reference.entrySet()> <#list entries as entry> - <tr> + <tr <#if rowNum == "1">class="alternate-row"</#if>> <td>${rowNumber}</td> <td><a href="<@ofbizUrl>ViewFile?fileName=${entry.getKey()}&sourceKey=${parameters.sourceKey?if_exists}</@ofbizUrl>">${entry.getKey()}</a></td> <td>${entry.getValue()}</td> - </tr> + </tr> + <#assign totalRefs = totalRefs + entry.getValue()/> <#if rowNum == "2"> <#assign rowNum = "1"> <#else> @@ -49,8 +51,11 @@ </#if> <#assign rowNumber = rowNumber + 1> </#list> + <tr <#if rowNum == "1">class="alternate-row"</#if>> + <td> </td> + <td><b>${uiLabelMap.CommonTotal}</b></td> + <td>${totalRefs}</td> + </tr> </#if> </#if> </table> - </form> -</div> Modified: ofbiz/trunk/framework/webtools/widget/LabelManagerScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/LabelManagerScreens.xml?rev=776988&r1=776987&r2=776988&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/LabelManagerScreens.xml (original) +++ ofbiz/trunk/framework/webtools/widget/LabelManagerScreens.xml Thu May 21 07:26:22 2009 @@ -20,27 +20,47 @@ <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + <screen name="SearchLabels"> <section> <condition> <if-has-permission permission="LABEL_MANAGER_VIEW"/> </condition> <actions> - <set field="titleProperty" value="WebtoolsLabelManager"/> + <set field="titleProperty" value="WebtoolsLabelManagerFindLabels"/> <script location="component://webtools/webapp/webtools/WEB-INF/actions/labelmanager/LabelManager.groovy"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <screenlet id="SearchLabelsPanel" title="${uiLabelMap.WebtoolsLabelManagerSearchBy}" collapsible="true"> - <platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/SearchLabels.ftl"/></html></platform-specific> - </screenlet> - <screenlet id="ViewLabelsPanel" title="${uiLabelMap.WebtoolsLabelManager}" collapsible="false"> - <platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/ViewLabels.ftl"/></html></platform-specific> - </screenlet> + <container style="h1"> + <label text="${uiLabelMap.WebtoolsLabelManagerFindLabels}"/> + </container> + <screenlet id="searchOptions" name="findScreenlet" collapsible="true" padded="false"> + <container style="screenlet-body"> + <container style="h2"> + <label text="${uiLabelMap.CommonSearchOptions}"/> + </container> + <container id="search-options"> + <platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/SearchLabels.ftl"/></html></platform-specific> + </container> + </container> + </screenlet> + <container style="screenlet"> + <container style="screenlet-body"> + <container style="h2"> + <label text="${uiLabelMap.CommonSearchResults}"/> + </container> + </container> + <container id="search-results"> + <platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/ViewLabels.ftl"/></html></platform-specific> + </container> + </container> + <!-- <screenlet id="ViewHardcodedLabelsPanel" title="${uiLabelMap.WebtoolsLabelManagerHardcoded}" collapsible="false"> <platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/ViewHardcodedLabels.ftl"/></html></platform-specific> </screenlet> + --> </decorator-section> </decorator-screen> </widgets> @@ -49,6 +69,7 @@ </fail-widgets> </section> </screen> + <screen name="UpdateLabel"> <section> <condition> @@ -61,9 +82,10 @@ <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <screenlet id="UpdateLabelPanel" title="${uiLabelMap.WebtoolsLabelManagerUpdate}"> + <container style="h1"> + <label text="${uiLabelMap.WebtoolsLabelManagerAddNew}"/> + </container> <platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/UpdateLabel.ftl"/></html></platform-specific> - </screenlet> </decorator-section> </decorator-screen> </widgets> @@ -72,6 +94,7 @@ </fail-widgets> </section> </screen> + <screen name="ViewReferences"> <section> <condition> @@ -79,14 +102,12 @@ </condition> <actions> <set field="titleProperty" value="WebtoolsLabelManagerViewReferences"/> - <script location="component://webtools/webapp/webtools/WEB-INF/actions/labelmanager/LabelManager.groovy"/> + <script location="component://webtools/webapp/webtools/WEB-INF/actions/labelmanager/ViewReferences.groovy"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <screenlet id="ViewReferencesPanel" title="${uiLabelMap.WebtoolsLabelManagerViewReferences}"> - <platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/ViewReferences.ftl"/></html></platform-specific> - </screenlet> + <platform-specific><html><html-template location="component://webtools/webapp/webtools/labelmanager/ViewReferences.ftl"/></html></platform-specific> </decorator-section> </decorator-screen> </widgets> @@ -95,6 +116,7 @@ </fail-widgets> </section> </screen> + <screen name="ViewFile"> <section> <condition> |
Free forum by Nabble | Edit this page |