feat(base): add dynamic docs icon
specifying `context['model_docs_path']` with the path will add the docs icon !21
This commit is contained in:
@ -72,6 +72,10 @@ section h2 span svg {
|
||||
fill: #ff0000;
|
||||
}
|
||||
|
||||
.icon-help svg {
|
||||
fill: #177ee6;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<section>
|
||||
@ -81,6 +85,11 @@ section h2 span svg {
|
||||
{% include 'icons/delete.svg' %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if model_docs_path %}
|
||||
<span title="Documentation" id="content_header_icon" class="icon-help" onclick="window.open('{% settings_value 'DOCS_ROOT' %}{{ model_docs_path }}', '_blank')">
|
||||
{% include 'icons/help.svg' %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if model_name and model_pk %}
|
||||
{% block content_header_icon %}
|
||||
<span title="View History" id="content_header_icon" onclick="window.location='{% url '_history' model_name=model_name model_pk=model_pk %}';">
|
||||
|
Reference in New Issue
Block a user