2020-03-24 17:11:20 +01:00
|
|
|
<h2>
|
|
|
|
<a
|
2020-04-27 17:45:53 +02:00
|
|
|
href="{{url_for("users.summary_GET", username=owner.username)}}"
|
2020-09-04 16:49:06 +02:00
|
|
|
>{{owner.canonical_name}}</a>/<wbr>{{project.name}}
|
2020-03-24 17:11:20 +01:00
|
|
|
</h2>
|
2021-05-16 22:35:25 +02:00
|
|
|
{% macro link(path, title, alternates=[], cls="") %}
|
2020-03-24 17:11:20 +01:00
|
|
|
<a
|
|
|
|
class="nav-link {% if view == title or view in alternates %}active{% endif %} {{cls}}"
|
|
|
|
href="{{ path }}">{{ title }}</a>
|
|
|
|
{% endmacro %}
|
|
|
|
<ul class="nav nav-tabs">
|
2022-06-29 14:25:16 +02:00
|
|
|
{% if project.visibility.value != "PUBLIC" %}
|
2021-12-08 18:13:25 +01:00
|
|
|
<li
|
|
|
|
class="nav-item nav-text vis-{{project.visibility.value.lower()}}"
|
2022-06-29 14:25:16 +02:00
|
|
|
{% if project.visibility.value == "UNLISTED" %}
|
2021-12-08 18:13:25 +01:00
|
|
|
title="This project is only visible to those who know the URL."
|
2022-06-29 14:25:16 +02:00
|
|
|
{% elif project.visibility.value == "PRIVATE" %}
|
2021-12-08 18:13:25 +01:00
|
|
|
title="This project is only visible to those who were invited to view it."
|
|
|
|
{% endif %}
|
|
|
|
>
|
2022-06-29 14:25:16 +02:00
|
|
|
{% if project.visibility.value == "UNLISTED" %}
|
2021-12-08 18:13:25 +01:00
|
|
|
Unlisted
|
2022-06-29 14:25:16 +02:00
|
|
|
{% elif project.visibility.value == "PRIVATE" %}
|
2021-12-08 18:13:25 +01:00
|
|
|
Private
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2020-03-24 17:11:20 +01:00
|
|
|
<li class="nav-item">
|
|
|
|
{{link(url_for("projects.summary_GET",
|
|
|
|
owner=owner.canonical_name,
|
|
|
|
project_name=project.name), "summary")}}
|
|
|
|
</li>
|
2020-04-02 18:55:05 +02:00
|
|
|
{% if project.website %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a
|
|
|
|
class="nav-link"
|
|
|
|
href="{{project.website}}"
|
|
|
|
rel="noopener nofollow"
|
|
|
|
>website {{icon('external-link-alt')}}</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2020-03-24 17:11:20 +01:00
|
|
|
{% if any(project.source_repos) %}
|
|
|
|
<li class="nav-item">
|
2020-09-04 17:22:40 +02:00
|
|
|
{% if len(project.source_repos) == 1 and
|
|
|
|
not (current_user and current_user.id == project.owner_id) %}
|
|
|
|
{{link(project.source_repos[0].url(), "source")}}
|
|
|
|
{% else %}
|
2020-04-01 19:36:13 +02:00
|
|
|
{{link(url_for("sources.sources_GET",
|
2020-03-24 17:11:20 +01:00
|
|
|
owner=owner.canonical_name,
|
|
|
|
project_name=project.name), "sources")}}
|
2020-09-04 17:22:40 +02:00
|
|
|
{% endif %}
|
2020-03-24 17:11:20 +01:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
2020-03-25 15:08:29 +01:00
|
|
|
{% if any(project.mailing_lists) %}
|
|
|
|
<li class="nav-item">
|
2020-09-04 17:22:40 +02:00
|
|
|
{% if len(project.mailing_lists) == 1 and
|
|
|
|
not (current_user and current_user.id == project.owner_id) %}
|
|
|
|
{{link(project.mailing_lists[0].url(), "mailing list")}}
|
|
|
|
{% else %}
|
2020-04-01 19:36:13 +02:00
|
|
|
{{link(url_for("mailing_lists.lists_GET",
|
2020-03-25 15:08:29 +01:00
|
|
|
owner=owner.canonical_name,
|
|
|
|
project_name=project.name), "mailing lists")}}
|
2020-09-04 17:22:40 +02:00
|
|
|
{% endif %}
|
2020-03-25 15:08:29 +01:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
2020-04-02 15:24:29 +02:00
|
|
|
{% if any(project.trackers) %}
|
|
|
|
<li class="nav-item">
|
2020-09-04 17:22:40 +02:00
|
|
|
{% if len(project.trackers) == 1 and
|
|
|
|
not (current_user and current_user.id == project.owner_id) %}
|
|
|
|
{{link(project.trackers[0].url(), "tickets")}}
|
|
|
|
{% else %}
|
2020-04-02 16:18:04 +02:00
|
|
|
{{link(url_for("trackers.trackers_GET",
|
|
|
|
owner=owner.canonical_name,
|
|
|
|
project_name=project.name), "tickets")}}
|
2020-09-04 17:22:40 +02:00
|
|
|
{% endif %}
|
2020-04-02 15:24:29 +02:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
2020-03-24 17:11:20 +01:00
|
|
|
{# TODO
|
|
|
|
<li class="nav-item">
|
|
|
|
{{link("#", "documentation")}}
|
|
|
|
</li>
|
|
|
|
#}
|
2020-04-02 15:36:27 +02:00
|
|
|
{% if current_user and current_user.id == owner.id %}
|
2020-03-24 17:11:20 +01:00
|
|
|
<li class="flex-grow-1"></li>
|
|
|
|
<li class="nav-item">
|
2020-04-02 18:55:05 +02:00
|
|
|
{{link(url_for("projects.config_GET",
|
|
|
|
owner=owner.canonical_name, project_name=project.name), "more +",
|
|
|
|
alternates=["add more"])}}
|
2020-03-24 17:11:20 +01:00
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|