From: Radek Czajka Date: Mon, 18 Mar 2019 12:51:27 +0000 (+0100) Subject: More banners admin. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/e5f72228d92e58406b43c2a772737535041d28c0?ds=inline More banners admin. --- diff --git a/src/social/admin.py b/src/social/admin.py index 258e522c0..0a634ed89 100755 --- a/src/social/admin.py +++ b/src/social/admin.py @@ -10,8 +10,9 @@ from social.models import Cite, BannerGroup, Carousel, CarouselItem class CiteAdmin(admin.ModelAdmin): list_display = ['nonempty_text', 'created_at', 'sticky', 'vip', 'small', 'has_image'] list_filter = ['group'] + readonly_fields = ['created_at'] fieldsets = ( - (None, {'fields': ('group', 'sticky')}), + (None, {'fields': ('group', 'sticky', 'created_at')}), (_('Content'), {'fields': ('book', 'text', 'small', 'vip', 'link', 'video', 'picture', 'banner')}), ( _('Background'), @@ -35,7 +36,13 @@ class CiteAdmin(admin.ModelAdmin): admin.site.register(Cite, CiteAdmin) -admin.site.register(BannerGroup) + +class BannerGroupAdmin(admin.ModelAdmin): + list_display = ['name', 'created_at'] + fields = ['name', 'created_at'] + readonly_fields = ['created_at'] + +admin.site.register(BannerGroup, BannerGroupAdmin) class CarouselItemInline(OrderableAdmin, admin.TabularInline): diff --git a/src/social/locale/pl/LC_MESSAGES/django.mo b/src/social/locale/pl/LC_MESSAGES/django.mo index 127985396..c470ca1e5 100644 Binary files a/src/social/locale/pl/LC_MESSAGES/django.mo and b/src/social/locale/pl/LC_MESSAGES/django.mo differ diff --git a/src/social/locale/pl/LC_MESSAGES/django.po b/src/social/locale/pl/LC_MESSAGES/django.po index 5217cf9a6..d65d69190 100644 --- a/src/social/locale/pl/LC_MESSAGES/django.po +++ b/src/social/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-03-18 13:38+0100\n" +"POT-Creation-Date: 2019-03-18 13:48+0100\n" "PO-Revision-Date: 2014-01-24 10:06+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: LANGUAGE \n" @@ -19,19 +19,19 @@ msgstr "" "|| n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 1.5.4\n" -#: admin.py:15 +#: admin.py:16 msgid "Content" msgstr "Zawartość" -#: admin.py:17 +#: admin.py:18 msgid "Background" msgstr "Obraz tła" -#: admin.py:28 models.py:32 +#: admin.py:29 models.py:32 msgid "text" msgstr "tekst" -#: admin.py:32 models.py:44 +#: admin.py:33 models.py:44 msgid "image" msgstr "obraz" @@ -95,7 +95,7 @@ msgstr "przyklejony" msgid "Sticky cites will take precedense." msgstr "Przyklejone cytaty mają pierwszeństwo." -#: models.py:41 models.py:100 +#: models.py:41 models.py:60 models.py:100 msgid "banner" msgstr "banner" @@ -138,13 +138,9 @@ msgstr "adres licencji" msgid "group" msgstr "grupa" -#: models.py:60 -msgid "cite" -msgstr "cytat" - #: models.py:61 -msgid "cites" -msgstr "cytaty" +msgid "banners" +msgstr "bannery" #: models.py:87 msgid "slug" @@ -194,3 +190,9 @@ msgstr "" #: templates/social/sets_form.html:8 msgid "Remove from my shelf" msgstr "Usuń z mojej półki" + +#~ msgid "cite" +#~ msgstr "cytat" + +#~ msgid "cites" +#~ msgstr "cytaty" diff --git a/src/social/models.py b/src/social/models.py index 58f551104..588b2eb8e 100644 --- a/src/social/models.py +++ b/src/social/models.py @@ -57,8 +57,8 @@ class Cite(models.Model): class Meta: ordering = ('vip', 'text') - verbose_name = _('cite') - verbose_name_plural = _('cites') + verbose_name = _('banner') + verbose_name_plural = _('banners') def __str__(self): return u"%s: %s…" % (self.vip, self.text[:60]) diff --git a/src/wolnelektury/templates/admin/base_site.html b/src/wolnelektury/templates/admin/base_site.html index 9bd250c20..71a4be5e7 100644 --- a/src/wolnelektury/templates/admin/base_site.html +++ b/src/wolnelektury/templates/admin/base_site.html @@ -7,7 +7,7 @@

{% trans "Site administration" %} - WolneLektury.pl

promobox | - cytaty | + bannery | info | książki | tagi |