Files
ofbiz-framework/framework/webtools/widget/LabelManagerScreens.xml
T
Jacques Le Roux c750a95810 Fixes "The "Only Not Used Labels" option of the Label Manager is broken" OFBIZ-8114
Simply replaces the parenthesis in ServiceUtil.getResource() by 2 spaces when parsing files with getLabelsFromJavaFiles() and getLabelsFromFtlFiles(). 
ServiceUtil.getResource() breaks the parsing
Note: no occurrences of ServiceUtil.getResource() yet in FTL files, and only 16 in Java files.

Also replaces "script" by "minilang" in getLabelsFromSimpleMethodFiles()

This adds a getResourceRegex  in a new webtools.properties files. This property
* Allow to remove this string from files when parsing with Label Manager, else it breaks 
* Moreover the string can't be in the LabelReferences.java file, to avoid side effects

I have also increased the transaction-timeout of the screen "SearchLabels" to 600. 
Because when using the "Only Not Used Labels" option the 1st pass can be long. 10 min should plenty enough, even on old machines. Not blocking anyway, just a bad stack trace in log
I'm sorry you will see a lot of false changes because the LabelManagerScreens.xml had no svn:properties at all, here they are now.


We have 5237 "Not Used Labels". I wondered if they were all real, I just checked some an indeed, they were not used. 
But there are also a huge bunch of *.description.* labels which certainly make sense. I'll remove them from the "Only Not Used Labels" result in another Jira I'll create

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759457 13f79535-47bb-0310-9956-ffa450edef68
2016-09-06 16:38:14 +00:00

130 lines
6.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="SearchLabels" transaction-timeout="600">
<section>
<condition>
<if-has-permission permission="LABEL_MANAGER_VIEW"/>
</condition>
<actions>
<set field="titleProperty" value="WebtoolsLabelManagerFindLabels"/>
<set field="tabButtonItem" value="labels"/>
<script location="component://webtools/groovyScripts/labelmanager/LabelManager.groovy"/>
</actions>
<widgets>
<decorator-screen name="CommonArtifactDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<platform-specific><html><html-template location="component://webtools/template/labelmanager/SearchLabels.ftl"/></html></platform-specific>
</decorator-section>
<decorator-section name="search-results">
<platform-specific><html><html-template location="component://webtools/template/labelmanager/ViewLabels.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
<!--
<screenlet id="ViewHardcodedLabelsPanel" title="${uiLabelMap.WebtoolsLabelManagerHardcoded}" collapsible="false">
<platform-specific><html><html-template location="component://webtools/template/labelmanager/ViewHardcodedLabels.ftl"/></html></platform-specific>
</screenlet>
-->
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.WebtoolsLabelManagerSecuryError}</label>
</fail-widgets>
</section>
</screen>
<screen name="UpdateLabel">
<section>
<condition>
<if-has-permission permission="LABEL_MANAGER_VIEW"/>
</condition>
<actions>
<set field="titleProperty" value="WebtoolsLabelManagerAddNew"/>
<script location="component://webtools/groovyScripts/labelmanager/UpdateManager.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<container style="h1">
<label text="${uiLabelMap.WebtoolsLabelManagerAddNew}"/>
</container>
<platform-specific><html><html-template location="component://webtools/template/labelmanager/UpdateLabel.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.WebtoolsLabelManagerSecuryError}</label>
</fail-widgets>
</section>
</screen>
<screen name="ViewReferences">
<section>
<condition>
<if-has-permission permission="LABEL_MANAGER_VIEW"/>
</condition>
<actions>
<set field="titleProperty" value="WebtoolsLabelManagerViewReferences"/>
<script location="component://webtools/groovyScripts/labelmanager/ViewReferences.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://webtools/template/labelmanager/ViewReferences.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.WebtoolsLabelManagerSecuryError}</label>
</fail-widgets>
</section>
</screen>
<screen name="ViewFile">
<section>
<condition>
<if-has-permission permission="LABEL_MANAGER_VIEW"/>
</condition>
<actions>
<set field="titleProperty" value="WebtoolsLabelManagerViewFile"/>
<script location="component://webtools/groovyScripts/labelmanager/ViewFile.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="ViewFilePanel" title="${uiLabelMap.WebtoolsLabelManagerViewFile}">
<platform-specific><html><html-template location="component://webtools/template/labelmanager/ViewFile.ftl"/></html></platform-specific>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.WebtoolsLabelManagerSecuryError}</label>
</fail-widgets>
</section>
</screen>
</screens>