Difference between revisions of "Template:Tool"

From Nottinghack Wiki
Jump to navigation Jump to search
(→‎Arguments: expanddocu)
(• [[)
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{| class="wikitable" style="float:right; width:300px; margin-left:10px; margin-bottom:10px;"
+
{| class="wikitable" {{#ifeq: {{{defunct}}}|yes|style="float:right; width:300px; margin-left:10px; margin-bottom:10px; color: DarkSlateGray;"|style="float:right; width:300px; margin-left:10px; margin-bottom:10px;" }} <!-- make text grey if defunct -->
! colspan="2" style="background-color:#195905; color:#ffffff; text-align: center; border: 1px solid #244724;" | {{{name|{{SUBPAGENAME}}}}}<!--
+
! colspan="2" {{#ifeq: {{{defunct}}}|yes|style="background-color:DarkSlateGray; color:#ffffff; text-align: center; border: 1px solid #244724;"|style="background-color:#195905; color:#ffffff; text-align: center; border: 1px solid #244724;" }} | {{{name|{{SUBPAGENAME}}}}} {{#ifeq: {{{defunct}}}|yes|&nbsp;(defunct) }}
-->{{#if: {{{image|}}}|<br /><!-- conditional row -->
+
  |- {{#if: {{{image|}}}| | style="display: none;" }}
  {{!}}-
+
   | colspan="2" style="text-align:center;" | [[{{{image}}}|border|frameless|{{#ifexpr: {{{imagewidth|220}}}>220 |220|{{{imagewidth|220}}}}}px|center]]{{#if: {{{caption|}}}|''{{{caption}}}''}}
   {{!}} colspan="2" style="text-align:center;" {{!}} [[{{{image}}}|border|frameless|{{#ifexpr: {{{imagewidth|220}}}>220 |220|{{{imagewidth|220}}}}}px|center]]<!--
+
  |- {{#if:{{{manufacturer|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
-->{{#if: {{{caption|}}}|''{{{caption}}}''}}
 
}}<!--
 
-->{{#if:{{{manufacturer|}}}|<br /><!-- conditional row -->
 
  {{!}}-
 
 
   ! Manufacturer
 
   ! Manufacturer
   {{!}} {{{manufacturer}}}
+
   | {{{manufacturer}}}
}}<!--
+
  |- {{#if:{{{model|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
-->{{#if:{{{model|}}}|<br /><!-- conditional row -->
 
  {{!}}-
 
 
   ! Model
 
   ! Model
   {{!}} {{{model}}}
+
   | {{{model}}}
}}<!--
+
  |- {{#if:{{{obtained|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
-->{{#if:{{{obtained|}}}|<br /><!-- conditional row -->
 
  {{!}}-
 
 
   ! Obtained
 
   ! Obtained
   {{!}} {{{obtained}}} {{#if: {{{obtaineddate|}}}|<small>'' ({{{obtaineddate|}}})''</small> }}
+
   | {{{obtained}}} {{#if: {{{obtaineddate|}}}|<small>'' ({{{obtaineddate|}}})''</small> }}
}}<!--
+
  |- {{#if:{{{location|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
-->{{#if:{{{location|}}}|<br /><!-- conditional row -->
 
  {{!}}-
 
 
   ! Location
 
   ! Location
   {{!}} {{{location}}}
+
   | {{#ifeq: {{{team}}}|noteam|{{{location}}}| [[{{{location}}}]] }}
}}<!--
+
  |-
-->
+
  ! Team
|-
+
  | {{#if: {{{team|}}}|{{#ifeq: {{{team}}}|noteam|Not maintained by space.|[[Team:{{{team|}}}|{{{team|}}}]] }} |[[Team:Tools|Tools]] }}
! Team
+
  |- {{#if:{{{induction|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
| {{#if: {{{team|}}}|[[Team:{{{team|}}}|{{{team|}}}]]|[[Team:Tools|Tools]] }} <!--
 
-->{{#if:{{{induction|}}}|<br /><!-- conditional row -->
 
  {{!}}-
 
 
   ! Induction Required
 
   ! Induction Required
   {{!}} {{{induction}}}
+
   | {{#switch:{{lc:{{{induction|}}} }} |yes=Yes <small>(use [https://docs.google.com/forms/d/11Cn8Y4vmnWjj7TVxJYkPtvR0fjt5seOK-RPwSN4DbQA/viewform?edit_requested=true request form])</small>|no=No|#default={{{induction}}} }}
}}<!--
+
  |- {{#if:{{{booking|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
-->{{#ifeq: {{{defunct|}}}|yes|<br /><!-- conditional row -->
+
  ! Booking
  {{!}}-
+
  | {{#switch:{{lc:{{{booking}}} }}|yes=Yes <small>(use [https://hms.nottinghack.org.uk/tools HMS])</small>|no=No|#default={{{booking}}} }}
 +
  |- {{#ifeq: {{{defunct|}}}|yes| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
 
   ! Status
 
   ! Status
   {{!}} Defunct {{#if: {{{defunctdate|}}}|<small>'' ({{{defunctdate|}}})''</small> }}
+
   | Defunct {{#if: {{{defunctdate|}}}|<small>'' ({{{defunctdate|}}})''</small> }}
}}<!--
 
-->
 
 
|-
 
|-
| colspan="2" style="text-align: center; border: 1px solid #244724; "|<small> '''Tools:''' &nbsp; [[Tools/We Have|list]] • [[:Category:Tools and Equipment|all pages]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [[Template:Tool |{{}}]]</small>
+
| colspan="2" style="text-align: center; border: 1px solid #244724; "|<small> '''Tools:''' &nbsp; [[:Category:Tools and Equipment|all pages]] • [[Tools/We Have|list]] • [[Tools/We Have/Power Tools|Power Tools]] • [[Broken tools]] &nbsp; &nbsp; [[Template:Tool|{{}}]]</small>
|}{{#switch:{{lc:{{{defunct|}}}}}|yes=[[Category:Tools and Equipment (Defunct)]]|#default=[[Category:Tools and Equipment]]}}<noinclude>
+
|}
 +
<includeonly>{{#switch:{{lc:{{{defunct|}}}}}|yes=[[Category:Tools and Equipment (Defunct)]]|#default=[[Category:Tools and Equipment]]
 +
{{#if:{{{team|}}}|{{#ifeq:{{{team}}}|noteam||[[Category:Responsibility of Team:{{{team|}}}]]}}|[[Category:Responsibility of Team:Tools]]}}}}
 +
{{#if:{{{location|}}}|{{#ifeq: {{{team}}}|noteam||[[Category:Tools and Equipment in {{{location}}}]]}} }}
 +
{{#if:{{{induction|}}}|{{#ifeq:{{lc:{{{induction|}}} }} |yes|[[Category:Tools and Equipment requiring Induction]]}}}}</includeonly><noinclude>
 
{{clear}}
 
{{clear}}
 +
 
== Documentation ==
 
== Documentation ==
  
Line 61: Line 52:
 
|manufacturer=
 
|manufacturer=
 
|model=
 
|model=
|obtained=
+
|obtained=<!-- pledge drive/donated/purchased etc. -->
 
|obtaineddate=
 
|obtaineddate=
 
|location=
 
|location=
 
|team=
 
|team=
 
|induction=
 
|induction=
 +
|defunct=
 +
|defunctdate=
 
}}
 
}}
 
</pre>
 
</pre>
 
  
 
=== Arguments ===
 
=== Arguments ===
Line 83: Line 75:
 
:Date obtained, use format DD/MM/YYYY. If day or month is unknown use 01.
 
:Date obtained, use format DD/MM/YYYY. If day or month is unknown use 01.
 
;location
 
;location
:Where the tool is located in the space.
+
:Where the tool is located in the space. A list of locations is available here: [[:category:Location]]
 +
{{note|If the tool has been removed from the space or is located elsewhere, leave the location blank.}}
 
;team
 
;team
:Team responsible for looking after tool or equipment. Defaults to 'Tools'. Use name of team only without the 'Team:' prefix or double square brackets. For example, for [[Team:Laser]] use use 'team=Laser'. See [[:category:Teams]] for Team names.
+
:Team responsible for looking after tool or equipment. Defaults to 'Tools'. Use name of team only without the 'Team:' prefix or double square brackets. For example, for [[Team:Laser]] use use 'team=Laser'. See [[:category:Teams]] for Team names. For tools not maintained by the space use team=noteam (for example, [[Risograph GR3750]]). Noteam also stops location automatically being a wikilink and automatic categorisation by location.
 
;induction
 
;induction
:Whether or not an induction is required to use the tool. If required use 'induction=yes'.
+
:Whether or not an induction is required to use the tool. If required use 'induction=yes' - adds link to induction request form
 +
;booking
 +
:Whether or not booking is required to use the tool. If required use 'booking=yes' - adds link to booking in HMS
 
;defunct
 
;defunct
 
:If the tool no longer works and/or no longer at the space use 'defunct=yes'
 
:If the tool no longer works and/or no longer at the space use 'defunct=yes'
 
;defunctdate
 
;defunctdate
 
:Date defunct use format DD/MM/YYYY. If day or month is unknown use 01.
 
:Date defunct use format DD/MM/YYYY. If day or month is unknown use 01.
 
+
 
[[Category:Templates infoboxes]]
 
[[Category:Templates infoboxes]]
 
</noinclude>
 
</noinclude>

Revision as of 20:40, 11 September 2019

Tool
[[{{{image}}}|border|frameless|220px|center]]
Manufacturer {{{manufacturer}}}
Model {{{model}}}
Obtained {{{obtained}}}
Location [[{{{location}}}]]
Team Tools
Induction Required {{{induction}}}
Booking {{{booking}}}
Status Defunct
Tools:   all pageslistPower ToolsBroken tools     {{}}

Documentation

All arguments are optional, but you should have at least 1 (ideally more). Don't worry about the way it looks on this page: that's purely because no arguments are specified.

Usage

Inserting the following text at the top of the tool page will produce an information box on your page that gives an overview of the tool. Arguments can be written in any order.

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

Abbreviated parameter list:

{{Tool
|image=
|manufacturer=
|model=
|obtained=<!-- pledge drive/donated/purchased etc. -->
|obtaineddate=
|location=
|team=
|induction=
|defunct=
|defunctdate=
}}

Arguments

image
An image, in the format File:<image name>.<ext>. DO NOT include the [[]] brackets otherwise the image will display full size.
manufacturer
The name of the maker of the tool
model
The model number of the tool. Please be as exact as possible.
obtained
How the tool was obtained (i.e. pledge drive, donation, etc)
obtaineddate
Date obtained, use format DD/MM/YYYY. If day or month is unknown use 01.
location
Where the tool is located in the space. A list of locations is available here: category:Location
Note Note: If the tool has been removed from the space or is located elsewhere, leave the location blank.
team
Team responsible for looking after tool or equipment. Defaults to 'Tools'. Use name of team only without the 'Team:' prefix or double square brackets. For example, for Team:Laser use use 'team=Laser'. See category:Teams for Team names. For tools not maintained by the space use team=noteam (for example, Risograph GR3750). Noteam also stops location automatically being a wikilink and automatic categorisation by location.
induction
Whether or not an induction is required to use the tool. If required use 'induction=yes' - adds link to induction request form
booking
Whether or not booking is required to use the tool. If required use 'booking=yes' - adds link to booking in HMS
defunct
If the tool no longer works and/or no longer at the space use 'defunct=yes'
defunctdate
Date defunct use format DD/MM/YYYY. If day or month is unknown use 01.