field for cybernauts
authorJan Szejko <jan.szejko@gmail.com>
Thu, 24 Mar 2016 15:39:17 +0000 (16:39 +0100)
committerJan Szejko <jan.szejko@gmail.com>
Thu, 24 Mar 2016 15:39:17 +0000 (16:39 +0100)
13 files changed:
apps/catalogue/locale/pl/LC_MESSAGES/django.mo
apps/catalogue/locale/pl/LC_MESSAGES/django.po
apps/catalogue/migrations/0014_auto__add_field_book_for_cybernauts.py [new file with mode: 0644]
apps/catalogue/models/book.py
apps/wiki/forms.py
apps/wiki/locale/pl/LC_MESSAGES/django.mo
apps/wiki/locale/pl/LC_MESSAGES/django.po
apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo
apps/wiki/locale/pl/LC_MESSAGES/djangojs.po
apps/wiki/templates/wiki/bootstrap.html
apps/wiki/templates/wiki/document_details.html [deleted file]
apps/wiki/templates/wiki/save_dialog.html [deleted file]
apps/wiki/views.py

index 0187fa8..fc65919 100644 (file)
Binary files a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo and b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo differ
index 5f5148e..0b0b51c 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Platforma Redakcyjna\n"
 "Report-Msgid-Bugs-To: \n"
 msgstr ""
 "Project-Id-Version: Platforma Redakcyjna\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-04-01 11:28+0200\n"
+"POT-Creation-Date: 2016-03-24 11:04+0100\n"
 "PO-Revision-Date: 2014-04-01 11:29+0100\n"
 "Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
 "Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org."
 "PO-Revision-Date: 2014-04-01 11:29+0100\n"
 "Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
 "Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org."
@@ -20,95 +20,95 @@ msgstr ""
 "|| n%100>=20) ? 1 : 2);\n"
 "X-Generator: Poedit 1.5.4\n"
 
 "|| n%100>=20) ? 1 : 2);\n"
 "X-Generator: Poedit 1.5.4\n"
 
-#: forms.py:38
+#: forms.py:39
 msgid "You must select a template"
 msgstr "Musisz wybrać szablon"
 
 msgid "You must select a template"
 msgstr "Musisz wybrać szablon"
 
-#: forms.py:47
+#: forms.py:48
 msgid "ZIP file"
 msgstr "Plik ZIP"
 
 msgid "ZIP file"
 msgstr "Plik ZIP"
 
-#: forms.py:48
+#: forms.py:49
 msgid "Directories are documents in chunks"
 msgstr "Katalogi zawierają dokumenty w częściach"
 
 msgid "Directories are documents in chunks"
 msgstr "Katalogi zawierają dokumenty w częściach"
 
-#: forms.py:72
+#: forms.py:73
 msgid "Assigned to"
 msgstr "Przypisane do"
 
 msgid "Assigned to"
 msgstr "Przypisane do"
 
-#: forms.py:93 forms.py:107
+#: forms.py:94 forms.py:108
 msgid "Chunk with this slug already exists"
 msgstr "Część z tym slugiem już istnieje"
 
 msgid "Chunk with this slug already exists"
 msgstr "Część z tym slugiem już istnieje"
 
-#: forms.py:116
+#: forms.py:117
 msgid "Append to"
 msgstr "Dołącz do"
 
 msgid "Append to"
 msgstr "Dołącz do"
 
-#: views.py:161
+#: views.py:160
 #, python-format
 msgid "Slug already used for %s"
 msgstr "Slug taki sam jak dla pliku %s"
 
 #, python-format
 msgid "Slug already used for %s"
 msgstr "Slug taki sam jak dla pliku %s"
 
-#: views.py:163
+#: views.py:162
 msgid "Slug already used in repository."
 msgstr "Dokument o tym slugu już istnieje w repozytorium."
 
 msgid "Slug already used in repository."
 msgstr "Dokument o tym slugu już istnieje w repozytorium."
 
