1. pi11
  2. xxxflash

Commits

pi11  committed bc98d59

paginator for theme

  • Participants
  • Parent commits fe9ead2
  • Branches default

Comments (0)

Files changed (3)

File templates/detskie-igry/pages_theme.html

View file
+<!--  {% for page in pages %}
+    {% ifnotequal page page_id %}
+      <a class="pages_links" href="/theme/{{ theme.url }}/{{ page }}/">{{ page }}</a>
+    {% endifnotequal %}
+    {% ifequal page page_id %}
+      <span class="c_page">{{ page }}</span>
+    {% endifequal %}
+  {% endfor %}-->
+       <span class="current">
+            Страница {{ flashes.number }} из {{ flashes.paginator.num_pages }}.
+        </span>
+<div class="page_buttons">
+    <span class="step-links">
+        {% if flashes.has_previous %}
+            <a href="/theme/{{ theme.url }}/{{ flashes.previous_page_number }}/">&larr;</a>
+        {% endif %}
+
+
+   {% for page in pages %}
+    {% ifnotequal page page_id %}
+      <a class="pages_links" href="/theme/{{ theme.url }}/{{ page }}/">{{ page }}</a>
+    {% endifnotequal %}
+    {% ifequal page page_id %}
+      <span class="c_page">{{ page }}</span>
+    {% endifequal %}
+   {% endfor %}
+
+
+        {% if flashes.has_next %}
+            <a href="/theme/{{ theme.url }}/{{ flashes.next_page_number }}/">&rarr;</a>
+        {% endif %}
+    </span>
+</div>

File templates/detskie-igry/theme.html

View file
     <h1>Раздел: {{ theme.name }} </h1>
     <br />
     {% include "flash-list.html" %}
+    <div class="pages">
+      {% include "pages_theme.html" %}
+    </div>
   </div>
 {% endblock %}    
 

File templates/igry-dlya-devochek-online.com/game.html

View file
       <div class="options">
 	<div align="right">Добавил: <a href="#">{{ g.user }}</a></div>
 	<div align="right">Оценка игры:  <span style="font-size:18px; font:bold;"> <span id="mark1">{{ mark|default:0 }}</span> <a class="mark" id="upvote"><img src="{{ MEDIA_URL }}images/up.gif" /></a>  <a class="mark" id="downvote"><img src="{{ MEDIA_URL }}images/down.gif" /></a> </span> </div>
-	<div align="right">Играли: {{ g.views }} раз</div>
+	<div align="right">Играли: {{ views }} раз</div>
 	<div align="right">
           {% for t in gt %}
               <a href="/theme/{{ t.url }}/">{{ t.name }}</a>