diff --git a/sonar/modules/documents/templates/documents/record.html b/sonar/modules/documents/templates/documents/record.html
index 2de5483d..0a45bf2a 100644
--- a/sonar/modules/documents/templates/documents/record.html
+++ b/sonar/modules/documents/templates/documents/record.html
@@ -67,18 +67,26 @@
{{ _('document_type_' + record.documentType) }}
{{ title | nl2br | safe }}
+ {% set infoOrgSub = true %}
+ {%- if view != config.SONAR_APP_DEFAULT_ORGANISATION %}
+ {% set infoOrgSub = false if record.get('subdivisions', [])|length == 0 else true %}
+ {%- endif %}
+ {%- if infoOrgSub %}
- {%- for organisation in record.get('organisation', []) -%}
-
- {{ organisation.name }}
-
- {%- endfor -%}
+ {%- if view == config.SONAR_APP_DEFAULT_ORGANISATION %}
+ {%- for organisation in record.get('organisation', []) -%}
+
+ {{ organisation.name }}
+
+ {%- endfor -%}
+ {%- endif %}
{%- for subdivision in record.get('subdivisions', []) -%}
{{ subdivision.name | language_value }}
{%- endfor -%}
+ {%- endif %}
{% set contributors = record | contributors %}
diff --git a/sonar/modules/documents/views.py b/sonar/modules/documents/views.py
index 66cd5690..62dbe758 100644
--- a/sonar/modules/documents/views.py
+++ b/sonar/modules/documents/views.py
@@ -56,7 +56,8 @@ def search(view):
collection = CollectionRecord.get_record_by_pid(
request.args['collection_view'])
- return render_template('sonar/search.html', collection=collection)
+ return render_template('sonar/search.html',
+ collection=collection, view=view)
def detail(pid, record, template=None, **kwargs):
@@ -107,6 +108,7 @@ def detail(pid, record, template=None, **kwargs):
return render_template(template,
pid=pid,
record=record,
+ view=kwargs.get('view'),
schema_org_data=schema_org_data,
google_scholar_data=google_scholar_data)
diff --git a/sonar/theme/templates/sonar/page.html b/sonar/theme/templates/sonar/page.html
index 1c538d9e..e34ead71 100755
--- a/sonar/theme/templates/sonar/page.html
+++ b/sonar/theme/templates/sonar/page.html
@@ -21,7 +21,10 @@
+ lang="{{ current_i18n.locale.language|safe }}" dir="{{ current_i18n.locale.text_direction }}"
+ {%- block view %}{%- endblock %}
+>
+
{% include config.THEME_TRACKINGCODE_TEMPLATE %}
diff --git a/sonar/theme/templates/sonar/search.html b/sonar/theme/templates/sonar/search.html
index 13132a54..2e7b22e6 100644
--- a/sonar/theme/templates/sonar/search.html
+++ b/sonar/theme/templates/sonar/search.html
@@ -1,5 +1,6 @@
{% extends 'sonar/page.html' %}
+{%- block view %} data-view="{{ view }}"{%- endblock %}
{%- block body %}
{% if collection %}
{% include 'collections/item.html' %}