Difference between revisions of "Template:Tool"

From Nottinghack Wiki
Jump to navigation Jump to search
(grey header and (defunct) text if defunct)
m (css row hiding)
Line 1: Line 1:
 
{| 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 -->
 
{| 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" {{#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) }}<!--
+
! 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: {{{caption|}}}|''{{{caption}}}''}}
+
  |- {{#if:{{{manufacturer|}}} | | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
}}<!--
 
-->{{#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}}}
+
   | {{{location}}}
}}<!--
+
  |-
-->
+
  ! Team
|-
+
  | {{#if: {{{team|}}}|[[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}}}
+
   | {{{induction}}}
}}<!--
+
  |-{{#ifeq: {{{defunct|}}}|yes| | style="display: none;" <!-- Hide row if parameter doesn't exist --> }}
-->{{#ifeq: {{{defunct|}}}|yes|<br /><!-- conditional row -->
 
  {{!}}-
 
 
   ! 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; [[:Category:Tools and Equipment|all pages]] • [[Tools/We Have|list]] &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]] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [[Template:Tool |{{}}]]</small>
 
|}{{#switch:{{lc:{{{defunct|}}}}}|yes=[[Category:Tools and Equipment (Defunct)]]|#default=[[Category:Tools and Equipment]]}}<noinclude>
 
|}{{#switch:{{lc:{{{defunct|}}}}}|yes=[[Category:Tools and Equipment (Defunct)]]|#default=[[Category:Tools and Equipment]]}}<noinclude>
 
{{clear}}
 
{{clear}}
 +
 
== Documentation ==
 
== Documentation ==
  

Revision as of 10:45, 22 February 2019

Tool
[[{{{image}}}|border|frameless|220px|center]]

}}

Manufacturer {{{manufacturer}}}
Model {{{model}}}
Obtained {{{obtained}}}
Location {{{location}}}
Team Tools
Induction Required {{{induction}}}
Status Defunct
Tools:   all pageslist             {{}}

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=
|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.
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.
induction
Whether or not an induction is required to use the tool. If required use 'induction=yes'.
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.