-#: views.py:169
+#: views.py:168
 msgid "File should be UTF-8 encoded."
 msgstr "Plik powinien mieć kodowanie UTF-8."
 
 msgid "File should be UTF-8 encoded."
 msgstr "Plik powinien mieć kodowanie UTF-8."
 
-#: models/book.py:28 models/chunk.py:23
+#: models/book.py:24 models/chunk.py:23
 msgid "title"
 msgstr "tytuł"
 
 msgid "title"
 msgstr "tytuł"
 
-#: models/book.py:29 models/chunk.py:24
+#: models/book.py:25 models/chunk.py:24
 msgid "slug"
 msgstr "slug"
 
 msgid "slug"
 msgstr "slug"
 
-#: models/book.py:30
+#: models/book.py:26
 msgid "public"
 msgstr "publiczna"
 
 msgid "public"
 msgstr "publiczna"
 
-#: models/book.py:35
+#: models/book.py:32
 msgid "parent"
 msgstr "rodzic"
 
 msgid "parent"
 msgstr "rodzic"
 
-#: models/book.py:36
+#: models/book.py:33
 msgid "parent number"
 msgstr "numeracja rodzica"
 
 msgid "parent number"
 msgstr "numeracja rodzica"
 
-#: models/book.py:55 models/chunk.py:21 models/publish_log.py:17
-msgid "book"
-msgstr "książka"
-
-#: models/book.py:56
-msgid "books"
-msgstr "książki"
+#: models/book.py:35
+msgid "for Cybernauts"
+msgstr "dla Cybernautów"
 
 
-#: models/book.py:255
+#: models/book.py:247
 msgid "No chunks in the book."
 msgstr "Książka nie ma części."
 
 msgid "No chunks in the book."
 msgstr "Książka nie ma części."
 
-#: models/book.py:259
+#: models/book.py:251
 msgid "Not all chunks have publishable revisions."
 msgstr "Niektóre części nie są gotowe do publikacji."
 
 msgid "Not all chunks have publishable revisions."
 msgstr "Niektóre części nie są gotowe do publikacji."
 
-#: models/book.py:266
+#: models/book.py:258
 msgid "Invalid XML"
 msgstr "Nieprawidłowy XML"
 
 msgid "Invalid XML"
 msgstr "Nieprawidłowy XML"
 
-#: models/book.py:268
+#: models/book.py:260
 msgid "No Dublin Core found."
 msgstr "Brak sekcji Dublin Core."
 
 msgid "No Dublin Core found."
 msgstr "Brak sekcji Dublin Core."
 
-#: models/book.py:270
+#: models/book.py:262
 msgid "Invalid Dublin Core"
 msgstr "Nieprawidłowy Dublin Core"
 
 msgid "Invalid Dublin Core"
 msgstr "Nieprawidłowy Dublin Core"
 
-#: models/book.py:273
+#: models/book.py:265
 msgid "rdf:about is not"
 msgstr "rdf:about jest różny od"
 
 msgid "rdf:about is not"
 msgstr "rdf:about jest różny od"
 
+#: models/chunk.py:21 models/publish_log.py:17
+msgid "book"
+msgstr "książka"
+
 #: models/chunk.py:22
 msgid "number"
 msgstr "numer"
 #: models/chunk.py:22
 msgid "number"
 msgstr "numer"
@@ -418,6 +418,9 @@ msgstr "Zmiana"
 msgid "Comment"
 msgstr "Komentarz"
 
 msgid "Comment"
 msgstr "Komentarz"
 
+#~ msgid "books"
+#~ msgstr "książki"
+
 #~ msgid "Text file must be UTF-8 encoded."
 #~ msgstr "Plik powinien mieć kodowanie UTF-8."
 
 #~ msgid "Text file must be UTF-8 encoded."
 #~ msgstr "Plik powinien mieć kodowanie UTF-8."
 
diff --git a/apps/catalogue/migrations/0014_auto__add_field_book_for_cybernauts.py b/apps/catalogue/migrations/0014_auto__add_field_book_for_cybernauts.py
new file mode 100644 (file)
index 0000000..061b941
--- /dev/null
@@ -0,0 +1,157 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+    def forwards(self, orm):
+        # Adding field 'Book.for_cybernauts'
+        db.add_column(u'catalogue_book', 'for_cybernauts',
+                      self.gf('django.db.models.fields.BooleanField')(default=False),
+                      keep_default=False)
+
+
+    def backwards(self, orm):
+        # Deleting field 'Book.for_cybernauts'
+        db.delete_column(u'catalogue_book', 'for_cybernauts')
+
+
+    models = {
+        u'auth.group': {
+            'Meta': {'object_name': 'Group'},
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+        },
+        u'auth.permission': {
+            'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+        },
+        u'auth.user': {
+            'Meta': {'object_name': 'User'},
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+        },
+        'catalogue.book': {
+            'Meta': {'ordering': "['title', 'slug']", 'object_name': 'Book'},
+            '_new_publishable': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+            '_on_track': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+            '_published': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+            '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+            '_single': ('django.db.models.fields.NullBooleanField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+            'dc_cover_image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cover.Image']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
+            'dc_slug': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '128', 'null': 'True', 'blank': 'True'}),
+            'for_cybernauts': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'gallery': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
+            'parent_number': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Project']", 'null': 'True', 'blank': 'True'}),
+            'public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
+            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '128'}),
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
+        },
+        'catalogue.bookpublishrecord': {
+            'Meta': {'ordering': "['-timestamp']", 'object_name': 'BookPublishRecord'},
+            'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.Book']"}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
+        },
+        'catalogue.chunk': {
+            'Meta': {'ordering': "['number']", 'unique_together': "[['book', 'number'], ['book', 'slug']]", 'object_name': 'Chunk'},
+            '_changed': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+            '_hidden': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
+            '_short_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+            'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}),
+            'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_chunk'", 'null': 'True', 'to': u"orm['auth.User']"}),
+            'gallery_start': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}),
+            'head': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['catalogue.ChunkChange']", 'null': 'True', 'blank': 'True'}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'number': ('django.db.models.fields.IntegerField', [], {}),
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
+            'stage': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.ChunkTag']", 'null': 'True', 'blank': 'True'}),
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
+        },
+        'catalogue.chunkchange': {
+            'Meta': {'ordering': "('created_at',)", 'unique_together': "(['tree', 'revision'],)", 'object_name': 'ChunkChange'},
+            'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
+            'author_email': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
+            'author_name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
+            'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True'}),
+            'data': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
+            'description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'merge_parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'merge_children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}),
+            'parent': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'children'", 'null': 'True', 'blank': 'True', 'to': "orm['catalogue.ChunkChange']"}),
+            'publishable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'revision': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
+            'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'change_set'", 'symmetrical': 'False', 'to': "orm['catalogue.ChunkTag']"}),
+            'tree': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'change_set'", 'to': "orm['catalogue.Chunk']"})
+        },
+        'catalogue.chunkpublishrecord': {
+            'Meta': {'object_name': 'ChunkPublishRecord'},
+            'book_record': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.BookPublishRecord']"}),
+            'change': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'publish_log'", 'to': "orm['catalogue.ChunkChange']"}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+        },
+        'catalogue.chunktag': {
+            'Meta': {'ordering': "['ordering']", 'object_name': 'ChunkTag'},
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
+            'ordering': ('django.db.models.fields.IntegerField', [], {}),
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'})
+        },
+        'catalogue.project': {
+            'Meta': {'ordering': "['name']", 'object_name': 'Project'},
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
+            'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
+        },
+        'catalogue.template': {
+            'Meta': {'object_name': 'Template'},
+            'content': ('django.db.models.fields.TextField', [], {}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'is_main': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'is_partial': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+        },
+        u'contenttypes.contenttype': {
+            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+        },
+        u'cover.image': {
+            'Meta': {'object_name': 'Image'},
+            'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+            'download_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'unique': 'True', 'null': 'True'}),
+            'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
+            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'license_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+            'license_url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}),
+            'source_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True'}),
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+        }
+    }
+
+    complete_apps = ['catalogue']
\ No newline at end of file
index 38d8499..f40a368 100755 (executable)
@@ -32,6 +32,8 @@ class Book(models.Model):
         'self', null=True, blank=True, verbose_name=_('parent'), related_name="children", editable=False)
     parent_number = models.IntegerField(_('parent number'), null=True, blank=True, db_index=True, editable=False)
 
         'self', null=True, blank=True, verbose_name=_('parent'), related_name="children", editable=False)
     parent_number = models.IntegerField(_('parent number'), null=True, blank=True, db_index=True, editable=False)
 
+    for_cybernauts = models.BooleanField(_('for Cybernauts'), default=False)
+
     # Cache
     _short_html = models.TextField(null=True, blank=True, editable=False)
     _single = models.NullBooleanField(editable=False, db_index=True)
     # Cache
     _short_html = models.TextField(null=True, blank=True, editable=False)
     _single = models.NullBooleanField(editable=False, db_index=True)
index 137b072..c7da3af 100644 (file)
@@ -64,13 +64,20 @@ class DocumentTextSaveForm(forms.Form):
         help_text=_(u"Mark this revision as publishable.")
     )
 
         help_text=_(u"Mark this revision as publishable.")
     )
 
+    for_cybernauts = forms.BooleanField(
+        required=False, initial=False,
+        label=_(u"For Cybernauts"),
+        help_text=_(u"Mark this document for Cybernauts.")
+    )
+
     def __init__(self, *args, **kwargs):
         user = kwargs.pop('user')
     def __init__(self, *args, **kwargs):
         user = kwargs.pop('user')
-        r = super(DocumentTextSaveForm, self).__init__(*args, **kwargs)
+        chunk = kwargs.pop('chunk')
+        super(DocumentTextSaveForm, self).__init__(*args, **kwargs)
         if user and user.is_authenticated():
             self.fields['author_name'].required = False
             self.fields['author_email'].required = False
         if user and user.is_authenticated():
             self.fields['author_name'].required = False
             self.fields['author_email'].required = False
-        return r
+        self.fields['for_cybernauts'].initial = chunk.book.for_cybernauts
 
 
 class DocumentTextRevertForm(forms.Form):
 
 
 class DocumentTextRevertForm(forms.Form):
index 3690ba5..e5c3cac 100644 (file)
Binary files a/apps/wiki/locale/pl/LC_MESSAGES/django.mo and b/apps/wiki/locale/pl/LC_MESSAGES/django.mo differ
index 04df573..c3fd439 100644 (file)
@@ -7,37 +7,38 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Platforma Redakcyjna\n"
 "Report-Msgid-Bugs-To: \n"
 msgstr ""
 "Project-Id-Version: Platforma Redakcyjna\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-03-21 14:34+0100\n"
+"POT-Creation-Date: 2016-03-24 12:11+0100\n"
 "PO-Revision-Date: 2013-07-10 16:58+0100\n"
 "Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
 "Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org."
 "pl>\n"
 "PO-Revision-Date: 2013-07-10 16:58+0100\n"
 "Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
 "Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org."
 "pl>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: Poedit 1.5.4\n"
 
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: Poedit 1.5.4\n"
 
-#: forms.py:19 forms.py:63 views.py:279
+#: forms.py:19 forms.py:63 views.py:45
 msgid "Publishable"
 msgid "Publishable"
-msgstr "Gotowe do publikacji"
+msgstr "Do publikacji"
 
 
-#: forms.py:38 forms.py:89
+#: forms.py:38 forms.py:96
 msgid "Author"
 msgstr "Autor"
 
 msgid "Author"
 msgstr "Autor"
 
-#: forms.py:39 forms.py:90
+#: forms.py:39 forms.py:97
 msgid "Your name"
 msgstr "Imię i nazwisko"
 
 msgid "Your name"
 msgstr "Imię i nazwisko"
 
-#: forms.py:44 forms.py:95
+#: forms.py:44 forms.py:102
 msgid "Author's email"
 msgstr "E-mail autora"
 
 msgid "Author's email"
 msgstr "E-mail autora"
 
-#: forms.py:45 forms.py:96
+#: forms.py:45 forms.py:103
 msgid "Your email address, so we can show a gravatar :)"
 msgstr "Adres e-mail, żebyśmy mogli pokazać gravatar :)"
 
 msgid "Your email address, so we can show a gravatar :)"
 msgstr "Adres e-mail, żebyśmy mogli pokazać gravatar :)"
 
-#: forms.py:51 forms.py:102
+#: forms.py:51 forms.py:109
 msgid "Your comments"
 msgstr "Twój komentarz"
 
 msgid "Your comments"
 msgstr "Twój komentarz"
 
@@ -57,7 +58,15 @@ msgstr "Jeśli został ukończony etap prac, wskaż go."
 msgid "Mark this revision as publishable."
 msgstr "Oznacz tę wersję jako gotową do publikacji."
 
 msgid "Mark this revision as publishable."
 msgstr "Oznacz tę wersję jako gotową do publikacji."
 
-#: forms.py:103
+#: forms.py:69
+msgid "For Cybernauts"
+msgstr "Dla Cybernautów"
+
+#: forms.py:70
+msgid "Mark this document for Cybernauts."
+msgstr "Oznacz dokument do użytku w Cybernautach"
+
+#: forms.py:110
 msgid "Describe the reason for reverting."
 msgstr "Opisz powód przywrócenia."
 
 msgid "Describe the reason for reverting."
 msgstr "Opisz powód przywrócenia."
 
@@ -73,15 +82,15 @@ msgstr "motyw"
 msgid "themes"
 msgstr "motywy"
 
 msgid "themes"
 msgstr "motywy"
 
-#: views.py:281
+#: views.py:47
 msgid "Published"
 msgstr "Opublikowano"
 
 msgid "Published"
 msgstr "Opublikowano"
 
-#: views.py:302
+#: views.py:329
 msgid "Revision marked"
 msgstr "Wersja oznaczona"
 
 msgid "Revision marked"
 msgstr "Wersja oznaczona"
 
-#: views.py:304
+#: views.py:331
 msgid "Nothing changed"
 msgstr "Nic nie uległo zmianie"
 
 msgid "Nothing changed"
 msgstr "Nic nie uległo zmianie"
 
@@ -89,6 +98,23 @@ msgstr "Nic nie uległo zmianie"
 msgid "Table for Redmine wiki"
 msgstr "Tabela do wiki na Redmine"
 
 msgid "Table for Redmine wiki"
 msgstr "Tabela do wiki na Redmine"
 
+#: templates/wiki/bootstrap.html:69
+msgid "Informations about lesson"
+msgstr "Informacje o lekcji"
+
+#: templates/wiki/bootstrap.html:71
+#: templates/wiki/document_details_base.html:35
+msgid "Version"
+msgstr "Wersja"
+
+#: templates/wiki/bootstrap.html:72
+msgid "Stage"
+msgstr "Etap"
+
+#: templates/wiki/bootstrap.html:73
+msgid "Assignment"
+msgstr "Przypisano"
+
 #: templates/wiki/diff_table.html:5
 msgid "Old version"
 msgstr "Stara wersja"
 #: templates/wiki/diff_table.html:5
 msgid "Old version"
 msgstr "Stara wersja"
@@ -105,10 +131,6 @@ msgstr "Kliknij, aby (ro)zwinąć galerię"
 msgid "Help"
 msgstr "Pomoc"
 
 msgid "Help"
 msgstr "Pomoc"
 
-#: templates/wiki/document_details_base.html:35
-msgid "Version"
-msgstr "Wersja"
-
 #: templates/wiki/document_details_base.html:35
 msgid "Unknown"
 msgstr "nieznana"
 #: templates/wiki/document_details_base.html:35
 msgid "Unknown"
 msgstr "nieznana"
@@ -203,14 +225,15 @@ msgstr "Zamień"
 msgid "Replace all"
 msgstr "Zamień wszystko"
 
 msgid "Replace all"
 msgstr "Zamień wszystko"
 
+#: templates/wiki/tabs/search_view.html:15
 msgid "Options"
 msgstr "Opcje"
 
 msgid "Options"
 msgstr "Opcje"
 
