phonebook_index.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {% extends "base.html" %}
  2. {% block content %}
  3. <td align="center" valign="top" bgcolor="white" width="440">
  4. <table width="444" border="0" cellspacing="8" cellpadding="0">
  5. <tr><td span=3><ul>
  6. {% for town in towns %}
  7. <li style="display:inline; list-style:none;"><a href="{% url di-phonebook-town town.slug %}" >{{town.name}}</a></li>
  8. {% endfor %}
  9. </ul> </td></tr>
  10. <tr><th>Entry</th><th>Town</th><th>Number</th></tr>
  11. {% for entry in entries.object_list %}
  12. <tr>
  13. <td>{{entry.entry}}</td><td>{{entry.town.name}}</td><td>{{entry.phone}}</td>
  14. </tr>
  15. {% endfor %}
  16. </table>
  17. <div class="pagination">
  18. <span class="step-links">
  19. {% if entries.has_previous %}
  20. <a href="?page={{ entries.previous_page_number }}">previous</a>
  21. {% endif %}
  22. <span class="current">
  23. Page {{ entries.number }} of {{ entries.paginator.num_pages }}.
  24. </span>
  25. {% if entries.has_next %}
  26. <a href="?page={{ entries.next_page_number }}">next</a>
  27. {% endif %}
  28. </span>
  29. </div>
  30. <p><a href="{% url di-index %}">Back to directory</a></p>
  31. </td>
  32. </tr>
  33. {% endblock %}