mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-03 04:39:10 +00:00
Real estate demo: sortability
This commit is contained in:
parent
6beb058e2d
commit
85bbb08838
@ -10,7 +10,7 @@ This is a list of all the tiddlers containing ~GeoJSON markers in this wiki (ide
|
|||||||
<div>
|
<div>
|
||||||
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
|
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
|
||||||
<$let
|
<$let
|
||||||
config={{{ [<schema>jsonget[fields],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/]] }}}
|
config={{{ [<schema>jsonget[fields],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/fields/]] }}}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<$checkbox tiddler=<<config>> field="visible" checked="yes" unchecked="no" default="yes">
|
<$checkbox tiddler=<<config>> field="visible" checked="yes" unchecked="no" default="yes">
|
||||||
@ -20,12 +20,25 @@ This is a list of all the tiddlers containing ~GeoJSON markers in this wiki (ide
|
|||||||
</$let>
|
</$let>
|
||||||
</$list>
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
Sorting by
|
||||||
|
<$select tiddler="$:/config/geospatial/demo/real-estate-demo/sort-field" default="title">
|
||||||
|
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
|
||||||
|
<option value={{{ [<schema>jsonget[fields],<index>,[name]] }}}>
|
||||||
|
<$text text={{{ [<schema>jsonget[fields],<index>,[caption]] }}}/>
|
||||||
|
</option>
|
||||||
|
</$list>
|
||||||
|
</$select>
|
||||||
|
<$checkbox tiddler="$:/config/geospatial/demo/real-estate-demo/sort-order" field="text" checked="reverse" unchecked="normal" default="normal">
|
||||||
|
Reverse sort order
|
||||||
|
</$checkbox>
|
||||||
|
</div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
|
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
|
||||||
<$let
|
<$let
|
||||||
config={{{ [<schema>jsonget[fields],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/]] }}}
|
config={{{ [<schema>jsonget[fields],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/fields/]] }}}
|
||||||
>
|
>
|
||||||
<$list filter="[<config>get[visible]else[yes]match[yes]]" variable="ignore">
|
<$list filter="[<config>get[visible]else[yes]match[yes]]" variable="ignore">
|
||||||
<th>
|
<th>
|
||||||
@ -37,11 +50,15 @@ This is a list of all the tiddlers containing ~GeoJSON markers in this wiki (ide
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]sort[caption]]">
|
<$let
|
||||||
|
sortField={{{ [[$:/config/geospatial/demo/real-estate-demo/sort-field]get[text]else[title]] }}}
|
||||||
|
sortOrder={{{ [[$:/config/geospatial/demo/real-estate-demo/sort-order]get[text]else[normal]] }}}
|
||||||
|
>
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]sort<sortField>order<sortOrder>]">
|
||||||
<tr>
|
<tr>
|
||||||
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
|
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
|
||||||
<$let
|
<$let
|
||||||
config={{{ [<schema>jsonget[fields],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/]] }}}
|
config={{{ [<schema>jsonget[fields],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/fields/]] }}}
|
||||||
>
|
>
|
||||||
<$list filter="[<config>get[visible]else[yes]match[yes]]" variable="ignore">
|
<$list filter="[<config>get[visible]else[yes]match[yes]]" variable="ignore">
|
||||||
<td>
|
<td>
|
||||||
@ -56,6 +73,7 @@ This is a list of all the tiddlers containing ~GeoJSON markers in this wiki (ide
|
|||||||
</$list>
|
</$list>
|
||||||
</tr>
|
</tr>
|
||||||
</$list>
|
</$list>
|
||||||
|
</$let>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</$let>
|
</$let>
|
||||||
|
Loading…
Reference in New Issue
Block a user