You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mb...@apache.org on 2017/10/18 09:05:42 UTC
svn commit: r1812479 - in /ofbiz/ofbiz-framework/trunk/framework/webtools:
groovyScripts/labelmanager/LabelManager.groovy
template/labelmanager/ViewLabels.ftl
Author: mbrohl
Date: Wed Oct 18 09:05:42 2017
New Revision: 1812479
URL: http://svn.apache.org/viewvc?rev=1812479&view=rev
Log:
Improved: Label Manager: Have totals shown at the top of the search
results.
(OFBIZ-6457)
Thanks Pierre Smits for reporting and providing the initial patch,
Aditya Sharma for the revised patch.
Modified:
ofbiz/ofbiz-framework/trunk/framework/webtools/groovyScripts/labelmanager/LabelManager.groovy
ofbiz/ofbiz-framework/trunk/framework/webtools/template/labelmanager/ViewLabels.ftl
Modified: ofbiz/ofbiz-framework/trunk/framework/webtools/groovyScripts/labelmanager/LabelManager.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/groovyScripts/labelmanager/LabelManager.groovy?rev=1812479&r1=1812478&r2=1812479&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webtools/groovyScripts/labelmanager/LabelManager.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webtools/groovyScripts/labelmanager/LabelManager.groovy Wed Oct 18 09:05:42 2017
@@ -24,7 +24,8 @@ LabelManagerFactory factory = LabelManag
context.factory = factory
factory.findMatchingLabels(parameters.labelComponentName, parameters.labelFileName, parameters.labelKey, parameters.labelLocaleName, "Y".equals(parameters.onlyNotUsedLabels))
context.labels = factory.getLabels()
-context.labelsList = factory.getLabelsList()
+allLabels = factory.getLabelsList();
+context.labelsList = allLabels;
context.localesFound = factory.getLocalesFound()
context.filesFound = factory.getFilesFound()
context.componentNamesFound = factory.getComponentNamesFound()
@@ -37,3 +38,5 @@ if ("Y".equals(parameters.onlyNotUsedLab
context.references = references
context.referencesList = references.keySet()
}
+
+context.totalLabelsCount = allLabels.size();
\ No newline at end of file
Modified: ofbiz/ofbiz-framework/trunk/framework/webtools/template/labelmanager/ViewLabels.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/template/labelmanager/ViewLabels.ftl?rev=1812479&r1=1812478&r2=1812479&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webtools/template/labelmanager/ViewLabels.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webtools/template/labelmanager/ViewLabels.ftl Wed Oct 18 09:05:42 2017
@@ -16,7 +16,11 @@ KIND, either express or implied. See th
specific language governing permissions and limitations
under the License.
-->
-<div class="screenlet-body">
+ <table class="basic-table hover-bar" cellspacing="3">
+ <tr class="header-row">
+ <td>${uiLabelMap.WebtoolsLabelStatsTotal}: ${totalLabelsCount!}</td>
+ </tr>
+ </table>
<table class="basic-table hover-bar" cellspacing="3">
<tr class="header-row">
<td>${uiLabelMap.WebtoolsLabelManagerRow}</td>
@@ -48,14 +52,12 @@ under the License.
<#if parameters.searchLabels??>
<#assign rowNum = "2">
<#assign rowNumber = 1>
- <#assign totalLabels = 0>
<#assign missingLabels = 0>
<#assign existingLabels = 0>
<#assign previousKey = "">
<#list labelsList as labelList>
<#assign label = labels.get(labelList)>
<#assign labelKey = label.labelKey>
- <#assign totalLabels = totalLabels + 1>
<#if references??>
<#assign referenceNum = 0>
<#assign reference = references.get(labelKey)!>
@@ -117,7 +119,7 @@ under the License.
</#list>
<tr class="header-row">
<td/>
- <td>${uiLabelMap.WebtoolsLabelStatsTotal}: ${totalLabels}</td>
+ <td>${uiLabelMap.WebtoolsLabelStatsTotal}: ${totalLabelsCount!}</td>
<td colspan="2">
${uiLabelMap.WebtoolsLabelStatsExist}:<br />
${uiLabelMap.WebtoolsLabelStatsMissing}:
@@ -129,4 +131,3 @@ under the License.
</tr>
</#if>
</table>
-</div>