{% block body %}
<h1>{% trans "Footnotes" %}</h1>
+<div class="normal-text">
<p>
{% trans "By first letter" %}:
{% endif %}
+</div>
+
{% endblock %}
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.shortcuts import render_to_response, get_object_or_404
-from django.template import RequestContext, Template
+from django.template import RequestContext, Template, TemplateSyntaxError
from infopages.models import InfoPage
def infopage(request, slug):
page = get_object_or_404(InfoPage, slug=slug)
rc = RequestContext(request)
- left_column = Template(page.left_column).render(rc)
- right_column = Template(page.right_column).render(rc)
+ try:
+ left_column = Template(page.left_column).render(rc)
+ except TemplateSyntaxError:
+ left_column = ''
+
+ try:
+ right_column = Template(page.right_column).render(rc)
+ except TemplateSyntaxError:
+ left_column = ''
return render_to_response('infopages/infopage.html', locals(),
context_instance=RequestContext(request))
{% block body %}
<h1>Statystyka</h1>
- <p><a href="{% url reporting_catalogue_pdf %}">Katalog biblioteki w formacie PDF.</a></p>
+ <div class="normal-text">
<table class="stats">
<tr><th>Utwory</th></tr>
<td>{{ mt.size|filesizeformat }}</td>
<td>{{ mt.deprecated }}
{% for m in mt.deprecated_files %}
- <br/><a href="{{ m.book.get_absolute_url }}">{{ m }}</a>
+ <br/><a href="{{ m.book.get_absolute_url }}">{% book_title m.book %}: {{ m }}</a>
{% endfor %}
</td>
</tr>
{% endfor %}
</table>
+ </div>
+
{% endblock %}
from django.utils.translation import ugettext as _
from catalogue.utils import get_random_hash
-from catalogue.models import Book, Tag, Fragment, TAG_CATEGORIES
+from catalogue.models import Book, Tag, Fragment
from catalogue.fields import dumps
from catalogue.views import JSONResponse
-from catalogue import forms
from search import Search, JVM, SearchResult
from lucene import StringReader
from suggest.forms import PublishingSuggestForm
elif len(results) == 0:
form = PublishingSuggestForm(initial={"books": query + ", "})
return render_to_response('catalogue/search_no_hits.html',
- {'tags': tag_list, 'prefix': query, "pubsuggest_form": form,
- 'form': forms.SearchForm()},
+ {'tags': tag_list, 'prefix': query,
+ "form": form},
context_instance=RequestContext(request))
return render_to_response('catalogue/search_multiple_hits.html',
{'tags': tag_list, 'prefix': query,
- 'results': results, 'from': forms.SearchForm()},
+ 'results': results},
context_instance=RequestContext(request))
# return render_to_response('newsearch/search.html', {'results': results,
'js/search.js',
- #~ 'js/jquery.autocomplete.js',
- #~ 'js/jquery.labelify.js', 'js/catalogue.js',
+ 'js/jquery.labelify.js',
),
'output_filename': 'js/base?.min.js',
},
}
.left-column {
- width: 48em;
+ width: 47em;
float: left;
}
.right-column {
float:right;
- width: 48em;
+ width: 47em;
}
.normal-text {
font-size: 1.3em;
-#books-list ol {
+.work-list {
margin: 0;
padding: 0;
list-style: none;
}
-#books-list li {
- display: inline-block;
+.work-item {
margin: 0;
padding: 0;
}
+.books .work-item {
+ display: inline-block;
+}
+
+
+#tagged-object-list .left-column, #tagged-object-list .right-column {
+ width: 48em;
+}
+
/* listing of all books */
#book-list {
border-left: 1px #cfcfcf solid;
padding: 10px;
background-color: white;
-}
\ No newline at end of file
+}
+
+
+
+fragment
\ No newline at end of file
width: 63.1em;
padding-left: .5em;
padding-right: 0;
- padding-top: 0.5em;
+ padding-top: 0.6em;
padding-bottom: 0;
}
-#search-field input {
+#search {
+ font-size: 1.3em;
padding: 0;
- height: 3.3em;
- border: none;
+ /*height: 3.3em;
width: 62.6em;
- font-size: 1em;
padding-left: .5em;
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
+ border: none;
border-radius: .5em;
-webkit-box-shadow:0 0 .5em #444 inset;
-moz-box-shadow:0 0 .5em #444 inset;
+ box-shadow: 0 0 .5em #444 inset;*/
+ height: 2.54em;
+ width: 47.47em;
+ padding-left: 1em;
+ -webkit-border-radius: .38em;
+ -moz-border-radius: .38em;
+ border: none;
+ border-radius: .38em;
+ -webkit-box-shadow:0 0 .38em #444 inset;
+ -moz-box-shadow:0 0 .38em #444 inset;
box-shadow: 0 0 .5em #444 inset;
+
+ font-family: Georgia;
+ background-color: #fff;
+ color: #000;
+}
+#search.blur {
+ font-family: Georgia;
+ font-style: italic;
+ color: #888;
}
#search-button {
(function($) {
$(function() {
+ $.fn.toggle_slide = function(p) {
+ cont = $(this);
+ short_el = p['short_el'] || $(':first-child', this);
+ long_el = p['long_el'] || short_el.next();
+ button = p['button'];
+ short_text = p['short_text'],
+ long_text = p['long_text'];
+
+ var toggle_fun = function(cont, short_el, long_el, button, short_text, long_text) {
+ var toggle = function() {
+ if (cont.hasClass('short')) {
+ cont.animate({"height": long_el.attr("cont_h")+'px'}, {duration: "fast" }).removeClass('short');
+ short_el.hide();
+ long_el.show();
+ if (button && long_text) button.html(long_text);
+ } else {
+ cont.animate({"height": short_el.attr("cont_h")+'px'}, {duration: "fast" }).addClass('short');
+ long_el.hide();
+ short_el.show();
+ if (button && short_text) button.html(short_text);
+ }
+ return false;
+ }
+ return toggle;
+ }
+ if (long_el.html().length <= short_el.html().length)
+ return;
+
+ // ensure long element shown first
+ long_el.show();short_el.hide();
+ long_el.attr("cont_h", $(this).height()).hide();
+ short_el.show().attr("cont_h", $(this).height());
+ $(this).addClass('short');
+
+ if (button && short_text) button.html(short_text);
+ if (button) button.hover(
+ function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
+ function() { $(this).css({background: '#EEE'}); }
+ ).click(toggle_fun(cont, short_el, long_el, button, short_text, long_text));
+ short_el.hover(
+ function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
+ function() { $(this).css({background: '#FFF'}); }
+ ).click(toggle_fun(cont, short_el, long_el, button, short_text, long_text));
+ long_el.hover(
+ function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
+ function() { $(this).css({background: '#FFF'}); }
+ ).click(toggle_fun(cont, short_el, long_el, button, short_text, long_text));
+ };
+
+
+ // Fragments
+ $('.fragment-short-text').each(function() {
+ var fragment = $(this).closest('.fragment');
+ fragment.toggle_slide({
+ short_el: $(this),
+ long_el: fragment.find('.fragment-text')
+ })
+ });
+
+
+
+
$('#themes-list-toggle').click(function(event) {
});
$(function() {
- $("#search-area input[name=q]").search();
-
+ $("#search").search().labelify({labelledClass: "blur"});
});
+
})(jQuery);
<form id="search-area" action="/fullsearch/">
<span id="search-field" class="grid-line">
- <input title="np. Leśmian" name="q" autocomplete="off" data-source="/fullsearch/hint/">
+ <input id="search" title="np. Leśmian" name="q" autocomplete="off" data-source="/fullsearch/hint/">
</span><span id="search-button">
<button type='submit'><span class="mono">{% trans "Search" %}</span></button>
</span>
+ <div class="clearboth"></div>
</form>
- <div class="clearboth"></div>
</div>
</div>
<h1>{% trans "Catalogue" %}</h1>
<div class="normal-text">
+
+ <p><a href="{% url reporting_catalogue_pdf %}">
+ {% trans "Download the catalogue in PDF format." %}
+ </a></p>
+
<h2></a>{% trans "Authors" %}<a name="autorzy"></a></h2>
{% tag_list categories.author %}
{% block body %}
<h1>{% trans "Search" %}</h1>
- <div id="books-list">
+ <div class="left-column">
+ <div class="normal-text">
<p>{% trans "Sorry! Search cirteria did not match any resources." %}</p>
<p>{% blocktrans %}Search engine supports following criteria: title, author, theme/topic, epoch, kind and genre.
As for now we do not support full text search.{% endblocktrans %}</p>
{% include "info/join_us.html" %}
</div>
+ </div>
- <div class="column-right block-form">
+ <div class="right-column">
{% include "publishing_suggest.html" %}
</div>
{% endblock %}
{% if object_list %}
{% spaceless %}
- <ol>
+ <ol class='work-list'>
{% for book in object_list %}
- <li>
+ <li class='work-item'>
{% if user_is_owner %}
<a href="{% url remove_from_shelf last_tag.slug book.slug %}" class="remove-from-shelf">{% trans "Delete" %}</a>
{% endif %}