Template:Service: Difference between revisions

From MuHack
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
You can use this in a page to make it part of [[:Category:Services]].
{{#template_params:Physical Location (label=Service Physical Location;property=Service Physical Location)|URI (label=Service URI;property=Service URI)}}

</noinclude><includeonly>{| class="wikitable"
The "Service URI" field in the form expects (comma-separated) tokens in the format: <code>name;uri:port</code> (port is optional).
! Service Physical Location

| [[Service Physical Location::{{{Physical Location|}}}]]
For example, if you input:
* Token 1: <code>Main API;api.example.com:8080</code>
* Token 2: <code>Website;www.example.com:443</code>

The URI section below will render as:
{| class="wikitable" style="width: auto;"
! colspan=2| ''URIs''
|-
|-
| style="vertical-align:top; padding-left: 10px;" | Main API
! Service URI
| api.example.com:8080
| [[Service URI::{{{URI|}}}]]
|-
| style="vertical-align:top; padding-left: 10px;" | Website
| www.example.com:443
|}
|}


Or, using #arraymap for a live example:
[[Category:Services]]
{| class="wikitable" style="width: auto;"
</includeonly>
|- style="background: {{Style|header}}; text-align:center;"
! colspan=2| ''URIs''
{{#arraymap:Main API;api.example.com:8080, Website;www.example.com:443|,|@@item@@|
{{!}}-
{{!}} style="vertical-align:top; padding-left: 10px;" {{!}} {{#explode:@@item@@|;|0}}
{{!}} {{#explode:@@item@@|;|1}}
{{!}}-
}}
|}

</noinclude>
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="float:right; clear:right; width:370px; margin:5px 0 1em 1em; border-collapse:collapse; font-size:95%; empty-cells:hide"
|- style="background: {{Style|header}}; text-align:center;"
! colspan=2| ''Service: [[Service Name::{{PAGENAME}}]]''
|-
|- style="text-align:center;"
{{#if:{{{Picture|}}}|
{{!}} style="vertical-align:top; text-align:center;" colspan="2" {{!}} [[File:{{{Picture|}}}|300px]]
}}
|-
| style="vertical-align:top" | Operational Status
| {{#switch: {{{Operational Status|}}} | Working = style="background: #32CD32; text-align: center" | Functional = style="background: #BFFF00; text-align: center" | Broken = style="background: #FF6347; text-align: center" | Needs: Money = style="background: #FFCD17; text-align: center" | Needs: Parts = style="background: #FFCD17; text-align: center" | Needs: Work = style="background: #FFCD17; text-align: center" | Needs: Upgrades = style="background: #FFCD17; text-align: center" | #default = style="background: #BDBDBD"}} | [[Operational Status::{{{Operational Status|}}}]]
|-
{{#if:{{{Location|}}}|
{{!}} style="vertical-align:top;" {{!}} Location
{{!}} [[Location::{{{Location|}}}]]
}}
|-
{{#if:{{{Contact email|}}}|
{{!}} style="vertical-align:top;" {{!}} Contact
{{!}} [[Service Contact::{{{Contact email|}}}]]
}}
|-
| style="vertical-align:top" | Super Users
| {{#arraymap:{{{Super Users|}}}|,|@|[[Super user::User:@|@]]}}
|-
| style="vertical-align:top" | Owner
| [[Owner::User:{{{Owner|}}}|{{{Owner}}}]]
|-
| style="vertical-align:top" | Last Update
|{{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}
|- style="background: {{Style|header}}; text-align:center;"
! colspan=2| ''URIs''
{{#arraymap:{{{Service URI|}}}|,|@@item@@|
{{!}}-
{{!}} style="vertical-align:top; padding-left: 10px;" {{!}} {{#explode:@@item@@|;|0}}
{{!}} [[Service URI::{{#explode:@@item@@|;|1}}]]
{{!}}-
}}
|}<includeonly>[[Category:Services|{{PAGENAME}}]]</includeonly>

Latest revision as of 14:58, 25 May 2025

You can use this in a page to make it part of Category:Services.

The "Service URI" field in the form expects (comma-separated) tokens in the format: name;uri:port (port is optional).

For example, if you input:

  • Token 1: Main API;api.example.com:8080
  • Token 2: Website;www.example.com:443

The URI section below will render as:

URIs
Main API api.example.com:8080
Website www.example.com:443

Or, using #arraymap for a live example:

URIs
Main API api.example.com:8080
Website www.example.com:443


Service: Service
Operational Status
Super Users
Owner {{{Owner}}}
Last Update 2025-05-25
URIs