Skip to content

Commit

Permalink
Person -> Personen und Orte
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Sep 19, 2024
1 parent e582303 commit 1bcd7a4
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 3 deletions.
2 changes: 1 addition & 1 deletion archiv/templates/archiv/partials/entity_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ul>
{% endif %}
{% if object.person.all %}
<legend>Personen</legend>
<legend>Personen und Institutionen</legend>
<ul>
{% for x in object.person.all %}
<li><a href="{{ x.get_absolute_url }}">{{ x }}</a></li>
Expand Down
125 changes: 125 additions & 0 deletions archiv/templates/archiv/person_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{% extends "webpage/base.html" %}
{% load static %}
{% load django_tables2 %}
{% load browsing_extras %}
{% load crispy_forms_field %}
{% load crispy_forms_tags %}
{% block title %}
Personen und Institutionen
{% endblock title %}
{% block scriptHeader %}{% endblock scriptHeader %}
{% block content %}
<script type="text/javascript">
$(document).ready(function() {
var fetchedParameter = "{{ table.page.number }}";
$("#goto option").each(function() {
if($(this).text() == fetchedParameter) {
$(this).attr('selected', 'selected');
}
});
});
</script>
<div class="container-fluid">
<div class="row">
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h3>
Personen und Institutionen
</h3>
{% if user.is_authenticated %}
{% if create_view_link %}
<a class="btn btn-outline-secondary" href="{{ create_view_link }} ">
{% if class_name == "Skos Concept" %}
Neues Schlagwort erstellen
{% else %}
Neue {{ class_name }} erstellen
{% endif %}
</a>
{% endif %}
{% endif %}
{% block customView %}
{% endblock customView %}
{% block create_button %}
{% endblock create_button %}
<!--Search mask-->
{% load django_tables2 crispy_forms_tags %}
<form action="." class="uniForm" method="get">
{% crispy filter.form filter.form.helper %}
{% if togglable_colums %}

{% if togglable_colums %}
<label for="column_selector">Weitere Spalten zur Anzeige in der rechten Tabelle auswählen:</label>
<select multiple
class="form-control"
name="columns"
size="3"
id="column_selector" style="margin-bottom: 1em">
{% for key, value in togglable_colums.items %}
{% if key == 'merge' and user.is_authenticated and enable_merge %}
<option value="{{ key }}">
{{ value }}
</option>
{% elif key == 'merge' and not user.is_authenticated %}
{% elif key != 'merge' %}
<option value="{{ key }}">
{{ value }}
</option>
{% endif %}
{% endfor %}
</select>
{% else %}
{% endif %}

{% endif %}
<a class="btn btn-primary" href=".">Suche zurücksetzen</a>
<button type="submit" class="btn btn-primary">Suchanfrage absenden</button>
</form>

{% include "browsing/partials/chart_form.html" %}
</div>
</div>
</div>
<div class="col-md-8" id="results">
<div class="card">
<div class="card-body table-responsive">
{% with table.paginator.count as total %}
<legend>
Alle Treffer: {{ total }}
</legend>
{% endwith %}

{% block table %}
{% include "browsing/partials/table.html" %}
{% endblock table %}
{% block pagination.allpages %}
{% include "browsing/partials/pagination.html" %}
{% endblock pagination.allpages %}
<div style="float: right;">
{% include "browsing/partials/download_menu.html" %}
</div>

</div>
</div>
</div>
</div>
</div>
{% endblock content %}
{% block scripts2 %}
<script src="{% static "browsing/js/set-form-attributes.js" %}"></script>
<script src="{% static "browsing/js/filter-for-blank-fields.js" %}"></script>

<!-- Makes sure that "icontains" (enthält) is set as initial value for lookup filters -->
<!-- <script>
const lookUps = document.getElementsByClassName('select form-control custom-select');
for (lookUp in lookUps) {
const options = Array.prototype.slice.call(lookUps[lookUp].options, 0);
console.log(options)
for (let i = 0; i < options.length; ++i) {
if (options[i].text === '---------') {
options[i].remove();
}
}
}
</script> -->
{% endblock scripts2 %}
2 changes: 1 addition & 1 deletion archiv/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class PersonListView(GenericListView):
"title",
]
enable_merge = True
template_name = "archiv/custom_list.html"
template_name = "archiv/person_list.html"


class PersonDetailView(BaseDetailView):
Expand Down
2 changes: 1 addition & 1 deletion webpage/templates/webpage/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
<a class="dropdown-item" href="{% url 'archiv:event_browse' %}">Ereignisse</a>
<a class="dropdown-item" href="{% url 'archiv:wab_browse' %}">Bruckner Werke</a>
<a class="dropdown-item" href="{% url 'archiv:work_browse' %}">Literatur</a>
<a class="dropdown-item" href="{% url 'archiv:person_browse' %}">Personen</a>
<a class="dropdown-item" href="{% url 'archiv:person_browse' %}">Personen und Institutionen</a>
<a class="dropdown-item" href="{% url 'archiv:place_browse' %}">Orte</a>
<a class="dropdown-item" href="{% url 'vocabs:skosconcept_browse' %}">Schlagworte</a>
</div>
Expand Down

0 comments on commit 1bcd7a4

Please sign in to comment.