Skip to content

Commit ca783eb

Browse files
committed
add collapse/open all v.1.4.0
1 parent 26a81ce commit ca783eb

14 files changed

Lines changed: 139 additions & 32 deletions

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,15 @@ def save(self, *args, **kwargs):
440440
# settings.py
441441
```
442442

443+
### STREAMFIELD_SHOW_ADMIN_COLLAPSE
444+
If you want to hide "Collapse" link in admin.
445+
Set:
446+
```python
447+
STREAMFIELD_SHOW_ADMIN_COLLAPSE = False
448+
```
449+
443450
### STREAMFIELD_SHOW_ADMIN_HELP_TEXT
444-
If you want to hide "Help" link in admin, above the "Add new block" link.
451+
If you want to hide "Help" link in admin.
445452
Set:
446453
```python
447454
STREAMFIELD_SHOW_ADMIN_HELP_TEXT = False

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="django-streamfield",
8-
version="1.3.9",
8+
version="1.4.0",
99
author="Yury Lapshinov",
1010
author_email="y.raagin@gmail.com",
1111
description="StreamField for native Django Admin or with Grappelli",

streamfield/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
name = "streamfield"
2-
VERSION = '1.3.9'
2+
VERSION = '1.4.0'

streamfield/fields.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .settings import (
88
BLOCK_OPTIONS,
99
SHOW_ADMIN_HELP_TEXT,
10+
SHOW_ADMIN_COLLAPSE,
1011
DELETE_BLOCKS_FROM_DB,
1112
BASE_ADMIN_URL
1213
)
@@ -37,6 +38,7 @@ def __init__(self, attrs=None):
3738

3839
attrs["model_list_info"] = json.dumps(model_list_info)
3940
attrs['show_admin_help_text'] = SHOW_ADMIN_HELP_TEXT
41+
attrs['show_admin_collapse'] = SHOW_ADMIN_COLLAPSE
4042
attrs['delete_blocks_from_db'] = DELETE_BLOCKS_FROM_DB
4143
attrs['base_admin_url'] = BASE_ADMIN_URL
4244
super().__init__(attrs)
-41 Bytes
Binary file not shown.

streamfield/locale/en/LC_MESSAGES/django.po

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-05-01 23:26+0300\n"
11+
"POT-Creation-Date: 2021-06-29 11:06+0300\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,6 +18,21 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2020

21+
#: templates/streamfield/admin/change_form.html:19
22+
msgid "Please correct the error below."
23+
msgstr ""
24+
25+
#: templates/streamfield/admin/change_form.html:19
26+
msgid "Please correct the errors below."
27+
msgstr ""
28+
29+
#: templates/streamfield/admin/fields/file_browse_widget.html:24
30+
msgid "File not found"
31+
msgstr ""
32+
33+
#: templates/streamfield/admin/streamfield_popup_response.html:3
34+
msgid "Popup closing..."
35+
msgstr ""
2136

2237
#: templates/streamfield/streamfield_admin_help.html:2
2338
msgid ""
@@ -46,20 +61,31 @@ msgstr ""
4661
msgid "Help?"
4762
msgstr ""
4863

49-
#: templates/streamfield/streamfield_widget.html:45
50-
#: templates/streamfield/streamfield_widget.html:50
51-
#: templates/streamfield/streamfield_widget.html:77
64+
#: templates/streamfield/streamfield_widget.html:20
65+
msgid "Collapse all"
66+
msgstr ""
67+
68+
#: templates/streamfield/streamfield_widget.html:20
69+
msgid "Open all"
70+
msgstr ""
71+
72+
#: templates/streamfield/streamfield_widget.html:53
73+
#: templates/streamfield/streamfield_widget.html:58
74+
#: templates/streamfield/streamfield_widget.html:80
75+
#: templates/streamfield/streamfield_widget.html:85
5276
msgid "Change"
5377
msgstr ""
5478

55-
#: templates/streamfield/streamfield_widget.html:60
79+
#: templates/streamfield/streamfield_widget.html:65
80+
#: templates/streamfield/streamfield_widget.html:68
5681
msgid "Add one more"
5782
msgstr ""
5883

59-
#: templates/streamfield/streamfield_widget.html:85
84+
#: templates/streamfield/streamfield_widget.html:90
85+
#: templates/streamfield/streamfield_widget.html:93
6086
msgid "Add content"
6187
msgstr ""
6288

63-
#: templates/streamfield/streamfield_widget.html:103
89+
#: templates/streamfield/streamfield_widget.html:119
6490
msgid "Add new block"
6591
msgstr ""
94 Bytes
Binary file not shown.

streamfield/locale/it/LC_MESSAGES/django.po

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,32 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-05-01 23:26+0300\n"
10+
"POT-Creation-Date: 2021-06-29 11:06+0300\n"
1111
"PO-Revision-Date: 2020-02-08 14:10+0100\n"
12+
"Last-Translator: \n"
13+
"Language-Team: \n"
14+
"Language: it_IT\n"
1215
"MIME-Version: 1.0\n"
1316
"Content-Type: text/plain; charset=UTF-8\n"
1417
"Content-Transfer-Encoding: 8bit\n"
1518
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
16-
"Language-Team: \n"
1719
"X-Generator: Poedit 2.3\n"
18-
"Last-Translator: \n"
19-
"Language: it_IT\n"
20+
21+
#: templates/streamfield/admin/change_form.html:19
22+
msgid "Please correct the error below."
23+
msgstr ""
24+
25+
#: templates/streamfield/admin/change_form.html:19
26+
msgid "Please correct the errors below."
27+
msgstr ""
28+
29+
#: templates/streamfield/admin/fields/file_browse_widget.html:24
30+
msgid "File not found"
31+
msgstr ""
32+
33+
#: templates/streamfield/admin/streamfield_popup_response.html:3
34+
msgid "Popup closing..."
35+
msgstr ""
2036

