From 4e17ee1bbde80e43ae80fb6f28946e9364423ec8 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 24 Jan 2014 10:10:55 +0100 Subject: [PATCH 1/1] Fix cover display issues. --- .../templates/catalogue/book_text.html | 2 +- .../catalogue/templates/catalogue/player.html | 4 +-- apps/social/locale/pl/LC_MESSAGES/django.mo | Bin 2083 -> 2234 bytes apps/social/locale/pl/LC_MESSAGES/django.po | 28 ++++++++++-------- apps/social/models.py | 3 +- apps/wolnelektury_core/views.py | 2 +- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/apps/catalogue/templates/catalogue/book_text.html b/apps/catalogue/templates/catalogue/book_text.html index 37a8a1ed2..8dd154646 100644 --- a/apps/catalogue/templates/catalogue/book_text.html +++ b/apps/catalogue/templates/catalogue/book_text.html @@ -9,7 +9,7 @@ {% block menu %}
  • - {{ book.pretty_title }} diff --git a/apps/catalogue/templates/catalogue/player.html b/apps/catalogue/templates/catalogue/player.html index b5d6d1259..507e5d51a 100755 --- a/apps/catalogue/templates/catalogue/player.html +++ b/apps/catalogue/templates/catalogue/player.html @@ -17,12 +17,12 @@ - {% if book.cover %} + {% if book.cover_thumb %} Cover {% endif %} diff --git a/apps/social/locale/pl/LC_MESSAGES/django.mo b/apps/social/locale/pl/LC_MESSAGES/django.mo index e540b21fb2e53ea3d0948bfb2e55ff6dcba5856d..8b72b7b4cefad9e4de67ea5467c4dd7db5b7fb51 100644 GIT binary patch delta 791 zcmZ9}KWGzC9Ki9Hc&Qp&ZCdNUN_;4Sg9(XTl%!o+Pzx1l2ceVnG>>|1lM8oO(nKMH zpe_y?Tr3FU(m|(gB@T+ALnj>^U0uY*#Yy`8rI*FWz5Bf1FYoUC^1FA#+o{%%5$ly= zoME12{$gHac4FKZb8)5Ca2}JmgGKy?=Wy_VQit#|j$r|h<1C)XMLdCzkxRYiHiK_) zK&h7c$-*M>JMs@Ei2p|Z!$D$;O=1dVf0~;VbOB|5Hqu63tV+nGrlR}}{K}uYh40Cy z*_7mbwaa3X#CNoD^x*zMGdN0o2j!o+cnMpW#!aL)wSyk+q7*VgI}YO%N<52F(0mjx z;8EhcBIm0L3whuX%El)+gwIi4uz^SLZ4`e%*|&xAmE_aOIJHmj*=X5oy&Ohuy>6Yv z)BPXux*RNr^hb(?w3&CS;V5|wrIqqsr4TuMgel#T4ve+)@fXEu6NK8WI7>#mfi~;T z{cyFRi`NRZbzOJMMmyEAt{ZphK^W+@YT5WYpUbUGXSY7ZU&e;)OfH|fVv{T7uC^Dg z@&7Wo%hE@W<+s_~uB^GkZpGi5i_`D`I;w?8MgCvQ8;tELt-8``_)J5612 kbkH=ux8ij-zC4ZUadqA4b{e|oRo!mKEcYvUIItPp1K3n*wg3PC delta 639 zcmXxhJxfAS7{Kv!^{QoBzGX#H5(F(5?lm)XN?IBk8u|hb;Z_v51%8IOG&UtfB0(qw z4uTQ5O9U+qVGuRcR7*quM~?@e`#aC^yq|XTGE#ksndgeKK%|HPu}U-yK9ntwQWY#> z5btmq?{NZOaTY%@freM96-;6h^Tx>DR8iOHZ4Vis z9#J;(jM9Ig{Xm)c8>Qc`ZvVqBhw;$Zp#6bCGX9v(S=LvlRAixBjAIAoM15StcU;0~ zV0022kI1tq8>rzV)^*-OhN!mAyEskW(>|f}e?vd(t1l{H{6U$}|B!CQPBc ziaeE+xe>$7>*^4hOZv+q@&xn5xG=@=cE\n" "Language-Team: LANGUAGE \n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2)\n" +"|| n%100>=20) ? 1 : 2);\n" +"X-Generator: Poedit 1.5.4\n" #: admin.py:16 msgid "Background" @@ -54,7 +54,7 @@ msgstr "Sprawia, że cytat wyświetla się mniejszym fontem." msgid "VIP" msgstr "VIP" -#: models.py:18 models.py:30 +#: models.py:18 models.py:31 msgid "link" msgstr "odnośnik" @@ -67,37 +67,41 @@ msgid "Sticky cites will take precedense." msgstr "Przyklejone cytaty mają pierwszeństwo." #: models.py:24 +msgid "Best image is exactly 975px wide and weights under 100kB." +msgstr "Najlepszy obraz ma szerokość 975px i waży poniżej 100kB." + +#: models.py:25 msgid "shift" msgstr "przesunięcie" -#: models.py:25 +#: models.py:26 msgid "" "Vertical shift, in percents. 0 means top, 100 is bottom. Default is 50%." msgstr "" "Przesunięcie w pionie, w procentach. 0 to wyrównanie do górnej krawędzi, 100 " "do dolnej. Domyślne jest 50%." -#: models.py:26 +#: models.py:27 msgid "title" msgstr "tytuł" -#: models.py:28 +#: models.py:29 msgid "author" msgstr "autor" -#: models.py:31 +#: models.py:32 msgid "license name" msgstr "nazwa licencji" -#: models.py:33 +#: models.py:34 msgid "license link" msgstr "adres licencji" -#: models.py:37 +#: models.py:38 msgid "cite" msgstr "cytat" -#: models.py:38 +#: models.py:39 msgid "cites" msgstr "cytaty" diff --git a/apps/social/models.py b/apps/social/models.py index 835773de1..df1b17599 100644 --- a/apps/social/models.py +++ b/apps/social/models.py @@ -20,7 +20,8 @@ class Cite(models.Model): help_text=_('Sticky cites will take precedense.')) image = models.ImageField(_('image'), upload_to='social/cite', - null=True, blank=True) + null=True, blank=True, + help_text=_('Best image is exactly 975px wide and weights under 100kB.')) image_shift = models.IntegerField(_('shift'), null=True, blank=True, help_text=_(u'Vertical shift, in percents. 0 means top, 100 is bottom. Default is 50%.')) image_title = models.CharField(_('title'), max_length=255, diff --git a/apps/wolnelektury_core/views.py b/apps/wolnelektury_core/views.py index 77cd01681..f2a774b60 100644 --- a/apps/wolnelektury_core/views.py +++ b/apps/wolnelektury_core/views.py @@ -20,7 +20,7 @@ from social.templatetags.social_tags import choose_cite def main_page(request): - last_published = Book.objects.filter(parent=None).order_by('-created_at')[:4] + last_published = Book.objects.exclude(cover_thumb='').filter(parent=None).order_by('-created_at')[:4] cite = choose_cite(RequestContext(request)) return render_to_response("main_page.html", locals(), -- 2.20.1