{% extends "master.html" %}
{% block title %}{{ repo.name }}{% endblock %}
{%block tag %}home{% endblock %}
{% block content %}
<h2>
{% if '/fork/' in request.url %}
<a href="{{ url_for('view_fork_repo', username=username, repo=repo.name)}}">
{% else %}
<a href="{{ url_for('view_repo', repo=repo.name)}}">
{% endif %}
{{ repo.fullname }}
</a>
{% if branchname %} ({{ branchname }}) {% endif %}
</h2>
{% if repo.is_fork %}
<section id="parent">
Forked from
<a href="{{ url_for('view_repo', repo=repo.parent.name)}}">
{{ repo.parent.name }}</a>
</section>
{% endif %}
<div class="horizontal-menu">
<ul>
<li {% if select == 'overview' %}class="selected" {% endif %}>
{% if '/fork/' in request.url %}
<a href="{{ url_for('view_fork_repo', username=username,
repo=repo.name) }}">
{% else %}
<a href="{{ url_for('view_repo', repo=repo.name) }}">
{% endif %}
Overview</a>
</li>
{% if repo.project_wiki %}
<li {% if select == 'docs' %}class="selected" {% endif %}>
<a href="{{ url_for('view_wiki', username=username,
repo=repo.name) }}">Docs</a>
</li>
{% endif %}
<li {% if select == 'logs' %}class="selected" {% endif %}>
{% if '/fork/' in request.url %}
<a href="{{ url_for('view_fork_log', username=username,
repo=repo.name) }}">Logs</a>
{% else %}
<a href="{{ url_for('view_log', repo=repo.name) }}">Logs</a>
{% endif %}
</li>
<li {% if select == 'tree' %}class="selected" {% endif %}>
{% if '/fork/' in request.url %}
<a href="{{ url_for('view_fork_tree', username=username,
repo=repo.name) }}">Tree</a>
{% else %}
<a href="{{ url_for('view_tree', repo=repo.name) }}">Tree</a>
{% endif %}
</li>
{% if repo.issue_tracker %}
<li {% if select == 'issues' %}class="selected" {% endif %}>
{% if '/fork/' in request.url %}
<a href="{{ url_for('view_fork_issues', username=username,
repo=repo.name) }}">
{% else %}
<a href="{{ url_for('view_issues', repo=repo.name) }}">
{% endif %}
Issues</a>
</li>
{% endif %}
<li {% if select == 'requests' %}class="selected" {% endif %}>
{% if '/fork/' in request.url %}
<a href="{{ url_for('fork_request_pulls', username=username,
repo=repo.name) }}">
{% else %}
<a href="{{ url_for('request_pulls', repo=repo.name) }}">
{% endif %}
Pull-requests</a>
</li>
{% if repo.forks %}
<li {% if select == 'forks' %}class="selected" {% endif %}>
{% if '/fork/' in request.url %}
<a href="{{ url_for('fork_view_forks', username=username,
repo=repo.name) }}">
{% else %}
<a href="{{ url_for('view_forks', repo=repo.name) }}">
{% endif %}
Forks ({{ repo.forks |length }})</a>
</li>
{% endif %}
</ul>
<ul class="right">
<li {% if select == '' %}class="selected" {% endif %}>
{% if '/fork/' in request.url %}
<a href="{{ url_for(
'fork_project', repo=repo.name, username=username) }}">
{% else %}
<a href="{{ url_for('fork_project', repo=repo.name) }}">
{% endif %}
Fork</a>
</li>
{% if g.fas_user and g.fas_user.username == repo.user %}
<li {% if select == 'settings' %}class="selected" {% endif %}>
<a href="">Settings</a>
</li>
{% endif %}
</ul>
</div>
{% block repo %}
{% endblock %}
{% endblock %}