Commit 92931cd6 authored by benjaminParisel's avatar benjaminParisel Committed by abirembaut

feat(info): Make page information more clearer (#2515)

* edit tooltip for button show popup
* Cut page|form on display name default value
* Update rest API message
* replace text when no rest api call is found

Covers [BS-18917](https://bonitasoft.atlassian.net/browse/BS-18917)
parent 340f9a7a
......@@ -27,6 +27,7 @@ import static org.bonitasoft.web.designer.controller.ResponseHeadersHelper.getMo
import java.util.List;
import java.util.Locale;
import java.util.UUID;
import java.util.stream.Collectors;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
......@@ -240,7 +241,7 @@ public class PageResource extends AssetResource<Page> {
resources.addAll(authRulesCollector.visit(page));
return resources;
return resources.stream().distinct().collect(Collectors.toList());
}
}
......@@ -57,7 +57,7 @@ public class Page extends AbstractPage implements HasUUID {
@JsonView({JsonViewPersistence.class})
public String getDisplayName() {
return "".equals(displayName) ? this.getName().concat(" ").concat(this.type) : displayName;
return "".equals(displayName) ? this.getName() : displayName;
}
......
......@@ -20,7 +20,7 @@
ng-trim="false"
required>
<button type="button" id="metadata" ng-if="vm.page.type === 'page' || vm.page.type === 'form' || vm.page.type === 'layout'" class="btn btn-bonita-primary" ng-click="vm.editMetadata(vm.page)"
uib-tooltip="{{ 'Edit ' + vm.page.type + ' information' | translate }}" tooltip-placement="bottom" tooltip-popup-delay="300">
uib-tooltip="{{ vm.page.type + ' information' | translate }}" tooltip-placement="bottom" tooltip-popup-delay="300">
<i class="ui-icon ui-tags"></i>
</button>
<div class="btn-group" uib-dropdown>
......
......@@ -30,21 +30,21 @@
</div>
<div class="form-group" ng-if="ctrl.type.key === 'page' || ctrl.type.key === 'form'">
<label class="control-label" for="type" tranlate>Type</label>
<i class="fa fa-info-circle" uib-tooltip="{{'You can change the type to be able to use this artifact as a process form or as an application page.' | translate}}" tooltip-placement="right"></i>
<i id="type" class="fa fa-info-circle" uib-tooltip="{{'You can change the type to be able to use this artifact as a process form or as an application page.' | translate}}" tooltip-placement="right"></i>
<div class="radio" ng-repeat="type in ctrl.types">
<label><input type="radio" name="type" id="type-{{type.key}}" ng-model="ctrl.type" ng-value="type">{{type.value | translate}}</label>
</div>
</div>
<br/>
<h4 translate>Resources
<i class="fa fa-info-circle" uib-tooltip="{{'List of Bonita REST API calls made by the page. As a summary.' | translate}}" tooltip-placement="right"></i>
<h4 translate>Bonita REST API calls
<i class="fa fa-info-circle" uib-tooltip="{{'Summary of the Bonita REST API calls made by the page.' | translate}}" tooltip-placement="right"></i>
</h4>
<div class="form-group">
<ul>
<li ng-repeat=" resource in ctrl.resources track by $index">
{{resource }}
</li>
<li ng-show="!ctrl.resources.length" translate>No resources used</li>
<li ng-show="!ctrl.resources.length" translate>No Bonita REST API calls.</li>
</ul>
</p>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment