Skip to content

Commit

Permalink
Merge pull request #38 from arthur-schnitzler/main
Browse files Browse the repository at this point in the history
buttons, titles, ...
  • Loading branch information
csae8092 authored Jan 13, 2024
2 parents 75ee4eb + 7be0ded commit 4b4a683
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 39 deletions.
8 changes: 4 additions & 4 deletions apis_core/apis_entities/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def save(self, *args, **kwargs):

def __init__(self, entity, *args, **kwargs):
attrs = {
"data-placeholder": "Type to get suggestions",
"data-placeholder": "Tippe um Vorschläge zu bekommen",
"data-minimum-input-length": 1,
"data-html": True,
"style": "width: auto",
Expand All @@ -45,7 +45,7 @@ def __init__(self, entity, *args, **kwargs):
args=[entity.title(), ent_merge_pk],
)
label = f"Suche nach Objekten vom Type: {entity.title()}"
button_label = "Merge"
button_label = "zusammenführen"
self.helper.form_action = reverse(
"apis:apis_entities:merge_view", kwargs=form_kwargs
)
Expand Down Expand Up @@ -88,8 +88,8 @@ def __init__(self, *args, **kwargs):
acc_grp1 = Fieldset("Metadata {}".format(entity.title()))
acc_grp2 = AccordionGroup("MetaInfo", "references", "notes", "review")
attrs = {
"data-placeholder": "Type to get suggestions",
"data-minimum-input-length": getattr(settings, "APIS_MIN_CHAR", 3),
"data-placeholder": "Tippe um Vorschläge zu bekommen",
"data-minimum-input-length": 1,
"data-html": True,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
{% if object.get_prev_url %}
<h2>
<a href="{{ object.get_prev_url }}" style="float:right">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left">
<polyline points="15 18 9 12 15 6" />
</svg>
<i class="bi bi-chevron-left" title="vorige Entität"></i>
</a>
</h2>
{% endif %}
Expand All @@ -30,13 +28,13 @@ <h2 class="display-4 text-center">
<h2 class="text-center">
{% if object.get_edit_url %}
<a href="{{ object.get_edit_url }}">
<i class="bi bi-pencil-square"></i>
<i class="bi bi-pencil-square" title="Entität bearbeiten"></i>
</a>
{% endif %}
{% if object.get_delete_url %}
|
<a href="{{ object.get_delete_url }}">
<i class="bi bi-trash3"></i>
<i class="bi bi-trash3" title="Entität löschen"></i>
</a>
{% endif %}
</h2>
Expand All @@ -46,9 +44,7 @@ <h2 class="text-center">
{% if object.get_next_url %}
<h2>
<a href="{{ object.get_next_url }}" style="float:left">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
<polyline points="9 18 15 12 9 6" />
</svg>
<i class="bi bi-chevron-right" title="nächste Entität"></i>
</a>
</h2>
{% endif %}
Expand All @@ -58,17 +54,10 @@ <h2>
<div class="row">
<div class="col-md-5">
<h3 class="text-center">
General Info
<a href="{{ object.get_api_url }}">
<small>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-database">
<ellipse cx="12" cy="5" rx="9" ry="3" />
<path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3" />
<path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5" />
</svg>
</small>
<i class="bi bi-database" title="zur API-Ansicht der Entität"></i>
</a>
{% if entity_type != 'event' %}| <a href="{{ object.get_tei_url }}"><abbr title="link to a project specific TEI-serialisation of this entity">TEI</abbr></a>{% endif %}
{% if entity_type != 'event' %}| <a href="{{ object.get_tei_url }}" title="zur TEI-Ansicht der Entität"><i class="bi bi-filetype-xml"></i></a>{% endif %}
</h3>
{% block info-table %}
<table class="table">
Expand Down Expand Up @@ -148,9 +137,9 @@ <h3 class="text-center">
</th>
<td>
{% for x in object.uri_set.all %}
<a href="{{ x }}">{{ x }}</a> {% if user.is_authenticated %} <a href="{{ x.get_edit_url }}">
<a href="{{ x }}">{{ x }}</a> {% if user.is_authenticated %} <a href="{{ x.get_edit_url }}" title="URI bearbeiten">
<i class="bi bi-pencil-square"></i>
</a> | <a href="{{ x.get_delete_url }}">
</a> | <a href="{{ x.get_delete_url }}" title="URI löschen">
<i class="bi bi-trash3"></i>
</a>{% endif %}<br />
{% endfor %}
Expand Down
18 changes: 9 additions & 9 deletions apis_core/apis_entities/templates/apis_entities/edit_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,37 @@
<div class="container-fluid pt-2">
<h1 class="display-4 text-center">
<a href="{{ instance.get_listview_url }}">
<small>{{ entity_type }}s </small>
<i class="{{ instance.get_icon }}" title="{{ entity_type|title }}"></i>
</a>
{{ instance }}
</h1>
<h2 class="text-center">
<a href="{{ instance.get_absolute_url }}">
<i class="bi bi-eye"></i>
<i class="bi bi-eye" title="zur Detailansicht"></i>
</a>
<a href="/entity/{{ instance.id }}">
<i class="bi bi-database"></i>
<a href="{{ instance.get_api_url }}">
<i class="bi bi-database" title="zur API-Ansicht"></i>
</a>
</h2>
<div class="row">
<div class="col-md-5">
<h3 class="text-center">
Edit the Entity
Entität bearbeiten
</h3>
<form action="" method="post">
{% crispy form %}
<div class="pt-3">
<input class="btn btn-primary" type="submit" value="modify" />
<a class ="btn btn-danger btn-primary" href="delete">Delete</a>
<input class="btn btn-primary" type="submit" value="ändern" />
<a class ="btn btn-danger btn-primary" href="delete">löschen</a>
</div>
</form>
<hr>
<h4>Merge Entity</h4>
<h4>Entitäten zusammenführen</h4>
<p>Die aktuelle Entität <strong>{{ instance }}</strong> wird gelöscht, deren Eigenschaften/Verbindungen aber auf die ausgewählten Entität übertragen.</p>
{% crispy form_merge_with form_merge_with.helper %}
</div>
<div class="col-md-7">
<h3 class="text-center">Edit the Relations</h3>
<h3 class="text-center">Bearbeiten der Verbindungen</h3>
{% for obj in right_card %}
<div class="pt-2">
<h4>{{ obj.0 }}</h4>
Expand Down
10 changes: 4 additions & 6 deletions apis_core/apis_metainfo/templates/apis_metainfo/uri_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% if object.get_prev_url %}
<h2>
<a href="{{ object.get_prev_url }}" style="float:right">
<i data-feather="chevron-left" title="previous"></i>
<i class="bi bi-chevron-left" title="vorige Entität"></i>
</a>
</h2>
{% endif %}
Expand All @@ -26,13 +26,13 @@ <h2 class="display-4 text-center">
{% if user.is_authenticated %}
<h2 class="text-center">
{% if object.get_edit_url %}
<a href="{{ object.get_edit_url }}">
<a href="{{ object.get_edit_url }}" title="URI bearbeiten">
<i class="bi bi-pencil-square"></i>
</a>
{% endif %}
{% if object.get_delete_url %}
|
<a href="{{ object.get_delete_url }}">
<a href="{{ object.get_delete_url }}" title="URI löschen">
<i class="bi bi-trash3"></i>
</a>
{% endif %}
Expand All @@ -45,9 +45,7 @@ <h2 class="text-center">
{% if object.get_next_url %}
<h2>
<a href="{{ object.get_next_url}}" style="float:left">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
<polyline points="9 18 15 12 9 6" />
</svg>
<i class="bi bi-chevron-right" title="nächste URI"></i>
</a>
</h2>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"entity_type": "{{ entity_type }}",
"ButtonText": "speichern"
}'>
<i class="bi bi-pencil-square"></i>
<i class="bi bi-pencil-square" title="Verbindung bearbeiten"></i>
</a>

0 comments on commit 4b4a683

Please sign in to comment.