new combined states definition publishable_state
This commit is contained in:
parent
d0c5004f80
commit
02d65acffb
5 changed files with 67 additions and 4 deletions
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
"Project-Id-Version: $Id$\n"
|
||||
"Project-Id-Version: 0.13.0\n"
|
||||
"POT-Creation-Date: 2007-05-22 12:00 CET\n"
|
||||
"PO-Revision-Date: 2012-11-24 12:00 CET\n"
|
||||
"PO-Revision-Date: 2013-01-02 12:00 CET\n"
|
||||
"Last-Translator: Helmut Merz <helmutm@cy55.de>\n"
|
||||
"Language-Team: loops developers <helmutm@cy55.de>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -906,6 +906,9 @@ msgstr "Veröffentlichung"
|
|||
msgid "task_states"
|
||||
msgstr "Aufgabe"
|
||||
|
||||
msgid "publishable_task"
|
||||
msgstr "Aufgabe/Zugriff"
|
||||
|
||||
# state names
|
||||
|
||||
msgid "accepted"
|
||||
|
@ -914,6 +917,9 @@ msgstr "angenommen"
|
|||
msgid "active"
|
||||
msgstr "aktiv"
|
||||
|
||||
msgid "active (published)"
|
||||
msgstr "aktiv (zugänglich)"
|
||||
|
||||
msgid "archived"
|
||||
msgstr "Archiv"
|
||||
|
||||
|
@ -938,6 +944,9 @@ msgstr "Entwurf"
|
|||
msgid "finished"
|
||||
msgstr "beendet"
|
||||
|
||||
msgid "finished (published)"
|
||||
msgstr "beendet (zugänglich)"
|
||||
|
||||
msgid "moved"
|
||||
msgstr "verschoben"
|
||||
|
||||
|
@ -994,6 +1003,9 @@ msgstr "delegieren"
|
|||
msgid "finish"
|
||||
msgstr "beenden"
|
||||
|
||||
msgid "finish (published)"
|
||||
msgstr "beenden (zugänglich)"
|
||||
|
||||
msgid "hide"
|
||||
msgstr "verstecken"
|
||||
|
||||
|
@ -1015,6 +1027,9 @@ msgstr "entfernen"
|
|||
msgid "release"
|
||||
msgstr "freigeben"
|
||||
|
||||
msgid "release, publish"
|
||||
msgstr "freigeben (zugänglich)"
|
||||
|
||||
msgid "re-open"
|
||||
msgstr "zurücksetzen"
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ template = ViewPageTemplateFile('view_macros.pt')
|
|||
|
||||
statefulActions = ('classification_quality',
|
||||
'simple_publishing',
|
||||
'task_states',)
|
||||
'task_states',
|
||||
'publishable_task',)
|
||||
|
||||
|
||||
class StateAction(Action):
|
||||
|
|
|
@ -49,6 +49,20 @@
|
|||
set_schema="cybertools.stateful.interfaces.IStateful" />
|
||||
</zope:class>
|
||||
|
||||
<zope:utility
|
||||
factory="loops.organize.stateful.task.publishableTask"
|
||||
name="publishable_task" />
|
||||
|
||||
<zope:adapter
|
||||
factory="loops.organize.stateful.task.PublishableTask"
|
||||
name="publishable_task" trusted="True" />
|
||||
<zope:class class="loops.organize.stateful.task.PublishableTask">
|
||||
<require permission="zope.View"
|
||||
interface="cybertools.stateful.interfaces.IStateful" />
|
||||
<require permission="zope.ManageContent"
|
||||
set_schema="cybertools.stateful.interfaces.IStateful" />
|
||||
</zope:class>
|
||||
|
||||
<zope:utility
|
||||
factory="loops.organize.stateful.quality.classificationQuality"
|
||||
name="classification_quality" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2012 Helmut Merz helmutm@cy55.de
|
||||
# Copyright (c) 2013 Helmut Merz helmutm@cy55.de
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -52,7 +52,40 @@ def taskStates():
|
|||
initialState='draft')
|
||||
|
||||
|
||||
@implementer(IStatesDefinition)
|
||||
def publishableTask():
|
||||
return StatesDefinition('publishable_task',
|
||||
State('draft', 'draft', ('release', 'release_publish', 'cancel',),
|
||||
color='yellow'),
|
||||
State('active', 'active', ('finish', 'publish', 'cancel',),
|
||||
color='lightblue'),
|
||||
State('active_published', 'active (published)',
|
||||
('finish_published', 'retract', 'cancel',), color='blue'),
|
||||
State('finished', 'finished', ('reopen', 'archive',),
|
||||
color='lightgreen'),
|
||||
State('finished_published', 'finished (published)', ('reopen', 'archive',),
|
||||
color='green'),
|
||||
State('cancelled', 'cancelled', ('reopen',),
|
||||
color='x'),
|
||||
State('archived', 'archived', ('reopen',),
|
||||
color='grey'),
|
||||
Transition('release', 'release', 'active'),
|
||||
Transition('release_publish', 'release, publish', 'active_published'),
|
||||
Transition('publish', 'publish', 'active_published'),
|
||||
Transition('retract', 'retract', 'active'),
|
||||
Transition('finish', 'finish', 'finished'),
|
||||
Transition('finish_published', 'finish (published)', 'finished_published'),
|
||||
Transition('cancel', 'cancel', 'cancelled'),
|
||||
Transition('reopen', 're-open', 'draft'),
|
||||
initialState='draft')
|
||||
|
||||
|
||||
class StatefulTask(StatefulLoopsObject):
|
||||
|
||||
statesDefinition = 'task_states'
|
||||
|
||||
|
||||
class PublishableTask(StatefulLoopsObject):
|
||||
|
||||
statesDefinition = 'publishable_task'
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue