{% extends "moneta/base_package.html" %}{% load staticfiles i18n moneta %}

{% block extrahead %}

{% endblock %}

{% block repo_content %}
    <h2>{% trans 'Available gem indexes' %}</h2>
    {% with view=repo|moneta_url:'simple' %}

        <ul class="nav nav-tabs">
            {% for tab_info in tab_infos %}
                <li {% if forloop.first %}class="active"{% endif %}><a href="#{{ tab_info.2.slug }}" data-toggle="tab">{{ tab_info.2.name }}</a></li>
            {% endfor %}
        </ul>

        <div class="tab-content">
            {% for tab_info in tab_infos %}
                <div class="tab-pane {% if forloop.first %}active{% endif %}" id="{{ tab_info.2.slug }}">
                    {% trans 'Modifiy your $HOME/.gemrc:' %}
<pre>
---
# gem: --no-rdoc --no-ri
# :verbose: true
# :backtrace: false
# :update_sources: true
:sources:
- {{ absolute_url }}{{ tab_info.0 }}{% if use_https %}
cert = {% trans '/Path/to/your/ROOT/CA.pem' %}{% endif %}</pre>

                {% if upload_allowed %}<h2>{% trans 'Add a package' %}</h2>{% trans 'In order to add a new package, please run the following command:' %}
                    <pre>FILENAME=filename-version.gem
{% curl %} --data-binary @$FILENAME {{ absolute_url }}{% url 'moneta:add_element_post' rid=repo.id %}\?filename=$FILENAME{% for state in tab_info.1 %}\&amp;states={{ state }}{% endfor %}</pre>{% endif %}
        {% trans 'Run the following command to re-index packages after an upload:' %}
        {% with view=repo|auth_moneta_url:"force_index" %}<pre>{% curl %} {{ absolute_url }}{% url view rid=repo.id repo_slug=repo.slug %}</pre>{% endwith %}

            </div>
            {% endfor %}

        </div>

    {% endwith %}

    {% include 'moneta/add_signature.html' %}
{% endblock %}
