CCM NG: Fixes for workflow, translations for Workflow widgets in ccm-cms

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4818 8810af33-2d31-482b-a856-94f89814c4df
pull/2/head
jensp 2017-06-27 09:37:55 +00:00
parent f1266b0b5d
commit 41dfa9ee08
4 changed files with 64 additions and 9 deletions

View File

@ -310,3 +310,20 @@ cms.ui.workflow.task.assigned=Your assigned tasks
cms.ui.workflow.task.assigned.none=You have no assigned tasks cms.ui.workflow.task.assigned.none=You have no assigned tasks
cms.ui.workflow.restart_stopped_workflow=Start workflow cms.ui.workflow.restart_stopped_workflow=Start workflow
cms.ui.content_item=Document cms.ui.content_item=Document
cms.ui.workflow=Workflow
cms.ui.workflow.delete_prompt=Are you sure you want to delete this workflow?
cms.ui.workflow.insufficient_privileges=You have insufficient privileges
cms.ui.workflow.no_users_were_selected=No users were selected.
cms.ui.workflow.task.approval_or_reject_required=Approval or rejection is required.
cms.ui.workflow.task.approve=Approve
cms.ui.workflow.task.approve_prompt=Approve this work?
cms.ui.workflow.task.assigned.lock_all=Lock all my tasks for this item
cms.ui.workflow.task.assigned.unlock_all=Unlock all my tasks for this item
cms.ui.workflow.task.comment.add=Add comment
cms.ui.workflow.task.finish=Finish task
cms.ui.workflow.task.item_title=Document title
cms.ui.workflow.task.locking_user=Locking User
cms.ui.workflow.task.reject=Reject
cms.ui.workflow.task.takeover=Take over
cms.ui.workflow.task.unlock=Unlock task
cms.ui.workflow.task.user.add=Assign user

View File

@ -307,3 +307,20 @@ cms.ui.workflow.task.assigned=Ihre zugeordneten Aufgaben
cms.ui.workflow.task.assigned.none=Sie haben keine zugeordneten Aufgaben cms.ui.workflow.task.assigned.none=Sie haben keine zugeordneten Aufgaben
cms.ui.workflow.restart_stopped_workflow=Arbeitsablauf starten cms.ui.workflow.restart_stopped_workflow=Arbeitsablauf starten
cms.ui.content_item=Dokument cms.ui.content_item=Dokument
cms.ui.workflow=Arbeitsablauf
cms.ui.workflow.delete_prompt=Sind Sie sicher, dass Sie diesen Arbeitsablauf l\u00f6schen wollen?
cms.ui.workflow.insufficient_privileges=Sie haben unzureichende Rechte
cms.ui.workflow.no_users_were_selected=Keine Benutzer ausgew\u00e4hlt
cms.ui.workflow.task.approval_or_reject_required=Bitte akzeptieren Sie die \u00c4nderungen oder weisen diese zur\u00fcck.
cms.ui.workflow.task.approve=Akzeptieren
cms.ui.workflow.task.approve_prompt=\u00c4nderungen akzeptieren?
cms.ui.workflow.task.assigned.lock_all=Alle meine Aufgaben zu diesem Punkt reservieren
cms.ui.workflow.task.assigned.unlock_all=Alle meine Aufgaben zu diesem Punkt freigeben
cms.ui.workflow.task.comment.add=Kommentar hinzuf\u00fcgen
cms.ui.workflow.task.finish=Aufgabe abschlie\u00dfen
cms.ui.workflow.task.item_title=Titel des Dokuments
cms.ui.workflow.task.locking_user=Reserviert durch
cms.ui.workflow.task.reject=Zur\u00fcckweisen
cms.ui.workflow.task.takeover=\u00dcbernehmen
cms.ui.workflow.task.unlock=Aufgabe freigeben
cms.ui.workflow.task.user.add=Benutzer zuordnen

View File

@ -266,3 +266,20 @@ cms.ui.workflow.task.assigned=Your assigned tasks
cms.ui.workflow.task.assigned.none=You have no assigned tasks cms.ui.workflow.task.assigned.none=You have no assigned tasks
cms.ui.workflow.restart_stopped_workflow=Start workflow cms.ui.workflow.restart_stopped_workflow=Start workflow
cms.ui.content_item=Document cms.ui.content_item=Document
cms.ui.workflow=Workflow
cms.ui.workflow.delete_prompt=Are you sure you want to delete this workflow?
cms.ui.workflow.insufficient_privileges=You have insufficient privileges
cms.ui.workflow.no_users_were_selected=No users were selected.
cms.ui.workflow.task.approval_or_reject_required=Approval or rejection is required.
cms.ui.workflow.task.approve=Approve
cms.ui.workflow.task.approve_prompt=Approve this work?
cms.ui.workflow.task.assigned.lock_all=Lock all my tasks for this item
cms.ui.workflow.task.assigned.unlock_all=Unlock all my tasks for this item
cms.ui.workflow.task.comment.add=Add comment
cms.ui.workflow.task.finish=Finish task
cms.ui.workflow.task.item_title=Document title
cms.ui.workflow.task.locking_user=Locking User
cms.ui.workflow.task.reject=Reject
cms.ui.workflow.task.takeover=Take over
cms.ui.workflow.task.unlock=Unlock task
cms.ui.workflow.task.user.add=Assign user

View File

@ -229,8 +229,8 @@ public class WorkflowManager {
writeMethod.invoke(task, value); writeMethod.invoke(task, value);
} }
} catch (IllegalAccessException } catch (IllegalAccessException
| IllegalArgumentException | IllegalArgumentException
| InvocationTargetException ex) { | InvocationTargetException ex) {
throw new RuntimeException(); throw new RuntimeException();
} }
} }
@ -355,6 +355,7 @@ public class WorkflowManager {
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN) @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
@Transactional(Transactional.TxType.REQUIRED) @Transactional(Transactional.TxType.REQUIRED)
public void start(final Workflow workflow) { public void start(final Workflow workflow) {
final WorkflowState oldState = workflow.getState(); final WorkflowState oldState = workflow.getState();
workflow.setState(WorkflowState.STARTED); workflow.setState(WorkflowState.STARTED);
@ -372,12 +373,15 @@ public class WorkflowManager {
firstTask.setActive(true); firstTask.setActive(true);
taskManager.updateState(firstTask); taskManager.updateState(firstTask);
final Optional<User> currentUser = shiro.getUser(); if (firstTask instanceof AssignableTask) {
if (!currentUser.isPresent() final Optional<User> currentUser = shiro.getUser();
&& assignableTaskManager if (currentUser.isPresent()
.isAssignedTo((AssignableTask) firstTask, && assignableTaskManager
currentUser.get())) { .isAssignedTo((AssignableTask) firstTask,
assignableTaskManager.lockTask((AssignableTask) firstTask); currentUser.get())) {
assignableTaskManager
.lockTask((AssignableTask) firstTask);
}
} }
} }
} }