Skip to content

Commit

Permalink
feat: cleanup the default entity detail and edit view
Browse files Browse the repository at this point in the history
This commit reduces borders around elements in the `General Info` table
in the detail view and in the edit form in the edit view.
  • Loading branch information
b1rger committed Oct 3, 2023
1 parent f2be4dc commit 789d906
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ <h3>
</a>
</h3>
</div>
<div class="card-body">
<div class="card-body p-0">

{% block info-table %}
<table class="table table-bordered table-hover">
<table class="table table-hover">
<tr>
<th>Titel</th>
<td>{{ object.name }}</td>
Expand Down Expand Up @@ -174,7 +174,7 @@ <h3>
{% endblock info-table %}

{% block info-metadata %}
<table class="table table-bordered table-hover">
<table class="table table-hover">
<tr>
<th>Source</th>
<td>{{ object.source }}</td>
Expand Down
139 changes: 67 additions & 72 deletions apis_core/apis_entities/templates/apis_entities/edit_generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,82 +68,80 @@ <h2>
</button>
{% endif %}

<div class="card card-default">
{% crispy form %}
<div class="card-header" role="tab" id="headingFour">
<h4 class="card-title">
<a class="collapsed"
role="button"
data-toggle="collapse"
data-parent="#accordion"
href="#collapseFour"
aria-expanded="false"
aria-controls="collapseFour">Texts</a>
</h4>
</div>
<div id="collapseFour"
class="card-collapse collapse"
role="tabcard"
aria-labelledby="headingFour">
<div class="card-body"></div>
</div>

{% block linkedOpenData %}
{% crispy form %}
<div class="card-header" role="tab" id="headingFour">
<h4 class="card-title">
<a class="collapsed"
role="button"
data-toggle="collapse"
data-parent="#accordion"
href="#collapseFour"
aria-expanded="false"
aria-controls="collapseFour">Texts</a>
</h4>
</div>
<div id="collapseFour"
class="card-collapse collapse"
role="tabcard"
aria-labelledby="headingFour">
<div class="card-body"></div>
</div>

{% if object_lod %}
<div class="card card-default">
<div class="card-header" role="tab" id="headingSix">
<h4 class="card-title">
<a role="button"
data-toggle="collapse"
data-parent="#accordion"
href="#collapseOne3"
aria-expanded="false"
aria-controls="collapseOne3">Linked Open Data</a>
</h4>
</div>
<div id="collapseOne3"
class="card-collapse collapse"
role="tabcard"
aria-labelledby="headingSix">
<div id="tab_Revisions" class="card-body">
<p>
{% for lod in object_lod %}

{% if forloop.last %}
<a href="{{ lod.uri }}">{{ lod.uri }}</a>
{% else %}
<a href="{{ lod.uri }}">{{ lod.uri }}</a>
<br />
{% endif %}

{% endfor %}
</p>
</div>
{% block linkedOpenData %}

{% if object_lod %}
<div class="card card-default">
<div class="card-header" role="tab" id="headingSix">
<h4 class="card-title">
<a role="button"
data-toggle="collapse"
data-parent="#accordion"
href="#collapseOne3"
aria-expanded="false"
aria-controls="collapseOne3">Linked Open Data</a>
</h4>
</div>
<div id="collapseOne3"
class="card-collapse collapse"
role="tabcard"
aria-labelledby="headingSix">
<div id="tab_Revisions" class="card-body">
<p>
{% for lod in object_lod %}

{% if forloop.last %}
<a href="{{ lod.uri }}">{{ lod.uri }}</a>
{% else %}
<a href="{{ lod.uri }}">{{ lod.uri }}</a>
<br />
{% endif %}

{% endfor %}
</p>
</div>
</div>
{% endif %}
</div>
{% endif %}

{% endblock %}
{% endblock %}

{% block editbuttons %}
{% block editbuttons %}

{% if instance %}
<input class="btn btn-primary" type="submit" value="modify" />
<button class="compare_tooltip btn btn-default"
data-tooltip='{"app":"apis_entities","kind":"{{ entity_type|lower }}","pk":"{{ instance.pk }}"}'>
Revisions
</button>
<a class ="btn btn-danger btn-primary" href="delete">Delete</a>
<a class="btn btn-success"
href="{% url 'apis:apis_entities:generic_entities_create_view' entity_type %}">Create new {{ entity_type|title }}</a>
{% else %}
<input class="btn btn-primary" type="submit" value="create" />
{% endif %}
{% if instance %}
<input class="btn btn-primary" type="submit" value="modify" />
<button class="compare_tooltip btn btn-default"
data-tooltip='{"app":"apis_entities","kind":"{{ entity_type|lower }}","pk":"{{ instance.pk }}"}'>
Revisions
</button>
<a class ="btn btn-danger btn-primary" href="delete">Delete</a>
<a class="btn btn-success"
href="{% url 'apis:apis_entities:generic_entities_create_view' entity_type %}">Create new {{ entity_type|title }}</a>
{% else %}
<input class="btn btn-primary" type="submit" value="create" />
{% endif %}

{% endblock editbuttons %}
{% endblock editbuttons %}

</div>
</form>
</div>

Expand All @@ -161,10 +159,7 @@ <h3>
</h3>
</div>
<div class="card-body">
<div class="card"
id="accordion"
role="tablist"
aria-multiselectable="true">
<div id="accordion" role="tablist" aria-multiselectable="true">

{% block additional_accordion %}
<div class="panel panel-default">
Expand Down

0 comments on commit 789d906

Please sign in to comment.