Difference between revisions of "Template:ProjectSidebar"

From Pirate Party Belgium
Jump to: navigation, search
(quick fix issue of duplicate entries in categories for translated pages)
(new project sidebar)
Line 1: Line 1:
<includeonly>{{#set: In language={{{lang|en}}} }}{{#vardefine:NA|?}}{| style="width: 275px; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; position:relative; text-align:left;"
+
<includeonly>{| style="width: 300px; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; position:relative; text-align:left;"
! style="text-align: center; background-color: #692D89; color:white;padding:0.3em; font-size:medium;" colspan="2" |[[Has title::{{{projectname|Pirate Project}}}]]
+
! style="text-align: center; background-color: #692D89; color:white;padding:0.3em; font-size:medium;" colspan="2" | [[Has title::{{{title|Pirate Project}}}]]
|-
 
! style="vertical-align: top;" | {{#switch: {{{lang|}}} | fr = Lancé par | Initiated by }}
 
| {{{initiator|{{#var:NA}}}}}
 
 
|-  
 
|-  
! style="vertical-align: top;" | {{#switch: {{{lang|}}} | fr = Collaborateur(s) | Collaborator(s) }}
+
{{#if: {{{workgroup|}}}
| {{#arraymap: {{{collaborators|{{#var:NA}}}}}|,|x|{{#set: Has member=x }}x|<br />}}
+
|
 +
! style="vertical-align: top;" {{!}} {{int:sidebar-workgroup}}
 +
{{!}} {{#arraymap:{{{workgroup}}}|,|x|[[Organized by::x]]|<br />}}
 +
{{!}}- }}
 +
! style="vertical-align: top;" | {{int:sidebar-start-date}}
 +
| {{#if: {{{start|}}} | [[Has start date::{{#time:Y/m/d|{{{start}}} }}|{{#time: D j F Y|{{{start}}}|{{int:language-code}} }}]] | ? }}
 
|-  
 
|-  
! style="vertical-align: top;" | {{#switch: {{{lang|}}} | fr = Résumé | Summary }}
+
{{#if: {{{end|}}}
| {{{summary|{{#var:NA}}}}}
+
| ! style="vertical-align: top;" {{!}} {{int:sidebar-end-date}}
 +
{{!}} [[Has end date::{{#time:Y/m/d|{{{end}}} }}|{{#time: D j F Y|{{{end}}}|{{int:language-code}} }}]]
 +
{{!}}- }}
 +
! style="vertical-align: top;" | {{int:sidebar-contact}}  
 +
| {{#if: {{{contact|}}} | {{#arraymap: {{{contact}}}|,|x|x|<br />}} | ? }}
 
|-
 
|-
! style="vertical-align: top;" | {{#switch: {{{lang|}}} | fr = Objectifs | Goals }}
+
! style="vertical-align: top;" | {{int:sidebar-status}}  
| {{{goals|{{#var:NA}}}}}
+
| {{#if: {{{status|}}}  
|-  
+
   | [[Has status::{{lc:{{{status}}}}}|{{int:sidebar-status-{{lc:{{{status}}}}}}}]]
! style="vertical-align: top;" | {{#switch: {{{lang|}}} | Contact }}  
+
  | ?
| {{#arraymap: {{{contact|{{#var:NA}}}}}|,|x|x|<br />}}
 
|-
 
! style="vertical-align: top;" | {{#switch: {{{lang|}}} | fr = Statut | nl = Staat | Status }}
 
| {{#ifeq: {{{active|}}} | true |
 
   {{#switch: {{{lang|}}} | fr = Actif | nl = Actief | Active }} {{#set: Has status=Active }} |
 
  {{#ifeq: {{{archived|}}} | true |
 
    {{#switch: {{{lang|}}} | fr = Archivé | nl = Gearchiveerd | Archived }} {{#set: Has status=Archived }} |
 
    {{#switch: {{{lang|}}} | fr = Inactif | nl = Inactief | Inactive }} {{#set: Has status=Inactive }}
 
  }}
 
}}
 
|}
 
{{#if: {{{nocat|}}} | |
 
  {{#switch: {{SUBPAGENAME}}
 
  | fr = | nl = | en =
 
  | {{#ifeq: {{{active|}}} | true | [[Category:Active_Projects]] |
 
      {{#ifeq: {{{archived|}}} | true | [[Category:Archived Project]] |  
 
        [[Category:Inactive Project]]
 
      }}
 
    }} [[Category:Project]]
 
 
   }}
 
   }}
}}</includeonly><noinclude>
+
|} {{#if: {{{nocat|}}}
{{ProjectSidebar
+
|
|lang = en
+
| {{#switch: {{{status|}}}
|projectname = Our awesome project
+
  | doing = [[Category:Active_Projects]]
|initiator = An awesome Pirate
+
  | done = [[Category:Archived Project]]
|collaborators = An awesome team
+
  | [[Category:Inactive Project]]
|summary = This is an awesome project to do great things in order to live in a better world
+
  }} [[Category:Project]]
|goals = To take on the world !
+
}}</includeonly><noinclude>{{ProjectSidebar/sandbox
|contact = Some tentacles
+
| title = New ProjectSidebar
|active = true
+
| workgroup = WikiSquad
|nocat = true
+
| start = 2017/03/01
 +
| end = tomorrow
 +
| contact = wiki +at+ pirateparty [point] be
 +
| status = doing
 +
| nocat = true
 
}}
 
}}
 
+
== Usage ==
=== Usage ===
+
  <nowiki>{{ProjectSidebar/sandbox
  <nowiki>
+
| title = New ProjectSidebar
{{ProjectSidebar
+
| workgroup = WikiSquad <!-- optional -->
|lang = en
+
| start = 2017/03/01
|projectname = Our awesome project
+
| end = tomorrow <!-- optional -->
|initiator = An awesome Pirate
+
| contact = wiki +at+ pirateparty [point] be
|collaborators = An awesome team
+
| status = doing <!-- doing / done / abandoned -->
|summary = This is an awesome project to do great things in order to live in a better world
 
|goals = To take on the world !
 
|contact = Some tentacles
 
|active = true
 
|archived = false
 
 
}}</nowiki></noinclude>
 
}}</nowiki></noinclude>

Revision as of 20:11, 18 March 2017

New ProjectSidebar
Workgroup WikiSquad
Start date Wed 1 March 2017
End date Fri 26 April 2024
Contact wiki +at+ pirateparty [point] be
Status In progress

Usage

{{ProjectSidebar/sandbox
| title = New ProjectSidebar
| workgroup = WikiSquad <!-- optional -->
| start = 2017/03/01
| end = tomorrow <!-- optional -->
| contact = wiki +at+ pirateparty [point] be
| status = doing <!-- doing / done / abandoned -->
}}