-#: templates/wiki/tabs/search_view.html:15
+#: templates/wiki/tabs/search_view.html:17
 msgid "Case sensitive"
 msgstr "Rozróżniaj wielkość liter"
 
 msgid "Case sensitive"
 msgstr "Rozróżniaj wielkość liter"
 
-#: templates/wiki/tabs/search_view.html:17
+#: templates/wiki/tabs/search_view.html:19
 msgid "From cursor"
 msgstr "Zacznij od kursora"
 
 msgid "From cursor"
 msgstr "Zacznij od kursora"
 
@@ -278,18 +301,6 @@ msgstr "Wstaw przypis"
 msgid "Visual editor"
 msgstr "Edytor wizualny"
 
 msgid "Visual editor"
 msgstr "Edytor wizualny"
 
-#: templates/wiki/bootstrap.html:95
-msgid "Informations about lesson"
-msgstr "Informacje o lekcji"
-
-#: templates/wiki/bootstrap.html:97
-msgid "Stage"
-msgstr "Etap"
-
-#: templates/wiki/bootstrap.html:98
-msgid "Assignment"
-msgstr "Przypisano"
-
 #~ msgid "ZIP file"
 #~ msgstr "Plik ZIP"
 
 #~ msgid "ZIP file"
 #~ msgstr "Plik ZIP"
 
index 45254a3..b078536 100644 (file)
Binary files a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo and b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo differ
index 16d331d..0c91bc4 100644 (file)
@@ -148,7 +148,7 @@ msgstr ""
 
 #: static/wiki/editor/src/editor/modules/data/data.js:139
 msgid "Yes, restore local draft"
 
 #: static/wiki/editor/src/editor/modules/data/data.js:139
 msgid "Yes, restore local draft"
-msgstr "Tak, chcę użyć lokalną kopię"
+msgstr "Tak, chcę użyć lokalnej kopii"
 
 #: static/wiki/editor/src/editor/modules/data/data.js:140
 msgid "No, use version loaded from the server"
 
 #: static/wiki/editor/src/editor/modules/data/data.js:140
 msgid "No, use version loaded from the server"
index 03f8d4c..fc5623b 100644 (file)
@@ -70,7 +70,7 @@
                     properties: [
                         {name: 'version', label: '{% trans 'Version' %}'},
                         {name: 'stage', label: '{% trans 'Stage' %}'},
                     properties: [
                         {name: 'version', label: '{% trans 'Version' %}'},
                         {name: 'stage', label: '{% trans 'Stage' %}'},
-                        {name: 'assignment', label: '{% trans 'Assignment' %}'},
+                        {name: 'assignment', label: '{% trans 'Assignment' %}'}
                     ]
                 },
 
                     ]
                 },
 
                     return '{{MEDIA_URL}}{{IMAGE_DIR}}{{slug}}/' + attachmentName;
                 },
                 documentUrl: function(id, version) {
                     return '{{MEDIA_URL}}{{IMAGE_DIR}}{{slug}}/' + attachmentName;
                 },
                 documentUrl: function(id, version) {
-                    var url = '{% url 'wiki_editor' slug %}'
+                    var url = '{% url 'wiki_editor' slug %}';
                     if(version) {
                         url = url + '?version=' + version;
                     }
                     if(version) {
                         url = url + '?version=' + version;
                     }
                             {% for value,text in tags %}
                                 {value:'{{value|default:''}}', text:'{{text}}'} {% if not forloop.last %}, {% endif %}
                             {% endfor %}
                             {% for value,text in tags %}
                                 {value:'{{value|default:''}}', text:'{{text}}'} {% if not forloop.last %}, {% endif %}
                             {% endfor %}
-                        ], description: '{{forms.text_save.stage_completed.help_text}}'},
+                        ], description: '{{forms.text_save.stage_completed.help_text}}'}
                     ],
                     content_field_name: '{{forms.text_save.text.html_name}}',
                     version_field_name: '{{forms.text_save.parent_revision.html_name}}'
                     ],
                     content_field_name: '{{forms.text_save.text.html_name}}',
                     version_field_name: '{{forms.text_save.parent_revision.html_name}}'
             };
 
             {% if can_pubmark %}
             };
 
             {% if can_pubmark %}
