core-explore-common-app 2.5.0__tar.gz → 2.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/PKG-INFO +1 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/abstract_query/models.py +3 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/result/models.py +1 -1
- core_explore_common_app-2.6.0/core_explore_common_app/migrations/0003_rename_xml_content_result_content.py +18 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/rest/query/views.py +3 -3
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/rest/result/serializers.py +1 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/rest/result/views.py +1 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/user/css/query_result.css +1 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/user/css/results.css +9 -2
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/user/js/results.js +19 -3
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/user/js/results.raw.js +2 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/results/data_source_info.html +10 -3
- core_explore_common_app-2.6.0/core_explore_common_app/templates/core_explore_common_app/user/results/data_source_results.html +18 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/result/result.py +2 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/views/user/ajax.py +0 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app.egg-info/PKG-INFO +1 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app.egg-info/SOURCES.txt +1 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app.egg-info/requires.txt +1 -1
- core_explore_common_app-2.6.0/requirements.core.txt +1 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/setup.py +1 -1
- core_explore_common_app-2.5.0/core_explore_common_app/templates/core_explore_common_app/user/results/data_source_results.html +0 -14
- core_explore_common_app-2.5.0/requirements.core.txt +0 -1
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/LICENSE.md +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/MANIFEST.in +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/README.rst +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/access_control/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/access_control/api.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/admin.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/apps.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/commons/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/commons/exceptions.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/abstract_persistent_query/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/abstract_persistent_query/api.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/abstract_persistent_query/models.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/abstract_query/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/query/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/query/admin_site.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/query/api.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/query/models.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/components/result/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/constants.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/discover.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/migrations/0001_initial.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/migrations/0002_result_blob_url.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/migrations/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/rest/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/rest/query/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/rest/result/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/rest/urls.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/settings.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/common/js/tools.js +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/user/css/toggle.css +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/user/js/local_selector.js +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/user/js/persistent_query_config.js +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/user/js/sorting_multi_criteria.js +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/static/core_explore_common_app/user/js/sorting_single_criteria.js +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/system/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/system/api.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/tasks.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/admin/persistent_query/content_query_box.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/admin/persistent_query/view_query_content.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/commons/query_content.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/ordering_menu/multi_criteria_sorting_menu.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/ordering_menu/single_criteria_sorting_menu.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/persistent_query/button.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/persistent_query/modal.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/persistent_query/persistent_query_content.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/persistent_query/persistent_query_pagination.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/results/data_source_pagination.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/results/data_sources_results.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/results/results.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/selector/data_sources_selector.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/selector/list_selector_base.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/selector/local_content.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/templates/core_explore_common_app/user/selector/local_selector.html +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/urls.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/linked_records/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/linked_records/pid.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/oaipmh/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/oaipmh/oaipmh.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/protocols/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/protocols/commons.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/protocols/oauth2.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/query/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/query/query.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/utils/result/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/views/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/views/user/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/views/user/views.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app.egg-info/dependency_links.txt +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app.egg-info/top_level.txt +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/pyproject.toml +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/setup.cfg +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/components/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/components/abstract_persistent_query/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/components/query/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/components/query/tests_unit.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/query/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/query/views/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/query/views/tests_unit.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/result/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/result/tests_permissions.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/result/tests_unit.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/test_settings.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/urls.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/linked_records/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/linked_records/tests_pid.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/oaipmh/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/oaipmh/tests_oaipmh.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/query/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/query/tests_query.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/views/__init__.py +0 -0
- {core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/views/test_unit.py +0 -0
|
@@ -48,7 +48,9 @@ class AbstractQuery(models.Model):
|
|
|
48
48
|
|
|
49
49
|
user_id = models.CharField(blank=False, max_length=200)
|
|
50
50
|
content = models.TextField(blank=True, null=True)
|
|
51
|
-
templates = models.ManyToManyField(
|
|
51
|
+
templates = models.ManyToManyField(
|
|
52
|
+
Template, blank=True, default=[], symmetrical=False
|
|
53
|
+
)
|
|
52
54
|
data_sources = models.JSONField(blank=True, default=list)
|
|
53
55
|
creation_date = models.DateTimeField(auto_now_add=True)
|
|
54
56
|
|
|
@@ -7,7 +7,7 @@ class Result(models.Model):
|
|
|
7
7
|
"""Result class"""
|
|
8
8
|
|
|
9
9
|
title = models.CharField(blank=False, max_length=200)
|
|
10
|
-
|
|
10
|
+
content = models.TextField(blank=False)
|
|
11
11
|
template_info = models.JSONField(default=dict)
|
|
12
12
|
permission_url = models.CharField(blank=True, null=True, max_length=200)
|
|
13
13
|
detail_url = models.CharField(blank=True, null=True, max_length=200)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Generated by Django 3.2.18 on 2023-05-12 20:34
|
|
2
|
+
|
|
3
|
+
from django.db import migrations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("core_explore_common_app", "0002_result_blob_url"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.RenameField(
|
|
14
|
+
model_name="result",
|
|
15
|
+
old_name="xml_content",
|
|
16
|
+
new_name="content",
|
|
17
|
+
),
|
|
18
|
+
]
|
|
@@ -4,8 +4,8 @@ import json
|
|
|
4
4
|
import logging
|
|
5
5
|
|
|
6
6
|
import pytz
|
|
7
|
-
from django.conf import settings as conf_settings
|
|
8
7
|
from django import urls as django_urls
|
|
8
|
+
from django.conf import settings as conf_settings
|
|
9
9
|
|
|
10
10
|
from core_explore_common_app.components.result.models import Result
|
|
11
11
|
from core_explore_common_app.utils.linked_records import pid as pid_utils
|
|
@@ -59,7 +59,7 @@ def build_local_query(query_data):
|
|
|
59
59
|
# update the criteria with templates information
|
|
60
60
|
if templates is not None and len(templates) > 0:
|
|
61
61
|
list_template_ids = [
|
|
62
|
-
AbstractExecuteLocalQueryView.parse_id(template
|
|
62
|
+
AbstractExecuteLocalQueryView.parse_id(template)
|
|
63
63
|
for template in templates
|
|
64
64
|
]
|
|
65
65
|
query_builder.add_list_criteria("template", list_template_ids)
|
|
@@ -168,7 +168,7 @@ def format_local_results(results, request):
|
|
|
168
168
|
blob_url=f"{blob_detail_url_base}?id={blob.id}"
|
|
169
169
|
if blob_detail_url_base and blob
|
|
170
170
|
else None,
|
|
171
|
-
|
|
171
|
+
content=data.content,
|
|
172
172
|
template_info=template_info[template_id],
|
|
173
173
|
permission_url=f'{url_permission_data}?ids=%5B"{str(data.id)}"%5D',
|
|
174
174
|
detail_url=detail_url,
|
|
@@ -44,7 +44,7 @@ def get_result_from_data_id(request):
|
|
|
44
44
|
data = data_api.get_by_id(data_id, request.user)
|
|
45
45
|
|
|
46
46
|
# Build a Result
|
|
47
|
-
result = Result(title=data.title,
|
|
47
|
+
result = Result(title=data.title, content=data.content)
|
|
48
48
|
|
|
49
49
|
# Serialize results
|
|
50
50
|
return_value = ResultSerializer(result)
|
|
@@ -137,11 +137,18 @@ span.expand {
|
|
|
137
137
|
float: left;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
.
|
|
140
|
+
.content-result {
|
|
141
141
|
width: 100%;
|
|
142
142
|
overflow: auto;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
#data_sources_selector {
|
|
146
146
|
word-break: break-all;
|
|
147
|
-
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.highlight-content{
|
|
150
|
+
max-height:160px !important;
|
|
151
|
+
overflow:auto;
|
|
152
|
+
font-size: 18px;
|
|
153
|
+
}
|
|
154
|
+
|
|
@@ -73,6 +73,17 @@ var get_data_source_results = function(result_page, data_source_url) {
|
|
|
73
73
|
initDisplayDateToggle();
|
|
74
74
|
// permission api calls for the edit button
|
|
75
75
|
getDataPermission();
|
|
76
|
+
// format and highlight data content
|
|
77
|
+
$('.highlight-content code').each(function(i, block) {
|
|
78
|
+
if ($(".data-template-format").val() == "JSON"){
|
|
79
|
+
var jsonContent = JSON.parse($(block).text());
|
|
80
|
+
var highlightedContent = hljs.highlight('json',JSON.stringify(jsonContent, null, 8)).value
|
|
81
|
+
$(block).html(highlightedContent);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
hljs.highlightElement(block);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
76
87
|
// Add leave notice on links from loaded data
|
|
77
88
|
leaveNotice($("#results_" + nb_results_id.match(/(\d+)/)[0] + " a"));
|
|
78
89
|
},
|
|
@@ -108,14 +119,19 @@ var getDataPermission = function() {
|
|
|
108
119
|
}());
|
|
109
120
|
// show the open icon
|
|
110
121
|
var openLinkElement = inputElement.siblings(".permissions-link-open");
|
|
122
|
+
var dataFormat = inputElement.siblings(".data-template-format").val();
|
|
111
123
|
openLinkElement.css('display', "inline");
|
|
112
124
|
// add link to text editor
|
|
113
|
-
openLinkElement.attr("href",
|
|
125
|
+
if(dataFormat == "XSD") openLinkElement.attr("href", openXMLRecordUrl + '?id=' + id);
|
|
126
|
+
else if (dataFormat == "JSON") openLinkElement.attr("href", openJSONRecordUrl + '?id=' + id);
|
|
127
|
+
else $.notify("Error while initializing the text editor URL page. Unsupported data format.", 'danger');
|
|
128
|
+
|
|
114
129
|
}
|
|
115
130
|
}
|
|
116
131
|
},
|
|
117
132
|
error: function(data) {
|
|
118
|
-
|
|
133
|
+
var errors = $.parseJSON(data.responseText);
|
|
134
|
+
$.notify(errors.message, "danger");
|
|
119
135
|
}
|
|
120
136
|
})
|
|
121
137
|
});
|
|
@@ -209,7 +225,7 @@ showhideResult = function(event) {
|
|
|
209
225
|
let button = event.target;
|
|
210
226
|
// find the xml container
|
|
211
227
|
$(button).parents('.result-line-main-container')
|
|
212
|
-
.find(".
|
|
228
|
+
.find(".content-result")
|
|
213
229
|
.toggle("blind", 500);
|
|
214
230
|
|
|
215
231
|
if ($(button).attr("class") === "expand") {
|
|
@@ -4,4 +4,5 @@ var displayPersistentQueryButton = '{{display_persistent_query_button}}';
|
|
|
4
4
|
var defaultDataSortingFields = '{{data.default_data_sorting_fields}}';
|
|
5
5
|
var defaultDateToggleValue = '{{data.default_date_toggle_value}}'
|
|
6
6
|
var editRecordUrl = "{% url 'core_dashboard_edit_record' %}";
|
|
7
|
-
var
|
|
7
|
+
var openXMLRecordUrl = "{% url 'core_main_app_xml_text_editor_view' %}";
|
|
8
|
+
var openJSONRecordUrl = "{% url 'core_main_app_json_text_editor_view' %}";
|
|
@@ -25,19 +25,26 @@
|
|
|
25
25
|
<span class="template-info-name">{{result.template_info.name}}</span>
|
|
26
26
|
{% if result.permission_url and display_edit_button %}
|
|
27
27
|
<input class="input-permission-url" type="hidden" value="{{result.permission_url}}">
|
|
28
|
+
<input class="data-template-format" type="hidden" value="{{result.template_info.format}}">
|
|
28
29
|
<a class="permissions-link-open mx-2" href="#" {% if BOOTSTRAP_VERSION|first == "4" %}data-toggle{% elif BOOTSTRAP_VERSION|first == "5" %}data-bs-toggle{% endif %}="tooltip" title="Open in text editor">
|
|
29
30
|
<i class="fas fa-code" aria-hidden="true"></i>
|
|
30
31
|
</a>
|
|
32
|
+
{% if result.template_info.format == 'XSD' %}
|
|
31
33
|
<a class="permissions-link mx-2" href="#" {% if BOOTSTRAP_VERSION|first == "4" %}data-toggle{% elif BOOTSTRAP_VERSION|first == "5" %}data-bs-toggle{% endif %}="tooltip" title="Edit">
|
|
32
34
|
<i class="fas fa-pencil-alt permissions-icon edit" aria-hidden="true"></i>
|
|
33
35
|
</a>
|
|
36
|
+
{% endif %}
|
|
34
37
|
{% endif %}
|
|
35
38
|
<div title="Last modification date" class="data-info-right-container">
|
|
36
39
|
{{result.last_modification_date|parse_date|localtime|json_date:"N d Y g:iA"}}
|
|
37
40
|
</div>
|
|
38
41
|
</div>
|
|
39
42
|
</div>
|
|
40
|
-
<div class=
|
|
41
|
-
|
|
43
|
+
<div class="content-result highlight-content" readonly='true'>
|
|
44
|
+
{% if result.template_info.format == 'XSD' %}
|
|
45
|
+
{{ html_string }}
|
|
46
|
+
{% else %}
|
|
47
|
+
<pre><code>{{html_string}}</code></pre>
|
|
48
|
+
{% endif %}
|
|
42
49
|
</div>
|
|
43
|
-
</div>
|
|
50
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{% load xsl_transform_tag %}
|
|
2
|
+
{% load blob_tags %}
|
|
3
|
+
{% load get_attribute %}
|
|
4
|
+
{% for result in results %}
|
|
5
|
+
{% if result.template_info.format == 'XSD' %}
|
|
6
|
+
{% xsl_transform_list xml_content=result.content template_id=result.template_info.id template_hash=result.template_info.hash as html_string %}
|
|
7
|
+
{% if blobs_preview %}
|
|
8
|
+
{% render_blob_links_in_span xml_string=html_string as html_string %}
|
|
9
|
+
{% endif %}
|
|
10
|
+
{% include 'core_explore_common_app/user/results/data_source_info.html' with html_string=html_string|safe %}
|
|
11
|
+
{% else %}
|
|
12
|
+
{% include 'core_explore_common_app/user/results/data_source_info.html' with html_string=result.content|safe %}
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% empty %}
|
|
15
|
+
<span style="font-style:italic; color:red;"> No Results found... </span>
|
|
16
|
+
{% endfor %}
|
|
17
|
+
|
|
18
|
+
{% include 'core_explore_common_app/user/results/data_source_pagination.html'%}
|
|
@@ -24,6 +24,7 @@ def get_template_info(template, include_template_id=True):
|
|
|
24
24
|
"id": template.id if include_template_id else "",
|
|
25
25
|
"name": template.display_name,
|
|
26
26
|
"hash": template.hash,
|
|
27
|
+
"format": template.format,
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
return return_value
|
|
@@ -45,7 +46,7 @@ def get_result_from_rest_data_response(response):
|
|
|
45
46
|
# Build a Result
|
|
46
47
|
result = Result(
|
|
47
48
|
title=result_serialized.data["title"],
|
|
48
|
-
|
|
49
|
+
content=result_serialized.data["content"],
|
|
49
50
|
)
|
|
50
51
|
# Serialize results
|
|
51
52
|
return_value = ResultSerializer(result)
|
|
@@ -35,6 +35,7 @@ core_explore_common_app/components/result/__init__.py
|
|
|
35
35
|
core_explore_common_app/components/result/models.py
|
|
36
36
|
core_explore_common_app/migrations/0001_initial.py
|
|
37
37
|
core_explore_common_app/migrations/0002_result_blob_url.py
|
|
38
|
+
core_explore_common_app/migrations/0003_rename_xml_content_result_content.py
|
|
38
39
|
core_explore_common_app/migrations/__init__.py
|
|
39
40
|
core_explore_common_app/rest/__init__.py
|
|
40
41
|
core_explore_common_app/rest/urls.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
core-main-app==2.6.*
|
|
@@ -37,7 +37,7 @@ required = [req_link(r) if r.startswith("https://") else r for r in required]
|
|
|
37
37
|
|
|
38
38
|
setup(
|
|
39
39
|
name="core_explore_common_app",
|
|
40
|
-
version="2.
|
|
40
|
+
version="2.6.0",
|
|
41
41
|
description="Base exploration function for the curator core project",
|
|
42
42
|
long_description=long_desc,
|
|
43
43
|
author="NIST IT Lab",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{% load xsl_transform_tag %}
|
|
2
|
-
{% load blob_tags %}
|
|
3
|
-
{% load get_attribute %}
|
|
4
|
-
{% for result in results %}
|
|
5
|
-
{% xsl_transform_list xml_content=result.xml_content template_id=result.template_info.id template_hash=result.template_info.hash as xml_representation%}
|
|
6
|
-
{% if blobs_preview %}
|
|
7
|
-
{% render_blob_links_in_span xml_string=xml_representation as xml_representation %}
|
|
8
|
-
{% endif %}
|
|
9
|
-
{% include 'core_explore_common_app/user/results/data_source_info.html' with xml_representation=xml_representation|safe %}
|
|
10
|
-
{% empty %}
|
|
11
|
-
<span style="font-style:italic; color:red;"> No Results found... </span>
|
|
12
|
-
{% endfor %}
|
|
13
|
-
|
|
14
|
-
{% include 'core_explore_common_app/user/results/data_source_pagination.html'%}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
core-main-app==2.5.*
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/admin.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/apps.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/constants.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/discover.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/rest/urls.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/tasks.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/core_explore_common_app/urls.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/components/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/components/query/__init__.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/components/query/tests_unit.py
RENAMED
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/query/__init__.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/query/views/__init__.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/query/views/tests_unit.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/result/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/rest/result/tests_unit.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/oaipmh/__init__.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/oaipmh/tests_oaipmh.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/query/__init__.py
RENAMED
|
File without changes
|
{core_explore_common_app-2.5.0 → core_explore_common_app-2.6.0}/tests/utils/query/tests_query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|