Difference between revisions of "Template:Generate concept formlinks from SMW import page"

From TDWG Terms Wiki
Jump to: navigation, search
m (output delimiter arraymap)
m (no red links)
Line 31: Line 31:
 
     -->{{#vardefine: thisHasType|{{#ask: [[{{#var: thisFullPageName}}]] | mainlabel=-|link=none|?Has type#=|format=list}}}}<!--  
 
     -->{{#vardefine: thisHasType|{{#ask: [[{{#var: thisFullPageName}}]] | mainlabel=-|link=none|?Has type#=|format=list}}}}<!--  
  
    page link always
 
  -->[[{{#var: thisFullPageName}}|{{#var: thisVocabNoPrefix}}]]&#32;<!--
 
 
 
 
     check Has type (create a warning if mismatch) and existance (use different icons)
 
     check Has type (create a warning if mismatch) and existance (use different icons)
 
   -->{{#ifexist: {{#var: thisFullPageName}}<!--
 
   -->{{#ifexist: {{#var: thisFullPageName}}<!--
 
      
 
      
   then-->|{{#formlink:  
+
   then-->|[[{{#var: thisFullPageName}}|{{#var: thisVocabNoPrefix}}]]&#32;{{#formlink:  
 
     form=Property setting<!--   
 
     form=Property setting<!--   
 
     -->|link text=[[File:Pencil.png|x16px|link=]]<!--   
 
     -->|link text=[[File:Pencil.png|x16px|link=]]<!--   
Line 51: Line 48:
 
     -->{{#ifeq: {{#var: thisHasType}}|{{#var: thisHasTypeImport}}|<!-- then-->|<!-- else-->{{#info: message=“Type:{{#var: thisHasTypeImport}}” on import page [[MediaWiki:Smw_import_{{{ns prefix|}}}]] does not match “Has type:{{#var: thisHasType}}” on page “{{#var: thisFullPageName}}”!}}}}<!--
 
     -->{{#ifeq: {{#var: thisHasType}}|{{#var: thisHasTypeImport}}|<!-- then-->|<!-- else-->{{#info: message=“Type:{{#var: thisHasTypeImport}}” on import page [[MediaWiki:Smw_import_{{{ns prefix|}}}]] does not match “Has type:{{#var: thisHasType}}” on page “{{#var: thisFullPageName}}”!}}}}<!--
 
      
 
      
   else-->|{{#formlink:  
+
   else-->|{{#var: thisVocabNoPrefix}}&#32;{{#formlink:  
 
     form=Property setting<!--   
 
     form=Property setting<!--   
 
     -->|link text=[[File:Pencil add.png|x16px|link=]]<!--   
 
     -->|link text=[[File:Pencil add.png|x16px|link=]]<!--   
Line 71: Line 68:
 
      
 
      
 
     --><span title="A class">[[File:Folder-silk.png|link=]]</span>&nbsp;<!--
 
     --><span title="A class">[[File:Folder-silk.png|link=]]</span>&nbsp;<!--
    -->[[:{{#var: thisFullPageName}}|{{#var: thisVocabNoPrefix}}]]&#32;<!--
 
 
      
 
      
 
     -->{{#ifexist: {{#var: thisFullPageName}}<!--
 
     -->{{#ifexist: {{#var: thisFullPageName}}<!--
   then-->|{{#formlink:  
+
   then-->|[[:{{#var: thisFullPageName}}|{{#var: thisVocabNoPrefix}}]]&#32;{{#formlink:  
 
     form=Concept collection<!--   
 
     form=Concept collection<!--   
 
     -->|link text=[[File:Pencil.png|x16px|link=]]<!--   
 
     -->|link text=[[File:Pencil.png|x16px|link=]]<!--   
Line 83: Line 79:
 
     -->|tooltip=Edit this {{lc:{{ns:category}}}} page<!--   
 
     -->|tooltip=Edit this {{lc:{{ns:category}}}} page<!--   
 
     -->}}<!--
 
     -->}}<!--
   else-->|{{#formlink:  
+
   else-->|{{#var: thisVocabNoPrefix}}&#32;{{#formlink:  
 
     form=Concept collection<!--   
 
     form=Concept collection<!--   
 
     -->|link text=[[File:Pencil add.png|x16px|link=]]<!--   
 
     -->|link text=[[File:Pencil add.png|x16px|link=]]<!--   

Revision as of 13:10, 26 September 2012

[edit] [purge] Template-info.svg Template documentation

Template “Generate concept formlinks from SMW import page” generates a list of formlinks based on a “MediaWiki:Smw_import-ns-prefix”-page

Usage

This template has the following parameter:

{{Generate concept formlinks from SMW import page
|ns prefix=    e.g. "dwc" or "rdf" etc.
|title=        optional title of the target page
|query string= form_name[field]=value&form_name[field2]=value3 “form_name” must be given, it will be replaced by an appropriate form
}}

Technical documentation

Dependencies: