image_file = ImageField(_('image_file'), upload_to="images", storage=picture_storage)
html_file = models.FileField('html_file', upload_to="html", storage=picture_storage)
areas = jsonfield.JSONField(_('picture areas'), default={}, editable=False)
+ extra_info = jsonfield.JSONField(_('extra information'), default={})
+ culturepl_link = models.CharField(blank=True, max_length=240)
+ wiki_link = models.CharField(blank=True, max_length=240)
objects = models.Manager()
tagged = managers.ModelTaggedItemManager(catalogue.models.Tag)
raise Picture.AlreadyExists('Picture %s already exists' % picture_xml.slug)
picture.title = picture_xml.picture_info.title
+ picture.extra_info = picture_xml.picture_info.to_dict()
motif_tags = set()
thing_tags = set()
{% endfor %}
</span>
+ <span class="mono">{% trans "Genre" %}: </span>
+ <span class="book-box-tag">
+ {% for tag in tags.genre %}
+ <a href="{{ tag.get_absolute_url }}">{{ tag.name }} </a>{% if not forloop.last %},{% endif %}
+ {% endfor %}
+ </span>
+
{% endspaceless %}
</div>
</div>
</div>-->
</li>
</ul>
+ {% block book-box-extra-info %}{% endblock %}
+ {% block box-append %}
+ {% endblock %}
+ {% block right-column %}
+ {% endblock %}
<div class="clearboth"/>
</div>
</div>
</head>
<body>
- <div id="menu">
+ <div id="menu" class="moveright">
<ul>
<!-- <li><a class="menu" href="#themes">{% trans "Themes" %}</a></li>
<li><a class="menu" href="#objects">{% trans "Objects" %}</a></li>-->
<!-- XXX do we have this? -->
- <li><a class="menu" href="#nota_red">{% trans "Edit. note" %}</a></li>
+<!-- <li><a class="menu" href="#nota_red">{% trans "Edit. note" %}</a></li>-->
<li><a class="menu" href="#info">{% trans "Infobox" %}</a></li>
<li><a href="{{ picture.get_absolute_url }}">{% trans "Picture's page" %}</a></li>
<!-- XXX -->
<li><a class="menu" href="#download">{% trans "Download" %}</a></li>
</ul>
</div>
- <div id="info">
- {# book_info book #}
+ <div id="info" class="moveright">
+ {% book_info picture %}
</div>
{{ picture.html_file.read|safe }}
</div>
{{ piwik_tag|safe }}
<div id="spinner"></div>
+ <div id="sponsors">
+ <div>
+ <a href="/"><img src="{% static "img/logo-220.png" %}" alt="Wolne Lektury" ></img>
+ </a>
+ </div>
+ <div>
+ <a href="http://www.nck.pl"><img src="{% static "img/logo_nck.jpg" %}" alt="Narodowe Centrum Kultury" ></img></a>
+ </div>
+ </div>
</body>
</html
{% block book-box-extra-info %}
-{% if themes %}
+{% if themes or things%}
<div class="hidden-box-wrapper" id="theme-list-wrapper">
<p><a class="mono hidden-box-trigger theme-list-link"
- href="#">{% trans "Motifs and themes" %}</a></p>
+ href="#">{% trans "Motifs, themes and objects" %}</a></p>
<div class="hidden-box">
- <ul>
+ {% if themes %}
+ <p>{% trans "Motifs and themes" %}</p>
+ <ul>
{% for theme in themes %}
- <li><a href="{% url 'book_fragments' book.slug theme.slug %}">{{ theme }} ({{ theme.count }})</a></li>
- {% endfor %}
+ <li><a href="{% url 'picture_viewer' picture.slug %}#theme-{{theme.slug}}">{{ theme }}{# ({{ theme.picture_count }})#}</a></li>
+ {% endfor %}
</ul>
+ {% endif %}
+ {% if things %}
+ <p>{% trans "Objects" %}</p>
+ <ul>
+ {% for thing in things %}
+ <li><a href="{% url 'picture_viewer' picture.slug %}#object-{{thing.slug}}">{{ thing }}{# ({{ thing.picture_count }})#}</a></li>
+ {% endfor %}
+ </ul>
+ {% endif %}
</div>
</div>
{% else %}
{% block right-column %}
<div class="right-column">
- INFO
- {% comment %}<div class="other-tools">
+ <div class="other-tools">
<h2 class="mono">{% trans "See" %}</h2>
<ul class="plain">
{% if extra_info.source_url %}
- <li><a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the book" %}</li>
+ <li><a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the picture" %}</li>
{% endif %}
- <li><a href="{{ book.xml_file.url }}">{% trans "Source XML file" %}</a></li>
+ <li><a href="{{ picture.xml_file.url }}">{% trans "Source XML file" %}</a></li>
{% if extra_info.about and not hide_about %}
- <li>{% trans "Book on" %} <a href="{{ extra_info.about }}">{% trans "Editor's Platform" %}</a></li>
+ <li>{% trans "Picture on" %} <a href="{{ extra_info.about }}">{% trans "Editor's Platform" %}</a></li>
{% endif %}
- {% if book.gazeta_link %}
- <li><a href="{{ book.gazeta_link }}">{% trans "Book description on Lektury.Gazeta.pl" %}</a></li>
+ {% if picture.culturepl_link %}
+ <li><a href="{{ picture.culturepl_link }}">{% trans "Picture description on Lektury.Gazeta.pl" %}</a></li>
{% endif %}
- {% if book.wiki_link %}
- <li><a href="{{ book.wiki_link }}">{% trans "Book description on Wikipedia" %}</a></li>
+ {% if picture.wiki_link %}
+ <li><a href="{{ picture.wiki_link }}">{% trans "Picture description on Wikipedia" %}</a></li>
{% endif %}
- <li><a href="{% url 'poem_from_book' book.slug %}">{% trans "Mix this book" %}</a></li>
</ul>
</div>
+
+ {% comment %}
<div class="other-download">
<h2 class="mono">{% trans "Download" %}</h2>
<ul class="plain">
<li>
{% if related.media.mp3 or related.media.ogg or related.media.daisy %}
{% trans "Download all audiobooks for this book" %}:
- {% download_audio book %}.
+ {% download_audio book %}.
{% endif %}
</li>
{% custom_pdf_link_li book %}
</ul>
- </div>{% endcomment %}
+ </div>
+ {% endcomment %}
</div>
{% endblock %}
@register.inclusion_tag('picture/picture_short.html', takes_context=True)
def picture_short(context, picture):
- return {
+ context.update({
'picture': picture,
'main_link': picture.get_absolute_url(),
# 'related': picture.related_info(),
'request': context.get('request'),
'tags': split_tags(picture.tags),
- }
+ })
+ return context
@register.inclusion_tag('picture/picture_wide.html', takes_context=True)
def picture_wide(context, picture):
- return {
+ context.update({
'picture': picture,
'main_link': picture.get_absolute_url(),
# 'related': picture.related_info(),
'request': context.get('request'),
'tags': split_tags(picture.tags),
- }
+ })
+ return context
for tag in picture.tags.iterator():
categories.setdefault(tag.category, []).append(tag)
- picture_themes = []
+ themes = categories.get('theme', [])
+ things = categories.get('thing', [])
+
+ extra_info = picture.extra_info
return render_to_response("picture/picture_detail.html", locals(),
context_instance=RequestContext(request))
width: 30em;
}
+.picture.book-wide-box #theme-list-wrapper {
+ margin-left: 55em;
+}
+
.book-box-read a:before {
float: left;
width: 14.5em;
margin: 5em 0 0 1.5em;
-
+}
+
+.picture.book-wide-box .other-tools {
+ margin: 5em 0 0 0;
}
.book-wide-box .other-download {
position:absolute;
top: 0;
bottom: 0;
+ z-index: 10;
}
#picture-view .picture-wrap {
margin: 3rem auto 1rem auto;
display: block;
-// position: absolute;
+ z-index: 10;
+}
+#picture-view .picture-wrap img {
+ z-index: 10;
}
#picture-view .picture-wrap {
.toolbar {
position: fixed;
- top: 1.5rem;
+ //top: 1.5rem;
left: 0rem;
color: #FFF;
z-index: 99;
list-style: none;
padding: 0;
margin: 0;
+
+ background: #333;
+ opacity: 0.9;
+ width: 8rem;
}
.toolbar ul {
}
.toolbar .button a {
- background: #333;
- opacity: 0.9;
+ //background: #333;
+ //opacity: 0.9;
display: block;
height:1.5rem;
text-align: center;
color: #FFF;
- padding: 0.2rem;
+ padding: 0.2rem 0;
text-decoration: none;
}
}
#picture-view .toolbar .button.square a {
- width:1.5rem;
+ width: 4rem; //1.5rem;
}
li.button {
#picture-view .toolbar.button a:active {
color: yellow;
+}
+
+.moveright {
+ margin-left: 8rem !important;
+}
+
+#sponsors {
+ position: absolute;
+ display: block;
+ top: 3.5rem;
+ right: 2rem;
+ z-index:1;
+ width: 9rem;
+}
+#sponsors div {
+ z-index: -10;
+}
+
+#sponsors img {
+ width: 100%;
+ z-index: -10;
}
\ No newline at end of file
margin-top: -23em;
}
+.picture.book-wide-box .right-column {
+ float: none;
+ width: 41.5em;
+ top: 0;
+ margin-left: 55em;
+ margin-top: 0em;
+}
+
+
.book-wide-box #theme-list-wrapper {
margin-bottom: 0;
}