Jump to content

Template:Printer: Difference between revisions

From Swarthmore Knowledge Base
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<includeonly>{| class="wikitable"
{{#template_params:Department (property=Department)|Location (property=Location)|Queue Name (property=Queue Name)|Printer Model (property=Printer Model)|Access (list;property=Access)|Print Release Station (property=Print Release Station)}}
 
This template defines a printer. It stores data in Semantic MediaWiki and automatically categorizes the page based on the Access field.
</noinclude><includeonly>{| class="wikitable"
! Department
! Department
| [[Department::{{{Department|}}}]]
| [[Department::{{{Department|}}}]]
Line 24: Line 20:
{{#arraymap:{{{Access|}}}|,|@@@|
{{#arraymap:{{{Access|}}}|,|@@@|
   {{#switch:@@@
   {{#switch:@@@
     | Employees     = [[Category:FacStaff Printer]]
     | Employees = [[Category:FacStaff Printer]]
     | Students   = [[Category:Student Printer]]
     | Students = [[Category:Student Printer]]
   }}
   }}
|}}
|}}
<!-- Conditional printing instructions -->
[[Category:NoFS]]
{{#if: {{#pos:{{{Printer Model|}}}|Dymo}}
{{#invoke:PrinterInstructionsLookup|getInstructions}}</includeonly>
  | {{Printing Instructions for Dymo LabelWriter}}
  |
}}{{#arraymap:{{{Access|}}}|,|@@@|
  {{#switch:@@@
    | Employees =
        {{#if: {{#pos:{{{Printer Model|}}}|Canon}}|{{Printing Instructions for Employees - Canon}}|}}{{#if: {{#pos:{{{Printer Model|}}}|HP}}|{{Printing Instructions for Employees - HP}}|}}
    | Students =
        {{#if: {{#pos:{{{Printer Model|}}}|Canon}}|{{Printing Instructions for Students- Canon}}|}}{{#if: {{#pos:{{{Printer Model|}}}|HP}}|{{Printing Instructions for Students - HP}}|}}
  }}
|}}
</includeonly>
<noinclude>
<templatedata>
{
"params": {
"Department": {
"type": "string",
"required": true
},
"Location": {
"type": "string",
"suggested": true
},
"Queue Name": {
"type": "string",
"label": "Print Queue Name"
},
"Printer Model": {
"type": "string"
},
"Access": {
"type": "string",
"description": "Who is allowed to use this printer?",
"suggestedvalues": [
"Students",
"Employees"
]
},
"Print Release Station": {
"type": "boolean",
"label": "Has Print Release?",
"description": "Does this printer have a print release station?",
"example": "Yes"
}
},
"description": "Template for managing printer infrastructure data."
}
</templatedata>
</noinclude>

Latest revision as of 21:36, 22 July 2026