From: Aleksander Łukasz
Date: Tue, 8 Oct 2013 09:48:42 +0000 (+0200)
Subject: Merge branch 'forum'
X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/42c42960c2dce4500f12dd14a68a10ed4f06abf5?hp=0286981a64802f5cea0ac8473a360e9635b005a3
Merge branch 'forum'
---
diff --git a/catalogue/templates/catalogue/lesson/lesson_detail.html b/catalogue/templates/catalogue/lesson/lesson_detail.html
index c6f726a..f08b5b8 100755
--- a/catalogue/templates/catalogue/lesson/lesson_detail.html
+++ b/catalogue/templates/catalogue/lesson/lesson_detail.html
@@ -111,6 +111,17 @@
+
+
+{% if request.user.is_authenticated and object.forum_topics.all.count %}
+ Na forum
+
+{% endif %}
+
{% endblock %}
diff --git a/edumed/forms.py b/edumed/forms.py
new file mode 100755
index 0000000..554779f
--- /dev/null
+++ b/edumed/forms.py
@@ -0,0 +1,17 @@
+from django import forms
+from django.utils.translation import ugettext_lazy as _
+from pybb.forms import EditProfileForm
+from pybb import util
+
+
+class AvatarlessEditProfileForm(EditProfileForm):
+ signature = forms.CharField(
+ widget=forms.Textarea(attrs={'rows': 2, 'cols:': 60}),
+ required=False,
+ label = _('Signature')
+ )
+
+ class Meta:
+ model = util.get_pybb_profile_model()
+ fields = ['signature', 'time_zone', 'language',
+ 'show_signatures']
diff --git a/edumed/forum.py b/edumed/forum.py
new file mode 100755
index 0000000..4b194a8
--- /dev/null
+++ b/edumed/forum.py
@@ -0,0 +1,25 @@
+from pybb.permissions import DefaultPermissionHandler
+
+
+class ForumPermissionHandler(DefaultPermissionHandler):
+ def may_post_as_admin(self, user):
+ """ return True if `user` may post as admin """
+ return False
+
+ def may_create_topic(self, user, forum):
+ """ return True if `user` is allowed to create a new topic in `forum` """
+ return user.is_authenticated()
+
+ def may_create_post(self, user, topic):
+ """ return True if `user` is allowed to create a new post in `topic` """
+
+ if topic.forum.hidden and (not user.is_staff):
+ # if topic is hidden, only staff may post
+ return False
+
+ if topic.closed and (not user.is_staff):
+ # if topic is closed, only staff may post
+ return False
+
+ return user.is_authenticated()
+
\ No newline at end of file
diff --git a/edumed/locale-contrib/django.pot b/edumed/locale-contrib/django.pot
new file mode 100644
index 0000000..c231cd9
--- /dev/null
+++ b/edumed/locale-contrib/django.pot
@@ -0,0 +1,715 @@
+# Translations template for PROJECT.
+# Copyright (C) 2013 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2013.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2013-08-09 11:40+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 1.3\n"
+
+#: pybb/admin.py:40
+#: pybb/admin.py:66
+#: pybb/admin.py:94
+#: pybb/admin.py:116
+msgid "Additional options"
+msgstr ""
+
+#: pybb/admin.py:99
+#: pybb/models.py:254
+msgid "Message"
+msgstr ""
+
+#: pybb/admin.py:130
+msgid "View post"
+msgstr ""
+
+#: pybb/admin.py:135
+msgid "Edit post"
+msgstr ""
+
+#: pybb/feeds.py:25
+#: pybb/feeds.py:26
+#: pybb/templates/pybb/base.html:12
+msgid "Latest posts on forum"
+msgstr ""
+
+#: pybb/feeds.py:35
+#: pybb/feeds.py:36
+#: pybb/templates/pybb/base.html:13
+msgid "Latest topics on forum"
+msgstr ""
+
+#: pybb/forms.py:27
+msgid "Attachment is too big"
+msgstr ""
+
+#: pybb/forms.py:47
+#, python-format
+msgid "You cant add more than %s answers for poll"
+msgstr ""
+
+#: pybb/forms.py:49
+msgid "Add two or more answers for this poll"
+msgstr ""
+
+#: pybb/forms.py:109
+msgid "Polls question is required when adding a poll"
+msgstr ""
+
+#: pybb/forms.py:192
+#, python-format
+msgid "Avatar is too large, max size: %s bytes"
+msgstr ""
+
+#: pybb/models.py:68
+#: pybb/models.py:99
+msgid "Name"
+msgstr ""
+
+#: pybb/models.py:69
+#: pybb/models.py:100
+msgid "Position"
+msgstr ""
+
+#: pybb/models.py:70
+#: pybb/models.py:106
+#: pybb/templates/pybb/category.html:5
+#: pybb/templates/pybb/category.html:28
+msgid "Hidden"
+msgstr ""
+
+#: pybb/models.py:71
+msgid "If checked, this category will be visible only for staff"
+msgstr ""
+
+#: pybb/models.py:76
+#: pybb/models.py:98
+msgid "Category"
+msgstr ""
+
+#: pybb/models.py:77
+msgid "Categories"
+msgstr ""
+
+#: pybb/models.py:101
+msgid "Description"
+msgstr ""
+
+#: pybb/models.py:102
+msgid "Moderators"
+msgstr ""
+
+#: pybb/models.py:103
+#: pybb/models.py:165
+#: pybb/models.py:270
+msgid "Updated"
+msgstr ""
+
+#: pybb/models.py:104
+#: pybb/models.py:172
+#: pybb/models.py:357
+msgid "Post count"
+msgstr ""
+
+#: pybb/models.py:105
+msgid "Topic count"
+msgstr ""
+
+#: pybb/models.py:108
+msgid "Headline"
+msgstr ""
+
+#: pybb/models.py:112
+#: pybb/models.py:162
+#: pybb/templates/pybb/category.html:10
+msgid "Forum"
+msgstr ""
+
+#: pybb/models.py:113
+msgid "Forums"
+msgstr ""
+
+#: pybb/models.py:157
+msgid "None"
+msgstr ""
+
+#: pybb/models.py:158
+msgid "Single answer"
+msgstr ""
+
+#: pybb/models.py:159
+msgid "Multiple answers"
+msgstr ""
+
+#: pybb/models.py:163
+msgid "Subject"
+msgstr ""
+
+#: pybb/models.py:164
+#: pybb/models.py:269
+msgid "Created"
+msgstr ""
+
+#: pybb/models.py:166
+#: pybb/models.py:268
+#: pybb/models.py:381
+#: pybb/models.py:512
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3
+msgid "User"
+msgstr ""
+
+#: pybb/models.py:167
+msgid "Views count"
+msgstr ""
+
+#: pybb/models.py:168
+#: pybb/templates/pybb/topic_list.html:27
+msgid "Sticky"
+msgstr ""
+
+#: pybb/models.py:169
+#: pybb/templates/pybb/topic_list.html:28
+msgid "Closed"
+msgstr ""
+
+#: pybb/models.py:170
+#: pybb/templates/pybb/topic.html:92
+msgid "Subscribers"
+msgstr ""
+
+#: pybb/models.py:174
+#: pybb/models.py:272
+msgid "On moderation"
+msgstr ""
+
+#: pybb/models.py:175
+msgid "Poll type"
+msgstr ""
+
+#: pybb/models.py:176
+msgid "Poll question"
+msgstr ""
+
+#: pybb/models.py:180
+#: pybb/models.py:267
+#: pybb/models.py:489
+#: pybb/templates/pybb/topic_list.html:7
+msgid "Topic"
+msgstr ""
+
+#: pybb/models.py:181
+#: pybb/templates/pybb/category.html:13
+msgid "Topics"
+msgstr ""
+
+#: pybb/models.py:255
+msgid "HTML version"
+msgstr ""
+
+#: pybb/models.py:256
+msgid "Text version"
+msgstr ""
+
+#: pybb/models.py:271
+msgid "User IP"
+msgstr ""
+
+#: pybb/models.py:276
+#: pybb/models.py:397
+msgid "Post"
+msgstr ""
+
+#: pybb/models.py:277
+#: pybb/templates/pybb/category.html:16
+#: pybb/templates/pybb/topic_list.html:10
+msgid "Posts"
+msgstr ""
+
+#: pybb/models.py:346
+msgid "Signature"
+msgstr ""
+
+#: pybb/models.py:348
+msgid "Signature HTML Version"
+msgstr ""
+
+#: pybb/models.py:350
+msgid "Time zone"
+msgstr ""
+
+#: pybb/models.py:352
+msgid "Language"
+msgstr ""
+
+#: pybb/models.py:355
+msgid "Show signatures"
+msgstr ""
+
+#: pybb/models.py:358
+msgid "Avatar"
+msgstr ""
+
+#: pybb/models.py:360
+msgid "Automatically subscribe"
+msgstr ""
+
+#: pybb/models.py:361
+msgid "Automatically subscribe to topics that you answer"
+msgstr ""
+
+#: pybb/models.py:384
+msgid "Profile"
+msgstr ""
+
+#: pybb/models.py:385
+msgid "Profiles"
+msgstr ""
+
+#: pybb/models.py:394
+#: pybb/templates/pybb/post_template.html:73
+msgid "Attachment"
+msgstr ""
+
+#: pybb/models.py:395
+msgid "Attachments"
+msgstr ""
+
+#: pybb/models.py:398
+msgid "Size"
+msgstr ""
+
+#: pybb/models.py:399
+msgid "File"
+msgstr ""
+
+#: pybb/models.py:447
+msgid "Topic read tracker"
+msgstr ""
+
+#: pybb/models.py:448
+msgid "Topic read trackers"
+msgstr ""
+
+#: pybb/models.py:483
+msgid "Forum read tracker"
+msgstr ""
+
+#: pybb/models.py:484
+msgid "Forum read trackers"
+msgstr ""
+
+#: pybb/models.py:490
+msgid "Text"
+msgstr ""
+
+#: pybb/models.py:493
+#: pybb/models.py:511
+msgid "Poll answer"
+msgstr ""
+
+#: pybb/models.py:494
+msgid "Polls answers"
+msgstr ""
+
+#: pybb/models.py:516
+msgid "Poll answer user"
+msgstr ""
+
+#: pybb/models.py:517
+msgid "Polls answers users"
+msgstr ""
+
+#: pybb/util.py:58
+msgid "Can't get profile for anonymous user"
+msgstr ""
+
+#: pybb/views.py:648
+msgid "All forums marked as read"
+msgstr ""
+
+#: pybb/views.py:668
+msgid "User successfuly blocked"
+msgstr ""
+
+#: pybb/templates/pybb/_button_new_topic.html:2
+#: pybb/templates/pybb/add_post.html:24
+msgid "New topic"
+msgstr ""
+
+#: pybb/templates/pybb/_button_save.html:1
+msgid "Save"
+msgstr ""
+
+#: pybb/templates/pybb/_button_submit.html:1
+msgid "Submit"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:15
+msgid "Bold"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:16
+msgid "Italic"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:17
+msgid "Underline"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:18
+msgid "Stroke"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:20
+msgid "Picture"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:21
+msgid "Link"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:23
+msgid "Bulleted list"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:24
+msgid "Numeric list"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:25
+msgid "List item"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:27
+msgid "Quotes"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:28
+msgid "Code"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:30
+msgid "Clean"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:31
+msgid "Preview"
+msgstr ""
+
+#: pybb/templates/pybb/_need_to_login_message.html:3
+msgid "Register"
+msgstr ""
+
+#: pybb/templates/pybb/_need_to_login_message.html:3
+msgid "or"
+msgstr ""
+
+#: pybb/templates/pybb/_need_to_login_message.html:3
+msgid "login"
+msgstr ""
+
+#: pybb/templates/pybb/_need_to_login_message.html:3
+msgid "to create to post a reply"
+msgstr ""
+
+#: pybb/templates/pybb/add_post.html:24
+msgid "New reply"
+msgstr ""
+
+#: pybb/templates/pybb/attachments_formset.html:4
+msgid "Add attachments"
+msgstr ""
+
+#: pybb/templates/pybb/attachments_formset.html:10
+#: pybb/templates/pybb/edit_profile.html:27
+msgid "delete"
+msgstr ""
+
+#: pybb/templates/pybb/breadcrumb.html:5
+msgid "Home"
+msgstr ""
+
+#: pybb/templates/pybb/category.html:19
+msgid "Last posts"
+msgstr ""
+
+#: pybb/templates/pybb/category.html:44
+msgid "No forums created"
+msgstr ""
+
+#: pybb/templates/pybb/category.html:45
+msgid "Add forum now"
+msgstr ""
+
+#: pybb/templates/pybb/delete_post.html:5
+msgid "Are you sure you want to delete this message?"
+msgstr ""
+
+#: pybb/templates/pybb/delete_post.html:12
+msgid "No, take me back"
+msgstr ""
+
+#: pybb/templates/pybb/delete_post.html:13
+msgid "Yes, I am sure"
+msgstr ""
+
+#: pybb/templates/pybb/edit_post.html:4
+#: pybb/templates/pybb/edit_post.html:13
+msgid "Editing the post"
+msgstr ""
+
+#: pybb/templates/pybb/edit_profile.html:7
+#: pybb/templates/pybb/edit_profile.html:10
+#: pybb/templates/pybb/edit_profile.html:15
+msgid "Profile editing"
+msgstr ""
+
+#: pybb/templates/pybb/edit_profile.html:20
+msgid "Subscriptions on topics"
+msgstr ""
+
+#: pybb/templates/pybb/index.html:19
+msgid "Forum categories are not created"
+msgstr ""
+
+#: pybb/templates/pybb/index.html:20
+msgid "Add a category now"
+msgstr ""
+
+#: pybb/templates/pybb/index.html:25
+#: pybb/templates/pybb/latest_topics.html:7
+#: pybb/templates/pybb/latest_topics.html:17
+msgid "Last updates in topics"
+msgstr ""
+
+#: pybb/templates/pybb/index.html:28
+msgid "Mark all forums as read"
+msgstr ""
+
+#: pybb/templates/pybb/latest_topics.html:10
+msgid "\"Last updates in topics\""
+msgstr ""
+
+#: pybb/templates/pybb/latest_topics.html:33
+msgid "Mark all topics as read"
+msgstr ""
+
+#: pybb/templates/pybb/pagination.html:7
+msgid "previous page"
+msgstr ""
+
+#: pybb/templates/pybb/pagination.html:21
+msgid "next page"
+msgstr ""
+
+#: pybb/templates/pybb/poll.html:5
+msgid "Poll"
+msgstr ""
+
+#: pybb/templates/pybb/poll.html:37
+msgid "'Cancel my poll vote'"
+msgstr ""
+
+#: pybb/templates/pybb/poll_edit_form.html:7
+msgid "Poll answers"
+msgstr ""
+
+#: pybb/templates/pybb/poll_edit_form.html:20
+msgid "remove answer"
+msgstr ""
+
+#: pybb/templates/pybb/poll_edit_form.html:21
+msgid "add answer"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:25
+msgid "Rank"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:38
+#: pybb/templates/pybb/user.html:41
+msgid "Edit"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:42
+msgid "Delete post?"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:43
+msgid "Delete"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:45
+msgid "Approve post"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:50
+#: pybb/templates/pybb/topic.html:63
+msgid "Admin"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:66
+msgid "Edited"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:78
+msgid "quote"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:24
+#: pybb/templates/pybb/topic.html:44
+#: pybb/templates/pybb/user_posts.html:8
+msgid "'Posts'"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:52
+msgid "Unstick topic"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:54
+msgid "Stick topic"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:58
+msgid "Open topic"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:60
+msgid "Close topic"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:66
+msgid "Merge topics"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:71
+msgid "Unsubscribe"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:73
+msgid "Subscribe"
+msgstr ""
+
+#: pybb/templates/pybb/topic_list.html:13
+msgid "Views"
+msgstr ""
+
+#: pybb/templates/pybb/topic_list.html:16
+msgid "Last post"
+msgstr ""
+
+#: pybb/templates/pybb/topic_list.html:26
+msgid "Go to first unread post"
+msgstr ""
+
+#: pybb/templates/pybb/topic_list.html:32
+msgid "pages"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:15
+msgid "Statistics"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:18
+msgid "Number of topics"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:24
+msgid "Number of posts"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:28
+msgid "Date of registration"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:35
+msgid "Block"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:36
+msgid "Block and delete all messages"
+msgstr ""
+
+#: pybb/templates/pybb/user_posts.html:13
+msgid "All posts created by"
+msgstr ""
+
+#: pybb/templates/pybb/user_topics.html:8
+msgid "'Topics'"
+msgstr ""
+
+#: pybb/templates/pybb/user_topics.html:11
+#: pybb/templates/pybb/user_topics.html:15
+msgid "All topics created by"
+msgstr ""
+
+#: pybb/templates/pybb/users.html:8
+msgid "Users"
+msgstr ""
+
+#: pybb/templates/pybb/users.html:12
+msgid "Search"
+msgstr ""
+
+#: pybb/templates/pybb/users.html:24
+msgid "'Users'"
+msgstr ""
+
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3
+msgid "replied in topic to which you are subscribed."
+msgstr ""
+
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:4
+msgid "Link to post:"
+msgstr ""
+
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:5
+msgid "Link to topic:"
+msgstr ""
+
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:8
+msgid ""
+"If you don't want to recive notifications on new messages in this topic "
+"visit following link:"
+msgstr ""
+
+#: pybb/templates/pybb/mail_templates/subscription_email_subject.html:2
+msgid "New answer in topic that you subscribed."
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:61
+msgid "seconds ago,seconds ago,seconds ago"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:64
+msgid "seconds ago"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:70
+msgid "minutes ago,minutes ago,minutes ago"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:73
+msgid "minutes ago"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:83
+#, python-format
+msgid "today, %s"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:85
+#, python-format
+msgid "yesterday, %s"
+msgstr ""
+
diff --git a/edumed/locale-contrib/pl/LC_MESSAGES/django.mo b/edumed/locale-contrib/pl/LC_MESSAGES/django.mo
new file mode 100644
index 0000000..604f177
Binary files /dev/null and b/edumed/locale-contrib/pl/LC_MESSAGES/django.mo differ
diff --git a/edumed/locale-contrib/pl/LC_MESSAGES/django.po b/edumed/locale-contrib/pl/LC_MESSAGES/django.po
new file mode 100644
index 0000000..f2768dd
--- /dev/null
+++ b/edumed/locale-contrib/pl/LC_MESSAGES/django.po
@@ -0,0 +1,677 @@
+# Polish translations for PROJECT.
+# Copyright (C) 2013 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR , 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2013-08-09 11:40+0200\n"
+"PO-Revision-Date: 2013-08-09 12:17+0100\n"
+"Last-Translator: Radek Czajka \n"
+"Language-Team: pl \n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 1.3\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: pybb/admin.py:40 pybb/admin.py:66 pybb/admin.py:94 pybb/admin.py:116
+msgid "Additional options"
+msgstr ""
+
+#: pybb/admin.py:99 pybb/models.py:254
+msgid "Message"
+msgstr ""
+
+#: pybb/admin.py:130
+msgid "View post"
+msgstr ""
+
+#: pybb/admin.py:135
+msgid "Edit post"
+msgstr ""
+
+#: pybb/feeds.py:25 pybb/feeds.py:26 pybb/templates/pybb/base.html:12
+msgid "Latest posts on forum"
+msgstr ""
+
+#: pybb/feeds.py:35 pybb/feeds.py:36 pybb/templates/pybb/base.html:13
+msgid "Latest topics on forum"
+msgstr ""
+
+#: pybb/forms.py:27
+msgid "Attachment is too big"
+msgstr ""
+
+#: pybb/forms.py:47
+#, python-format
+msgid "You cant add more than %s answers for poll"
+msgstr ""
+
+#: pybb/forms.py:49
+msgid "Add two or more answers for this poll"
+msgstr ""
+
+#: pybb/forms.py:109
+msgid "Polls question is required when adding a poll"
+msgstr ""
+
+#: pybb/forms.py:192
+#, python-format
+msgid "Avatar is too large, max size: %s bytes"
+msgstr ""
+
+#: pybb/models.py:68 pybb/models.py:99
+msgid "Name"
+msgstr ""
+
+#: pybb/models.py:69 pybb/models.py:100
+msgid "Position"
+msgstr ""
+
+#: pybb/models.py:70 pybb/models.py:106 pybb/templates/pybb/category.html:5
+#: pybb/templates/pybb/category.html:28
+msgid "Hidden"
+msgstr ""
+
+#: pybb/models.py:71
+msgid "If checked, this category will be visible only for staff"
+msgstr ""
+
+#: pybb/models.py:76 pybb/models.py:98
+msgid "Category"
+msgstr ""
+
+#: pybb/models.py:77
+msgid "Categories"
+msgstr ""
+
+#: pybb/models.py:101
+msgid "Description"
+msgstr ""
+
+#: pybb/models.py:102
+msgid "Moderators"
+msgstr ""
+
+#: pybb/models.py:103 pybb/models.py:165 pybb/models.py:270
+msgid "Updated"
+msgstr ""
+
+#: pybb/models.py:104 pybb/models.py:172 pybb/models.py:357
+msgid "Post count"
+msgstr ""
+
+#: pybb/models.py:105
+msgid "Topic count"
+msgstr ""
+
+#: pybb/models.py:108
+msgid "Headline"
+msgstr ""
+
+#: pybb/models.py:112 pybb/models.py:162 pybb/templates/pybb/category.html:10
+msgid "Forum"
+msgstr ""
+
+#: pybb/models.py:113
+msgid "Forums"
+msgstr ""
+
+#: pybb/models.py:157
+msgid "None"
+msgstr ""
+
+#: pybb/models.py:158
+msgid "Single answer"
+msgstr ""
+
+#: pybb/models.py:159
+msgid "Multiple answers"
+msgstr ""
+
+#: pybb/models.py:163
+msgid "Subject"
+msgstr ""
+
+#: pybb/models.py:164 pybb/models.py:269
+msgid "Created"
+msgstr ""
+
+#: pybb/models.py:166 pybb/models.py:268 pybb/models.py:381 pybb/models.py:512
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3
+msgid "User"
+msgstr ""
+
+#: pybb/models.py:167
+msgid "Views count"
+msgstr ""
+
+#: pybb/models.py:168 pybb/templates/pybb/topic_list.html:27
+msgid "Sticky"
+msgstr ""
+
+#: pybb/models.py:169 pybb/templates/pybb/topic_list.html:28
+msgid "Closed"
+msgstr ""
+
+#: pybb/models.py:170 pybb/templates/pybb/topic.html:92
+msgid "Subscribers"
+msgstr ""
+
+#: pybb/models.py:174 pybb/models.py:272
+msgid "On moderation"
+msgstr ""
+
+#: pybb/models.py:175
+msgid "Poll type"
+msgstr ""
+
+#: pybb/models.py:176
+msgid "Poll question"
+msgstr ""
+
+#: pybb/models.py:180 pybb/models.py:267 pybb/models.py:489
+#: pybb/templates/pybb/topic_list.html:7
+msgid "Topic"
+msgstr ""
+
+#: pybb/models.py:181 pybb/templates/pybb/category.html:13
+msgid "Topics"
+msgstr ""
+
+#: pybb/models.py:255
+msgid "HTML version"
+msgstr ""
+
+#: pybb/models.py:256
+msgid "Text version"
+msgstr ""
+
+#: pybb/models.py:271
+msgid "User IP"
+msgstr ""
+
+#: pybb/models.py:276 pybb/models.py:397
+msgid "Post"
+msgstr ""
+
+#: pybb/models.py:277 pybb/templates/pybb/category.html:16
+#: pybb/templates/pybb/topic_list.html:10
+msgid "Posts"
+msgstr ""
+
+#: pybb/models.py:346
+msgid "Signature"
+msgstr "Podpis"
+
+#: pybb/models.py:348
+msgid "Signature HTML Version"
+msgstr ""
+
+#: pybb/models.py:350
+msgid "Time zone"
+msgstr ""
+
+#: pybb/models.py:352
+msgid "Language"
+msgstr ""
+
+#: pybb/models.py:355
+msgid "Show signatures"
+msgstr ""
+
+#: pybb/models.py:358
+msgid "Avatar"
+msgstr ""
+
+#: pybb/models.py:360
+msgid "Automatically subscribe"
+msgstr ""
+
+#: pybb/models.py:361
+msgid "Automatically subscribe to topics that you answer"
+msgstr ""
+
+#: pybb/models.py:384
+msgid "Profile"
+msgstr ""
+
+#: pybb/models.py:385
+msgid "Profiles"
+msgstr ""
+
+#: pybb/models.py:394 pybb/templates/pybb/post_template.html:73
+msgid "Attachment"
+msgstr ""
+
+#: pybb/models.py:395
+msgid "Attachments"
+msgstr ""
+
+#: pybb/models.py:398
+msgid "Size"
+msgstr ""
+
+#: pybb/models.py:399
+msgid "File"
+msgstr ""
+
+#: pybb/models.py:447
+msgid "Topic read tracker"
+msgstr ""
+
+#: pybb/models.py:448
+msgid "Topic read trackers"
+msgstr ""
+
+#: pybb/models.py:483
+msgid "Forum read tracker"
+msgstr ""
+
+#: pybb/models.py:484
+msgid "Forum read trackers"
+msgstr ""
+
+#: pybb/models.py:490
+msgid "Text"
+msgstr ""
+
+#: pybb/models.py:493 pybb/models.py:511
+msgid "Poll answer"
+msgstr ""
+
+#: pybb/models.py:494
+msgid "Polls answers"
+msgstr ""
+
+#: pybb/models.py:516
+msgid "Poll answer user"
+msgstr ""
+
+#: pybb/models.py:517
+msgid "Polls answers users"
+msgstr ""
+
+#: pybb/util.py:58
+msgid "Can't get profile for anonymous user"
+msgstr ""
+
+#: pybb/views.py:648
+msgid "All forums marked as read"
+msgstr ""
+
+#: pybb/views.py:668
+msgid "User successfuly blocked"
+msgstr ""
+
+#: pybb/templates/pybb/_button_new_topic.html:2
+#: pybb/templates/pybb/add_post.html:24
+msgid "New topic"
+msgstr ""
+
+#: pybb/templates/pybb/_button_save.html:1
+msgid "Save"
+msgstr ""
+
+#: pybb/templates/pybb/_button_submit.html:1
+msgid "Submit"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:15
+msgid "Bold"
+msgstr "Pogrubienie"
+
+#: pybb/templates/pybb/_markitup.html:16
+msgid "Italic"
+msgstr "Kursywa"
+
+#: pybb/templates/pybb/_markitup.html:17
+msgid "Underline"
+msgstr "PodkreÅlenie"
+
+#: pybb/templates/pybb/_markitup.html:18
+msgid "Stroke"
+msgstr "PrzekreÅlenie"
+
+#: pybb/templates/pybb/_markitup.html:20
+msgid "Picture"
+msgstr "Obrazek"
+
+#: pybb/templates/pybb/_markitup.html:21
+msgid "Link"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:23
+msgid "Bulleted list"
+msgstr "Lista wypunktowana"
+
+#: pybb/templates/pybb/_markitup.html:24
+msgid "Numeric list"
+msgstr "Lista numerowana"
+
+#: pybb/templates/pybb/_markitup.html:25
+msgid "List item"
+msgstr "Element listy"
+
+#: pybb/templates/pybb/_markitup.html:27
+msgid "Quotes"
+msgstr "Cytat"
+
+#: pybb/templates/pybb/_markitup.html:28
+msgid "Code"
+msgstr "Kod"
+
+#: pybb/templates/pybb/_markitup.html:30
+msgid "Clean"
+msgstr ""
+
+#: pybb/templates/pybb/_markitup.html:31
+msgid "Preview"
+msgstr "PodglÄ
d"
+
+#: pybb/templates/pybb/_need_to_login_message.html:3
+msgid "Register"
+msgstr ""
+
+#: pybb/templates/pybb/_need_to_login_message.html:3
+msgid "or"
+msgstr ""
+
+#: pybb/templates/pybb/_need_to_login_message.html:3
+msgid "login"
+msgstr ""
+
+#: pybb/templates/pybb/_need_to_login_message.html:3
+msgid "to create to post a reply"
+msgstr ""
+
+#: pybb/templates/pybb/add_post.html:24
+msgid "New reply"
+msgstr ""
+
+#: pybb/templates/pybb/attachments_formset.html:4
+msgid "Add attachments"
+msgstr ""
+
+#: pybb/templates/pybb/attachments_formset.html:10
+#: pybb/templates/pybb/edit_profile.html:27
+msgid "delete"
+msgstr ""
+
+#: pybb/templates/pybb/breadcrumb.html:5
+msgid "Home"
+msgstr ""
+
+#: pybb/templates/pybb/category.html:19
+msgid "Last posts"
+msgstr ""
+
+#: pybb/templates/pybb/category.html:44
+msgid "No forums created"
+msgstr ""
+
+#: pybb/templates/pybb/category.html:45
+msgid "Add forum now"
+msgstr ""
+
+#: pybb/templates/pybb/delete_post.html:5
+msgid "Are you sure you want to delete this message?"
+msgstr ""
+
+#: pybb/templates/pybb/delete_post.html:12
+msgid "No, take me back"
+msgstr ""
+
+#: pybb/templates/pybb/delete_post.html:13
+msgid "Yes, I am sure"
+msgstr ""
+
+#: pybb/templates/pybb/edit_post.html:4 pybb/templates/pybb/edit_post.html:13
+msgid "Editing the post"
+msgstr ""
+
+#: pybb/templates/pybb/edit_profile.html:7
+#: pybb/templates/pybb/edit_profile.html:10
+#: pybb/templates/pybb/edit_profile.html:15
+msgid "Profile editing"
+msgstr ""
+
+#: pybb/templates/pybb/edit_profile.html:20
+msgid "Subscriptions on topics"
+msgstr ""
+
+#: pybb/templates/pybb/index.html:19
+msgid "Forum categories are not created"
+msgstr ""
+
+#: pybb/templates/pybb/index.html:20
+msgid "Add a category now"
+msgstr ""
+
+#: pybb/templates/pybb/index.html:25 pybb/templates/pybb/latest_topics.html:7
+#: pybb/templates/pybb/latest_topics.html:17
+msgid "Last updates in topics"
+msgstr "Ostatnio modyfikowane tematy"
+
+#: pybb/templates/pybb/index.html:28
+msgid "Mark all forums as read"
+msgstr ""
+
+#: pybb/templates/pybb/latest_topics.html:10
+msgid "\"Last updates in topics\""
+msgstr ""
+
+#: pybb/templates/pybb/latest_topics.html:33
+msgid "Mark all topics as read"
+msgstr "Oznacz wszystkie tematy jako przeczytane"
+
+#: pybb/templates/pybb/pagination.html:7
+msgid "previous page"
+msgstr ""
+
+#: pybb/templates/pybb/pagination.html:21
+msgid "next page"
+msgstr ""
+
+#: pybb/templates/pybb/poll.html:5
+msgid "Poll"
+msgstr ""
+
+#: pybb/templates/pybb/poll.html:37
+msgid "'Cancel my poll vote'"
+msgstr "Anuluj mój gÅos w ankiecie"
+
+#: pybb/templates/pybb/poll_edit_form.html:7
+msgid "Poll answers"
+msgstr ""
+
+#: pybb/templates/pybb/poll_edit_form.html:20
+msgid "remove answer"
+msgstr ""
+
+#: pybb/templates/pybb/poll_edit_form.html:21
+msgid "add answer"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:25
+msgid "Rank"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:38 pybb/templates/pybb/user.html:41
+msgid "Edit"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:42
+msgid "Delete post?"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:43
+msgid "Delete"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:45
+msgid "Approve post"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:50 pybb/templates/pybb/topic.html:63
+msgid "Admin"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:66
+msgid "Edited"
+msgstr ""
+
+#: pybb/templates/pybb/post_template.html:78
+msgid "quote"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:24 pybb/templates/pybb/topic.html:44
+#: pybb/templates/pybb/user_posts.html:8
+msgid "'Posts'"
+msgstr "'Posty'"
+
+#: pybb/templates/pybb/topic.html:52
+msgid "Unstick topic"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:54
+msgid "Stick topic"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:58
+msgid "Open topic"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:60
+msgid "Close topic"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:66
+msgid "Merge topics"
+msgstr "PoÅÄ
cz wÄ
tki"
+
+#: pybb/templates/pybb/topic.html:71
+msgid "Unsubscribe"
+msgstr ""
+
+#: pybb/templates/pybb/topic.html:73
+msgid "Subscribe"
+msgstr ""
+
+#: pybb/templates/pybb/topic_list.html:13
+msgid "Views"
+msgstr ""
+
+#: pybb/templates/pybb/topic_list.html:16
+msgid "Last post"
+msgstr ""
+
+#: pybb/templates/pybb/topic_list.html:26
+msgid "Go to first unread post"
+msgstr "Zobacz pierwszy nieprzeczytany post"
+
+#: pybb/templates/pybb/topic_list.html:32
+msgid "pages"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:15
+msgid "Statistics"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:18
+msgid "Number of topics"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:24
+msgid "Number of posts"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:28
+msgid "Date of registration"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:35
+msgid "Block"
+msgstr ""
+
+#: pybb/templates/pybb/user.html:36
+msgid "Block and delete all messages"
+msgstr "Zablokuj i usuÅ wszystkie posty"
+
+#: pybb/templates/pybb/user_posts.html:13
+msgid "All posts created by"
+msgstr "Wszystkie posty utworzone przez"
+
+#: pybb/templates/pybb/user_topics.html:8
+msgid "'Topics'"
+msgstr "'Tematy'"
+
+#: pybb/templates/pybb/user_topics.html:11
+#: pybb/templates/pybb/user_topics.html:15
+msgid "All topics created by"
+msgstr ""
+
+#: pybb/templates/pybb/users.html:8
+msgid "Users"
+msgstr ""
+
+#: pybb/templates/pybb/users.html:12
+msgid "Search"
+msgstr ""
+
+#: pybb/templates/pybb/users.html:24
+msgid "'Users'"
+msgstr "'Użytkownicy'"
+
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:3
+msgid "replied in topic to which you are subscribed."
+msgstr ""
+
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:4
+msgid "Link to post:"
+msgstr ""
+
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:5
+msgid "Link to topic:"
+msgstr ""
+
+#: pybb/templates/pybb/mail_templates/subscription_email_body.html:8
+msgid ""
+"If you don't want to recive notifications on new messages in this topic "
+"visit following link:"
+msgstr ""
+
+#: pybb/templates/pybb/mail_templates/subscription_email_subject.html:2
+msgid "New answer in topic that you subscribed."
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:61
+msgid "seconds ago,seconds ago,seconds ago"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:64
+msgid "seconds ago"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:70
+msgid "minutes ago,minutes ago,minutes ago"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:73
+msgid "minutes ago"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:83
+#, python-format
+msgid "today, %s"
+msgstr ""
+
+#: pybb/templatetags/pybb_tags.py:85
+#, python-format
+msgid "yesterday, %s"
+msgstr ""
diff --git a/edumed/locale/pl/LC_MESSAGES/django.mo b/edumed/locale/pl/LC_MESSAGES/django.mo
index bd15844..6c2cbcf 100644
Binary files a/edumed/locale/pl/LC_MESSAGES/django.mo and b/edumed/locale/pl/LC_MESSAGES/django.mo differ
diff --git a/edumed/locale/pl/LC_MESSAGES/django.po b/edumed/locale/pl/LC_MESSAGES/django.po
index ffd5d7b..86361c7 100644
--- a/edumed/locale/pl/LC_MESSAGES/django.po
+++ b/edumed/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: 2012-11-19 15:57+0100\n"
+"POT-Creation-Date: 2013-09-04 13:32+0200\n"
"PO-Revision-Date: 2012-11-19 15:58+0100\n"
"Last-Translator: Radek Czajka \n"
"Language-Team: LANGUAGE \n"
@@ -26,3 +26,7 @@ msgstr "Strona nie znaleziona"
msgid "The page you were looking for doesn't exist."
msgstr "Strona której szukasz nie zostaÅa znaleziona."
+#: templates/base_forum.html:7
+msgid "Forum search"
+msgstr "Szukaj na forum"
+
diff --git a/edumed/settings.d/30-apps.py b/edumed/settings.d/30-apps.py
index 521839b..6a8d656 100644
--- a/edumed/settings.d/30-apps.py
+++ b/edumed/settings.d/30-apps.py
@@ -15,6 +15,9 @@ INSTALLED_APPS = (
'haystack',
'chunks',
'contact',
+ 'forum',
+ 'pybb',
+ 'django_libravatar',
'sorl.thumbnail',
'django.contrib.auth',
@@ -26,4 +29,5 @@ INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.flatpages',
+ 'django.contrib.humanize'
)
diff --git a/edumed/settings.d/30-locale.py b/edumed/settings.d/30-locale.py
index d77583d..40f6617 100644
--- a/edumed/settings.d/30-locale.py
+++ b/edumed/settings.d/30-locale.py
@@ -28,3 +28,10 @@ USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
+
+CONTRIB_LOCALE_APPS = (
+ 'pybb',
+)
+LOCALE_PATHS = (
+ path.join(PROJECT_DIR, 'edumed/locale-contrib'),
+)
diff --git a/edumed/settings.d/40-context.py b/edumed/settings.d/40-context.py
index e161e0b..0cf10b8 100644
--- a/edumed/settings.d/40-context.py
+++ b/edumed/settings.d/40-context.py
@@ -8,5 +8,6 @@ TEMPLATE_CONTEXT_PROCESSORS = tuple(x for x in (
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages"
if 'django.contrib.messages' in INSTALLED_APPS else None,
- "django.core.context_processors.request"
+ "django.core.context_processors.request",
+ 'pybb.context_processors.processor',
) if x is not None)
diff --git a/edumed/settings.d/40-middleware.py b/edumed/settings.d/40-middleware.py
index 34780d8..b9c614d 100644
--- a/edumed/settings.d/40-middleware.py
+++ b/edumed/settings.d/40-middleware.py
@@ -21,5 +21,7 @@ MIDDLEWARE_CLASSES = tuple(x for x in (
'pagination.middleware.PaginationMiddleware'
if "pagination" in INSTALLED_APPS else None,
'django.middleware.cache.FetchFromCacheMiddleware',
- 'fnpdjango.middleware.SetRemoteAddrFromXRealIP'
+ 'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
+ 'pybb.middleware.PybbMiddleware',
+ 'forum.middleware.ForumMiddleware'
) if x is not None)
diff --git a/edumed/settings.d/50-contrib.py b/edumed/settings.d/50-contrib.py
index 9291ce5..64770e8 100644
--- a/edumed/settings.d/50-contrib.py
+++ b/edumed/settings.d/50-contrib.py
@@ -4,4 +4,10 @@ CAS_VERSION = '1'
SPONSORS_THUMB_WIDTH = 100
SPONSORS_THUMB_HEIGHT = 56
-HONEYPOT_FIELD_NAME='miut'
+PYBB_TEMPLATE = "base_forum.html"
+PYBB_SMILES = {}
+PYBB_ENABLE_ANONYMOUS_POST = False
+
+PYBB_DEFAULT_TITLE = u'Forum'
+PYBB_DEFAULT_TIME_ZONE = 1
+PYBB_PERMISSION_HANDLER = 'edumed.forum.ForumPermissionHandler'
diff --git a/edumed/settings.d/50-static.py b/edumed/settings.d/50-static.py
index b6d9591..4d75c9a 100644
--- a/edumed/settings.d/50-static.py
+++ b/edumed/settings.d/50-static.py
@@ -25,6 +25,8 @@ PIPELINE_CSS = {
'catalogue/css/section_list.scss',
'curriculum/curriculum.scss',
'jquery/colorbox/colorbox.css',
+
+ 'css/forum.scss',
),
'output_filename': 'compressed/base.css',
},
@@ -41,6 +43,7 @@ PIPELINE_JS = {
'sponsors/js/sponsors.js',
'curriculum/curriculum.js',
'js/formset.js',
+ 'pybb/js/pybbjs.js',
),
'output_filename': 'compressed/base.js',
},
diff --git a/edumed/static/css/_mixins.scss b/edumed/static/css/_mixins.scss
new file mode 100644
index 0000000..6b9499c
--- /dev/null
+++ b/edumed/static/css/_mixins.scss
@@ -0,0 +1,7 @@
+@import "vars";
+
+@mixin base-font {
+ font-family: Dosis;
+ background: white;
+ color: $ciemny;
+}
\ No newline at end of file
diff --git a/edumed/static/css/_vars.scss b/edumed/static/css/_vars.scss
new file mode 100644
index 0000000..a502ca4
--- /dev/null
+++ b/edumed/static/css/_vars.scss
@@ -0,0 +1,4 @@
+$px: .0625em;
+$oranji: #ed7831;
+$ciemny: #363a3e;
+$zielony: #16a487;
\ No newline at end of file
diff --git a/edumed/static/css/base.css b/edumed/static/css/base.css
index c59a82d..95fb533 100644
--- a/edumed/static/css/base.css
+++ b/edumed/static/css/base.css
@@ -9,9 +9,9 @@ a {
body {
font-family: Dosis;
- margin: 0;
background: white;
- color: #363a3e; }
+ color: #363a3e;
+ margin: 0; }
.clr {
clear: both; }
@@ -22,9 +22,9 @@ body {
background-position: 0 100%; }
header.main {
- margin: 0 auto 1.438em;
+ margin: 0 auto 1.4375em;
width: 58.75em;
- padding: 1.813em 0.625em 0; }
+ padding: 1.8125em 0.625em 0; }
header.main #logo {
float: left;
margin-bottom: 1.25em; }
@@ -44,7 +44,7 @@ header.main {
list-style: none;
display: inline-block;
text-transform: uppercase;
- margin: 0 .5em;
+ margin: 0 0.5em;
text-align: center;
/*position:relative;*/ }
header.main nav a {
@@ -203,5 +203,5 @@ footer.main {
margin: 1em 0; }
.flatpage img {
- border: 0.313em solid #eeeeee;
+ border: 0.3125em solid #eeeeee;
margin: 1.3em; }
diff --git a/edumed/static/css/base.scss b/edumed/static/css/base.scss
index c29938d..38f8a09 100644
--- a/edumed/static/css/base.scss
+++ b/edumed/static/css/base.scss
@@ -1,9 +1,7 @@
@import url(http://fonts.googleapis.com/css?family=Dosis:400,700&subset=latin,latin-ext);
-$px: .0625em;
-$oranji: #ed7831;
-$ciemny: #363a3e;
-$zielony: #16a487;
+@import "vars";
+@import "mixins";
a {
@@ -16,10 +14,8 @@ a {
}
body {
- font-family: Dosis;
+ @include base-font;
margin: 0;
- background: white;
- color: $ciemny;
}
.clr {
clear: both;
diff --git a/edumed/static/css/forum.css b/edumed/static/css/forum.css
new file mode 100644
index 0000000..1c0b056
--- /dev/null
+++ b/edumed/static/css/forum.css
@@ -0,0 +1,89 @@
+ul.breadcrumb {
+ margin: 0;
+ padding: 0;
+ list-style: none; }
+ ul.breadcrumb li {
+ display: inline; }
+
+.forum-body {
+ position: relative;
+ /* --- Unread --- */
+ /* --- Moderation --- */
+ /* --- Mini pagination --- */ }
+ .forum-body .search-result em {
+ background-color: yellow; }
+ .forum-body .pagination ul {
+ margin: 0;
+ padding: 0;
+ list-style: none; }
+ .forum-body .pagination ul li {
+ display: inline-block; }
+ .forum-body .pagination ul li a {
+ display: block;
+ padding: .5em; }
+ .forum-body .pagination ul .disabled a {
+ color: black; }
+ .forum-body .table {
+ width: 100%;
+ margin: 1em 0; }
+ .forum-body .forum-description {
+ margin: 5px; }
+ .forum-body .forum-row, .forum-body .topic-row {
+ width: 100%; }
+ .forum-body .forum-name, .forum-body .topic-name {
+ width: 40%;
+ text-align: left; }
+ .forum-body .forum-topic-count, .forum-body .forum-post-count, .forum-body .topic-post-count, .forum-body .topic-view-count {
+ width: 10%;
+ text-align: center; }
+ .forum-body .forum-last-post, .forum-body .topic-last-post {
+ width: 32%;
+ text-align: center; }
+ .forum-body .first-unread-post-link, .forum-body .first-unread-post-link:hover {
+ text-decoration: none; }
+ .forum-body .post:nth-child(4n+4) {
+ background-color: #eaeaea; }
+ .forum-body .post-header {
+ padding: 3px 0 3px 20px; }
+ .forum-body .post-header th {
+ text-align: left; }
+ .forum-body .post-info {
+ width: 200px;
+ padding: 10px; }
+ .forum-body .post-info .post-author {
+ padding: 5px 0; }
+ .forum-body .post-content {
+ vertical-align: top;
+ padding: 10px; }
+ .forum-body .post-signature {
+ color: #CCC;
+ margin-top: 15px;
+ border-top: 1px dotted #cccccc;
+ display: block; }
+ .forum-body .post-related {
+ margin-top: 20px; }
+ .forum-body .forum-headline {
+ margin-top: 10px; }
+ .forum-body .attachments-form {
+ padding-bottom: 15px; }
+ .forum-body .attachment-link {
+ border-bottom: 1px dotted; }
+ .forum-body .state-indicator {
+ display: block;
+ float: left;
+ height: 10px;
+ width: 10px;
+ margin: 3px 5px; }
+ .forum-body .topic-unread a, .forum-body .forum-unread a {
+ font-weight: bold; }
+ .forum-body .on-moderation {
+ background: #ffcccc; }
+ .forum-body .mini-pagination {
+ padding: 3px 0 3px 10px; }
+ .forum-body .post-form input, .forum-body .post-form textarea {
+ font-family: Dosis;
+ background: white;
+ color: #363a3e;
+ font-size: 1.6em; }
+ .forum-body .post-form #id_name {
+ width: 698px; }
diff --git a/edumed/static/css/forum.scss b/edumed/static/css/forum.scss
new file mode 100755
index 0000000..e1a3d58
--- /dev/null
+++ b/edumed/static/css/forum.scss
@@ -0,0 +1,180 @@
+@import "mixins";
+
+
+ul.breadcrumb {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ li {
+ display: inline;
+ }
+}
+
+
+
+.forum-body {
+
+ position: relative;
+
+ .search-result {
+ em {
+ background-color: yellow;
+ }
+ }
+
+ .pagination {
+ ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+
+ li {
+ display: inline-block;
+ a {
+ display: block;
+ padding: .5em;
+ }
+ }
+
+ .disabled {
+ a {
+ color: black;
+ }
+ }
+ }
+ }
+
+ .table {
+ width: 100%;
+ margin: 1em 0;
+ }
+
+ .forum-description {
+ margin: 5px;
+ }
+
+ .forum-row, .topic-row {
+ width: 100%;
+ }
+
+ .forum-name, .topic-name {
+ width: 40%;
+ text-align: left;
+ }
+
+ .forum-topic-count, .forum-post-count, .topic-post-count, .topic-view-count {
+ width: 10%;
+ text-align: center;
+ }
+
+ .forum-last-post, .topic-last-post {
+ width: 32%;
+ text-align: center;
+ }
+
+ .first-unread-post-link, .first-unread-post-link:hover {
+ text-decoration: none;
+ }
+
+
+
+ .post:nth-child(4n+4) {
+ background-color: lighten(#D0D0D0 , 10%);
+ }
+
+ .post-header {
+ padding: 3px 0 3px 20px;
+ th {
+ text-align: left;
+ }
+ }
+
+ .post-info {
+ width: 200px;
+ padding: 10px;
+
+ .avatar {
+
+ }
+
+ .post-author {
+ padding: 5px 0;
+ }
+
+ .post-extra-info {
+ }
+
+ .post-controls {
+ }
+ }
+
+ .post-content {
+ vertical-align: top;
+ padding: 10px;
+ }
+
+ .post-signature {
+ color: #CCC;
+ margin-top: 15px;
+ border-top: 1px dotted #CCC;
+ display: block;
+ }
+
+ .post-related {
+ margin-top: 20px;
+ }
+
+
+
+
+ .forum-headline {
+ margin-top: 10px;
+ }
+
+ .attachments-form {
+ padding-bottom: 15px;
+ }
+
+ .attachment-link {
+ border-bottom: 1px dotted;
+ }
+
+ /* --- Unread --- */
+
+ .state-indicator {
+ display: block;
+ float: left;
+ height: 10px;
+ width: 10px;
+ margin: 3px 5px;
+ }
+
+ .topic-unread, .forum-unread {
+ a {
+ font-weight: bold;
+ }
+ .state-indicator {
+ }
+ }
+
+ /* --- Moderation --- */
+ .on-moderation {
+ background: #ffcccc;
+ }
+
+ /* --- Mini pagination --- */
+ .mini-pagination {
+ padding: 3px 0 3px 10px;
+ }
+
+
+ .post-form {
+ input, textarea {
+ @include base-font;
+ font-size: 1.6em;
+ }
+ #id_name {
+ width: 698px;
+ }
+ }
+}
diff --git a/edumed/templates/base.html b/edumed/templates/base.html
index 52b34ce..1c8f434 100644
--- a/edumed/templates/base.html
+++ b/edumed/templates/base.html
@@ -30,6 +30,9 @@
src="{% static "tlo.png" %}"
style="position:absolute; opacity: 0.5; top:0; left: -83px; z-index:1000"
-->
+ {% if request.user.is_authenticated %}
+ Wyloguj
+ {% endif %}