aboutsummaryrefslogtreecommitdiff
path: root/templates/dev_status/home.html
blob: 6c494fe5d82e83ee549ede7efa039da45546b9e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{% extends 'blog/partials/base.html' %} {% block content %}
<div class="main">
  <div class="area">
    {% load static %}
    {% load times %}
    <div style="background-image: url({% static 'images/site/repositories.png' %}); width: 720px; height: 173px; background-repeat: no-repeat; background-position: center;">
      {% comment %} Search and Filter {% endcomment %}
      <table style="margin: 0 auto; position: relative; top: 120px;">
        <form action="" method="get">
          <tr>
            <td>
              <p> Search &amp; Filter: &emsp;</p>
            </td>
            <td>
              <input type="text" name="search" placeholder="Search Term" value="{{ search }}" autocomplete="off">
            </td>
            <td>
              <select name="items">
                <option value="10" {% if items == 10 %}selected{% endif %}>10</option>
                <option value="25" {% if items == 25 %}selected{% endif %}>25</option>
                <option value="50" {% if items == 50 %}selected{% endif %}>50</option>
                <option value="100" {% if items == 100 %}selected{% endif %}>100</option>
              </select>
            </td>
            <td>
              <select name="sort">
                <option value="full_name" {% if sort == 'full_name' %}selected{% endif %}>Name</option>
                <option value="created" {% if sort == 'created' %}selected{% endif %}>Created</option>
                <option value="updated" {% if sort == 'updated' %}selected{% endif %}>Updated</option>
                <option value="pushed" {% if sort == 'pushed' %}selected{% endif %}>Pushed</option>
                <option value="stars" {% if sort == 'stars' %}selected{% endif %}>Stars</option>
              </select>
            </td>
            <td>
              <select name="direction">
                <option value="asc" {% if direction == 'asc' %}selected{% endif %}>Ascending</option>
                <option value="desc" {% if direction == 'desc' %}selected{% endif %}>Descending</option>
              </select>
            </td>
            <td>
              <input type="submit" value="Go" style="position: relative; top: -2px;">
            </td>
          </tr>
        </form>
      </table>
    </div>
  </div>
  <hr>
  <div class='repositories' style="width: 720px;">
    <table style="width=720px; margin: 0 auto; table-layout: fixed;">
      {% for repo in repos %}
        <tr>
          <td><a href="{% url 'dev_status:repo' repo.name %}">
              <img src="{% url 'ignis:cover_image' repo.name %}.gif" style="display: inline-block; margin-right: 10px;" class="zoom" border="0">
            </a>
          </td>
          <td>
        <p style="font-size: 20px; font-weight: bold;"><a href="{% url 'dev_status:repo' repo.name %}">{{ repo.name }}</a></p>
        <p style="font-size: 15px;">{{ repo.description }}</p>
        
        </td>
        </tr>
      {% endfor %}
    </table>
  </div>
  <div class="pagination">
    <center>
    <table id="pagination">
      <tr>
        {% if page == 1 %}
          <td><a class="disabled">&laquo;</a></td>
          <td style="margin-right: 15px;"><a class="disabled">&lsaquo;</a></td>
        {% else %}
          <td><a href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page=1">&laquo;</a></td>
          <td style="margin-right: 15px;"><a href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page={{ page|add:-1 }}">&lsaquo;</a></td>
        {% endif %}
        {% for i in num_pages|times  %}
          <td><a {% if i == page %}class="active"{% endif %} href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page={{ i }}">{{ i }}</a></td>
        {% endfor %}
        {% if page == num_pages %}
          <td style="margin-left: 15px;"><a class="disabled">&rsaquo;</a></td>
          <td><a class="disabled">&raquo;</a></td>
        {% else %}
          <td style="margin-left: 15px;"><a href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page={{ page|add:1 }}">&rsaquo;</a></td>
          <td><a href="{% url 'dev_status:home'%}?search={{ search }}&items={{ items }}&filter={{ filter }}&sort={{ sort }}&direction={{ direction }}&page={{ num_pages }}">&raquo;</a></td>
        {% endif %}
      </tr>
    </table>
    </center>
  </div>
 </div>
</div>
{% endblock %}