fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2277b55
)
Projects in context menu.
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 16 Jul 2013 11:22:31 +0000
(13:22 +0200)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 16 Jul 2013 11:22:31 +0000
(13:22 +0200)
apps/catalogue/locale/pl/LC_MESSAGES/django.mo
patch
|
blob
|
history
apps/catalogue/locale/pl/LC_MESSAGES/django.po
patch
|
blob
|
history
apps/catalogue/templates/catalogue/book_list/book_list.html
patch
|
blob
|
history
apps/catalogue/views.py
patch
|
blob
|
history
redakcja/static/js/catalogue/book_list.js
patch
|
blob
|
history
diff --git
a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo
b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo
index
fa4fb65
..
b6a12e3
100644
(file)
Binary files a/apps/catalogue/locale/pl/LC_MESSAGES/django.mo and b/apps/catalogue/locale/pl/LC_MESSAGES/django.mo differ
diff --git
a/apps/catalogue/locale/pl/LC_MESSAGES/django.po
b/apps/catalogue/locale/pl/LC_MESSAGES/django.po
index
9700619
..
6790400
100644
(file)
--- a/
apps/catalogue/locale/pl/LC_MESSAGES/django.po
+++ b/
apps/catalogue/locale/pl/LC_MESSAGES/django.po
@@
-7,8
+7,8
@@
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: 2013-07-
09 10:15
+0200\n"
-"PO-Revision-Date: 2013-07-
09 10:15
+0100\n"
+"POT-Creation-Date: 2013-07-
16 13:22
+0200\n"
+"PO-Revision-Date: 2013-07-
16 13:22
+0100\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org."
"pl>\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org."
"pl>\n"
@@
-61,11
+61,11
@@
msgstr "Dokument o tym slugu już istnieje w repozytorium."
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."
-#: views.py:4
87
models/book.py:56
+#: views.py:4
98
models/book.py:56
msgid "books"
msgstr "książki"
msgid "books"
msgstr "książki"
-#: views.py:
489
+#: views.py:
500
msgid "scan gallery"
msgstr "galeria skanów"
msgid "scan gallery"
msgstr "galeria skanów"
@@
-145,7
+145,7
@@
msgstr "nazwa"
msgid "notes"
msgstr "notatki"
msgid "notes"
msgstr "notatki"
-#: models/project.py:19
+#: models/project.py:19
templates/catalogue/book_list/book_list.html:62
msgid "project"
msgstr "projekt"
msgid "project"
msgstr "projekt"
@@
-362,36
+362,37
@@
msgid "No activity recorded."
msgstr "Nie zanotowano aktywności."
#: templates/catalogue/book_list/book.html:7
msgstr "Nie zanotowano aktywności."
#: templates/catalogue/book_list/book.html:7
-#: templates/catalogue/book_list/book.html:2
7
+#: templates/catalogue/book_list/book.html:2
8
msgid "Book settings"
msgstr "Ustawienia książki"
msgid "Book settings"
msgstr "Ustawienia książki"
-#: templates/catalogue/book_list/book_list.html:2
1
+#: templates/catalogue/book_list/book_list.html:2
2
msgid "Show hidden books"
msgstr "Pokaż ukryte książki"
msgid "Show hidden books"
msgstr "Pokaż ukryte książki"
-#: templates/catalogue/book_list/book_list.html:2
6
+#: templates/catalogue/book_list/book_list.html:2
7
msgid "Search in book titles"
msgstr "Szukaj w tytułach książek"
msgid "Search in book titles"
msgstr "Szukaj w tytułach książek"
-#: templates/catalogue/book_list/book_list.html:3
1
+#: templates/catalogue/book_list/book_list.html:3
2
msgid "stage"
msgstr "etap"
msgid "stage"
msgstr "etap"
-#: templates/catalogue/book_list/book_list.html:33
-#: templates/catalogue/book_list/book_list.html:44
+#: templates/catalogue/book_list/book_list.html:34
+#: templates/catalogue/book_list/book_list.html:45
+#: templates/catalogue/book_list/book_list.html:64
msgid "none"
msgstr "brak"
msgid "none"
msgstr "brak"
-#: templates/catalogue/book_list/book_list.html:4
2
+#: templates/catalogue/book_list/book_list.html:4
3
msgid "editor"
msgstr "redaktor"
msgid "editor"
msgstr "redaktor"
-#: templates/catalogue/book_list/book_list.html:5
3
+#: templates/catalogue/book_list/book_list.html:5
4
msgid "status"
msgstr "status"
msgid "status"
msgstr "status"
-#: templates/catalogue/book_list/book_list.html:
77
+#: templates/catalogue/book_list/book_list.html:
88
#, python-format
msgid "%(c)s book"
msgid_plural "%(c)s books"
#, python-format
msgid "%(c)s book"
msgid_plural "%(c)s books"
@@
-399,27
+400,31
@@
msgstr[0] "%(c)s książka"
msgstr[1] "%(c)s książki"
msgstr[2] "%(c)s książek"
msgstr[1] "%(c)s książki"
msgstr[2] "%(c)s książek"
-#: templates/catalogue/book_list/book_list.html:
82
+#: templates/catalogue/book_list/book_list.html:
93
msgid "No books found."
msgstr "Nie znaleziono książek."
msgid "No books found."
msgstr "Nie znaleziono książek."
-#: templates/catalogue/book_list/book_list.html:
88
+#: templates/catalogue/book_list/book_list.html:
99
msgid "Set stage"
msgstr "Ustaw etap"
msgid "Set stage"
msgstr "Ustaw etap"
-#: templates/catalogue/book_list/book_list.html:
89
+#: templates/catalogue/book_list/book_list.html:
100
msgid "Set user"
msgstr "Przypisz redaktora"
msgid "Set user"
msgstr "Przypisz redaktora"
-#: templates/catalogue/book_list/book_list.html:91
+#: templates/catalogue/book_list/book_list.html:102
+msgid "Project"
+msgstr "Projekt"
+
+#: templates/catalogue/book_list/book_list.html:103
msgid "Mark publishable"
msgstr "Oznacz do publikacji"
msgid "Mark publishable"
msgstr "Oznacz do publikacji"
-#: templates/catalogue/book_list/book_list.html:
92
+#: templates/catalogue/book_list/book_list.html:
104
msgid "Mark not publishable"
msgstr "Odznacz do publikacji"
msgid "Mark not publishable"
msgstr "Odznacz do publikacji"
-#: templates/catalogue/book_list/book_list.html:
93
+#: templates/catalogue/book_list/book_list.html:
105
msgid "Other user"
msgstr "Inny użytkownik"
msgid "Other user"
msgstr "Inny użytkownik"
diff --git
a/apps/catalogue/templates/catalogue/book_list/book_list.html
b/apps/catalogue/templates/catalogue/book_list/book_list.html
index
3553768
..
90ae183
100755
(executable)
--- a/
apps/catalogue/templates/catalogue/book_list/book_list.html
+++ b/
apps/catalogue/templates/catalogue/book_list/book_list.html
@@
-99,6
+99,7
@@
<label for="mass_edit_stage">{% trans "Set stage" %}</label><input type="hidden" name="stage" id="mass_edit_stage"/>
<label for="mass_edit_user">{% trans "Set user" %}</label><input type="hidden" name="user" id="mass_edit_stage" />
<input type="hidden" name="status" />
<label for="mass_edit_stage">{% trans "Set stage" %}</label><input type="hidden" name="stage" id="mass_edit_stage"/>
<label for="mass_edit_user">{% trans "Set user" %}</label><input type="hidden" name="user" id="mass_edit_stage" />
<input type="hidden" name="status" />
+<label for="mass_edit_project">{% trans "Project" %}</label><input type="hidden" name="project" id="mass_edit_project" />
<label for="mass_edit_publish">{% trans "Mark publishable" %}</label>
<label for="mass_edit_unpublish">{% trans "Mark not publishable" %}</label>
<label for="mass_edit_other">{% trans "Other user" %}</label>
<label for="mass_edit_publish">{% trans "Mark publishable" %}</label>
<label for="mass_edit_unpublish">{% trans "Mark not publishable" %}</label>
<label for="mass_edit_other">{% trans "Other user" %}</label>
@@
-110,4
+111,3
@@
{% endif %}value="{{ user.username }}">{{ user.first_name }} {{ user.last_name }} ({{ user.count }})</option>
{% endfor %}
</select>
{% endif %}value="{{ user.username }}">{{ user.first_name }} {{ user.last_name }} ({{ user.count }})</option>
{% endfor %}
</select>
-
diff --git
a/apps/catalogue/views.py
b/apps/catalogue/views.py
index
1436fc0
..
e1dc2a3
100644
(file)
--- a/
apps/catalogue/views.py
+++ b/
apps/catalogue/views.py
@@
-25,7
+25,7
@@
from apiclient import NotAuthorizedError
from catalogue import forms
from catalogue import helpers
from catalogue.helpers import active_tab
from catalogue import forms
from catalogue import helpers
from catalogue.helpers import active_tab
-from catalogue.models import Book, Chunk, BookPublishRecord, ChunkPublishRecord
+from catalogue.models import Book, Chunk, BookPublishRecord, ChunkPublishRecord
, Project
from fileupload.views import UploadView
#
from fileupload.views import UploadView
#
@@
-429,6
+429,17
@@
def chunk_mass_edit(request):
for b in books_affected:
b.touch() # cache
for b in books_affected:
b.touch() # cache
+ project_id = request.POST.get('project')
+ if project_id:
+ try:
+ project = Project.objects.get(pk=int(project_id))
+ except (Project.DoesNotExist, ValueError), e:
+ project = None
+ for c in chunks:
+ book = c.book
+ book.project = project
+ book.save()
+
for c in chunks: c.save()
return HttpResponse("", content_type="text/plain")
for c in chunks: c.save()
return HttpResponse("", content_type="text/plain")
diff --git
a/redakcja/static/js/catalogue/book_list.js
b/redakcja/static/js/catalogue/book_list.js
index
c0fbf37
..
9dd1e41
100644
(file)
--- a/
redakcja/static/js/catalogue/book_list.js
+++ b/
redakcja/static/js/catalogue/book_list.js
@@
-88,6
+88,14
@@
name: $("label[for=mass_edit_publish]").text(),
icon: "ok",
},
name: $("label[for=mass_edit_publish]").text(),
icon: "ok",
},
+ "project" :{
+ name: $("label[for=mass_edit_project]").text(),
+ items: get_items("project"),
+ },
+ "publish": {
+ name: $("label[for=mass_edit_publish]").text(),
+ icon: "ok",
+ },
"unpublish": {
name: $("label[for=mass_edit_unpublish]").text(),
icon: "stop",
"unpublish": {
name: $("label[for=mass_edit_unpublish]").text(),
icon: "stop",