Template:Mine: Difference between revisions
Appearance
Created page with "<noinclude> {{#template_params:}} {{#cargo_declare:_table=Min|=Page}} </noinclude><includeonly>{{#cargo_store:_table=Min}} {{#template_display:_format=table}} Category:Mines </includeonly>" |
No edit summary |
||
| (193 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude>{{#template_params: | ||
{{#template_params:}} | |hasName={{{hasName|}}} | ||
{{#cargo_declare:_table= | |hasID={{{hasID|}}} | ||
</noinclude><includeonly>{{#cargo_store:_table= | |hasURL={{{hasURL|}}} | ||
{{# | |hasAlias={{{hasAlias|}}} | ||
|hasMineStatus={{{hasMineStatus|}}} | |||
|hasInfrastructure={{{hasInfrastructure|}}} | |||
|hasMineType={{{hasMineType|}}} | |||
|hasDescription={{{hasDescription|}}} | |||
|extracts={{{extracts|}}} | |||
|isOwnedBy={{{isOwnedBy|}}} | |||
|mines={{{mines|}}} | |||
|hasFootprint={{{hasFootprint|}}} | |||
|hasLocation={{{hasLocation|}}} | |||
|isWithinRegion={{{isWithinRegion|}}} | |||
|hasProject={{{hasProject|}}} | |||
|isPartOfProject={{{isPartOfProject|}}} | |||
|isNearCommunity={{{isNearCommunity|}}} | |||
|producesWaste={{{producesWaste|}}} | |||
|isNearEcosystem={{{isNearEcosystem|}}} | |||
|isWithinEcosystem={{{isWithinEcosystem|}}} | |||
}} | |||
{{#cargo_declare:_table=Mine | |||
|hasName=String | |||
|hasID=String | |||
|hasURL=URL | |||
|hasAlias=List (,) of String | |||
|hasMineStatus=String | |||
|hasInfrastructure=List (,) of String | |||
|hasMineType=String | |||
|hasDescription=Text | |||
|extracts=List (,) of Page | |||
|isOwnedBy=List (,) of Page | |||
|mines=List (,) of Page | |||
|hasFootprint=Page | |||
|hasLocation=Coordinates | |||
|isWithinRegion=List (,) of Page | |||
|hasProject=List (,) of Page | |||
|isPartOfProject=List (,) of Page | |||
|isNearCommunity=List (,) of Page | |||
|producesWaste=List (,) of Page | |||
|isNearEcosystem=List (,) of Page | |||
|isWithinEcosystem=List (,) of Page | |||
}}</noinclude> | |||
<includeonly> | |||
{{#cargo_store:_table=Mine | |||
|hasName={{{hasName|}}} | |||
|hasID={{{hasID|}}} | |||
|hasURL={{{hasURL|}}} | |||
|hasAlias={{{hasAlias|}}} | |||
|hasMineStatus={{{hasMineStatus|}}} | |||
|hasInfrastructure={{{hasInfrastructure|}}} | |||
|hasMineType={{{hasMineType|}}} | |||
|hasDescription={{{hasDescription|}}} | |||
|extracts={{{extracts|}}} | |||
|isOwnedBy={{{isOwnedBy|}}} | |||
|mines={{{mines|}}} | |||
|hasFootprint={{{hasFootprint|}}} | |||
|hasLocation={{{hasLocation|}}} | |||
|isWithinRegion={{{isWithinRegion|}}} | |||
|hasProject={{{hasProject|}}} | |||
|isPartOfProject={{{isPartOfProject|}}} | |||
|isNearCommunity={{{isNearCommunity|}}} | |||
|producesWaste={{{producesWaste|}}} | |||
|isNearEcosystem={{{isNearEcosystem|}}} | |||
|isWithinEcosystem={{{isWithinEcosystem|}}} | |||
}} | |||
<!-- Main Div --> | |||
{{#vardefine:footprint|{{#cargo_query:tables=Mine|fields=hasFootprint|where=_pageName="{{PAGENAME}}"}}|format=list|link=none|delimiter=\n}} | |||
{{#vardefine:location|{{#cargo_query:tables=Mine|fields=hasLocation|where=_pageName="{{PAGENAME}}"}}}} | |||
{{#display_map:center=ArcticCordillera | geojson=GeoJson:ArcticCordillera}} | |||
<div style="overflow: hidden;"> | |||
<!-- Right column: Mine Information table --> | |||
<div style="float: right; width: 33%; margin-left: 20px;"> | |||
<h1>Mine Information</h1> | |||
<div> | |||
{| class="wikitable" | |||
|+{{{hasMineStatus}}} Mine - {{{hasName}}} | |||
! Name | |||
| {{{hasName|}}} | |||
|- | |||
! Minerals | |||
| {{#invoke:TrimArray|links|form=Mineral|{{{extracts|}}}}} | |||
|- | |||
!Location (cargo query) | |||
| {{#cargo_query:tables=Mine|fields=hasLocation|where=_pageName="{{PAGENAME}}"|format=map|height=300|width=200}} | |||
|- | |||
! Owners | |||
| {{#invoke:TrimArray|links|{{{isOwnedBy|}}}|alt_forms=Person,Organization}} | |||
|- | |||
! Status | |||
| {{#invoke:Bananas|hello}} | |||
|- | |||
! Infrastucture | |||
| {{#invoke:TrimArray|links|{{{hasInfrastructure}}}|form=Infrastructure}} | |||
|- | |||
! Footprint Value (display_map calling Geojson namespace directly) | |||
| {{#display_map:center=ArcticCordillera | geojson=ArcticCordillera}} | |||
|- | |||
! Value4 | |||
| | |||
|- | |||
!Test header cell | |||
|- | |||
! Value5 | |||
| {{{Community|}}} | |||
|- | |||
! Value6 | |||
| {{{childProject|}}} | |||
|- | |||
! Value7 | |||
| {{{Value7|}}} | |||
|- | |||
! Value8 | |||
| {{{Value8|}}} | |||
|- | |||
! ValueChangedinTemplate | |||
| {{{Value9|}}} | |||
|} | |||
</div> | |||
</div> | |||
<div style="max width: 100%;"> | |||
<h1>Description</h1> | |||
{{{hasDescription|}}} | |||
<h1>Community</h1> | |||
<pre>{{#display_map:71.9693888889,-82.3259722222|geojson=GeoJson:ArcticCordillera|center=71.9693888889,-82.3259722222}}</pre> | |||
{{#display_map:71.9693888889,-82.3259722222|geojson=GeoJson:ArcticCordillera|center=71.9693888889,-82.3259722222}} | |||
(called with var)footprint={{#var:footprint}}location={{#var:location}} | |||
</div> | |||
</div> | |||
(cargo query) | |||
{{#cargo_query:tables=Mine|fields=hasLocation|where=_pageName="{{PAGENAME}}"|format=map|height=300|width=200|defzoom=5}} | |||
(called with var){{#var:location}} | |||
{{#display_map:{{#var:location}}|geojson={{#var:footprint}}|center={{#var:location}}}} | |||
(with location coords) | |||
{{#display_map:71.9693888889,-82.3259722222 }} | |||
[[Category:Mines]] | [[Category:Mines]] | ||
</includeonly> | </includeonly> | ||
Latest revision as of 00:02, 31 October 2025
This is the "Mine" template.
It should be called in the following format:
{{Mine
|hasName==
|hasID==
|hasURL==
|hasAlias==
|hasMineStatus==
|hasInfrastructure==
|hasMineType==
|hasDescription==
|extracts==
|isOwnedBy==
|mines==
|hasFootprint==
|hasLocation==
|isWithinRegion==
|hasProject==
|isPartOfProject==
|isNearCommunity==
|producesWaste==
|isNearEcosystem==
|isWithinEcosystem==
}}
Edit the page to see the template text.
This template defines the table "Mine". View table.