localcosmos-app-kit 0.9.11__py3-none-any.whl → 0.9.13__py3-none-any.whl
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.
- app_kit/appbuilder/JSONBuilders/TaxonProfilesJSONBuilder.py +10 -0
- app_kit/appbuilder/JSONBuilders/__pycache__/TaxonProfilesJSONBuilder.cpython-313.pyc +0 -0
- app_kit/appbuilder/TaxonBuilder.py +19 -11
- app_kit/appbuilder/__pycache__/TaxonBuilder.cpython-313.pyc +0 -0
- app_kit/context_processors.py +13 -6
- app_kit/features/backbonetaxonomy/forms.py +7 -0
- app_kit/features/backbonetaxonomy/templates/backbonetaxonomy/ajax/swap_taxon_form.html +146 -0
- app_kit/features/backbonetaxonomy/templates/backbonetaxonomy/ajax/taxon_references_changes.html +153 -0
- app_kit/features/backbonetaxonomy/templates/backbonetaxonomy/manage_backbonetaxonomy.html +1 -1
- app_kit/features/backbonetaxonomy/templates/backbonetaxonomy/update_taxon_references.html +21 -37
- app_kit/features/backbonetaxonomy/tests/__pycache__/test_views.cpython-313.pyc +0 -0
- app_kit/features/backbonetaxonomy/tests/test_views.py +98 -53
- app_kit/features/backbonetaxonomy/urls.py +6 -0
- app_kit/features/backbonetaxonomy/utils.py +99 -1
- app_kit/features/backbonetaxonomy/views.py +99 -20
- app_kit/features/taxon_profiles/forms.py +24 -1
- app_kit/features/taxon_profiles/templates/taxon_profiles/ajax/collected_taxon_images.html +14 -0
- app_kit/features/taxon_profiles/templates/taxon_profiles/ajax/manage_taxon_profile_form.html +1 -2
- app_kit/features/taxon_profiles/templates/taxon_profiles/ajax/move_image_to_section.html +28 -0
- app_kit/features/taxon_profiles/urls.py +4 -1
- app_kit/features/taxon_profiles/views.py +65 -2
- app_kit/management/commands/export_all_nature_guides.py +28 -24
- app_kit/management/commands/import_all_nature_guides.py +36 -6
- app_kit/taxonomy/fields.py +6 -0
- app_kit/taxonomy/lazy.py +68 -38
- app_kit/templates/app_kit/ajax/content_images_list.html +11 -0
- app_kit/templates/app_kit/base.html +5 -0
- {localcosmos_app_kit-0.9.11.dist-info → localcosmos_app_kit-0.9.13.dist-info}/METADATA +2 -2
- {localcosmos_app_kit-0.9.11.dist-info → localcosmos_app_kit-0.9.13.dist-info}/RECORD +32 -28
- {localcosmos_app_kit-0.9.11.dist-info → localcosmos_app_kit-0.9.13.dist-info}/WHEEL +0 -0
- {localcosmos_app_kit-0.9.11.dist-info → localcosmos_app_kit-0.9.13.dist-info}/licenses/LICENCE +0 -0
- {localcosmos_app_kit-0.9.11.dist-info → localcosmos_app_kit-0.9.13.dist-info}/top_level.txt +0 -0
|
@@ -566,6 +566,16 @@ class TaxonProfilesJSONBuilder(JSONBuilder):
|
|
|
566
566
|
taxon_json = self.app_release_builder.taxa_builder.serialize_taxon_extended(relationship.taxon)
|
|
567
567
|
related_taxon_json = self.app_release_builder.taxa_builder.serialize_taxon_extended(relationship.related_taxon)
|
|
568
568
|
|
|
569
|
+
if relationship.relationship_type.taxon_role == None and relationship.relationship_type.related_taxon_role == None:
|
|
570
|
+
# make 'taxon' the profile taxon
|
|
571
|
+
if relationship.taxon.taxon_nuid == profile_taxon.taxon_nuid:
|
|
572
|
+
pass
|
|
573
|
+
else:
|
|
574
|
+
# swap
|
|
575
|
+
temp = taxon_json
|
|
576
|
+
taxon_json = related_taxon_json
|
|
577
|
+
related_taxon_json = temp
|
|
578
|
+
|
|
569
579
|
relationship_json = {
|
|
570
580
|
'taxon': taxon_json,
|
|
571
581
|
'relatedTaxon': related_taxon_json,
|
|
Binary file
|
|
@@ -111,8 +111,10 @@ class TaxonSerializer:
|
|
|
111
111
|
|
|
112
112
|
def serialize(self):
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
name_uuid_str = str(self.lazy_taxon.name_uuid)
|
|
115
|
+
|
|
116
|
+
if name_uuid_str in self.taxa_builder.cache['simple']:
|
|
117
|
+
taxon_json = self.taxa_builder.cache['simple'][name_uuid_str]
|
|
116
118
|
|
|
117
119
|
else:
|
|
118
120
|
taxon_json = {
|
|
@@ -123,7 +125,7 @@ class TaxonSerializer:
|
|
|
123
125
|
'taxonNuid' : self.lazy_taxon.taxon_nuid,
|
|
124
126
|
}
|
|
125
127
|
|
|
126
|
-
self.taxa_builder.cache['simple'][
|
|
128
|
+
self.taxa_builder.cache['simple'][name_uuid_str] = taxon_json
|
|
127
129
|
|
|
128
130
|
taxon_json_copy = copy.deepcopy(taxon_json)
|
|
129
131
|
|
|
@@ -173,8 +175,10 @@ class TaxonSerializer:
|
|
|
173
175
|
|
|
174
176
|
def serialize_extended(self):
|
|
175
177
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
name_uuid_str = str(self.lazy_taxon.name_uuid)
|
|
179
|
+
|
|
180
|
+
if name_uuid_str in self.taxa_builder.cache['extended']:
|
|
181
|
+
taxon_json = self.taxa_builder.cache['extended'][name_uuid_str]
|
|
178
182
|
|
|
179
183
|
else:
|
|
180
184
|
|
|
@@ -201,7 +205,7 @@ class TaxonSerializer:
|
|
|
201
205
|
taxon_json['shortProfile'] = taxon_profile.short_profile
|
|
202
206
|
|
|
203
207
|
|
|
204
|
-
self.taxa_builder.cache['extended'][
|
|
208
|
+
self.taxa_builder.cache['extended'][name_uuid_str] = taxon_json
|
|
205
209
|
|
|
206
210
|
taxon_json_copy = copy.deepcopy(taxon_json)
|
|
207
211
|
|
|
@@ -222,8 +226,10 @@ class TaxonSerializer:
|
|
|
222
226
|
|
|
223
227
|
def serialize_images(self):
|
|
224
228
|
|
|
225
|
-
|
|
226
|
-
|
|
229
|
+
name_uuid_str = str(self.lazy_taxon.name_uuid)
|
|
230
|
+
|
|
231
|
+
if name_uuid_str in self.taxa_builder.cache['images']:
|
|
232
|
+
taxon_images = self.taxa_builder.cache['images'][name_uuid_str]
|
|
227
233
|
|
|
228
234
|
else:
|
|
229
235
|
|
|
@@ -314,7 +320,7 @@ class TaxonSerializer:
|
|
|
314
320
|
collected_content_image_ids.add(taxon_image.id)
|
|
315
321
|
collected_image_store_ids.add(taxon_image.image_store.id)
|
|
316
322
|
|
|
317
|
-
self.taxa_builder.cache['images'][
|
|
323
|
+
self.taxa_builder.cache['images'][name_uuid_str] = taxon_images
|
|
318
324
|
|
|
319
325
|
taxon_images_copy = copy.deepcopy(taxon_images)
|
|
320
326
|
|
|
@@ -361,8 +367,10 @@ class TaxonSerializer:
|
|
|
361
367
|
|
|
362
368
|
def serialize_as_registry_taxon(self, languages, name_type, name, is_preferred_name, accepted_name_uuid=None):
|
|
363
369
|
|
|
364
|
-
|
|
365
|
-
|
|
370
|
+
name_uuid_str = str(self.lazy_taxon.name_uuid)
|
|
371
|
+
|
|
372
|
+
if name_uuid_str in self.taxa_builder.cache['registry']:
|
|
373
|
+
registry_taxon_json = self.taxa_builder.cache['registry'][name_uuid_str]
|
|
366
374
|
|
|
367
375
|
else:
|
|
368
376
|
|
|
Binary file
|
app_kit/context_processors.py
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
from django.conf import settings
|
|
2
|
+
import importlib.metadata
|
|
2
3
|
|
|
3
4
|
def app_kit_context(request):
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
try:
|
|
6
|
+
app_kit_version = importlib.metadata.version('localcosmos_app_kit')
|
|
7
|
+
except importlib.metadata.PackageNotFoundError:
|
|
8
|
+
app_kit_version = 'unknown'
|
|
9
|
+
|
|
10
|
+
context = {
|
|
11
|
+
'app_kit_mode': settings.APP_KIT_MODE,
|
|
12
|
+
'app_kit_sandbox_user': settings.APP_KIT_SANDBOX_USER,
|
|
13
|
+
'app_kit_sandbox_password': settings.APP_KIT_SANDBOX_PASSWORD,
|
|
14
|
+
'app_kit_short_name': getattr(settings, 'APP_KIT_SHORT_NAME', 'LC APP KIT'),
|
|
15
|
+
'app_kit_long_name': getattr(settings, 'APP_KIT_LONG_NAME', 'LOCAL COSMOS APP KIT'),
|
|
16
|
+
'app_kit_version': app_kit_version,
|
|
10
17
|
}
|
|
11
18
|
|
|
12
19
|
return context
|
|
@@ -5,6 +5,7 @@ from django.db.models.fields import BLANK_CHOICE_DASH
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
from taxonomy.lazy import LazyTaxon
|
|
8
|
+
from taxonomy.fields import HiddenTaxonField
|
|
8
9
|
|
|
9
10
|
from app_kit.features.backbonetaxonomy.models import BackboneTaxonomy, BackboneTaxa
|
|
10
11
|
|
|
@@ -89,6 +90,12 @@ class SwapTaxonForm(forms.Form):
|
|
|
89
90
|
raise forms.ValidationError(_('You cannot select the same taxon twice.'))
|
|
90
91
|
|
|
91
92
|
return cleaned_data
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class FixedSwapTaxonForm(forms.Form):
|
|
96
|
+
|
|
97
|
+
from_taxon = HiddenTaxonField()
|
|
98
|
+
to_taxon = HiddenTaxonField()
|
|
92
99
|
|
|
93
100
|
|
|
94
101
|
class TaxonRelationshipTypeForm(LocalizeableModelForm):
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{% extends 'localcosmos_server/modals/modal_form.html' %}
|
|
2
|
+
{% load i18n localcosmos_tags %}
|
|
3
|
+
|
|
4
|
+
{% block action %}
|
|
5
|
+
{% url 'request_swap_taxon' meta_app.id %}
|
|
6
|
+
{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block title %}
|
|
9
|
+
{% blocktrans %}Update taxon{% endblocktrans %}
|
|
10
|
+
{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block body %}
|
|
13
|
+
{% if swapped %}
|
|
14
|
+
<div class="alert alert-success">
|
|
15
|
+
{% blocktrans with to_name=to_taxon from_name=from_taxon %}{{ from_name }} has been replaced with {{ to_name }} where possible.{% endblocktrans %}
|
|
16
|
+
</div>
|
|
17
|
+
{% else %}
|
|
18
|
+
<p>
|
|
19
|
+
{% blocktrans %}You want to swap{% endblocktrans %}
|
|
20
|
+
</p>
|
|
21
|
+
<div>
|
|
22
|
+
<div>
|
|
23
|
+
<i>{{ from_taxon.taxon_latname }}</i> {{ from_taxon.taxon_author }}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div>
|
|
27
|
+
<strong>{% trans 'to:' %}</strong>
|
|
28
|
+
<div>
|
|
29
|
+
<i>{{ to_taxon.taxon_latname }}</i> {{ to_taxon.taxon_author }}
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div>
|
|
33
|
+
{{ form }}
|
|
34
|
+
</div>
|
|
35
|
+
<div>
|
|
36
|
+
{% if analyzed %}
|
|
37
|
+
<hr>
|
|
38
|
+
<div>
|
|
39
|
+
<div class="mt-3 mb-3">
|
|
40
|
+
<strong>{% trans 'Analyzation Result:' %}</strong>
|
|
41
|
+
{% if not verbose_to_taxon_occurrences %}
|
|
42
|
+
<span class="text-success">
|
|
43
|
+
<strong>{% trans 'swappable' %}</strong>
|
|
44
|
+
</span>
|
|
45
|
+
{% else %}
|
|
46
|
+
<span class="text-danger">
|
|
47
|
+
<strong>{% trans 'not swappable' %}</strong>
|
|
48
|
+
</span>
|
|
49
|
+
{% endif %}
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div>
|
|
53
|
+
|
|
54
|
+
<i>{{ from_taxon.taxon_latname }}</i> {{ from_taxon.taxon_author }} {% trans 'occurs in' %}:
|
|
55
|
+
|
|
56
|
+
<div class="ml-4">
|
|
57
|
+
{% if verbose_from_taxon_occurrences %}
|
|
58
|
+
{% for occurrences in verbose_from_taxon_occurrences %}
|
|
59
|
+
<div>
|
|
60
|
+
<div class="my-3">
|
|
61
|
+
<strong>{{ occurrences.verbose_model_name }}</strong>
|
|
62
|
+
{% if occurrences.is_swappable %}
|
|
63
|
+
<span class="badge badge-success">
|
|
64
|
+
{% trans 'swappable' %}
|
|
65
|
+
</span>
|
|
66
|
+
{% else %}
|
|
67
|
+
<span class="badge badge-danger">
|
|
68
|
+
{% trans 'not swappable' %}
|
|
69
|
+
</span>
|
|
70
|
+
{% endif %}
|
|
71
|
+
</div>
|
|
72
|
+
<ul>
|
|
73
|
+
{% for verbose_occurrence in occurrences.verbose_occurrences %}
|
|
74
|
+
<li>
|
|
75
|
+
{{ verbose_occurrence }}
|
|
76
|
+
</li>
|
|
77
|
+
{% endfor %}
|
|
78
|
+
</ul>
|
|
79
|
+
</div>
|
|
80
|
+
{% endfor %}
|
|
81
|
+
{% else %}
|
|
82
|
+
{% if swapped %}
|
|
83
|
+
<div class="alert alert-success">
|
|
84
|
+
{% blocktrans with to_name=to_taxon from_name=from_taxon %}{{ from_name }} has been replaced with {{ to_name }} where possible.{% endblocktrans %}
|
|
85
|
+
</div>
|
|
86
|
+
{% else %}
|
|
87
|
+
<div class="alert alert-danger">
|
|
88
|
+
{% blocktrans with name=from_taxon %}{{ name }} does not occur in your app and can't be swapped.{% endblocktrans %}
|
|
89
|
+
</div>
|
|
90
|
+
{% endif %}
|
|
91
|
+
{% endif %}
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
<div class="mt-4">
|
|
95
|
+
|
|
96
|
+
<i>{{ to_taxon.taxon_latname }}</i> {{ to_taxon.taxon_author }} {% trans 'occurs in' %}:
|
|
97
|
+
|
|
98
|
+
<div class="ml-4">
|
|
99
|
+
{% if verbose_to_taxon_occurrences %}
|
|
100
|
+
{% for to_occurrences in verbose_to_taxon_occurrences %}
|
|
101
|
+
<div>
|
|
102
|
+
<div class="my-3">
|
|
103
|
+
<strong>{{ to_occurrences.verbose_model_name }}</strong>
|
|
104
|
+
</div>
|
|
105
|
+
<ul>
|
|
106
|
+
{% for to_verbose_occurrence in to_occurrences.verbose_occurrences %}
|
|
107
|
+
<li>
|
|
108
|
+
{{ to_verbose_occurrence }}
|
|
109
|
+
</li>
|
|
110
|
+
{% endfor %}
|
|
111
|
+
</ul>
|
|
112
|
+
</div>
|
|
113
|
+
{% endfor %}
|
|
114
|
+
{% else %}
|
|
115
|
+
|
|
116
|
+
<div class="text-muted">
|
|
117
|
+
{% blocktrans %}No occurrences found.{% endblocktrans %}
|
|
118
|
+
</div>
|
|
119
|
+
{% endif %}
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
{% endif %}
|
|
124
|
+
</div>
|
|
125
|
+
{% endif %}
|
|
126
|
+
{% endblock %}
|
|
127
|
+
|
|
128
|
+
{% block footer %}
|
|
129
|
+
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{% trans 'Close' %}</button>
|
|
130
|
+
{% if not verbose_to_taxon_occurrences %}
|
|
131
|
+
<button type="submit" class="btn btn-outline-primary">{% trans 'Swap' %}</button>
|
|
132
|
+
{% endif %}
|
|
133
|
+
{% endblock %}
|
|
134
|
+
|
|
135
|
+
{% block script %}
|
|
136
|
+
{% if swapped %}
|
|
137
|
+
|
|
138
|
+
<script>
|
|
139
|
+
let element = document.getElementById("{{ from_taxon.name_uuid }}");
|
|
140
|
+
if (element) {
|
|
141
|
+
element.remove();
|
|
142
|
+
}
|
|
143
|
+
$("#Modal").modal("hide");
|
|
144
|
+
</script>
|
|
145
|
+
{% endif %}
|
|
146
|
+
{% endblock %}
|
app_kit/features/backbonetaxonomy/templates/backbonetaxonomy/ajax/taxon_references_changes.html
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{% load i18n static %}
|
|
2
|
+
|
|
3
|
+
<div class="row">
|
|
4
|
+
<div class="col-12">
|
|
5
|
+
<div class="mt-5">
|
|
6
|
+
<h2>{% trans 'Taxa with changes only in organizational data (e.g. position in tree)' %}</h2>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="card">
|
|
9
|
+
<div class="card-body">
|
|
10
|
+
{% if result.position_or_name_uuid_changed %}
|
|
11
|
+
<div class="row">
|
|
12
|
+
<div class="col-12">
|
|
13
|
+
<div class="alert alert-info">
|
|
14
|
+
{% blocktrans %}These taxa had changes only in organizational data like their position in the taxonomic tree. You can safely update these taxa without changing their scientific name or author.{% endblocktrans %}
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="card-text">
|
|
19
|
+
{% for taxon in result.position_or_name_uuid_changed %}
|
|
20
|
+
<div>
|
|
21
|
+
<i>{{ taxon.taxon_latname }}</i> {{ taxon.taxon_author }}
|
|
22
|
+
</div>
|
|
23
|
+
{% endfor %}
|
|
24
|
+
</div>
|
|
25
|
+
<div>
|
|
26
|
+
<form method="post" action="{% url 'update_taxon_references' meta_app.id %}">
|
|
27
|
+
{% csrf_token %}
|
|
28
|
+
<button type="submit" class="btn btn-primary mt-3">
|
|
29
|
+
{% trans 'Update these taxa' %}
|
|
30
|
+
</button>
|
|
31
|
+
</form>
|
|
32
|
+
</div>
|
|
33
|
+
{% else %}
|
|
34
|
+
<div class="text-muted">
|
|
35
|
+
{% trans 'No taxa with changes in organizational data found.' %}
|
|
36
|
+
</div>
|
|
37
|
+
{% endif %}
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="row mt-5">
|
|
45
|
+
<div class="col-12">
|
|
46
|
+
<div>
|
|
47
|
+
<h2>{% trans 'Taxa with potentially new author' %}</h2>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
{% if result.taxa_new_author %}
|
|
52
|
+
|
|
53
|
+
{% for entry in result.taxa_new_author %}
|
|
54
|
+
<div id="{{ entry.taxon.name_uuid }}" class="card">
|
|
55
|
+
<div class="card-body">
|
|
56
|
+
<h5 class="card-title">
|
|
57
|
+
<i>{{ entry.taxon.taxon_latname }}</i> {{ entry.taxon.taxon_author }}
|
|
58
|
+
</h5>
|
|
59
|
+
<div class="card-text">
|
|
60
|
+
<strong>{% trans 'New author names:' %}</strong>
|
|
61
|
+
<div class="my-3">
|
|
62
|
+
{% for similar_entry in entry.new_author_taxa %}
|
|
63
|
+
<div class="d-flex align-items-center">
|
|
64
|
+
<div class="pr-3">
|
|
65
|
+
<i>{{ similar_entry.similar_taxon.taxon_latname }}</i> {{ similar_entry.similar_taxon.taxon_author }}
|
|
66
|
+
</div>
|
|
67
|
+
<div>
|
|
68
|
+
<form action="{% url 'request_analyze_taxon' meta_app.id %}" class="xhr" ajax-target="ModalContent" method="POST">
|
|
69
|
+
{{ similar_entry.form }}
|
|
70
|
+
<button type="submit" class="btn btn-xs btn-success nodisable">{% trans 'accept' %}</button>
|
|
71
|
+
</form>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
{% endfor %}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
{% endfor %}
|
|
80
|
+
|
|
81
|
+
{% else %}
|
|
82
|
+
<div class="text-muted">
|
|
83
|
+
{% trans 'No taxa with new author found.' %}
|
|
84
|
+
</div>
|
|
85
|
+
{% endif %}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div>
|
|
90
|
+
<div class="row mt-5">
|
|
91
|
+
<div class="col-12">
|
|
92
|
+
<div>
|
|
93
|
+
<h2>{% trans 'Taxa now found as a synonym' %}</h2>
|
|
94
|
+
</div>
|
|
95
|
+
{% if result.taxa_in_synonyms %}
|
|
96
|
+
{% for entry in result.taxa_in_synonyms %}
|
|
97
|
+
<div id="{{ entry.taxon.name_uuid }}" class="card">
|
|
98
|
+
<div class="card-body">
|
|
99
|
+
<h5 class="card-title">
|
|
100
|
+
<i>{{ entry.taxon.taxon_latname }}</i> {{ entry.taxon.taxon_author }}
|
|
101
|
+
</h5>
|
|
102
|
+
|
|
103
|
+
<div class="card-text">
|
|
104
|
+
<div class="d-flex align-items-center">
|
|
105
|
+
<div class="pr-2">
|
|
106
|
+
<strong>{% trans 'accepted name:' %}</strong>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="pr-3">
|
|
109
|
+
<i>{{ entry.taxon.reference_accepted_name.taxon_latname }}</i> {{ entry.taxon.reference_accepted_name.taxon_author }}
|
|
110
|
+
</div>
|
|
111
|
+
<div>
|
|
112
|
+
<form action="{% url 'request_analyze_taxon' meta_app.id %}" class="xhr" ajax-target="ModalContent" method="POST">
|
|
113
|
+
{{ entry.form }}
|
|
114
|
+
<button type="submit" class="btn btn-xs btn-success nodisable">{% trans 'accept' %}</button>
|
|
115
|
+
</form>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
{% endfor %}
|
|
122
|
+
{% else %}
|
|
123
|
+
<div class="text-muted">
|
|
124
|
+
{% trans 'No taxa found as synonyms.' %}
|
|
125
|
+
</div>
|
|
126
|
+
{% endif %}
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="row my-5">
|
|
130
|
+
<div class="col-12">
|
|
131
|
+
<div>
|
|
132
|
+
<h2>{% trans 'Taxa not found in the taxonomic database anymore' %}</h2>
|
|
133
|
+
</div>
|
|
134
|
+
{% if result.taxa_missing %}
|
|
135
|
+
<div class="card">
|
|
136
|
+
<div class="card-body">
|
|
137
|
+
|
|
138
|
+
<div class="card-text">
|
|
139
|
+
{% for taxon in result.taxa_missing %}
|
|
140
|
+
<div>
|
|
141
|
+
{{ taxon }}
|
|
142
|
+
</div>
|
|
143
|
+
{% endfor %}
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
{% else %}
|
|
148
|
+
<div class="text-muted">
|
|
149
|
+
{% trans 'No missing taxa found.' %}
|
|
150
|
+
</div>
|
|
151
|
+
{% endif %}
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{% extends 'app_kit/manage_generic_content.html' %}
|
|
2
|
-
{% load i18n localcosmos_tags %}
|
|
2
|
+
{% load i18n static localcosmos_tags %}
|
|
3
3
|
|
|
4
4
|
{% block content %}
|
|
5
5
|
|
|
@@ -13,49 +13,33 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
<div>
|
|
16
|
-
<
|
|
17
|
-
{% blocktrans %}If you updated your taxonomic database you can update your taxonomic references here.
|
|
18
|
-
|
|
19
|
-
If a taxon is not found anymore in the referenced taxonomic database, this will not be fixed by this update mechanism. You have to use the Taxon Swap feature to select a new Taxon.{% endblocktrans %}
|
|
20
|
-
</div>
|
|
16
|
+
<p>
|
|
17
|
+
{% blocktrans %}If you updated your taxonomic database you can update your taxonomic references here.{% endblocktrans %}
|
|
18
|
+
</p>
|
|
21
19
|
</div>
|
|
22
|
-
|
|
23
|
-
<div class="
|
|
24
|
-
{% for error in result %}
|
|
25
|
-
<div>
|
|
26
|
-
<div>
|
|
27
|
-
<strong>
|
|
28
|
-
{{ error.taxon }}
|
|
29
|
-
</strong>
|
|
30
|
-
</div>
|
|
31
|
-
<div>
|
|
32
|
-
<ul>
|
|
33
|
-
{% for error_message in error.errors %}
|
|
34
|
-
<li>
|
|
35
|
-
{{ error_message}}
|
|
36
|
-
</li>
|
|
37
|
-
{% endfor %}
|
|
38
|
-
</ul>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
{% endfor %}
|
|
42
|
-
<div>
|
|
43
|
-
{% if updated %}
|
|
20
|
+
{% if updated %}
|
|
21
|
+
<div class="row my-5">
|
|
44
22
|
<div class="col-12">
|
|
45
23
|
<div class="alert alert-success">
|
|
46
|
-
{% trans
|
|
24
|
+
{% trans "Taxon references have been updated successfully. Some taxa might require manual review. See below." %}
|
|
47
25
|
</div>
|
|
48
26
|
</div>
|
|
49
|
-
{% endif %}
|
|
50
|
-
<div class="col-12">
|
|
51
|
-
<form id="update-taxa-form" method="POST" action="{% url 'update_taxon_references' meta_app.id %}">
|
|
52
|
-
{% csrf_token %}
|
|
53
|
-
<button type="submit" class="btn btn-primary">
|
|
54
|
-
{% trans 'Perform Update' %}
|
|
55
|
-
</button>
|
|
56
|
-
</form>
|
|
57
27
|
</div>
|
|
28
|
+
{% endif %}
|
|
29
|
+
<div class="row">
|
|
30
|
+
<div id="check-result" class="col-12">
|
|
31
|
+
<div class="text-center my-5">
|
|
32
|
+
<img src="{% static 'app_kit/images/spinner.gif' %}" />
|
|
33
|
+
</div>
|
|
34
|
+
<div>
|
|
58
35
|
</div>
|
|
59
36
|
</div>
|
|
60
37
|
|
|
38
|
+
<script>
|
|
39
|
+
$.get("{% url 'get_taxon_references_changes' meta_app.id %}", (html) => {
|
|
40
|
+
$("#check-result").html(html);
|
|
41
|
+
ajaxify('check-result')
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
44
|
+
|
|
61
45
|
{% endblock %}
|
|
Binary file
|