2137
#: templates/streamfield/streamfield_admin_help.html:2
2238
msgid ""
@@ -58,20 +74,31 @@ msgstr "Sei sicuro di voler cancellare questo sotto blocco?"
5874
msgid "Help?"
5975
msgstr "Un aiutino?"
6076

61-
#: templates/streamfield/streamfield_widget.html:45
62-
#: templates/streamfield/streamfield_widget.html:50
63-
#: templates/streamfield/streamfield_widget.html:77
77+
#: templates/streamfield/streamfield_widget.html:20
78+
msgid "Collapse all"
79+
msgstr "Crolla tutto"
80+
81+
#: templates/streamfield/streamfield_widget.html:20
82+
msgid "Open all"
83+
msgstr "Apri tutto"
84+
85+
#: templates/streamfield/streamfield_widget.html:53
86+
#: templates/streamfield/streamfield_widget.html:58
87+
#: templates/streamfield/streamfield_widget.html:80
88+
#: templates/streamfield/streamfield_widget.html:85
6489
msgid "Change"
6590
msgstr "Modifica"
6691

67-
#: templates/streamfield/streamfield_widget.html:60
92+
#: templates/streamfield/streamfield_widget.html:65
93+
#: templates/streamfield/streamfield_widget.html:68
6894
msgid "Add one more"
6995
msgstr "Aggiungine un altro"
7096

71-
#: templates/streamfield/streamfield_widget.html:85
97+
#: templates/streamfield/streamfield_widget.html:90
98+
#: templates/streamfield/streamfield_widget.html:93
7299
msgid "Add content"
73100
msgstr "Aggiungi contenuto"
74101

75-
#: templates/streamfield/streamfield_widget.html:103
102+
#: templates/streamfield/streamfield_widget.html:119
76103
msgid "Add new block"
77104
msgstr "Aggiungi un nuovo blocco"
73 Bytes
Binary file not shown.

streamfield/locale/ru/LC_MESSAGES/django.po

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-05-01 23:26+0300\n"
11+
"POT-Creation-Date: 2021-06-29 11:06+0300\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,6 +20,21 @@ msgstr ""
2020
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
2121
"%100>=11 && n%100<=14)? 2 : 3);\n"
2222

23+
#: templates/streamfield/admin/change_form.html:19
24+
msgid "Please correct the error below."
25+
msgstr ""
26+
27+
#: templates/streamfield/admin/change_form.html:19
28+
msgid "Please correct the errors below."
29+
msgstr ""
30+
31+
#: templates/streamfield/admin/fields/file_browse_widget.html:24
32+
msgid "File not found"
33+
msgstr ""
34+
35+
#: templates/streamfield/admin/streamfield_popup_response.html:3
36+
msgid "Popup closing..."
37+
msgstr ""
2338

2439
#: templates/streamfield/streamfield_admin_help.html:2
2540
msgid ""
@@ -59,21 +74,32 @@ msgstr "Вы уверены, что хотите удалить этот под
5974
msgid "Help?"
6075
msgstr "Помощь?"
6176

62-
#: templates/streamfield/streamfield_widget.html:45
63-
#: templates/streamfield/streamfield_widget.html:50
64-
#: templates/streamfield/streamfield_widget.html:77
77+
#: templates/streamfield/streamfield_widget.html:20
78+
msgid "Collapse all"
79+
msgstr "Закрыть все"
80+
81+
#: templates/streamfield/streamfield_widget.html:20
82+
msgid "Open all"
83+
msgstr "Открыть все"
84+
85+
#: templates/streamfield/streamfield_widget.html:53
86+
#: templates/streamfield/streamfield_widget.html:58
87+
#: templates/streamfield/streamfield_widget.html:80
88+
#: templates/streamfield/streamfield_widget.html:85
6589
msgid "Change"
6690
msgstr "Изменить"
6791

68-
#: templates/streamfield/streamfield_widget.html:60
92+
#: templates/streamfield/streamfield_widget.html:65
93+
#: templates/streamfield/streamfield_widget.html:68
6994
msgid "Add one more"
7095
msgstr "Добавить ещё"
7196

72-
#: templates/streamfield/streamfield_widget.html:85
97+
#: templates/streamfield/streamfield_widget.html:90
98+
#: templates/streamfield/streamfield_widget.html:93
7399
msgid "Add content"
74100
msgstr "Добавить контент"
75101

76-
#: templates/streamfield/streamfield_widget.html:103
102+
#: templates/streamfield/streamfield_widget.html:119
77103
msgid "Add new block"
78104
msgstr "Добавить новый блок"
79105

0 commit comments

Comments
 (0)