Commit 27bde76c authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Add GenresView

parent 49aa0f12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
				   <b>Авторы:</b>{% for a in b.authors %} <a href="{% url "web:searchbooks" %}?searchtype=a&searchterms={{a.id}}">{{a.last_name}} {{a.first_name}}</a>{% if not forloop.last %},{%endif%} {%endfor%}<br>
				{% endif %}
				{% if b.genres.count > 0 %}
				   <b>Жанры:</b>{% for g in b.genres %} {{g.subsection}}{% if not forloop.last %},{%endif%} {%endfor%} <br>
				   <b>Жанры:</b>{% for g in b.genres %} <a href="{% url "web:searchbooks" %}?searchtype=g&searchterms={{g.id}}">{{g.subsection}}</a>{% if not forloop.last %},{%endif%} {%endfor%} <br>
				{% endif %}
				{% if b.series.count > 0 %}
				   <b>Серии:</b> {% for s in b.series %} <a href="{% url "web:searchbooks" %}?searchtype=s&searchterms={{s.id}}">{{s.ser}}</a>{% if not forloop.last %},{%endif%} {%endfor%} <br>
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
	    <li {% if current == "catalog" %} class="active" {% endif %}><a href="{% url "web:catalog" %}">Catalogs</a></li>
	    <li {% if current == "book" %} class="active" {% endif %}><a href="{% url "web:book" %}?lang=0">Books</a></li>
	    <li {% if current == "author" %} class="active" {% endif %}><a href="{% url "web:author" %}?lang=0">Authors</a></li>
	    <li {% if current == "genre" %} class="active" {% endif %}><a href="#">Genres</a></li>
	    <li {% if current == "genre" %} class="active" {% endif %}><a href="{% url "web:genre" %}">Genres</a></li>
	    <li {% if current == "series" %} class="active" {% endif %}><a href="{% url "web:series" %}?lang=0">Series</a></li>
	  </ul>
	</div>
@@ -26,7 +26,7 @@
	        {% endfor %}  
	        </ul>	    
	    </li>
	    <li {% if current == "genre" %} class="active" {% endif %}><a href="#">Genres</a>    
	    <li {% if current == "genre" %} class="active" {% endif %}><a href="{% url "web:genre" %}">Genres</a>    
	    </li>
	    <li {% if current == "series" %} class="active" {% endif %}><a href="#">Series</a>
	        <ul class="vertical menu sopdsmenu">
+21 −0
Original line number Diff line number Diff line
{% extends "sopds_main.html" %}
{% load staticfiles %}

{% block body %}
<table>
{%  for g in items %}
<tr>
	<td>
	{% if not parent_id %}
	   <a href="{% url "web:genre" %}?section={{g.section_id}}">{{ g.section }}</a>
	{% else %}
	   <a href="{% url "web:searchbooks" %}?searchtype=g&searchterms={{g.id}}">{{ g.subsection }}</a>
	{% endif %}
	<span style="font-size:80%">Total: {{ g.num_book }} books.</span>
	</td>
</tr>		
{% endfor %}
</table>


{% endblock %}  {# body #}
 No newline at end of file
Loading