-                config.documentSaveForm.fields.push(
-                    {label: '{{forms.text_save.publishable.label}}', name: '{{forms.text_save.publishable.html_name}}', type: 'checkbox', description: '{{forms.text_save.publishable.help_text}}'}
-                );
+                config.documentSaveForm.fields.push({
+                    label: '{{forms.text_save.publishable.label}}',
+                    name: '{{forms.text_save.publishable.html_name}}',
+                    type: 'checkbox',
+                    description: '{{forms.text_save.publishable.help_text}}',
+                    checked: false
+                });
+                config.documentSaveForm.fields.push({
+                    label: '{{forms.text_save.for_cybernauts.label}}',
+                    name: '{{forms.text_save.for_cybernauts.html_name}}',
+                    type: 'checkbox',
+                    description: '{{forms.text_save.for_cybernauts.help_text}}',
+                    checked: {{ forms.text_save.for_cybernauts.field.initial|yesno:"true,false" }}
+                });
             {% endif %}
 
             {% if not request.user.is_authenticated %}
             {% endif %}
 
             {% if not request.user.is_authenticated %}
diff --git a/apps/wiki/templates/wiki/document_details.html b/apps/wiki/templates/wiki/document_details.html
deleted file mode 100644 (file)
index db003d2..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-{% extends "wiki/document_details_base.html" %}
-{% load i18n %}
-
-{% block extrabody %}
-{{ block.super }}
-<script src="{{ STATIC_URL }}js/lib/codemirror-0.8/codemirror.js" type="text/javascript" charset="utf-8">
-</script>
-<script src="{{ STATIC_URL }}js/wiki/loader.js" type="text/javascript" charset="utf-8"> </script>
-{% endblock %}
-
-{% block tabs-menu %}
-    {% include "wiki/tabs/summary_view_item.html" %}
-    {% include "wiki/tabs/wysiwyg_editor_item.html" %}
-    {% include "wiki/tabs/source_editor_item.html" %}
-    {% include "wiki/tabs/history_view_item.html" %}
-{% endblock %}
-
-{% block tabs-content %}
-    {% include "wiki/tabs/summary_view.html" %}
-    {% include "wiki/tabs/wysiwyg_editor.html" %}
-    {% include "wiki/tabs/source_editor.html" %}
-    {% include "wiki/tabs/history_view.html" %}
-{% endblock %}
-
-{% block tabs-right %}
-    {% include "wiki/tabs/gallery_view_item.html" %}
-    {% include "wiki/tabs/annotations_view_item.html" %}
-    {% include "wiki/tabs/search_view_item.html" %}
-{% endblock %}
-
-{% block splitter-extra %}
-<div class="vsplitbar" title="{% trans "Click to open/close gallery" %}">
-    <p class="vsplitbar-title"></p>
-    </div>
-    <div id="sidebar">
-        {% include "wiki/tabs/gallery_view.html" %}
-        {% include "wiki/tabs/annotations_view.html" %}
-        {% include "wiki/tabs/search_view.html" %}
-    </div>
-{% endblock %}
-
-{% block dialogs %}
-    {% include "wiki/save_dialog.html" %}
-    {% include "wiki/revert_dialog.html" %}
-    {% include "wiki/tag_dialog.html" %}
-    {% if can_pubmark %}
-        {% include "wiki/pubmark_dialog.html" %}
-    {% endif %}
-{% endblock %}
diff --git a/apps/wiki/templates/wiki/save_dialog.html b/apps/wiki/templates/wiki/save_dialog.html
deleted file mode 100644 (file)
index 31c5b01..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-{% load i18n %}
-<div id="save_dialog" class="dialog" data-ui-jsclass="SaveDialog">
-       <form method="POST" action="">
-    {% csrf_token %}
-       <p>{{ forms.text_save.comment.label }}</p>
-       <p class="help_text">
-               {{ forms.text_save.comment.help_text}}
-               <span data-ui-error-for="{{ forms.text_save.comment.name }}"> </span>
-       </p>
-       {{forms.text_save.comment }}
-
-
-
-       {% if request.user.is_anonymous %}
-    <table style='margin:0 4%;'>
-    <tr>
-        <td>{{ forms.text_save.author_name.label }}:</td>
-        <td>{{ forms.text_save.author_name }}
-        <span class="help_text">{{ forms.text_save.author_name.help_text }}</span>
-        <span data-ui-error-for="{{ forms.text_save.author_name.name }}"> </span></td>
-    </tr>
-    <tr>
-        <td>{{ forms.text_save.author_email.label }}:</td>
-        <td>{{ forms.text_save.author_email }}
-        <span class="help_text">{{ forms.text_save.author_email.help_text }}</span>
-        <span data-ui-error-for="{{ forms.text_save.author_email.name }}"> </span></td>
-    </tr>
-    </table>
-       {% else %}
-       <p>
-               {{ forms.text_save.stage_completed.label }}:
-               {{ forms.text_save.stage_completed }}
-               <span class="help_text">{{ forms.text_save.stage_completed.help_text }}</span>
-               <span data-ui-error-for="{{ forms.text_save.stage_completed.name }}"> </span>
-       </p>
-    {% if can_pubmark %}
-       <p>
-               {{ forms.text_save.publishable.label_tag }}:
-               {{ forms.text_save.publishable }}
-               <span class="help_text">{{ forms.text_save.publishable.help_text }}</span>
-               <span data-ui-error-for="{{ forms.text_save.publishable.name }}"> </span>
-       </p>
-    {% endif %}
-
-       {% endif %}
-
-
-       {% for f in forms.text_save.hidden_fields %}
-               {{ f }}
-       {% endfor %}
-
-       <p data-ui-error-for="__all__"> </p>
-
-       <p class="action_area">
-               <button type="submit" class"ok" data-ui-action="save">Zapisz</button>
-               <button type="button" class="cancel" data-ui-action="cancel">Anuluj</button>
-       </p>
-       </form>
-</div>
index d68a351..20dca02 100644 (file)
@@ -82,7 +82,7 @@ def editor(request, slug, chunk=None, template_name='wiki/bootstrap.html'):
         del last_books[oldest_key]
     request.session['wiki_last_books'] = last_books
 
         del last_books[oldest_key]
     request.session['wiki_last_books'] = last_books
 
