Template:CrewSidebar: Difference between revisions

From Pirate Party Belgium
Jump to navigation Jump to search
(arraymap function to replace "," with new lines in the "social networks" argument)
(merge templates)
Line 1: Line 1:
<includeonly>{| class="toccolours vatop" cellpadding="1" cellspacing="1" style="float:right; clear:right; width:150px; padding:0px; margin:0px 0px 1em 1em; font-size:85%; text-align:center;"
<includeonly>{{#vardefine:NA| {{#ifeq: {{{lang|}}} | fr | Non assigné | {{#ifeq: {{{lang|}}} | nl | | Not assigned }} }} }}{{#vardefine:TBD| {{#ifeq: {{{lang|}}} | fr | À définir | {{#ifeq: {{{lang|}}} | nl | | To be defined }} }} }}{| class="toccolours vatop" cellpadding="1" cellspacing="1" style="float:right; clear:right; width:150px; padding:0px; margin:0px 0px 1em 1em; font-size:85%; text-align:center;"
! colspan=2 bgcolor=#692D89 |<center><font color="white">'''{{{crewname|PiratenPartij}}}'''</font></center>
! colspan=2 bgcolor=#692E89 |<center><font color="white">'''{{{crewname|Pirate Party}}}'''</font></center>
{{{flag|}}}
|-
|-
!  colspan=2 bgcolor=gainsboro |<center>'''Locatie'''</center>
!  colspan=2 bgcolor=gainsboro |'''{{#ifeq: {{{lang|}}} | fr | Lieu | {{#ifeq: {{{lang|}}} | nl | Locatie | Location }} }}'''
|-
|-
|{{{place|Not assigned}}}
|{{{place| {{#var:NA}} }}}
|-
|-
|{{{street|}}} {{{number|}}}
|{{{street|}}} {{{number|}}}
Line 10: Line 11:
|{{{postalcode|}}} {{{city|}}}
|{{{postalcode|}}} {{{city|}}}
|-  
|-  
| colspan=2 bgcolor=gainsboro |<div style="text-align: center;">'''Leden'''</div>
| colspan=2 bgcolor=gainsboro |'''{{#ifeq: {{{lang|}}} | fr | Membres | {{#ifeq: {{{lang|}}} | nl | Leden | Members }} }}'''
|-  
|-  
|  
|  
{{#arraymap:{{{members|Not assigned}}}|,|x|x|<br />}}
{{#arraymap:{{{members|Not assigned}}}|,|x|x|<br />}}
|-  
|-  
| colspan=2 bgcolor=gainsboro |<div style="text-align: center;">'''Kapitein'''</div>
| colspan=2 bgcolor=gainsboro |'''{{#ifeq: {{{lang|}}} | fr | Capitaine | {{#ifeq: {{{lang|}}} | nl | Kapitein | Captain }} }}'''
|-  
|-  
| {{{captain|Not assigned}}}
| {{{captain|Not assigned}}}
|-  
|-  
!  colspan=2 bgcolor=gainsboro |<center>'''Navigator'''</center>
!  colspan=2 bgcolor=gainsboro |'''{{#ifeq: {{{lang|}}} | fr | Navigateur | {{#ifeq: {{{lang|}}} | nl | Navigator | Navigator }} }}'''
|-  
|-  
| {{{navigator|Not assigned}}}
| {{{navigator|Not assigned}}}
|-
|-
!  colspan=2 bgcolor=gainsboro |<center>'''Treasure Keeper'''</center>
!  colspan=2 bgcolor=gainsboro |'''{{#ifeq: {{{lang|}}} | fr | Trésorier | {{#ifeq: {{{lang|}}} | nl | | Treasure Keeper }} }}'''
|-  
|-  
| {{{treasurekeeper|Non assigné}}}
| {{{treasurekeeper|Not assigned}}}
{{#if: {{{socialnetworks|}}} |  
{{#if: {{{socialnetworks|}}} |  
{{!}}-
{{!}}-
!  colspan=2 bgcolor=gainsboro {{!}}<center>'''Social Networks'''</center>
!  colspan=2 bgcolor=gainsboro {{!}}'''{{#ifeq: {{{lang|}}} | fr | Réseaux sociaux | {{#ifeq: {{{lang|}}} | nl | Sociale Netwerken | Social Networks }} }}'''
{{!}}-  
{{!}}-  
{{!}}  
{{!}}  
Line 34: Line 35:
}}
}}
|-
|-
|  colspan=2 bgcolor=gainsboro |<center>'''Staat'''</center>
|  colspan=2 bgcolor=gainsboro |'''{{#ifeq: {{{lang|}}} | fr | Statut | {{#ifeq: {{{lang|}}} | nl | Staat | Status }} }}'''
|-  
|-  
| {{#ifeq: {{{active|false}}} | true | Actief | Inactief }}
| {{#ifeq: {{{active|}}} | true |
    {{#ifeq: {{{lang|}}} | fr | Actif | {{#ifeq: {{{lang|}}} | nl | Actief | Active }} }} |
    {{#ifeq: {{{lang|}}} | fr | Inactif | {{#ifeq: {{{lang|}}} | nl | Inactief | Inactive }} }}
  }}
|}
|}
{{#if: {{{nocat|}}} | |  
{{#if: {{{nocat|}}} | |  
   {{#ifeq: {{{active|false}}} | true | [[Category:Active_Crews]] | [[Category:Inactive_Crew]] }}  
   {{#ifeq: {{{active|}}} | true | [[Category:Active_Crews]] | [[Category:Inactive_Crew]] }}  
   [[Category:Crew]]  
   [[Category:Crew]]  
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{CrewSidebar
{{CrewSidebar
|lang = en
|crewname = An awesome crew
|crewname = An awesome crew
|place = An awesome location
|place = Flying Dutchman
|street = Ocean street
|street = Treasure Island
|number = 42
|number = 666
|postalcode = 9000
|postalcode = 9000
|city = Atlantica
|city = Atlantica
|members = Pierre, Paul, Jacques
|members = Jack, Pieter, Mary
|captain = Luffy
|captain = Edward Teach
|navigator = Nami
|navigator = Mr. Smee
|treasurekeeper = Coco the parrot
|treasurekeeper = Coco the parrot
|socialnetworks= Link Diaspora, Facebook, Twitter, ...
|socialnetworks= Link Diaspora, Facebook, Twitter, ...
Line 57: Line 62:
|nocat = true
|nocat = true
}}
}}
{| class="wikitable"
|+ Parameters
|--
! parameter
! description
|--
| lang
| en, fr or nl
| crewname
|
|--
| place
| Meeting place.
|--
| street
|
|--
| number
| Street number.
|--
| postalcode
|
|--
| city
|
|--
| captain
|
|--
| treasurekeeper
|
|--
| socialnetworks
| Links to social media.
|--
| active
| true or false
|}


=== Usage ===
=== Usage ===
  <nowiki>
  <nowiki>
{{CrewSidebar
{{CrewSidebar
|lang = en
|crewname = An awesome crew
|crewname = An awesome crew
|place = An awesome location
|place = Flying Dutchman
|street = Ocean street
|street = Treasure Island
|number = 42
|number = 666
|postalcode = 9000
|postalcode = 9000
|city = Atlantica
|city = Atlantica
|members = Pierre, Paul, Jacques
|members = Jack, Pieter, Mary
|captain = Black Beard
|captain = Edward Teach
|navigator = Nami
|navigator = Mr. Smee
|treasurekeeper = Coco the parrot
|treasurekeeper = Coco the parrot
|socialnetworks= Link Diaspora, Facebook, Twitter, ...
|socialnetworks= Link Diaspora, Facebook, Twitter, ...
|active = true
|active = true
}}</nowiki></noinclude>
}}</nowiki>

Revision as of 11:26, 12 November 2016

An awesome crew
Location
Flying Dutchman
Treasure Island 666
9000 Atlantica
Members

Jack
Pieter
Mary

Captain
Edward Teach
Navigator
Mr. Smee
Treasure Keeper
Coco the parrot
Social Networks

Link Diaspora
Facebook
Twitter
...

Status
Active


Parameters
parameter description
lang en, fr or nl crewname
place Meeting place.
street
number Street number.
postalcode
city
captain
treasurekeeper
socialnetworks Links to social media.
active true or false

Usage

{{CrewSidebar
|lang = en
|crewname = An awesome crew
|place = Flying Dutchman 
|street = Treasure Island
|number = 666
|postalcode = 9000
|city = Atlantica
|members = Jack, Pieter, Mary
|captain = Edward Teach
|navigator = Mr. Smee
|treasurekeeper = Coco the parrot
|socialnetworks= Link Diaspora, Facebook, Twitter, ...
|active = true
}}