Skip to content

Commit 45a6d6b

Browse files
committed
Tune project admin dashboard navigation menu
- Alter the admin navigation listing for use with organizations - Make docs listing less redundant with headers
1 parent f1f487b commit 45a6d6b

File tree

2 files changed

+35
-16
lines changed

2 files changed

+35
-16
lines changed

readthedocsext/theme/templates/projects/edit_base.html

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@
2626
<a class="item {% block project_domains_active %}{% endblock %}" href="{% url "projects_domains" project.slug %}">
2727
{% trans "Domains" %}
2828
</a>
29-
<a class="item {% block project_users_active %}{% endblock %}" href="{% url "projects_users" project.slug %}">
30-
{% trans "Maintainers" %}
31-
</a>
29+
{% if not USE_ORGANIZATIONS %}
30+
<a class="item {% block project_users_active %}{% endblock %}" href="{% url "projects_users" project.slug %}">
31+
{% trans "Maintainers" %}
32+
</a>
33+
{% endif %}
34+
{% if USE_ORGANIZATIONS %}
35+
<a class="item {% block project_access_tokens_active %}{% endblock %}" href="{% url "projects_temporary_access_list" project.slug %}">
36+
{% trans "Sharing" %}
37+
</a>
38+
{% endif %}
3239
<a class="item {% block project_translations_active %}{% endblock %}" href="{% url "projects_translations" project.slug %}">
3340
{% trans "Translations" %}
3441
</a>
@@ -38,6 +45,11 @@
3845
<a class="item {% block project_integrations_active %}{% endblock %}" href="{% url "projects_integrations" project.slug %}">
3946
{% trans "Integrations" %}
4047
</a>
48+
{% if USE_ORGANIZATIONS %}
49+
<a class="item {% block project_keys_active %}{% endblock %}" href="{% url "projects_keys" project.slug %}">
50+
{% trans "SSH keys" %}
51+
</a>
52+
{% endif %}
4153
<a class="item {% block project_environment_variables_active %}{% endblock %}" href="{% url "projects_environmentvariables" project.slug %}">
4254
{% trans "Environment variables" %}
4355
</a>
@@ -71,11 +83,13 @@
7183
{% block project_edit_sidebar_help_topics_container %}
7284
<div class="ui basic segment">
7385
<h2 class="ui small header">{% trans "Help topics" %}</h2>
74-
<div class="ui bulleted list">
75-
{% block project_edit_sidebar_help_topics %}
76-
{% endblock project_edit_sidebar_help_topics %}
77-
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/" text=_("Documentation index") is_external=True class="item" %}
78-
</div>
86+
{% block project_edit_sidebar_help_topics_content %}
87+
<div class="ui bulleted list">
88+
{% block project_edit_sidebar_help_topics %}
89+
{% endblock project_edit_sidebar_help_topics %}
90+
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/" text=_("Documentation index") is_external=True class="item" %}
91+
</div>
92+
{% endblock project_edit_sidebar_help_topics_content %}
7993
</div>
8094
{% endblock project_edit_sidebar_help_topics_container %}
8195

readthedocsext/theme/templates/projects/settings_basics_form.html

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,16 @@ <h3 class="ui small header">
6161
</div>
6262
{% endblock %}
6363

64-
{% block project_edit_sidebar_help_topics %}
65-
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/tutorial/index.html" text="Tutorial: Getting started" is_external=True class="item" %}
66-
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/intro/getting-started-with-sphinx.html" text="Tutorial: Getting started with Sphinx" is_external=True class="item" %}
67-
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/intro/getting-started-with-mkdocs.html" text="Tutorial: Getting started with MkDocs" is_external=True class="item" %}
68-
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/intro/import-guide.html" text="Tutorial: Importing your documentation" is_external=True class="item" %}
69-
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/config-file/v2.html" text="Reference for the .readthedocs.yaml configuration file" is_external=True class="item" %}
70-
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/en/stable/faq.html#how-do-i-change-my-project-slug-the-url-your-docs-are-served-at" text="How do I change my project slug (the URL your docs are served at)?" is_external=True class="item" %}
71-
{% endblock project_edit_sidebar_help_topics %}
64+
{% block project_edit_sidebar_help_topics_content %}
65+
<div class="ui mini header">{% trans "Tutorials" %}</div>
66+
<div class="ui bulleted list">
67+
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/tutorial/index.html" text="Getting started" is_external=True class="item" %}
68+
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/intro/getting-started-with-sphinx.html" text="Getting started with Sphinx" is_external=True class="item" %}
69+
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/intro/getting-started-with-mkdocs.html" text="Getting started with MkDocs" is_external=True class="item" %}
70+
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/intro/import-guide.html" text="Importing your documentation" is_external=True class="item" %}
71+
</div>
72+
<div class="ui mini header">{% trans "Resources" %}</div>
73+
<div class="ui bulleted list">
74+
{% include "includes/elements/link.html" with url="https://docs.readthedocs.io/page/config-file/v2.html" text="Configuration file" is_external=True class="item" %}
75+
</div>
76+
{% endblock project_edit_sidebar_help_topics_content %}

0 commit comments

Comments
 (0)