diff --git a/boards/locale/ru/LC_MESSAGES/django.mo b/boards/locale/ru/LC_MESSAGES/django.mo index 582a970731f4e47424970776c885629147b520a7..2173b90d43d3beac081380af7c55970ed18baa07 GIT binary patch literal 3641 zc$|GzTWlOx89vb3jd$&&7j7k7jwwlN(%J6X5i%QZ+D*MlSFA7C>qrF&Y3w~&Pr5s^ zotbT8sS>uMm?B#VDgvrjY1$MO@qpwyabjl^`=u{^sF*>0swyO;J{1rb2_!&5eE<26 zW0zP=vh$tupa1&({~Z7B{=0uF@buyLCH$^_N{AD{(p^G7({~H;WuOC00)Gg+2lx|U zJMdM5mw_F?UzzhO!25tLbN(Liv%vR(_%A-js}1;P;Df-w8~^(t>;mow?gjR=v0lH~ z9|b-P9BSiu%{KP`gEscN089WEjr?cE{-VJ*@!Cgu8ohO6_YQCm@ZC1f|F_2e0~7c6 z#{Mrx{~y2s;J?kjzn$~XwX|jz4*>s`;JVtAj1MN+{?R0#pGtld%W50PO8F{q5xX-!bPOb@HtL zsgwP5cd_1K;C|raT|AH9>tg$IPLj?IA*)DI7;BEia6%gDl$}OLh+0;X2%y}$`Q ze@2Yk$b4Ldq2pEqG2ZZ;n)1c?j2qf#MA@#&y6wWNCJkE@gLj}`vff0{NhK?)=F}Zx zY;r~h4SPxjDOm;$5}ndXNhgrLdba8K3Z>GKe#yYZnMMG-q17Pmil+kUqEO9*C_7Wn~V_On>(9HxH%z(rGAK zW9m64*w%ZxkRP*#My$cSd}<^+R6O+Ek>NsuhRZ7Zwj0za^{hNTQ7Xyd{7^v-6o&G} z(i8c?!Lh>l_))03)g}tF%F3>1Whp;=VuDg0D3zY5IVsPtZtG;F-%Jb@hYH&jW>V<{ zQHJhY<(URlXu2P3)NIE+BB!QpKTu(AqI}%y-`1nVPAT6ixKmyQW0jTtlTMfztu=kS zW*ztZdXSZFLvMpz-x0~n+#~LROgfj#$b$zZEz{k(Oh!H~(=w~~M{~VfM+3RTwA2>q zflOMy@B*7aC*1>^3~YLPjwEn(M4QoSJR7Y>E73-DHCmSOTs#lKMsy=u!v>4%B#+O> z^D?@H?Ml2Dt;=XRdK)Lp@j^;OFF|ir#`AD-qxzuNQ~I4 zng%*Yz$J=C>=CQ$_$b*+D_+u;ngH0f$UXRsUnKKakmoFH)^L7jy_YCGWW9>)Z{fWv zDFrT2i**vXfuc8Hun5r&bQ98L?jq&;qn){)K)M+7Q$5uLqAG#Ktu za+}>~T~}zPM>E{5wLjq^+MsLsjMry*)tjx!W1*Ln6F};=9IKH^`=Gj({_z# zgSrK?IhwMq5?kB#%xkijF}7=ldE&#gU`H>m(y)LCG(n=)MV-BNcU?2v;s!|`TZ{pT zv|BXk^48Eu1Z|PKwO!fOq6_*X=3!hiO~1T7b$1lDVO|+u5?3xC^s;cx?i*LIq`qKnXSv=e-D\n" "Language-Team: LANGUAGE \n" @@ -79,84 +79,92 @@ msgstr "Вставьте свой ID пользователя выше" msgid "Tag: " msgstr "Тег: " -#: templates/boards/posting_general.html:35 -#: templates/boards/posting_general.html:89 templates/boards/thread.html:27 +#: templates/boards/posting_general.html:43 +#: templates/boards/posting_general.html:99 templates/boards/thread.html:27 #: templates/boards/rss/post.html:5 msgid "Post image" msgstr "Изображение сообщения" -#: templates/boards/posting_general.html:48 +#: templates/boards/posting_general.html:56 msgid "Reply" msgstr "Ответ" -#: templates/boards/posting_general.html:54 templates/boards/thread.html:45 +#: templates/boards/posting_general.html:61 templates/boards/thread.html:45 msgid "Delete" msgstr "Удалить" -#: templates/boards/posting_general.html:63 templates/boards/thread.html:112 +#: templates/boards/posting_general.html:64 templates/boards/thread.html:48 +msgid "Ban IP" +msgstr "Заблокировать IP" + +#: templates/boards/posting_general.html:73 templates/boards/thread.html:112 msgid "replies" msgstr "ответов" -#: templates/boards/posting_general.html:64 templates/boards/thread.html:113 +#: templates/boards/posting_general.html:74 templates/boards/thread.html:113 msgid "images" msgstr "изображений" -#: templates/boards/posting_general.html:66 -#: templates/boards/posting_general.html:139 templates/boards/tags.html:7 +#: templates/boards/posting_general.html:76 +#: templates/boards/posting_general.html:149 templates/boards/tags.html:7 #: templates/boards/thread.html:58 templates/boards/rss/post.html:10 msgid "Tags" msgstr "Теги" -#: templates/boards/posting_general.html:115 +#: templates/boards/posting_general.html:125 msgid "No threads exist. Create the first one!" msgstr "Нет тем. Создайте первую!" -#: templates/boards/posting_general.html:121 +#: templates/boards/posting_general.html:131 msgid "Create new thread" msgstr "Создать новую тему" -#: templates/boards/posting_general.html:124 templates/boards/thread.html:77 +#: templates/boards/posting_general.html:134 templates/boards/thread.html:77 msgid "Title" msgstr "Заголовок" -#: templates/boards/posting_general.html:129 templates/boards/thread.html:82 +#: templates/boards/posting_general.html:139 templates/boards/thread.html:82 msgid "Text" msgstr "Текст" -#: templates/boards/posting_general.html:134 templates/boards/thread.html:87 +#: templates/boards/posting_general.html:144 templates/boards/thread.html:87 msgid "Image" msgstr "Изображение" -#: templates/boards/posting_general.html:152 templates/boards/thread.html:101 +#: templates/boards/posting_general.html:162 templates/boards/thread.html:101 msgid "Post" msgstr "Отправить" -#: templates/boards/posting_general.html:154 +#: templates/boards/posting_general.html:164 msgid "Tags must be delimited by spaces. Text or image is required." msgstr "" "Теги должны быть разделены пробелами. Текст или изображение обязательны." -#: templates/boards/posting_general.html:157 templates/boards/thread.html:103 +#: templates/boards/posting_general.html:167 templates/boards/thread.html:103 msgid "Text syntax" msgstr "Синтаксис текста" -#: templates/boards/posting_general.html:167 +#: templates/boards/posting_general.html:177 msgid "Pages:" msgstr "Страницы: " -#: templates/boards/settings.html:12 +#: templates/boards/settings.html:13 msgid "User:" msgstr "Пользователь:" -#: templates/boards/settings.html:14 +#: templates/boards/settings.html:15 msgid "You are moderator." msgstr "Вы модератор." -#: templates/boards/settings.html:20 +#: templates/boards/settings.html:18 +msgid "Posts:" +msgstr "Сообщений:" + +#: templates/boards/settings.html:23 msgid "Theme" msgstr "Тема" -#: templates/boards/settings.html:36 +#: templates/boards/settings.html:39 msgid "Save" msgstr "Сохранить" @@ -164,22 +172,10 @@ msgstr "Сохранить" msgid "threads" msgstr "тем" -#: templates/boards/tags.html:20 -msgid "Remove" -msgstr "Удалить" - -#: templates/boards/tags.html:23 -msgid "Add" -msgstr "Добавить" - #: templates/boards/tags.html:28 msgid "No tags found." msgstr "Теги не найдены." -#: templates/boards/thread.html:48 -msgid "Ban IP" -msgstr "Заблокировать IP" - #: templates/boards/thread.html:74 msgid "Reply to thread" msgstr "Ответить в тему" @@ -192,7 +188,7 @@ msgstr "Последнее обновление: " msgid "Banned" msgstr "Заблокирован" -#: templates/boards/staticpages/banned.html:10 +#: templates/boards/staticpages/banned.html:11 msgid "Your IP address has been banned. Contact the administrator" msgstr "Ваш IP адрес был заблокирован. Свяжитесь с администратором" @@ -229,6 +225,12 @@ msgstr "Цитата" msgid "Link to a post" msgstr "Ссылка на сообщение" +#~ msgid "Remove" +#~ msgstr "Удалить" + +#~ msgid "Add" +#~ msgstr "Добавить" + #~ msgid "Basic markdown syntax." #~ msgstr "Базовый синтаксис markdown." diff --git a/boards/models.py b/boards/models.py --- a/boards/models.py +++ b/boards/models.py @@ -33,6 +33,7 @@ RANK_USER = 100 class PostManager(models.Manager): + def create_post(self, title, text, image=None, thread=None, ip=NO_IP, tags=None, user=None): post = self.create(title=title, @@ -306,6 +307,9 @@ class User(models.Model): return tags + def get_post_count(self): + return Post.objects.filter(user=self).count() + def __unicode__(self): return self.user_id + '(' + str(self.rank) + ')' diff --git a/boards/templates/boards/settings.html b/boards/templates/boards/settings.html --- a/boards/templates/boards/settings.html +++ b/boards/templates/boards/settings.html @@ -9,10 +9,13 @@ {% block content %}
+

{% trans 'User:' %} {{ user.user_id }}. {% if user.is_moderator %} {% trans 'You are moderator.' %} {% endif %} +

+

{% trans 'Posts:' %} {{ user.get_post_count }}

diff --git a/boards/views.py b/boards/views.py --- a/boards/views.py +++ b/boards/views.py @@ -86,7 +86,7 @@ def _new_post(request, form, thread_id=b get_object_or_404(Post, id=thread_id) post = Post.objects.create_post(title=title, text=text, ip=ip, thread=op, image=image, - tags=tags) + tags=tags, user=_get_user(request)) thread_to_show = (post.id if new_thread else thread_id)