-    save_form = forms.DocumentTextSaveForm(user=request.user, prefix="textsave")
+    save_form = forms.DocumentTextSaveForm(user=request.user, chunk=chunk, prefix="textsave")
     try:
         version = int(request.GET.get('version', None))
     except:
     try:
         version = int(request.GET.get('version', None))
     except:
@@ -152,7 +152,7 @@ def text(request, chunk_id):
         return HttpResponseForbidden("Not authorized.")
 
     if request.method == 'POST':
         return HttpResponseForbidden("Not authorized.")
 
     if request.method == 'POST':
-        form = forms.DocumentTextSaveForm(request.POST, user=request.user, prefix="textsave")
+        form = forms.DocumentTextSaveForm(request.POST, user=request.user, chunk=doc, prefix="textsave")
         if form.is_valid():
             if request.user.is_authenticated():
                 author = request.user
         if form.is_valid():
             if request.user.is_authenticated():
                 author = request.user
@@ -177,6 +177,8 @@ def text(request, chunk_id):
                        author_email=form.cleaned_data['author_email'],
                        publishable=publishable,
                        )
                        author_email=form.cleaned_data['author_email'],
                        publishable=publishable,
                        )
+            doc.book.for_cybernauts = form.cleaned_data['for_cybernauts']
+            doc.book.save()
             revision = doc.revision()
             return JSONResponse({
                 'text': doc.materialize() if parent_revision != revision else None,
             revision = doc.revision()
             return JSONResponse({
                 'text': doc.materialize() if parent_revision != revision else None,