Skip to content

Commit

Permalink
Add "Documentation" links in the header and footer #38
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Jan 24, 2024
1 parent 32b89c5 commit 22db54f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions dje/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ def init_with_context(self, context):
)

shortcuts = [
{
"title": _("Documentation"),
"url": "https://dejacode.readthedocs.io/en/latest/",
},
{
"title": _("Models documentation"),
"url": reverse("admin:docs_models"),
Expand Down
1 change: 1 addition & 0 deletions dje/templates/includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<div class="container-fluid p-3 p-md-5">
<ul class="list-unstyled">
<li><a href="/">Home</a></li>{# No trans for Home on purpose #}
<li><a href="https://dejacode.readthedocs.io/en/latest/" target="_blank" rel="noreferrer">{% trans 'Documentation' %}</a></li>
<li><a href="https://www.nexb.com/resources/#support" target="_blank" rel="noreferrer">{% trans 'Support' %}</a></li>
<li><a href="https://www.nexb.com/dejacode/" target="_blank" rel="noreferrer">{% trans 'About' %}</a></li>
<li><a href="https://github.com/nexB/dejacode" target="_blank" rel="noreferrer">{% trans 'Source Code' %}</a></li>
Expand Down
1 change: 1 addition & 0 deletions dje/templates/includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<div class="dropdown-menu">
<a class="dropdown-item" href="/">Home</a>{# No trans for Home on purpose #}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://dejacode.readthedocs.io/en/latest/" target="_blank" rel="noreferrer">{% trans 'Documentation' %}</a>
<a class="dropdown-item" href="https://www.nexb.com/resources/#support" target="_blank" rel="noreferrer">{% trans 'Support' %}</a>
<a class="dropdown-item" href="https://www.nexb.com/dejacode/" target="_blank" rel="noreferrer">{% trans 'About' %}</a>
<div class="dropdown-divider"></div>
Expand Down
6 changes: 3 additions & 3 deletions dje/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,12 @@ def home_view(request):
"""Dataspace homepage."""
documentation_urls = {}
rtd_url = "https://dejacode.readthedocs.io/en/latest"
tutorials_label = format_html('Tutorials <span class="badge text-bg-success">New</span>')

documentation_urls = {
tutorials_label: f"{rtd_url}/tutorial-1.html",
"How-To videos": "https://www.youtube.com/playlist?list=PLCq_LXeUqhkQj0u7M26fSHt1ebFhNCpCv",
"Documentation": "https://dejacode.readthedocs.io/en/latest/",
"Tutorials": f"{rtd_url}/tutorial-1.html",
"API documentation": reverse("api-docs:docs-index"),
"How-To videos": "https://www.youtube.com/playlist?list=PLCq_LXeUqhkQj0u7M26fSHt1ebFhNCpCv",
}

support_urls = {
Expand Down

0 comments on commit 22db54f

Please sign in to comment.