src/pyams_content/shared/view/interfaces.py
changeset 1090 d6d041577ae0
parent 1060 29b1aaf9e080
child 1121 852aa448da04
--- a/src/pyams_content/shared/view/interfaces.py	Wed Nov 14 12:25:30 2018 +0100
+++ b/src/pyams_content/shared/view/interfaces.py	Wed Nov 14 17:29:40 2018 +0100
@@ -12,6 +12,8 @@
 
 __docformat__ = 'restructuredtext'
 
+from collections import OrderedDict
+
 from zope.interface import Attribute, Interface
 from zope.schema import Bool, Choice, Int, Set
 from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
@@ -155,11 +157,13 @@
 
 ALWAYS_REFERENCE_MODE = 'always'
 IFEMPTY_REFERENCE_MODE = 'if_empty'
+ONLY_REFERENCE_MODE = 'only'
 
-REFERENCES_MODES = {
-    ALWAYS_REFERENCE_MODE: _("Always include selected internal references"),
-    IFEMPTY_REFERENCE_MODE: _("Include selected internal references only if empty")
-}
+REFERENCES_MODES = OrderedDict((
+    (ALWAYS_REFERENCE_MODE, _("Always include selected internal references")),
+    (IFEMPTY_REFERENCE_MODE, _("Include selected internal references only if view is empty")),
+    (ONLY_REFERENCE_MODE, _("Include ONLY selected references (no search will be made)"))
+))
 
 REFERENCES_MODES_VOCABULARY = SimpleVocabulary([SimpleTerm(v, title=t) for v, t in REFERENCES_MODES.items()])