Add anchors in admin (#402)

* Add anchors in admin

* Fix whitespace

* Add some css
This commit is contained in:
Alexandr Artemyev 2020-06-09 14:27:52 +03:00 committed by GitHub
parent a304c4f865
commit 788616d70c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

View file

@ -13,6 +13,16 @@
.help {
font-weight: normal !important;
}
#results{
#results {
overflow-x: auto;
}
}
.item-anchor {
visibility: hidden;
margin-left: .1em;
}
.item-name {
white-space: nowrap;
}
.item-name:hover .item-anchor {
visibility: visible;
}

View file

@ -12,7 +12,11 @@
{% for item in config_values %}
<tr class="{% cycle 'row1' 'row2' %}">
<th>
{{ item.name }} <div class="help">{{ item.help_text|linebreaksbr }}</div>
<span class="item-name" id="{{ item.name|slugify }}">
{{ item.name }}
<a class="item-anchor" href="#{{ item.name|slugify }}" title="Link to this setting"></a>
</span>
<div class="help">{{ item.help_text|linebreaksbr }}</div>
</th>
<td>
{{ item.default|linebreaks }}