Difference between revisions of "Template:Project"

From Nottinghack Wiki
Jump to navigation Jump to search
m
m
 
(71 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{| class="wikitable" style="float:right;width:250px;margin-left:10px;margin-bottom:10px;"
 
{| class="wikitable" style="float:right;width:250px;margin-left:10px;margin-bottom:10px;"
|-
+
! colspan="2" style="background-color:#e5eee5; border: 1px solid #244724;" | {{#if:{{{version|}}} | [[{{#titleparts:{{FULLPAGENAME}}|-1}}|{{{name|{{BASEPAGENAME}}}}}]] | {{#if:{{{name|}}}|{{{name}}}|{{SUBPAGENAME}} }} }}
! colspan="2" style="text-align: center;" | {{#if:{{{version|}}} | [[{{#titleparts:{{FULLPAGENAME}}|-1}}|{{{name|{{BASEPAGENAME}}}}}]] | {{{name|{{SUBPAGENAME}} }}} }}
+
  |- {{#if: {{{image|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
{{#if: {{{image|}}}|
+
  | style="display: none;" <!-- Hide row if parameter doesn't exist --> }} colspan="2" style="text-align:center;" {{!}} [[{{{image}}}|border|frameless|{{#ifexpr: {{{imagewidth|220}}}>220 |220|{{{imagewidth|220}}}}}px|center]] {{#if: {{{caption|}}}|''{{{caption}}}''}}  
{{!}}-
+
  |- {{#if:{{{primary|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
{{!}} colspan="2" style="text-align:center;" {{!}}  
+
  ! Primary Contact
{{#if: {{{image|}}}|[[{{{image}}}|{{#ifexpr: {{{imagewidth|220}}}>220 |220|{{{imagewidth|220}}}}}px|frameless|center]]
+
  |{{{primary}}}
{{#if: {{{caption|}}}|''{{{caption}}}''}}}}
+
  |- {{#if:{{{created|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
|
+
  ! Created
}}
+
  |{{{created}}}
{{#if:{{{primary|}}}|
+
  |- {{#if:{{{completeddate|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
{{!}}-
+
  ! Completed
! Primary Contact
+
  |{{{completeddate}}}
{{!}} {{{primary}}}
+
  |- {{#if:{{{dormantdate|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
}}
+
  ! Dormant
{{#if:{{{created|}}}|
+
  |{{{dormantdate}}}
{{!}}-
+
  |- {{#if:{{{version|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
! Created
+
  ! Version
{{!}} {{{created}}}
+
  |{{{version}}}
}}
+
  |- {{#if:{{{members|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
{{#if:{{{version|}}}|
+
  ! Members
{{!}}-
+
  |{{{members}}}
! Version
+
  |- {{#if:{{{manufacturer|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
{{!}} {{{version}}}
+
  ! Manufacturer
}}
+
  | {{{manufacturer}}}
{{#if:{{{members|}}}|
+
  |- {{#if:{{{model|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
{{!}}-
+
  ! Model
! Members
+
  | {{{model}}}
{{!}} {{{members}}}
+
  |- {{#if:{{{location|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
}}
+
  ! Location
{{#if:{{{status|}}}|
+
  | [[{{{location}}}]]
{{!}}-
+
  |- {{#if:{{{repo|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
! Project Status
+
  ! GitHub / Repo
{{!}} {{{status}}}
+
  | {{{repo}}}
}}
+
  |- {{#if:{{{status|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
{{#ifexpr:{{{qrmode|1}}} > 0|
+
  ! Status
{{!}}-
+
  |{{{status}}}
{{!}} colspan="2" style="text-align: center;" {{!}} {{#ifeq:{{{qrmode|1}}}|2|<div style="height: 200px; width: 200px; margin: 0 auto; background: no-repeat 50% 50% #ccc; text-align: center; vertical-align: middle">
+
  |- {{#if:{{{type|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
http://chart.apis.google.com/chart?chs=200x200&cht=qr&chl=http://wiki.nottinghack.org.uk/wiki/{{FULLPAGENAMEE}}&.png
+
  ! Type
</div>}} [http://chart.apis.google.com/chart?chs=200x200&cht=qr&chl=wiki.nottinghack.org.uk/wiki/{{FULLPAGENAMEE}}&.png QR code]}}
+
  |{{#switch:{{lc:{{{type|}}}}}|event=Events|special=Special Project|workshop=Workshop Activity|member=Members Project|infrastructure=Hackspace Infrastructure|#default=Undefined}}
 +
  |- {{#if:{{{livestatus|}}}| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
 +
  ! Live Status
 +
  |{{{livestatus}}}
 +
  |- {{#ifexpr:{{{qrmode|1}}} > 0| | style="display: none;" <!-- Hide row if qrmode <= 0 --> }}
 +
  | colspan="2" style="text-align: center;" | {{#ifeq:{{{qrmode|1}}}|2|<div style="height: 200px; width: 200px; margin: 0 auto; background: no-repeat 50% 50% #ccc; text-align: center; vertical-align: middle">http://chart.apis.google.com/chart?chs=200x200&cht=qr&chl=http://wiki.nottinghack.org.uk/wiki/{{FULLPAGENAMEE}}&.png
 +
</div>}} [http://chart.apis.google.com/chart?chs=200x200&cht=qr&chl=wiki.nottinghack.org.uk/wiki/{{FULLPAGENAMEE}}&.png QR code]
 
|}<!--
 
|}<!--
--><noinclude>
+
--><includeonly><!--
 +
-->{{#if:{{{type|}}}|[[Category:{{#switch:{{lc:{{{type|}}} }}|event=Events|workshop=Workshop|member=Members|infrastructure=Hackspace Infrastructure|special=Special|#default=Undefined}} Projects]] }}<!--Set cat based on type--><!--
 +
-->{{#if:{{{status|}}}|[[Category:Projects ({{#switch:{{lc:{{{status|}}} }}|planning=planning|dormant=dormant|complete=complete|#default=in progress}})]] }}<!--Set cat based on status--><!--
 +
-->{{#switch:{{lc:{{{LookingforCollaborators|}}}}}|yes=[[Category:Looking for Collaborators]]|#default=}}</includeonly><noinclude>
 
{{clear}}
 
{{clear}}
  
Line 48: Line 57:
 
'''Note:''' if ''version'' is set, the project title links to the parent of the page that includes this template.
 
'''Note:''' if ''version'' is set, the project title links to the parent of the page that includes this template.
  
=== Arguments ===
+
===Usage===
 +
 
 +
Inserting the following text at the top of your project page will produce an information box on your page that gives an overview of the project to the reader. All of the arguments are optional and can be written in any order.
 +
 
 +
Images look great with this template, include one if you can!
 +
 
 +
 
 +
<pre>{{Project
 +
|image=
 +
|name=
 +
|primary=
 +
|created=
 +
|completeddate=
 +
|dormantdate=
 +
|version=
 +
|members=
 +
|location=
 +
|repo=
 +
|status=
 +
|type=
 +
|livestatus=
 +
|qrmode=1
 +
|LookingforCollaborators=
 +
}}
 +
</pre>
 +
 
 +
== Arguments ==
 
;image
 
;image
 
:An image, in the format File:<image name>.<ext>. DO NOT include the <nowiki>[[]]</nowiki> brackets otherwise the image will display full size.
 
:An image, in the format File:<image name>.<ext>. DO NOT include the <nowiki>[[]]</nowiki> brackets otherwise the image will display full size.
 +
;caption
 +
:This adds text under the image used for the infobox.
 
;name
 
;name
:Project name override (default: the page name without the '''Project:''' prefix)
+
:Used to override the project name if it is different from the name of the wiki page (default: the page name without the '''Project:''' prefix).
 
;primary
 
;primary
:Primary Contact
+
:Primary contact.
 +
:This is a useful argument where more than one person has worked on the project.
 
;created
 
;created
:Creation date
+
:The creation date of the project, format DD/MM/YYYY. If day of month unknown use 01.
 +
;completeddate
 +
:The date the project was completed, format DD/MM/YYYY. If day of month unknown use 01.
 +
;dormantdate
 +
:The date the project was put on hold or made dormant, format DD/MM/YYYY. If day of month unknown use 01.
 
;version
 
;version
 
:Project version number (e.g. 1).
 
:Project version number (e.g. 1).
 
;members
 
;members
 
:List of members involved. Ideally, use <nowiki>[[User:username|username]]</nowiki> format.
 
:List of members involved. Ideally, use <nowiki>[[User:username|username]]</nowiki> format.
 +
;location
 +
:Where the project lives
 +
;repo
 +
:Source code, files, etc - github or other
 
;status
 
;status
:Project status (e.g. Prototyping)
+
:Project status.
 +
:Please use the following categories: (Planning/Dormant/Complete/In Progress)
 +
;type
 +
:Is the project to benefit Hackspace infrastructure or is it a Members Project?
 +
:Including this will automatically apply the relevant category to your project.
 +
:Please use the following categories: (infrastructure/member/event/workshop/other)
 +
;livestatus
 +
:This can be used for projects that may be dormant or complete but still maintained/ live eg. vending machines
 
;qrmode
 
;qrmode
:(0/1/2) If set to 1 (default), a link to the QR code is displayed. If set to 2, it will display the QR code image on. If set to 0, do not display the QR code link or image.
+
:Please use the following categories: (0/1/2)  
 +
:If set to 1 (default), a link to the QR code is displayed.  
 +
:If set to 2, it will display the QR code image on. If set to 0, do not display the QR code link or image.
 +
;LookingforCollaborators
 +
:Indicates that the project is open to collaboration with other members
 +
===Extended arguments===
 +
;location
 +
:Some projects are installed, such as the [[Vending_Machine/Westomatic]].
 +
;manufacturer
 +
:Some projects have associated manufacturers (for example, [[Vending_Machine/Westomatic]]).
 +
;model
 +
:Some projects have associated models (for example, [[Vending_Machine/Westomatic]]).
  
===Source===
+
==Source==
Thanks to London Hackspace for this template ([https://wiki.london.hackspace.org.uk/view/Template:Project Template:Project on London Hackspace wiki]).
+
Thanks to London Hackspace for the original version of this template ([https://wiki.london.hackspace.org.uk/view/Template:Project Template:Project on London Hackspace wiki]).
  
 
[[Category:Templates infoboxes]]
 
[[Category:Templates infoboxes]]
 
</noinclude>
 
</noinclude>

Latest revision as of 21:41, 15 February 2024

Project
[[{{{image}}}|border|frameless|220px|center]]
Primary Contact {{{primary}}}
Created {{{created}}}
Completed {{{completeddate}}}
Dormant {{{dormantdate}}}
Version {{{version}}}
Members {{{members}}}
Manufacturer {{{manufacturer}}}
Model {{{model}}}
Location [[{{{location}}}]]
GitHub / Repo {{{repo}}}
Status {{{status}}}
Type Undefined
Live Status {{{livestatus}}}
QR code

Documentation

All arguments are optional. The default state of the template with no arguments is shown at the top of this page.

Note: if version is set, the project title links to the parent of the page that includes this template.

Usage

Inserting the following text at the top of your project page will produce an information box on your page that gives an overview of the project to the reader. All of the arguments are optional and can be written in any order.

Images look great with this template, include one if you can!


{{Project
|image=
|name=
|primary=
|created=
|completeddate=
|dormantdate=
|version=
|members=
|location=
|repo=
|status=
|type=
|livestatus=
|qrmode=1
|LookingforCollaborators=
}}

Arguments

image
An image, in the format File:<image name>.<ext>. DO NOT include the [[]] brackets otherwise the image will display full size.
caption
This adds text under the image used for the infobox.
name
Used to override the project name if it is different from the name of the wiki page (default: the page name without the Project: prefix).
primary
Primary contact.
This is a useful argument where more than one person has worked on the project.
created
The creation date of the project, format DD/MM/YYYY. If day of month unknown use 01.
completeddate
The date the project was completed, format DD/MM/YYYY. If day of month unknown use 01.
dormantdate
The date the project was put on hold or made dormant, format DD/MM/YYYY. If day of month unknown use 01.
version
Project version number (e.g. 1).
members
List of members involved. Ideally, use [[User:username|username]] format.
location
Where the project lives
repo
Source code, files, etc - github or other
status
Project status.
Please use the following categories: (Planning/Dormant/Complete/In Progress)
type
Is the project to benefit Hackspace infrastructure or is it a Members Project?
Including this will automatically apply the relevant category to your project.
Please use the following categories: (infrastructure/member/event/workshop/other)
livestatus
This can be used for projects that may be dormant or complete but still maintained/ live eg. vending machines
qrmode
Please use the following categories: (0/1/2)
If set to 1 (default), a link to the QR code is displayed.
If set to 2, it will display the QR code image on. If set to 0, do not display the QR code link or image.
LookingforCollaborators
Indicates that the project is open to collaboration with other members

Extended arguments

location
Some projects are installed, such as the Vending_Machine/Westomatic.
manufacturer
Some projects have associated manufacturers (for example, Vending_Machine/Westomatic).
model
Some projects have associated models (for example, Vending_Machine/Westomatic).

Source

Thanks to London Hackspace for the original version of this template (Template:Project on London Hackspace wiki).