Login
4 branches 0 tags
Ben (T14s/Arch Linux) Improved issue filter mobile layout fa55218 1 month ago 171 Commits
rubhub / templates / issues_list.html
<!DOCTYPE html>
<html>

  <head>
    <title>{{ owner.name }}/{{ project.name }} - Issues</title>
  </head>

  <body>
    {% include "sidebar.html" %}
    <main>
      <section>
        <div class="page-header">
          <h1 class="project-header">
            <a href="{{ owner.uri() }}">{{ owner.name }}</a> /
            <a href="{{ project.uri() }}">{{ project.name }}</a> /
            <a href="{{ project.uri_issues() }}">Issues</a>
          </h1>
        </div>

        {% include "project_tabs.html" %}

        <div class="card">
          <div class="issues-header">
            <h2>Issues</h2>
            <div class="issue-filters">
            {# Open button - toggle showOpen #}
            {% if show_open %}
            <a href="{{ project.uri_issues() }}?showOpen=false{% if show_completed %}&showCompleted=true{% endif %}{% if show_cancelled %}&showCancelled=true{% endif %}" class="btn btn-filter issue-open active"><span class="filter-icon">●</span><span class="filter-label">Open</span> {{ count_open }}</a>
            {% else %}
            <a href="{{ project.uri_issues() }}{% if show_completed || show_cancelled %}?{% endif %}{% if show_completed %}showCompleted=true{% endif %}{% if show_cancelled %}{% if show_completed %}&{% endif %}showCancelled=true{% endif %}" class="btn btn-filter issue-open"><span class="filter-icon">●</span><span class="filter-label">Open</span> {{ count_open }}</a>
            {% endif %}

            {# Completed button - toggle showCompleted #}
            {% if show_completed %}
            <a href="{{ project.uri_issues() }}{% if !show_open || show_cancelled %}?{% endif %}{% if !show_open %}showOpen=false{% endif %}{% if show_cancelled %}{% if !show_open %}&{% endif %}showCancelled=true{% endif %}" class="btn btn-filter issue-completed active"><span class="filter-icon">✓</span><span class="filter-label">Completed</span> {{ count_completed }}</a>
            {% else %}
            <a href="{{ project.uri_issues() }}?{% if !show_open %}showOpen=false&{% endif %}showCompleted=true{% if show_cancelled %}&showCancelled=true{% endif %}" class="btn btn-filter issue-completed"><span class="filter-icon">✓</span><span class="filter-label">Completed</span> {{ count_completed }}</a>
            {% endif %}

            {# Closed button - toggle showCancelled #}
            {% if show_cancelled %}
            <a href="{{ project.uri_issues() }}{% if !show_open || show_completed %}?{% endif %}{% if !show_open %}showOpen=false{% endif %}{% if show_completed %}{% if !show_open %}&{% endif %}showCompleted=true{% endif %}" class="btn btn-filter issue-cancelled active"><span class="filter-icon">✕</span><span class="filter-label">Closed</span> {{ count_cancelled }}</a>
            {% else %}
            <a href="{{ project.uri_issues() }}?{% if !show_open %}showOpen=false&{% endif %}{% if show_completed %}showCompleted=true&{% endif %}showCancelled=true" class="btn btn-filter issue-cancelled"><span class="filter-icon">✕</span><span class="filter-label">Closed</span> {{ count_cancelled }}</a>
            {% endif %}
            </div>
            {% if logged_in_user.is_some() %}
            <a href="/~{{ owner.slug }}/{{ project.slug }}/issues/new" class="btn">
              New Issue
            </a>
            {% endif %}
          </div>

          {% if issues.is_empty() %}
          <p class="empty-state">No issues yet.</p>
          {% else %}
          <div class="issues-list">
            {% for issue in issues %}
            <div class="issue-item issue-{{ issue.status.as_str() }}">
              <a href="{{ issue.uri(&owner.slug, &project.slug) }}" class="issue-link">
                <span class="issue-title">{{ issue.title }}</span>
                <span class="issue-meta">
                  opened by {{ issue.author }} -
                  {{ issue.comment_count }} comment{% if issue.comment_count != 1 %}s{% endif %}
                </span>
              </a>
              <span class="issue-status status-{{ issue.status.as_str() }}">{{ issue.status.as_str() }}</span>
            </div>
            {% endfor %}
          </div>
          {% endif %}
        </div>
      </section>
    </main>
  </body>

</html>