#252: info when no route model available

This commit is contained in:
Benjamin Gamard 2018-10-28 17:18:50 +01:00
parent 4910dfd527
commit feb3d15968
2 changed files with 7 additions and 2 deletions

View File

@ -127,7 +127,8 @@
"full_name": "<strong>{{ name }}</strong> started on {{ create_date | date }}", "full_name": "<strong>{{ name }}</strong> started on {{ create_date | date }}",
"cancel_workflow": "Cancel the current workflow", "cancel_workflow": "Cancel the current workflow",
"cancel_workflow_title": "Cancel the workflow", "cancel_workflow_title": "Cancel the workflow",
"cancel_workflow_message": "Do you really want to cancel the current workflow?" "cancel_workflow_message": "Do you really want to cancel the current workflow?",
"no_workflow": "You cannot start any workflow on this document."
}, },
"permissions": { "permissions": {
"permissions": "Permissions", "permissions": "Permissions",

View File

@ -6,7 +6,11 @@
</p> </p>
<p class="well-sm">{{ 'document.view.workflow.message' | translate }}</p> <p class="well-sm">{{ 'document.view.workflow.message' | translate }}</p>
<form name="startWorkflowForm" class="form-horizontal" novalidate ng-show="!document.route_step"> <p class="well-sm text-danger" ng-show="!document.route_step && routemodels.length == 0">
<strong translate="document.view.workflow.no_workflow"></strong>
</p>
<form name="startWorkflowForm" class="form-horizontal" novalidate ng-show="!document.route_step && routemodels.length > 0">
<div class="form-group" ng-class="{ 'has-error': !startWorkflowForm.routemodel.$valid && startWorkflowForm.$dirty }"> <div class="form-group" ng-class="{ 'has-error': !startWorkflowForm.routemodel.$valid && startWorkflowForm.$dirty }">
<label for="inputRouteModel" class="col-sm-3"> <label for="inputRouteModel" class="col-sm-3">
{{ 'document.view.workflow.workflow_start_label' | translate }} {{ 'document.view.workflow.workflow_start_label' | translate }}