+
+
+ Session |
+ Titre |
+ Catégorie |
+ Auteurs / rapporteurs / orateurs |
+ État |
+
+
- |
+ |
|
+ |
+ |
+ |
@@ -50,9 +63,8 @@
background: #eee;
}
-td.date {
- text-align: right;
- width: 7em;
+.results table tr th,
+.results table tr td {
padding-right: 1em;
}
diff --git a/themis/search/doc.py b/themis/search/doc.py
index e7e08b3..231f32d 100644
--- a/themis/search/doc.py
+++ b/themis/search/doc.py
@@ -182,3 +182,9 @@ class SearchView(BrowserView):
elif type(d[key]) is unicode:
d[key] = d[key].encode('utf-8')
return d
+
+ def review_states(self):
+ d = {}
+ for label, id in self.context.portal_workflow.listWFStatesByTitle():
+ d[id] = label
+ return d
diff --git a/themis/search/indexer.py b/themis/search/indexer.py
index dfc33c0..e1b9d77 100644
--- a/themis/search/indexer.py
+++ b/themis/search/indexer.py
@@ -60,6 +60,19 @@ def mailCategoryTxtIndexer(obj):
grok.global_adapter(mailCategoryTxtIndexer, name="mailCategoryTxt")
+@indexer(plone.dexterity.interfaces.IDexterityItem)
+def docSessionIndexer(obj):
+ if not '(D)' in obj.Type():
+ return None
+ for attr in ('session',):
+ if not hasattr(obj, attr):
+ continue
+ if getattr(obj, attr):
+ return getattr(obj, attr)
+ return None
+
+grok.global_adapter(docSessionIndexer, name='docSession')
+
def get_data_to_index(obj, data):
@@ -228,10 +241,8 @@ def docCategoryIndexer(obj):
return category
grok.global_adapter(docCategoryIndexer, name="docCategory")
-@indexer(plone.dexterity.interfaces.IDexterityItem)
-def personsFuzzyIndexer(obj):
- if not '(D)' in obj.Type():
- return None
+
+def get_doc_persons(obj):
persons = []
src = ContactsSource()
for attr in ('auteur', 'auteurs', 'rapporteurs', 'orateurs_seance',
@@ -256,6 +267,21 @@ def personsFuzzyIndexer(obj):
persons.append(r)
else:
persons.append(item)
- return ' '.join(persons)
+ return persons
+
+@indexer(plone.dexterity.interfaces.IDexterityItem)
+def personsFuzzyIndexer(obj):
+ if not '(D)' in obj.Type():
+ return None
+ return ' '.join(get_doc_persons(obj))
grok.global_adapter(personsFuzzyIndexer, name='docPersonsFuzzy')
+
+
+@indexer(plone.dexterity.interfaces.IDexterityItem)
+def personsStrIndexer(obj):
+ if not '(D)' in obj.Type():
+ return None
+ return ', '.join(get_doc_persons(obj))
+
+grok.global_adapter(personsStrIndexer, name='docPersonsStr')
diff --git a/themis/search/profiles/default/catalog.xml b/themis/search/profiles/default/catalog.xml
index 0019971..8efc433 100644
--- a/themis/search/profiles/default/catalog.xml
+++ b/themis/search/profiles/default/catalog.xml
@@ -44,6 +44,9 @@
+
+
+
@@ -67,4 +70,6 @@
+
+