Hello Samuele,

> [...]
>>> Do you have any suggestion?
>>
>> The short answer is this feature is not yet implemented. So in your
>> case you really need such a hack if you need this feature quickly.
>
> Ok, thanks to confirm it for us.

Just in case anybody else is interested, I have just modified a couple
of lines (attached).  Now, we'll evaluate if it works as expected.

Thanks Tibor, Samuele and all Invenio team for this clean code.  (Not
like my dirty solution ;-)

Ferran
---
 lib/python/invenio/websearch_templates.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/python/invenio/websearch_templates.py b/lib/python/invenio/websearch_templates.py
index ea5007b..d4a61b2 100644
--- a/lib/python/invenio/websearch_templates.py
+++ b/lib/python/invenio/websearch_templates.py
@@ -1184,6 +1184,8 @@ class Template:
           - 'grandsons' *list* - The list of sub-collections (second level)
         """
 
+        unchecked = ['hicncc']
+
         # load the right message language
         _ = gettext_set_language(ln)
 
@@ -1217,7 +1219,7 @@ class Template:
                                          'v': 'focusonsearchbox'}[type]}
 
             if type == 'r':
-                if son.restricted_p() and son.restricted_p() != father.restricted_p():
+                if (son.restricted_p() and son.restricted_p() != father.restricted_p()) or (son.name in unchecked):
                     out += """<input type="checkbox" name="c" value="%(name)s" /></td>""" % {'name' : cgi.escape(son.name) }
                 else:
                     out += """<input type="checkbox" name="c" value="%(name)s" checked="checked" /></td>""" % {'name' : cgi.escape(son.name) }

Reply via email to