X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8e7acde7d767a65708ed733e2882f90452ad6515..e79d6158a3308af13ff62091ff8b262cd2af3aa4:/wolnelektury/templates/catalogue/main_page.html diff --git a/wolnelektury/templates/catalogue/main_page.html b/wolnelektury/templates/catalogue/main_page.html index f6e45a301..f7cc4b08e 100644 --- a/wolnelektury/templates/catalogue/main_page.html +++ b/wolnelektury/templates/catalogue/main_page.html @@ -13,57 +13,53 @@ </form> <div id="intro"> + <p id="tags-description">â PrzeglÄ daj lektury wedÅug wybranych kategorii i motywów literackich â</p> <div id="propaganda"> <h2>Twoje póÅki z lekturami</h2> - <p>Stwórz wÅasny zestaw lektur!</p> - <p>Aby zarzÄ dzaÄ swoimi póÅkami musisz siÄ <a id="login-register-link" href="#">zalogowaÄ</a>.</p> + {% if user.is_authenticated %} + {% if shelves %} + <ul class="shelf-list"> + {% for shelf in shelves %} + <li><a href="{% url delete_shelf shelf.slug %}" class="delete-shelf">usuÅ</a> <a href="{{ shelf.get_absolute_url }}" class="visit-shelf">{{ shelf.name }}</a></li> + {% endfor %} + </ul> + {% else %} + <p>Nie posiadasz żadnych póÅek. JeÅli chcesz, możesz utworzyÄ póÅkÄ poniżej.</p> + {% endif %} + <hr /> + <form action="{% url catalogue.views.new_set %}" method="post" accept-charset="utf-8" class="cuteform"> + <ol> + <li>{{ new_set_form.name }} <input type="submit" value="Utwórz póÅkÄ"/></li> + </ol> + </form> + {% else %} + <p>Stwórz wÅasny zestaw lektur. Możesz siÄ nim później podzieliÄ z innymi, przesyÅajÄ c im link do Twojej póÅki.</p> + <p>Aby zarzÄ dzaÄ swoimi póÅkami, musisz siÄ <a class="login-register-link" href="#">zalogowaÄ</a>.</p> + {% endif %} </div> <div id="tags-list"> <div id="categories-list"> {% if categories.author %} <h2>Autorzy</h2> - <ul> - {% for author in categories.author %} - <li><a href="{% catalogue_url author %}">{{ author }} ({{ author.count }})</a></li> - {% endfor %} - </ul> - {% endif %} - - {% if categories.epoch %} - <h2>Epoki</h2> - <ul> - {% for epoch in categories.epoch %} - <li><a href="{% catalogue_url epoch %}">{{ epoch }} ({{ epoch.count }})</a></li> - {% endfor %} - </ul> + {% folded_tag_list categories.author %} {% endif %} - {% if categories.kind %} <h2>Rodzaje</h2> - <ul> - {% for kind in categories.kind %} - <li><a href="{% catalogue_url kind %}">{{ kind }} ({{ kind.count }})</a></li> - {% endfor %} - </ul> + {% folded_tag_list categories.kind %} {% endif %} - {% if categories.genre %} <h2>Gatunki literackie</h2> - <ul> - {% for genre in categories.genre %} - <li><a href="{% catalogue_url genre %}">{{ genre }} ({{ genre.count }})</a></li> - {% endfor %} - </ul> + {% folded_tag_list categories.genre %} + {% endif %} + {% if categories.epoch %} + <h2>Epoki</h2> + {% folded_tag_list categories.epoch %} {% endif %} </div> <div id="themes-list"> - {% if categories.theme %} - <h2>Motywy</h2> - <ul> - {% for theme in fragment_tags %} - <li><a href="{% catalogue_url theme %}">{{ theme }} ({{ theme.count }})</a></li> - {% endfor %} - </ul> + {% if fragment_tags %} + <h2>Motywy i tematy</h2> + {% folded_tag_list fragment_tags %} {% endif %} </div> <div class="clearboth"></div>