From ca4dd4d5f765e1ca6c6625802f9fb91bfe0cb976 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Mon, 19 Feb 2018 23:47:53 +0100 Subject: [PATCH 1/2] Add hide letter mechanism --- feder/cases/models.py | 2 +- feder/cases/tests.py | 7 +++- feder/letters/factories.py | 5 ++- .../migrations/0014_letter_mark_hidden_by.py | 23 +++++++++++++ feder/letters/models.py | 14 ++++++-- feder/letters/templates/letters/_btn.html | 7 +++- .../letters/templates/letters/_milestone.html | 17 ++++++---- feder/letters/tests/test_model.py | 5 ++- feder/letters/tests/test_views.py | 14 +++++++- feder/letters/urls.py | 3 ++ feder/letters/views.py | 33 +++++++++++++++++++ .../migrations/0011_auto_20180219_1842.py | 19 +++++++++++ feder/monitorings/models.py | 3 +- feder/monitorings/tests.py | 7 +++- 14 files changed, 142 insertions(+), 17 deletions(-) create mode 100644 feder/letters/migrations/0014_letter_mark_hidden_by.py create mode 100644 feder/monitorings/migrations/0011_auto_20180219_1842.py diff --git a/feder/cases/models.py b/feder/cases/models.py index bfd53d91c..c512cc8c9 100644 --- a/feder/cases/models.py +++ b/feder/cases/models.py @@ -29,7 +29,7 @@ def with_milestone(self): def with_letter(self): from feder.letters.models import Letter - queryset = Letter.objects.with_author().all() + queryset = Letter.objects.with_author().filter(mark_hidden_by=None).all() return self.prefetch_related(Prefetch(lookup='letter_set', queryset=queryset)) diff --git a/feder/cases/tests.py b/feder/cases/tests.py index 0f59966d6..b18e2cde5 100644 --- a/feder/cases/tests.py +++ b/feder/cases/tests.py @@ -3,7 +3,7 @@ from feder.cases.models import Case from feder.institutions.factories import InstitutionFactory -from feder.letters.factories import IncomingLetterFactory +from feder.letters.factories import IncomingLetterFactory, HiddenLetterFactory from feder.letters.models import Letter from feder.main.mixins import PermissionStatusMixin from feder.users.factories import UserFactory @@ -60,6 +60,11 @@ def test_not_contains_spam_letter(self): response = self.client.get(self.get_url()) self.assertNotContains(response, letter.body) + def test_hide_content_of_hidden_letter(self): + letter = HiddenLetterFactory(case=self.case) + response = self.client.get(self.get_url()) + self.assertNotContains(response, letter.body) + def test_contains_letter(self): letter = IncomingLetterFactory(case=self.case) response = self.client.get(self.get_url()) diff --git a/feder/letters/factories.py b/feder/letters/factories.py index 8dfdc5212..1929762f4 100644 --- a/feder/letters/factories.py +++ b/feder/letters/factories.py @@ -32,7 +32,10 @@ class DraftLetterFactory(OutgoingLetterFactory): is_draft = True +class HiddenLetterFactory(IncomingLetterFactory): + mark_hidden_by = factory.SubFactory(UserFactory) + + class SendOutgoingLetterFactory(LetterFactory): author_user = factory.SubFactory(UserFactory) - is_send_yes = factory.PostGenerationMethodCall('send') diff --git a/feder/letters/migrations/0014_letter_mark_hidden_by.py b/feder/letters/migrations/0014_letter_mark_hidden_by.py new file mode 100644 index 000000000..20d270dc3 --- /dev/null +++ b/feder/letters/migrations/0014_letter_mark_hidden_by.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2018-02-19 18:42 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('letters', '0013_letter_mark_spam_at'), + ] + + operations = [ + migrations.AddField( + model_name='letter', + name='mark_hidden_by', + field=models.ForeignKey(blank=True, help_text='The person who hid the letter', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='letter_mark_hidden_by', to=settings.AUTH_USER_MODEL, verbose_name='Hiding person'), + ), + ] diff --git a/feder/letters/models.py b/feder/letters/models.py index 5e6cc9b3f..47e58faa4 100644 --- a/feder/letters/models.py +++ b/feder/letters/models.py @@ -73,12 +73,18 @@ class Letter(TimeStampedModel): email = models.EmailField(verbose_name=_("E-mail"), max_length=100, blank=True) note = models.TextField(verbose_name=_("Comments from editor"), blank=True) is_spam = models.IntegerField(choices=SPAM, default=SPAM.unknown, db_index=True) - is_draft = models.BooleanField(verbose_name=_("Is draft?"), default=True) - mark_spam_by = models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True, blank=True, verbose_name="Spam marker", + mark_spam_by = models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True, blank=True, verbose_name=_("Spam marker"), help_text=_("The person who marked it as spam"), related_name="letter_mark_spam_by") mark_spam_at = models.DateTimeField(null=True, verbose_name="Time of mark as spam", help_text=_("Time when letter was marked as spam")) + + is_draft = models.BooleanField(verbose_name=_("Is draft?"), default=True) + + mark_hidden_by = models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True, blank=True, verbose_name=_("Hiding person"), + help_text=_("The person who hid the letter"), + related_name="letter_mark_hidden_by") + message_id_header = models.CharField(blank=True, verbose_name=_('ID of sent email message "Message-ID"'), max_length=500) @@ -113,6 +119,10 @@ def is_incoming(self): def is_outgoing(self): return bool(self.author_user_id) + @property + def is_hidden(self): + return bool(self.mark_hidden_by_id) + def get_title(self): if self.title and self.title.strip(): return self.title diff --git a/feder/letters/templates/letters/_btn.html b/feder/letters/templates/letters/_btn.html index dd506c2d0..960c1a496 100644 --- a/feder/letters/templates/letters/_btn.html +++ b/feder/letters/templates/letters/_btn.html @@ -24,7 +24,12 @@ {% endif %} {% endif %} - + {% if 'hide_letter' in monitoring_perms %} + + + {% trans 'Mark hidden' %} + + {% endif %} {% if not object.is_spam_validated %} diff --git a/feder/letters/templates/letters/_milestone.html b/feder/letters/templates/letters/_milestone.html index 54a62d30b..0ce18a6d0 100644 --- a/feder/letters/templates/letters/_milestone.html +++ b/feder/letters/templates/letters/_milestone.html @@ -1,7 +1,10 @@ -
  • - -
    - {% include 'letters/_header.html' with object=object %} - {% include 'letters/_object.html' with object=object %} -
    -
  • +{% if not object.is_hidden %} + {# TODO: Style display of hidden letter #} +
  • + +
    + {% include 'letters/_header.html' with object=object %} + {% include 'letters/_object.html' with object=object %} +
    +
  • +{% endif %} diff --git a/feder/letters/tests/test_model.py b/feder/letters/tests/test_model.py index 8fbb28a4b..6467067ec 100644 --- a/feder/letters/tests/test_model.py +++ b/feder/letters/tests/test_model.py @@ -14,7 +14,7 @@ from feder.monitorings.factories import MonitoringFactory from feder.users.factories import UserFactory from ..factories import (IncomingLetterFactory, LetterFactory, - OutgoingLetterFactory, SendOutgoingLetterFactory) + OutgoingLetterFactory, SendOutgoingLetterFactory, HiddenLetterFactory) from ..models import Letter from feder.letters.signals import MessageParser @@ -114,6 +114,9 @@ def test_send_new_case_adds_footer_from_monitoring(self): self.assertIn(footer_text, mail.outbox[0].body, "Email for a new case should contain footer text from monitoring") + def test_is_hidden(self): + self.assertEqual(HiddenLetterFactory().is_hidden, True) + class IncomingEmailTestCase(MessageMixin, TestCase): def test_case_identification(self): diff --git a/feder/letters/tests/test_views.py b/feder/letters/tests/test_views.py index 53f61168f..d4a5817df 100644 --- a/feder/letters/tests/test_views.py +++ b/feder/letters/tests/test_views.py @@ -14,7 +14,7 @@ from feder.main.mixins import PermissionStatusMixin from feder.monitorings.factories import MonitoringFactory from feder.users.factories import UserFactory -from ..factories import IncomingLetterFactory, OutgoingLetterFactory +from ..factories import IncomingLetterFactory, OutgoingLetterFactory, HiddenLetterFactory from django.utils.translation import ugettext_lazy as _ @@ -69,6 +69,18 @@ def test_contains_link_to_report_spam(self): self.assertContains(response, _("Report spam")) self.assertContains(response, reverse('letters:spam', kwargs={'pk': self.letter.pk})) + def test_contains_link_to_hide_link(self): + self.permission = ['monitorings.hide_letter'] + self.login_permitted_user() + response = self.client.get(self.get_url()) + self.assertContains(response, _("Mark hidden")) + self.assertContains(response, reverse('letters:mark_hidden', kwargs={'pk': self.letter.pk})) + + def test_show_content_of_hidden_letter(self): + letter = HiddenLetterFactory(case=self.case) + response = self.client.get(self.get_url()) + self.assertNotContains(response, letter.body) + class LetterCreateViewTestCase(ObjectMixin, PermissionStatusMixin, TestCase): permission = ['monitorings.add_letter', ] diff --git a/feder/letters/urls.py b/feder/letters/urls.py index 027c1d4fb..4c6c50c78 100644 --- a/feder/letters/urls.py +++ b/feder/letters/urls.py @@ -43,5 +43,8 @@ name="spam"), url(_(r'^(?P[\d-]+)/~mark-spam'), views.LetterMarkSpamView.as_view(), name="mark_spam"), + url(_(r'^(?P[\d-]+)/~mark-hidden'), views.LetterMarkHiddenView.as_view(), + name="mark_hidden"), + url(_(r'^messages/logs/'), include(messages_urlpatterns, namespace="messages")), ] diff --git a/feder/letters/views.py b/feder/letters/views.py index 6e580e07f..c7b89b44f 100644 --- a/feder/letters/views.py +++ b/feder/letters/views.py @@ -272,6 +272,39 @@ def get_success_url(self): return self.object.case.get_absolute_url() +class LetterMarkHiddenView(RaisePermissionRequiredMixin, ActionMessageMixin, ActionView): + template_name_suffix = '_hide' + model = Letter + permission_required = 'monitorings.hide_letter' + accept_global_perms = True + + def get_object(self, *args, **kwargs): + if not hasattr(self, 'object'): + self.object = super(LetterMarkHiddenView, self).get_object(*args, **kwargs) + return self.object + + def get_permission_object(self): + return self.get_object().case.monitoring + + def action(self): + self.is_hidden = self.object.is_hidden + + if self.is_hidden: + self.object.mark_hidden_by = None + else: + self.object.mark_hidden_by = self.request.user + + self.object.save(update_fields=['mark_hidden_by']) + + def get_success_message(self): + if not self.is_hidden: + return _("The letter {object} has been marked as non-hidden.").format(object=self.object) + return _("The message {object} has been marked as hidden.").format(object=self.object) + + def get_success_url(self): + return self.object.case.get_absolute_url() + + class UnrecognizedMessageListView(RaisePermissionRequiredMixin, PrefetchRelatedMixin, FilterView): filterset_class = MessageFilter model = Message diff --git a/feder/monitorings/migrations/0011_auto_20180219_1842.py b/feder/monitorings/migrations/0011_auto_20180219_1842.py new file mode 100644 index 000000000..29985bb5e --- /dev/null +++ b/feder/monitorings/migrations/0011_auto_20180219_1842.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2018-02-19 18:42 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('monitorings', '0010_auto_20180205_0811'), + ] + + operations = [ + migrations.AlterModelOptions( + name='monitoring', + options={'ordering': ['created'], 'permissions': (('add_questionary', 'Can add questionary'), ('change_questionary', 'Can change questionary'), ('delete_questionary', 'Can delete questionary'), ('add_case', 'Can add case'), ('change_case', 'Can change case'), ('delete_case', 'Can delete case'), ('add_task', 'Can add task'), ('change_task', 'Can change task'), ('delete_task', 'Can delete task'), ('add_letter', 'Can add letter'), ('reply', 'Can reply'), ('add_draft', 'Add reply draft'), ('change_letter', 'Can change task'), ('delete_letter', 'Can delete letter'), ('hide_letter', 'Can hide letter'), ('view_alert', 'Can view alert'), ('change_alert', 'Can change alert'), ('delete_alert', 'Can delete alert'), ('manage_perm', 'Can manage perms'), ('select_survey', 'Can select answer'), ('view_log', 'Can view logs'), ('spam_mark', 'Can mark spam')), 'verbose_name': 'Monitoring', 'verbose_name_plural': 'Monitoring'}, + ), + ] diff --git a/feder/monitorings/models.py b/feder/monitorings/models.py index 8eb7c752d..9a3516dca 100644 --- a/feder/monitorings/models.py +++ b/feder/monitorings/models.py @@ -71,13 +71,14 @@ class Meta: ('add_draft', _('Add reply draft')), ('change_letter', _('Can change task')), ('delete_letter', _('Can delete letter')), + ('hide_letter', _("Can hide letter")), ('view_alert', _('Can view alert')), ('change_alert', _('Can change alert')), ('delete_alert', _('Can delete alert')), ('manage_perm', _('Can manage perms')), ('select_survey', _('Can select answer')), ('view_log', _('Can view logs')), - ('spam_mark', _("Can mark spam")) + ('spam_mark', _("Can mark spam")), ) def __unicode__(self): diff --git a/feder/monitorings/tests.py b/feder/monitorings/tests.py index de07b7618..8c3d75d1b 100644 --- a/feder/monitorings/tests.py +++ b/feder/monitorings/tests.py @@ -7,7 +7,7 @@ from feder.cases.factories import CaseFactory from feder.cases.models import Case from feder.institutions.factories import InstitutionFactory -from feder.letters.factories import IncomingLetterFactory, DraftLetterFactory +from feder.letters.factories import IncomingLetterFactory, DraftLetterFactory, HiddenLetterFactory from feder.letters.factories import OutgoingLetterFactory from feder.main.mixins import PermissionStatusMixin from feder.monitorings.filters import MonitoringFilter @@ -122,6 +122,11 @@ def test_details_display(self): response = self.client.get(self.get_url()) self.assertContains(response, self.monitoring) + def test_hide_title_of_hidden_letter(self): + letter = HiddenLetterFactory(case__monitoring=self.monitoring) + response = self.client.get(self.get_url()) + self.assertNotContains(response, letter.title) + class LetterListMonitoringViewTestCase(ObjectMixin, PermissionStatusMixin, TestCase): status_anonymous = 200 From 1d1f18111d03187c508f737840d694b8680d6a4d Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Mon, 19 Feb 2018 23:49:26 +0100 Subject: [PATCH 2/2] Update locale of letters --- feder/letters/locale/pl/LC_MESSAGES/django.mo | Bin 8196 -> 8803 bytes feder/letters/locale/pl/LC_MESSAGES/django.po | 92 ++++++++++++------ .../logs/locale/pl/LC_MESSAGES/django.mo | Bin 1750 -> 1750 bytes .../logs/locale/pl/LC_MESSAGES/django.po | 2 +- 4 files changed, 64 insertions(+), 30 deletions(-) diff --git a/feder/letters/locale/pl/LC_MESSAGES/django.mo b/feder/letters/locale/pl/LC_MESSAGES/django.mo index 9b30d1777565bfdc0f667b5ed311e124509fb390..3a33f4dc61acd6c4dcf1b33b44f57af937a4f78d 100644 GIT binary patch delta 2625 zcmXxlZBSHI9LMpq!h#?V@)SNG+%!}k6kX61QK-lWEx?BoQ)7h<7I2~6ErLtf`rt9UEWtq8e(-vKL`aIZ{SV4b=;qu@{Zg*!Oq$dWQdg&N+MUx#!`3 zmlx}PsgL}aop{7hdWiyJcY-nMxR%5RWl4%L11@8hVjAstQjM8|AL1&!jAb}|nla0; z2GtIthB%4ya0K}?UpoEYVZJdDbB)S$zPO1Q=;kT8n2U*6f_!BbJN?zD>zXhfci>Fy z#aVa&_2AQ(iD#YfFF5_*B5O21U?R^q<95ZE3CG`YDi{2PdcZ$ej0rR}krHGx%rexD z)uJA_4YRQwXW+A#jE9gvbBqs7Xau$3^O(l-&F54!@EB^~pHMeWqPFgD%)&gDt%)tb z23&#~Xb{;-a}eEl26f$8)P&AC{iC>?_C?f!T+Aj?LS+G!Qfxs@WH)N-Uq+7C3_I;t zo%RXGvrc~ub>9WlPK=@!@RjrZ7_O!LJ$kT+Sues3)7k$DD*NbIfghlfYZ5I?X4#Fn z5VaE_)C!LwW0@1E2fdFicpkN&WR_iqOK}QrM}{UaZnLsCwBWksl!&PNM9cn@yGa(oV#;0S7hS5Wu=hFaKd)P&}c;p(>{RK|I|R^lM$ z-xYt&4l^6wa1u4}N2s%##5%ONTd$iJb=JpF*PTN0)m%dD)K%01uj6dIg$!Zxd1a`Y zNCg$0Sp(|ECe#jWLndp2sFfT*4RjPW&^gotE}`xl!y>$n8c!GNHA_adr=fBx+c6)> z>xe0!!m*iB)Cy`)N#}PAqeVM{8sHRiDrN*V(F>@Fe1i;VE+d<0CQ!d4|Dw)5gIQ}q zMW`dJwB`J3sp!nsp)TBw+R|a%fJadSP9lGH=IDV1WRNC47d4S8)WjQc6>i4Gco-}3 zV_c0lQ9I`0d=vHl*HTeOJt~`9Py@H3R@#GF`Cg}gKWa;lpeFJL>b^7BjPIfrbPM(1 z^1}GewxQa?$flT2Ffy0QH7XnNHtMz6$U*7>5zN5@s2w?uL-;1@{VlZOu196{5NZea zpmyvPWJoiDEZU5scJOCZ68>j#{@S{{yW`ndhFVEIYDdJwJhPvO) zDzu{6$fC`1)Xr=|O?)f5P=%^ps`S$^%4&U5jT+4RvP{=0WN^i6@=!wP#AzDa6CXdg2j6 zh1bkjL<6D2R#`#l+?J`q@!5x}T9rO1r9`@2_ zhwNJXC$E;evQuR~QBUab+ll3bo9CM?RP=+aqJz1g*i3X2D%*%h?OHrFJE^ZGlr<_k z-ejP{7+hWZyVwg`yW{A4=q+MbWl` nnrK%+F*c@Y?9X2CTD|^IIQDwMgeyrsVPEw5!kpMZ;jrs}VX_`R delta 2291 zcmZ|PTWnNC9LMqh+KXMGrQ4Qj3tbl43N0-xux+syw@SMr2(&^`kX5wRcz@A^)WjZ( zCWdO%Y-M2QU{0k&g|z_7T*52e1&|#|j+B zN<52t!DXC>f4koc7`@t;Aak@j%;o*om?@a8cD5jswRWt)I_f!A1mO;An&*N6!gF%RH~L@2sfezlEn4+2&#h*kkr{H zn1|<31DJI6%h*i)3Tgr?NLL+h!+IP-P3T?pl;UF)SRVTbRX^$KUpOaR`%kDDPoW0< zt84!Y6V$I_BX%;~wfHnf@Ca_eQ>Y1+G7Am7rI`HFW*s!B!%f(WeW(#1!R2@wufuBjk(bUuT+Zy##lhcGj9j8H!oBL6iM&eG6;*D#99$fpLj1J%J} zs9nDoHIRd@{V@K(=@`dB9A)QfZOh8D_b*2E8%Hh4lh}!eQK#jSM?q^`$?$b!HL8Oi zREm96~-e%9jRq6g9IiQO|vY%D|6UiZiH*1i4xLRG|8aq5AiFDCoiMxCr}E z9lnSe9%{|raE_st=pFa_c~l0c@oxMR)lY)yYNkolOb1af_D};&VVlnXK?*Bq zxPWVL4o`Jp9F>{pQ8O5E_196Gbqv`q_9kj($5Hovj>_QIs25M5?*ATp@FMCxG5$o> z==?uQVF`}mR{R*X>r2^j>L`v{%LHnsJMlT}M;*6G=iG31bGD)~*MZ8!W~57d75E>-!ur5MtyPH@~ zG!revJ;beq_J=NIx05K+`s+OFdMHa~e38h>ct&pfC{_oo0en_D9O#^YKYnx4y z$}NQc7ree%zcf)^Oe`Zdx^}IzHs3BHNW=+kp6!Iz{yri~^b)#agpRMS9YloC-nyO8 zX52~WdXQjm6lFF}riHJPbYt*Tj-OLF;a@8JES)aO5BMkN4f}(|EB$lDk#u=zB#=H) zawd=$jkY#5`>C?(yyz-Q=@Vs7<@xQE(|+rMU(&IKTLONn>J`5?9P^KctJ2fqGlBGl I$jgEM092sRh5!Hn diff --git a/feder/letters/locale/pl/LC_MESSAGES/django.po b/feder/letters/locale/pl/LC_MESSAGES/django.po index c6640d952..3684e772c 100644 --- a/feder/letters/locale/pl/LC_MESSAGES/django.po +++ b/feder/letters/locale/pl/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: letters 0.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-19 00:56+0000\n" -"PO-Revision-Date: 2018-02-19 01:56+0100\n" +"POT-Creation-Date: 2018-02-19 22:48+0000\n" +"PO-Revision-Date: 2018-02-19 23:49+0100\n" "Last-Translator: Adam Dobrawy \n" "Language-Team: Adam Dobrawy \n" "Language: pl_PL\n" @@ -19,7 +19,7 @@ msgstr "" "|| n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 1.8.7.1\n" -#: apps.py:8 models.py:100 +#: apps.py:8 models.py:106 msgid "Letter" msgstr "List" @@ -47,36 +47,44 @@ msgstr "Data utworzenia (rosnąco)" msgid "Creation date (descending)" msgstr "Data utworzenia (malejąco)" -#: forms.py:53 forms.py:56 +#: forms.py:22 models.py:65 +msgid "Case" +msgstr "Sprawa" + +#: forms.py:56 forms.py:59 msgid "Save draft" msgstr "Zapisz szkic" -#: forms.py:54 forms.py:58 +#: forms.py:57 forms.py:61 msgid "Send reply" msgstr "Wyślij odpowiedź" -#: forms.py:63 +#: forms.py:66 msgid "" "Nothing to do. You do not have permission to save draft or send replies." msgstr "" "Nic do zrobienia. Nie masz uprawnień, aby zapisać szkic lub wysłać odpowiedź." -#: forms.py:67 +#: forms.py:70 msgid "You do not have permission to send replies." msgstr "Nie masz uprawnień, aby wysłać odpowiedzi." -#: forms.py:71 +#: forms.py:74 msgid "You do not have permission to save draft." msgstr "Nie masz odpowiedzi, aby wysłać odpowiedź." -#: forms.py:91 +#: forms.py:94 msgid "Assign" msgstr "Przypisz" -#: forms.py:92 +#: forms.py:95 forms.py:109 msgid "Case number" msgstr "Numer sprawy" +#: forms.py:107 +msgid "Reassign" +msgstr "Ponownie przypisz" + #: models.py:62 msgid "Unknown" msgstr "Nieznane" @@ -89,10 +97,6 @@ msgstr "Spam" msgid "Non-spam" msgstr "Nie-spam" -#: models.py:65 -msgid "Case" -msgstr "Sprawa" - #: models.py:66 msgid "Author (if user)" msgstr "Autor (jeżeli użytkownik)" @@ -118,47 +122,59 @@ msgid "Comments from editor" msgstr "Komentarz od redakcji" #: models.py:76 -msgid "Is draft?" -msgstr "Czy szkic?" +msgid "Spam marker" +msgstr "Oznaczający spam" -#: models.py:78 +#: models.py:77 msgid "The person who marked it as spam" msgstr "Osoba, która oznaczyła jako spam" -#: models.py:81 +#: models.py:80 msgid "Time when letter was marked as spam" msgstr "Czas kiedy list został oznaczony jako spam" -#: models.py:83 +#: models.py:82 +msgid "Is draft?" +msgstr "Czy szkic?" + +#: models.py:84 +msgid "Hiding person" +msgstr "Osoba ukrywająca" + +#: models.py:85 +msgid "The person who hid the letter" +msgstr "Osoba, która ukryła list" + +#: models.py:89 msgid "ID of sent email message \"Message-ID\"" msgstr "ID wysłanej wiadomości e-mail \"Message-ID\"" -#: models.py:86 +#: models.py:92 msgid "File" msgstr "Plik" -#: models.py:91 +#: models.py:97 msgid "Message" msgstr "Wiadomość" -#: models.py:92 +#: models.py:98 msgid "Message registerd by django-mailbox" msgstr "Wiadomość zarejestrowanaa przez django-maiblxo" -#: models.py:101 templates/letters/base.html:5 +#: models.py:107 templates/letters/base.html:5 #: templates/letters/letter_detail.html:3 msgid "Letters" msgstr "Listy" -#: models.py:104 +#: models.py:110 msgid "Can filter eml" msgstr "Może filtrować po eml" -#: models.py:105 +#: models.py:111 msgid "Can recognize letter" msgstr "Może rozpoznawać listy" -#: models.py:119 +#: models.py:129 msgid "(no subject)" msgstr "(bez tematu)" @@ -179,12 +195,16 @@ msgstr "Odpowiedź" msgid "Send draft" msgstr "Wyślij ten szkic" -#: templates/letters/_btn.html:31 templates/letters/letter_spam.html:15 +#: templates/letters/_btn.html:30 tests/test_views.py:76 +msgid "Mark hidden" +msgstr "Oznacz jako ukrytę" + +#: templates/letters/_btn.html:36 templates/letters/letter_spam.html:15 #: tests/test_views.py:69 msgid "Report spam" msgstr "Zgłoś spam" -#: templates/letters/_btn.html:36 +#: templates/letters/_btn.html:41 msgid "Mark spam" msgstr "Oznacz spam" @@ -387,6 +407,10 @@ msgid "^(?P[\\d-]+)/~mark-spam" msgstr "^(?P[\\d-]+)/~oznacz-spam" #: urls.py:46 +msgid "^(?P[\\d-]+)/~mark-hidden" +msgstr "^(?P[\\d-]+)/~oznacz-ukryte" + +#: urls.py:49 msgid "^messages/logs/" msgstr "^wiadomosci/dziennik/" @@ -460,7 +484,17 @@ msgstr "List {object} został oznaczony jako spam i ukryty." msgid "The message {object} has been marked as spam and hidden." msgstr "List {object} został oznaczony jako spam i ukryty." -#: views.py:308 +#: views.py:301 +#, python-brace-format +msgid "The letter {object} has been marked as non-hidden." +msgstr "List {object} został oznaczony jako nie-ukryty." + +#: views.py:302 +#, python-brace-format +msgid "The message {object} has been marked as hidden." +msgstr "List {object} został oznaczony jako ukryty." + +#: views.py:341 #, python-format msgid "Assigned message to case '%(case)s'" msgstr "Przypisano wiadomość do sprawy '%(case)s'" diff --git a/feder/letters/logs/locale/pl/LC_MESSAGES/django.mo b/feder/letters/logs/locale/pl/LC_MESSAGES/django.mo index 55a0bf63f5623584f89b121243ce59dade322518..2ff36fe38d64fd55fcce47b6f57aec84e7f75d2d 100644 GIT binary patch delta 18 acmcb{dyRL)7iLx?BP$b&%|Ds%G64WZ=LZV_ delta 18 acmcb{dyRL)7iLxi11nRr%|Ds%G64WZyaxsV diff --git a/feder/letters/logs/locale/pl/LC_MESSAGES/django.po b/feder/letters/logs/locale/pl/LC_MESSAGES/django.po index 0994778a4..133fa426e 100644 --- a/feder/letters/logs/locale/pl/LC_MESSAGES/django.po +++ b/feder/letters/logs/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-19 00:56+0000\n" +"POT-Creation-Date: 2018-02-19 22:48+0000\n" "PO-Revision-Date: 2017-09-20 20:27+0200\n" "Last-Translator: Adam Dobrawy \n" "Language-Team: \n"