Blob Blame Raw
{% extends "master.html" %}

{% block title %}{{ repo.name }}{% endblock %}
{%block tag %}home{% endblock %}


{% block content %}
<header class="repo{% if repo.is_fork %} forked{% endif %}">
    <h2>
        <a href="{{ url_for('view_repo', username=username, repo=repo.name)}}">
            {{ repo.fullname }}
        </a>
        {% if branchname %} ({{ branchname }}) {% endif %}
    </h2>
    <span id="projectinfo">
    {% if repo.description %}{{ repo.description | markdown |safe }}{% else %}-{% endif -%}
    {%- if repo.url %} | <a class="inline" href="{{ repo.url }}">{{ repo.url }}</a>{% endif %}
    </span>

    {% if repo.is_fork %}
    <aside id="parent">
        Forked from
        {% if repo.parent.is_fork %}
        <a href="{{ url_for('view_repo', repo=repo.parent.name, username=repo.parent.user.user)}}">
        {% else %}
        <a href="{{ url_for('view_repo', repo=repo.parent.name)}}">
        {% endif %}
            {{ repo.parent.fullname }}
        </a>
    </aside>
    {% endif %}

</header>

  <div class="horizontal-menu">
    <ul>
      <li {% if select == 'overview' %}class="selected" {% endif %}>
        <a href="{{ url_for('view_repo', username=username,
                    repo=repo.name) }}">Overview</a>
      </li>

      {% if config['DOC_APP_URL'] and repo and repo.settings.get('project_documentation', True) %}
      <li {% if select == 'docs' %}class="selected" {% endif %}>
        <a href="{{ url_for('.view_docs', username=username, repo=repo.name) }}">Docs</a>
      </li>
      {% endif %}

      <li {% if select == 'logs' %}class="selected" {% endif %}>
        <a href="{{ url_for('.view_commits', username=username,
                   repo=repo.name, branchname=branchname) }}">Commits</a>
      </li>

      <li {% if select == 'tree' %}class="selected" {% endif %}>
        <a href="{{ url_for('.view_tree', username=username,
                   repo=repo.name, identifier=branchname) }}">Tree</a>
      </li>

      <li {% if select == 'tags' %}class="selected" {% endif %}>
        <a href="{{ url_for('.view_tags', username=username,
                   repo=repo.name) }}">Releases</a>
      </li>

      {% if config.get('ENABLE_TICKETS', True) and repo
            and repo.settings.get('issue_tracker', True) %}
      <li {% if select == 'issues' %}class="selected" {% endif %}>
          <a href="{{ url_for('.view_issues', username=username,
                     repo=repo.name) }}">Issues ({{
        repo.open_tickets |length if repo_admin else repo.open_tickets_public | length
        }})</a>
      </li>
      {% endif %}

      {% if repo and repo.settings.get('pull_requests', True) %}
      <li {% if select == 'requests' %}class="selected" {% endif %}>
        <a href="{{ url_for('.request_pulls', username=username,
                   repo=repo.name) }}">
          Pull-requests ({{repo.open_requests |length }})
        </a>
      </li>
      {% endif %}

      {% if repo and repo.forks %}
      <li {% if select == 'forks' %}class="selected" {% endif %}>
        <a href="{{ url_for('.view_forks', username=username,
                   repo=repo.name) }}">
        Forks ({{ repo.forks |length }})</a>
      </li>
      {% endif %}

    </ul>
    <ul class="right">
      {% if authenticated %}
      {% if not repo_admin %}
      <li id="fork_button" {% if select == '' %}class="selected" {% endif %}>
        <form method="POST" name="fork_project"
          action="{{ url_for(
            '.fork_project', repo=repo.name, username=username) }}">
          <a onclick="fork_project.submit();" id="fork_project">Fork</a>
          {{ forkbuttonform.csrf_token }}
        </form>
      </li>
      {% else %}
      <li id="settings_button" {% if select == 'settings' %}class="selected" {% endif %}>
        <a href="{{ url_for(
            '.view_settings', repo=repo.name, username=username) }}">
          Settings</a>
      </li>
      {% endif %}
      {% endif %}
    </ul>
  </div>
{% block repo %}
{% endblock %}

{% endblock %}