Blob Blame Raw
{% extends "repo_master.html" %}
{% from "_formhelper.html" import render_field_in_row %}

{% block title %}{{ select.capitalize() }} - {{ repo.name }}{% endblock %}
{%block tag %}home{% endblock %}

{% block header %}
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
  rel="stylesheet">
{% endblock %}

{% block repo %}

<section class="settings">
  <h2>Settings</h2>

  <div>
    <h3>Update description</h3>
    <form action="{{ url_for('.update_description',
                    username=username, repo=repo.name) }}" method="post">
      <input name="description" value="{{ repo.description }}" />
      <button type="submit" title="Update description">
        Update
      </button>
      {{ form.csrf_token }}
    </form>
  </div>

  <h3>Delete project</h3>
  <form action="{{ url_for('.delete_repo',
                  username=username, repo=repo.name) }}" method="post">
    <button class="delete_icon" type="submit"
      onclick="return confirm('Are you sure to delete this project/fork? \nThis is final and cannot be un-done.');"
      title="Delete the project/forl">
      Delete
    </button>
  </form>

  <h3>Project's options</h3>
  <form action="{{ url_for('.view_settings',
                  username=username, repo=repo.name) }}" method="post">
  <table>
    {{ render_field_in_row(form.issue_tracker) }}
    {{ render_field_in_row(form.project_docs) }}
  </table>
  <p class="buttons indent">
      <input type="submit" class="submit positive button" value="Update">
      <input type="button" value="Cancel" class="button" onclick="history.back();">
      {{ form.csrf_token }}
    </p>
  </form>
</section>

<section class="users">
  <h2>Users</h2>

  <p>Here below is the list of user having commit rights to this repo.</p>

  <p>
    <a href="{{ url_for('.add_user', username=username, repo=repo.name) }}"
        class="icon icon-plus-sign blue">
        [add]
    </a>
  </p>

  <ul>
    <li>
      <a href="{{ url_for('.view_user', username=repo.user.user) }}">{{ repo.user.user }}</a>
      (owner)
    </li>
  {% for user in repo.users %}
    <li>
      <a href="{{ url_for('.view_user', username=user.user) }}">{{ user.user }}</a>
      <form class="icon del_icon" method="POST"
        action="{{ url_for('.remove_user', username=username, repo=repo.name, userid=user.id) }}">
        <button
          onclick="return confirm('You sure you want to remove this user from this project?');"
          title="Remove user">
          <span class="icon icon-trash blue"></span>
        </button>
      </form>
    </li>
  {% endfor %}
  </ul>
</section>


{% if plugins %}
<section class="hooks">
  <h2>Hooks</h2>
  <ul>
  {% for plugin in plugins %}
    <li>
      <a href="{{ url_for('.view_plugin', repo=repo.name, username=username,
        plugin=plugin) }}">{{ plugin }}
      </a>
    </li>
  {% endfor %}
  </ul>
</section>
{% endif %}

<section class="tags">
  <h2>Tags</h2>

  <p>
    Here below is the list of tags associated with one or more issue of
    the project.
  </p>

  <ul>
  {% for tag in tags %}
    <li>
      <a href="{{ url_for('view_issues', username=username,
        repo=repo.name, tags=tag.tag) }}">
        {{ tag.tag }}
      </a>
      <form class="icon del_icon" method="POST"
        action="{{ url_for('remove_tag', username=username, repo=repo.name) }}">
        <input type="hidden" value="{{ tag.tag }}" name="tag" />
        {{ tag_form.csrf_token }}
        <button
          onclick="return confirm('Do you really want to remove the tag: {{ tag.tag }}?');"
          title="Remove tag">
          <span class="icon icon-trash blue"></span>
        </button>
      </form>
      <a href="{{ url_for(
            '.edit_tag',username=username, repo=repo.name, tag=tag.tag) }}">
        <button class="icon_button" title="Edit tag">
          <span class="icon icon-edit blue"></span>
        </button>
      </a>
    </li>
  {% endfor %}
  </ul>
</section>

{% endblock %}

{% block jscripts %}
{{ super() }}
{% endblock %}