Commit 3f2a258a authored by David Read's avatar David Read Committed by GitHub
Browse files

Merge pull request #19 from espona/master

Fixed bug and minor changes
parents b20b52f3 bd01b00c
......@@ -113,9 +113,9 @@ class HierarchyDisplay(p.SingletonPlugin):
base_query += [item]
if c.include_children_selected:
# add all the children organizations in an 'or' join
search_params['q'] = " ".join(base_query)
children = _children_name_list(helpers.group_tree_section(c.group_dict.get('id'), include_parents=False, include_siblings=False).get('children',[]))
if(children):
search_params['q'] = " ".join(base_query)
if (len(search_params['q'].strip())>0):
search_params['q'] += ' AND '
search_params['q'] += '(organization:%s' % c.group_dict.get('name')
......@@ -123,7 +123,7 @@ class HierarchyDisplay(p.SingletonPlugin):
if name:
search_params['q'] += ' OR organization:%s' % name
search_params['q'] += ")"
# add it back to fields
# add it back to fields
c.fields += [('include_children','True')]
return search_params
......
{% import 'macros/form.html' as form %}
{% set is_upload = data.image_url and not data.image_url.startswith('http') %}
{% set is_url = data.image_url and data.image_url.startswith('http') %}
{{ form.image_upload(data, errors, is_upload_enabled=h.uploads_enabled(), is_url=is_url, is_upload=is_upload) }}
......@@ -14,8 +14,12 @@
<dl>
{% for f in c.scheming_fields %}
{% if f.display_snippet != None %}
<dt>{{ h.scheming_language_text(f.label) }}:</dt>
<dd>{{ c.group_dict[f.field_name] or ("&nbsp;"|safe) }}</dd>
{% if f.field_name == "description" %}
{{ h.render_markdown(c.group_dict[f.field_name]) or ("&nbsp;"|safe) }}
{% else %}
<dt>{{ h.scheming_language_text(f.label) }}:</dt>
<dd>{{ c.group_dict[f.field_name] or ("&nbsp;"|safe) }}</dd>
{% endif %}
{% endif %}
{% endfor %}
</dl>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment