{% extends "coprs/detail.html" %}
{% from "_helpers.html" import copr_name %}
{% from "coprs/detail/_package_helpers.html" import show_navigation, show_package_form with context %}

{% block title %}Package {{ package.name }} in {{ copr_name(package.copr) }}{% endblock %}
{% set selected_tab = "packages" %}
{%block project_breadcrumb %}
  <li><a href="{{ copr_url('coprs_ns.copr_packages', copr) }}">Packages</a></li>
  <li><a href="{{ copr_url('coprs_ns.copr_package', copr, package_name=package.name) }}">{{ package.name }}</a></li>
  <li class="active">Edit</li>
{%endblock%}

{% block detail_body %}

<h2 class="page-title"> Package: <a href="{{ copr_url('coprs_ns.copr_package', copr, package_name=package.name) }}">{{ package.name }}</a></h2>

<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">{{ counter('instructions') }}. Select the source type - <a href="https://docs.copr.fedorainfracloud.org/user_documentation.html#build-source-types">Learn More</a></h3>
  </div>
  <div class="panel-body">
    <ul class="nav nav-tabs nav-tabs-pf">
      {{ show_navigation(copr, 'coprs_ns.copr_edit_package', package_name=package.name) }}
    </ul>
  </div>
</div>

{{ show_package_form(source_type_text, package) }}

{% endblock %}
