extend task_states definition; make type-based state handling fully operational
This commit is contained in:
parent
a429f9ca76
commit
e8cb0c94a8
6 changed files with 105 additions and 23 deletions
|
@ -291,7 +291,8 @@
|
||||||
tal:condition="stTrans"
|
tal:condition="stTrans"
|
||||||
tal:attributes="name string:state.$stDef">
|
tal:attributes="name string:state.$stDef">
|
||||||
<option i18n:translate="" value="-">No change</option>
|
<option i18n:translate="" value="-">No change</option>
|
||||||
<option tal:repeat="trans stTrans"
|
<option i18n:translate=""
|
||||||
|
tal:repeat="trans stTrans"
|
||||||
tal:attributes="value trans/name"
|
tal:attributes="value trans/name"
|
||||||
tal:content="trans/title">publish</option>
|
tal:content="trans/title">publish</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -368,7 +368,8 @@
|
||||||
i18n:translate=""></td>
|
i18n:translate=""></td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<tal:states repeat="state def/states">
|
<tal:states repeat="state def/states">
|
||||||
<tal:state define="name string:state.$deftype.${def/name};
|
<tal:state define="xx_name string:state.$deftype.${def/name};
|
||||||
|
name string:state.${def/name};
|
||||||
value state/name">
|
value state/name">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
tal:attributes="name string:$name:list;
|
tal:attributes="name string:$name:list;
|
||||||
|
|
|
@ -196,8 +196,9 @@ class Search(ConceptView):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def statesDefinitions(self):
|
def statesDefinitions(self):
|
||||||
return [component.getUtility(IStatesDefinition, name=n)
|
stdnames = (self.globalOptions('organize.stateful.resource', []) +
|
||||||
for n in self.globalOptions('organize.stateful.resource', ())]
|
self.globalOptions('organize.stateful.special', []))
|
||||||
|
return [component.getUtility(IStatesDefinition, name=n) for n in stdnames]
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def selectedStates(self):
|
def selectedStates(self):
|
||||||
|
@ -259,6 +260,8 @@ class Search(ConceptView):
|
||||||
for std, states in self.selectedStates.items():
|
for std, states in self.selectedStates.items():
|
||||||
if std.startswith('state.resource.'):
|
if std.startswith('state.resource.'):
|
||||||
std = std[len('state.resource.'):]
|
std = std[len('state.resource.'):]
|
||||||
|
elif std.startswith('state.'):
|
||||||
|
std = std[len('state.'):]
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
stf = component.queryAdapter(obj, IStateful, name=std)
|
stf = component.queryAdapter(obj, IStateful, name=std)
|
||||||
|
|
Binary file not shown.
|
@ -704,9 +704,6 @@ msgstr "Deckungsgrad"
|
||||||
msgid "Create loops Note"
|
msgid "Create loops Note"
|
||||||
msgstr "loops-Notiz anlegen"
|
msgstr "loops-Notiz anlegen"
|
||||||
|
|
||||||
msgid "State information for $definition: $title"
|
|
||||||
msgstr "Status ($definition): $title"
|
|
||||||
|
|
||||||
msgid "User ID"
|
msgid "User ID"
|
||||||
msgstr "Benutzerkennung"
|
msgstr "Benutzerkennung"
|
||||||
|
|
||||||
|
@ -885,8 +882,26 @@ msgstr "nach"
|
||||||
|
|
||||||
# state definitions
|
# state definitions
|
||||||
|
|
||||||
|
msgid "Restrict to objects with certain states"
|
||||||
|
msgstr "Auf Objekte mit bestimmtem Status beschränken"
|
||||||
|
|
||||||
|
msgid "Workflow"
|
||||||
|
msgstr "Statusdefinition/Workflow"
|
||||||
|
|
||||||
|
msgid "States"
|
||||||
|
msgstr "Statuswerte"
|
||||||
|
|
||||||
|
msgid "State information for $definition: $title"
|
||||||
|
msgstr "Status ($definition): $title"
|
||||||
|
|
||||||
|
msgid "classification_quality"
|
||||||
|
msgstr "Klassifizierung"
|
||||||
|
|
||||||
|
msgid "simple_publishing"
|
||||||
|
msgstr "Veröffentlichung"
|
||||||
|
|
||||||
msgid "task_states"
|
msgid "task_states"
|
||||||
msgstr "Status"
|
msgstr "Aufgabe"
|
||||||
|
|
||||||
# state names
|
# state names
|
||||||
|
|
||||||
|
@ -896,9 +911,15 @@ msgstr "angenommen"
|
||||||
msgid "active"
|
msgid "active"
|
||||||
msgstr "aktiv"
|
msgstr "aktiv"
|
||||||
|
|
||||||
|
msgid "archived"
|
||||||
|
msgstr "Archiv"
|
||||||
|
|
||||||
msgid "cancelled"
|
msgid "cancelled"
|
||||||
msgstr "abgebrochen"
|
msgstr "abgebrochen"
|
||||||
|
|
||||||
|
msgid "classified"
|
||||||
|
msgstr "klassifiziert"
|
||||||
|
|
||||||
msgid "closed"
|
msgid "closed"
|
||||||
msgstr "abgeschlossen"
|
msgstr "abgeschlossen"
|
||||||
|
|
||||||
|
@ -923,40 +944,96 @@ msgstr "neu"
|
||||||
msgid "planned"
|
msgid "planned"
|
||||||
msgstr "geplant"
|
msgstr "geplant"
|
||||||
|
|
||||||
|
msgid "private"
|
||||||
|
msgstr "privat"
|
||||||
|
|
||||||
|
msgid "published"
|
||||||
|
msgstr "veröffentlicht"
|
||||||
|
|
||||||
|
msgid "removed"
|
||||||
|
msgstr "gelöscht"
|
||||||
|
|
||||||
msgid "replaced"
|
msgid "replaced"
|
||||||
msgstr "ersetzt"
|
msgstr "ersetzt"
|
||||||
|
|
||||||
msgid "running"
|
msgid "running"
|
||||||
msgstr "in Arbeit"
|
msgstr "in Arbeit"
|
||||||
|
|
||||||
# transitions
|
msgid "unclassified"
|
||||||
|
msgstr "unklassifiziert"
|
||||||
|
|
||||||
msgid "plan"
|
msgid "verified"
|
||||||
msgstr "planen"
|
msgstr "verifiziert"
|
||||||
|
|
||||||
|
# transitions
|
||||||
|
|
||||||
msgid "accept"
|
msgid "accept"
|
||||||
msgstr "annehmen"
|
msgstr "annehmen"
|
||||||
|
|
||||||
msgid "start working"
|
msgid "archive"
|
||||||
msgstr "Arbeit beginnen"
|
msgstr "archivieren"
|
||||||
|
|
||||||
msgid "work"
|
msgid "classify"
|
||||||
msgstr "bearbeiten"
|
msgstr "klassifizieren"
|
||||||
|
|
||||||
msgid "finish"
|
msgid "change_classification"
|
||||||
msgstr "beenden"
|
msgstr "Klassifizierung ändern"
|
||||||
|
|
||||||
msgid "cancel"
|
msgid "cancel"
|
||||||
msgstr "abbrechen"
|
msgstr "abbrechen"
|
||||||
|
|
||||||
|
msgid "close"
|
||||||
|
msgstr "abschließen"
|
||||||
|
|
||||||
msgid "delegate"
|
msgid "delegate"
|
||||||
msgstr "delegieren"
|
msgstr "delegieren"
|
||||||
|
|
||||||
|
msgid "finish"
|
||||||
|
msgstr "beenden"
|
||||||
|
|
||||||
|
msgid "hide"
|
||||||
|
msgstr "verstecken"
|
||||||
|
|
||||||
msgid "move"
|
msgid "move"
|
||||||
msgstr "verschieben"
|
msgstr "verschieben"
|
||||||
|
|
||||||
msgid "close"
|
msgid "No change"
|
||||||
msgstr "abschließen"
|
msgstr "keine Änderung"
|
||||||
|
|
||||||
|
msgid "plan"
|
||||||
|
msgstr "planen"
|
||||||
|
|
||||||
|
msgid "publish"
|
||||||
|
msgstr "veröffentlichen"
|
||||||
|
|
||||||
|
msgid "remove"
|
||||||
|
msgstr "entfernen"
|
||||||
|
|
||||||
|
msgid "release"
|
||||||
|
msgstr "freigeben"
|
||||||
|
|
||||||
|
msgid "re-open"
|
||||||
|
msgstr "zurücksetzen"
|
||||||
|
|
||||||
|
msgid "remove_classification"
|
||||||
|
msgstr "Klassifizierung entfernen"
|
||||||
|
|
||||||
|
msgid "retract"
|
||||||
|
msgstr "zurückziehen"
|
||||||
|
|
||||||
|
msgid "show"
|
||||||
|
msgstr "anzeigen"
|
||||||
|
|
||||||
|
msgid "start working"
|
||||||
|
msgstr "Arbeit beginnen"
|
||||||
|
|
||||||
|
msgid "verify"
|
||||||
|
msgstr "verifizieren"
|
||||||
|
|
||||||
|
msgid "work"
|
||||||
|
msgstr "bearbeiten"
|
||||||
|
|
||||||
|
# calendar
|
||||||
|
|
||||||
msgid "Monday"
|
msgid "Monday"
|
||||||
msgstr "Montag"
|
msgstr "Montag"
|
||||||
|
|
|
@ -35,17 +35,17 @@ from loops.organize.stateful.base import StatefulLoopsObject
|
||||||
@implementer(IStatesDefinition)
|
@implementer(IStatesDefinition)
|
||||||
def taskStates():
|
def taskStates():
|
||||||
return StatesDefinition('task_states',
|
return StatesDefinition('task_states',
|
||||||
State('draft', 'draft', ('start', 'cancel',),
|
State('draft', 'draft', ('release', 'cancel',),
|
||||||
color='yellow'),
|
color='blue'),
|
||||||
State('active', 'active', ('finish', 'cancel',),
|
State('active', 'active', ('finish', 'cancel',),
|
||||||
color='yellow'),
|
color='yellow'),
|
||||||
State('finished', 'finished', ('reopen', 'archive',),
|
State('finished', 'finished', ('reopen', 'archive',),
|
||||||
color='green'),
|
color='green'),
|
||||||
State('cancelled', 'cancelled', ('reopen',),
|
State('cancelled', 'cancelled', ('reopen',),
|
||||||
color='grey'),
|
color='x'),
|
||||||
State('archived', 'archived', ('reopen',),
|
State('archived', 'archived', ('reopen',),
|
||||||
color='grey'),
|
color='grey'),
|
||||||
Transition('start', 'start', 'active'),
|
Transition('release', 'release', 'active'),
|
||||||
Transition('finish', 'finish', 'finished'),
|
Transition('finish', 'finish', 'finished'),
|
||||||
Transition('cancel', 'cancel', 'cancelled'),
|
Transition('cancel', 'cancel', 'cancelled'),
|
||||||
Transition('reopen', 're-open', 'draft'),
|
Transition('reopen', 're-open', 'draft'),
|
||||||
|
|
Loading…
Add table
Reference in a new issue