michal/tit

Browse tree · Show commit · Download archive

Blob: templates/watch.html

Raw · Blame

{% extends "base.html" %}
{% block title %}Watch · {{ owner }}/{{ repository }} · tit{% endblock %}
{% block content %}
  <header class="repository-header">
    <h1><a href="/{{ owner }}/{{ repository }}">{{ owner }}/{{ repository }}</a></h1>
    <nav aria-label="Repository">
      <a href="/{{ owner }}/{{ repository }}">Summary</a>
      <a href="/{{ owner }}/{{ repository }}/refs">Refs</a>
      <a href="/{{ owner }}/{{ repository }}/issues">Issues</a>
      <a href="/{{ owner }}/{{ repository }}/pulls">Pull requests</a>
      <a href="/{{ owner }}/{{ repository }}/watch">Watch</a>
      <a href="/{{ owner }}/{{ repository }}/atom.xml">Atom</a>
      <a href="/{{ owner }}/{{ repository }}/rss.xml">RSS</a>
    </nav>
  </header>

  <h2>Watch preferences</h2>
{% if watching %}
  <p>You watch selected activity in this repository.</p>
{% else %}
  <p>You do not watch this repository.</p>
{% endif %}
{% if can_change %}
  <form method="post" action="/{{ owner }}/{{ repository }}/watch">
    <input type="hidden" name="csrf" value="{{ csrf }}">
    <div class="field">
      <label for="watch-pushes">Pushes</label>
      <select id="watch-pushes" name="pushes">
        <option value="0"{% if !pushes %} selected{% endif %}>Do not watch</option>
        <option value="1"{% if pushes %} selected{% endif %}>Watch</option>
      </select>
    </div>
    <div class="field">
      <label for="watch-issues">Issues</label>
      <select id="watch-issues" name="issues">
        <option value="0"{% if !issues %} selected{% endif %}>Do not watch</option>
        <option value="1"{% if issues %} selected{% endif %}>Watch</option>
      </select>
    </div>
    <div class="field">
      <label for="watch-pull-requests">Pull requests</label>
      <select id="watch-pull-requests" name="pull-requests">
        <option value="0"{% if !pull_requests %} selected{% endif %}>Do not watch</option>
        <option value="1"{% if pull_requests %} selected{% endif %}>Watch</option>
      </select>
    </div>
    <button type="submit">Save watch preferences</button>
  </form>
  <p>Set all three values to “Do not watch” to stop watching this repository.</p>
{% else %}
  <p><a href="/login">Log in</a> to change watch preferences.</p>
{% endif %}
{% endblock %}