kopia lustrzana https://github.com/wagtail/wagtail
				
				
				
			Merge "collapsing multi field panels" into MultiFieldPanel
							rodzic
							
								
									3f780a1d8c
								
							
						
					
					
						commit
						866b762b7b
					
				|  | @ -94,6 +94,24 @@ MultiFieldPanel | |||
| 
 | ||||
|         A heading for the fields | ||||
| 
 | ||||
| .. topic:: Collapsing MultiFieldPanels to save space | ||||
| 
 | ||||
|     By default, ``MultiFieldPanel`` s are expanded and not collapsible. Adding the classname ``collapsible`` will enable the collapse control. Adding both ``collapsible`` and ``collapsed`` to the classname parameter will load the editor page with the ``MultiFieldPanel`` collapsed under its heading. | ||||
| 
 | ||||
|     .. code-block:: python | ||||
| 
 | ||||
|         content_panels = [ | ||||
|             MultiFieldPanel( | ||||
|                 [ | ||||
|                     ImageChooserPanel('cover'), | ||||
|                     DocumentChooserPanel('book_file'), | ||||
|                     PageChooserPanel('publisher'), | ||||
|                 ], | ||||
|                 heading="Collection of Book Fields", | ||||
|                 classname="collapsible collapsed" | ||||
|             ), | ||||
|         ] | ||||
| 
 | ||||
| InlinePanel | ||||
| ----------- | ||||
| 
 | ||||
|  | @ -305,30 +323,6 @@ Without a panel definition, a default form field (without label) will be used to | |||
| .. _Django model field reference (editable): https://docs.djangoproject.com/en/dev/ref/models/fields/#editable | ||||
| 
 | ||||
| 
 | ||||
| MultiFieldPanel | ||||
| ~~~~~~~~~~~~~~~ | ||||
| 
 | ||||
| The ``MultiFieldPanel`` groups a list of child fields into a fieldset, which can also be collapsed into a heading bar to save space. | ||||
| 
 | ||||
| .. code-block:: python | ||||
| 
 | ||||
|     BOOK_FIELD_COLLECTION = [ | ||||
|         ImageChooserPanel('cover'), | ||||
|         DocumentChooserPanel('book_file'), | ||||
|         PageChooserPanel('publisher'), | ||||
|     ] | ||||
| 
 | ||||
|     BookPage.content_panels = [ | ||||
|         MultiFieldPanel( | ||||
|             BOOK_FIELD_COLLECTION, | ||||
|             heading="Collection of Book Fields", | ||||
|             classname="collapsible collapsed" | ||||
|         ), | ||||
|     ] | ||||
| 
 | ||||
| By default, ``MultiFieldPanel`` s are expanded and not collapsible. Adding the classname ``collapsible`` will enable the collapse control. Adding both ``collapsible`` and ``collapsed`` to the classname parameter will load the editor page with the ``MultiFieldPanel`` collapsed under its heading. | ||||
| 
 | ||||
| 
 | ||||
| .. _inline_panels: | ||||
| 
 | ||||
| Inline Panels and Model Clusters | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Karl Hobley
						Karl Hobley