1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-09 19:39:57 +00:00
TiddlyWiki5/plugins/tiddlywiki/geospatial/demo/real-estate-demo/real-estate-demo.tid

87 lines
3.1 KiB
Plaintext
Raw Normal View History

2023-02-13 22:44:39 +00:00
title: $:/plugins/tiddlywiki/geospatial/demo/real-estate-demo
caption: Real Estate Demo
tags: $:/tags/GeospatialDemo
This is a list of all the tiddlers containing ~GeoJSON markers in this wiki (identified by the tag <<tag "$:/tags/GeoMarker">>) viewed as both a map and a table.
<$let
schema={{$:/plugins/tiddlywiki/geospatial/demo/real-estate-demo/schema}}
>
<div>
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
<$let
2023-03-03 09:50:54 +00:00
config={{{ [<schema>jsonget[fields],<index>,[name]addprefix[$:/config/geospatial/demo/real-estate-demo/fields/]] }}}
>
<div>
<$checkbox tiddler=<<config>> field="visible" checked="yes" unchecked="no" default="yes">
<$text text={{{ [<schema>jsonget[fields],<index>,[caption]] }}}/>
</$checkbox>
</div>
</$let>
</$list>
</div>
2023-03-03 09:50:54 +00:00
<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>
2023-03-03 13:15:04 +00:00
<div>
Search: <$edit-text tiddler="$:/config/geospatial/demo/real-estate-demo/search" tag="input"/>
</div>
<div>
Limit: <$edit-text tiddler="$:/config/geospatial/demo/real-estate-demo/limit" tag="input"/>
</div>
2023-02-13 22:44:39 +00:00
<table>
<thead>
<tr>
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
<$let
2023-03-03 09:50:54 +00:00
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">
<th>
<$text text={{{ [<schema>jsonget[fields],<index>,[caption]] }}}/>
</th>
</$list>
</$let>
</$list>
</tr>
</thead>
<tbody>
2023-03-03 09:50:54 +00:00
<$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]] }}}
2023-03-03 13:15:04 +00:00
limit={{{ [[$:/config/geospatial/demo/real-estate-demo/limit]get[text]else[100]] }}}
2023-03-03 09:50:54 +00:00
>
2023-03-03 13:15:04 +00:00
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]search:*{$:/config/geospatial/demo/real-estate-demo/search}nsort<sortField>order<sortOrder>limit<limit>]">
2023-03-03 09:50:54 +00:00
<tr>
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
<$let
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">
<td>
<$let
fieldname={{{ [<schema>jsonget[fields],<index>,[name]] }}}
>
<$text text={{{ [<currentTiddler>get<fieldname>] }}}/>
</$let>
</td>
</$list>
</$let>
</$list>
</tr>
</$list>
</$let>
</tbody>
2023-02-13 22:44:39 +00:00
</table>
</$let>