Demo VisualData 1.0 / Datatable cards

Datatable cards: Difference between revisions

From Wikisphere
Jump to navigation Jump to search
No edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
The following demonstrates the use of Datatables with the paramater <code>datatables-cards=true</code>.
The following demonstrates the use of Datatables with the paramater <code>datatables-cards=true</code>. If the results exceed the standard limit (100 items) the table/cards will be automatically navigable using Ajax. SearchPanes can also be simultaneously used.  


This page contains the following components:
This page contains the following components:
Line 66: Line 66:




The single cells of the table can be styles using the "data-label" attribute as follows:
The single cells of the table can be styled using the "data-label" attribute as follows:


<pre>
<pre>
Line 75: Line 75:
</pre>
</pre>


(see [[Template:Demo_VisualData/Datatable cards/cards.css]]) for the complete style)
(see [[Template:Demo_VisualData/Datatable cards/cards.css]] for the complete style)




Line 103: Line 103:
}}
}}
</pre>
</pre>
(see the docs [https://www.mediawiki.org/wiki/Extension:VisualData/Result_formats here])
(see the docs [https://www.mediawiki.org/wiki/Extension:VisualData/Result_formats here], note that the printouts with an empty alias, like <code>action=</code> or <code>url=</code> are used to ensure that the property is available within templates, without showing it)
 


<templatestyles src="Demo_VisualData/Datatable cards/cards.css" />  
<templatestyles src="Demo_VisualData/Datatable cards/cards.css" />  
Line 122: Line 123:
}}
}}


source/idea: http://playground-mw.bitplan.com/





Latest revision as of 09:06, 26 November 2024

The following demonstrates the use of Datatables with the paramater datatables-cards=true. If the results exceed the standard limit (100 items) the table/cards will be automatically navigable using Ajax. SearchPanes can also be simultaneously used.

This page contains the following components:


form is loading...
{{#visualdataform: Gods
|title = Add god
|action = create
|edit-page = 
|return-page = Demo_VisualData/Datatable_cards
|view = popup
|popup-size = medium
|css-class =
|pagename-formula = Demo_VisualData/Datatable cards/<name>
|edit-freetext = false	
|edit-categories = false
|edit-content-model = false
|edit-target-slot = false
|target-slot = main
|default-categories = 
|default-content-model = wikitext
|preload=
|preload-data=
|layout-align = top
|popup-help = false 
|submit-button-text =
|layout = tabs
|submit-button-text =
|validate-button-text =
}}

(see the docs here)


The single cells of the table can be styled using the "data-label" attribute as follows:

.visualdata.datatable.cards td[data-label="picture"] {
  display: block;
  text-align: center;
}

(see Template:Demo_VisualData/Datatable cards/cards.css for the complete style)


The following templates are applied to specific printouts with the syntax |template?picture=GodsPicture or |template?action=GodsAction


<templatestyles src="Demo_VisualData/Datatable cards/cards.css" /> 

{{#visualdataquery:[[name::+]]  
|schema=Gods 
|format=datatable   
|pagetitle= 
|?action=
|?picture
|?name
|?description
|?url=
|template?picture=GodsPicture
|template?action=GodsAction
|datatables-cards=true
|order=name asc
}}

(see the docs here, note that the printouts with an empty alias, like action= or url= are used to ensure that the property is available within templates, without showing it)


actionpicturenamedescription
form is loading...
Aglaeaone of the three Charites in Greek mythology, also called the Gratiae (Graces) in Roman mythology.
form is loading...
Amicitiafriendship
form is loading...
Anterosthe god of requited love (literally "love returned" or "counter-love") and also the punisher of those who scorn love and the advances of others, or the avenger of unrequited love.
form is loading...
Aresthe Greek god of war and courage. He is one of the Twelve Olympians, and the son of Zeus and Hera
form is loading...
Aristaeusthe mythological culture hero credited with the discovery of many rural useful arts and handicrafts, including bee-keeping --
form is loading...
Artemisthe goddess of the hunt, the wilderness, wild animals, nature, vegetation, childbirth, care of children, and chastity


source/idea: http://playground-mw.bitplan.com/


See also


support & questions: support at topway.it

Download the latest version!