Skip to content

Commit

Permalink
Add anchors in admin (#402)
Browse files Browse the repository at this point in the history
* Add anchors in admin

* Fix whitespace

* Add some css
  • Loading branch information
Mogost committed Jun 9, 2020
1 parent a304c4f commit 788616d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 12 additions & 2 deletions constance/static/admin/css/constance.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 788616d

Please sign in to comment.