Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (tweak - no nested if)
m (tweaking)
Line 12: Line 12:
</noinclude>
</noinclude>


{| cellpadding="2" cellspacing="0" style="float:right; border:1px solid #aaa; font-size:small; background:#f9f9f9; width:15em; margin:5px 0px 5px 5px;"
{| cellpadding="0" cellspacing="0" style="float:right; border:1px solid #aaa; font-size:small; background:#f9f9f9; width:15em; margin:5px 0px 5px 5px;"


|-
|-
| colspan="2" style="font-size:large; text-align:center; background:#6bbe45; color:white" | '''{{{component|{{PAGENAME}}}}}'''<span style="font-size:small;"><br>[[:Category:{{{type|activity}}}|({{{type|activity}}})]]</span> <!--
| colspan="2" style="font-size:large; text-align:center; background:#6bbe45; color:white; " | '''{{{component|{{PAGENAME}}}}}'''<span style="font-size:small;"><br>[[:Category:{{{type|activity}}}|({{{type|activity}}})]]</span> <!-- IF icon -->{{ #if: {{{icon|}}}<!-- THEN icon -->|<nowiki />
IF icon -->
{{ #if: {{{icon|}}} |
{{!}}-
{{!}}-
{{!}} colspan="2" style="valign:middle; padding:5px"{{!}} [[Image:{{{icon}}}|center]]
{{!}} colspan="2" style="valign:middle; padding:5px"{{!}} [[Image:{{{icon}}}|center]]<!-- ELSE icon -->|}}<!--
ENDIF icon --><!--
| <!-- ELSE icon -->
}} <!-- ENDIF icon --> <!--
IF source -->{{ #if: {{{source|}}}<!-- THEN source -->|<nowiki /><!--
IF status -->
IF status -->{{ #if: {{{status|}}}<!-- THEN status -->|<nowiki />
{{ #if: {{{status|}}} |
{{!}}-
{{!}}-
{{!}} style="text-align:right;" {{!}} '''Status:'''
{{!}} style="text-align:right;" {{!}} '''Status:'''
{{!}} style="text-align:left;" {{!}} {{{status}}}
{{!}} style="text-align:left;" {{!}} {{{status}}}<!-- ELSE status -->|}}<!--
| <!-- ELSE status -->
ENDIF status --><!--
IF build -->{{ #if: {{{build|}}}<!-- THEN build -->|<nowiki />
}} <!-- ENDIF status --> <!--
IF build --> {{ #if: {{{build|}}} |
{{!}}-
{{!}}-
{{!}} style="text-align:right;" {{!}} '''Build:'''
{{!}} style="text-align:right;" {{!}} '''Build:'''
{{!}} style="text-align:left;" {{!}} {{{build}}}
{{!}} style="text-align:left;" {{!}} {{{build}}}<!-- ELSE build -->|}}<!--
| <!-- ELSE build -->
ENDIF build --><!--
IF source -->{{ #if: {{{source|}}}<!-- THEN source -->|<nowiki />
}} <!-- ENDIF build --> <!--
IF source --> {{ #if: {{{source|}}} |
{{!}}-
{{!}}-
{{!}} style="text-align:right;" {{!}} '''Source:'''
{{!}} style="text-align:right;" {{!}} '''Source:'''
{{!}} style="text-align:left;" {{!}} {{{source}}}
{{!}} style="text-align:left;" {{!}} {{{source}}}<!-- ELSE source -->|}}<!--
ENDIF source --><!--
| <!-- ELSE source -->
IF language -->{{ #if: {{{language|}}}<!-- THEN language -->|<nowiki />
}} <!-- ENDIF source --> <!--
IF language --> {{ #if: {{{language|}}} |
{{!}}-
{{!}}-
{{!}} style="text-align:right;" {{!}} '''Language:'''
{{!}} style="text-align:right;" {{!}} '''Language:'''
{{!}} style="text-align:left;" {{!}} {{{language}}}
{{!}} style="text-align:left;" {{!}} {{{language}}}<!-- ELSE language -->|}}<!--
ENDIF language --><!--
| <!-- ELSE language -->
IF l10n -->{{ #if: {{{l10n|}}}<!-- THEN l10n -->|<nowiki />
}} <!-- ENDIF language --> <!--
IF l10n --> {{ #if: {{{l10n|}}} |
{{!}}-
{{!}}-
{{!}} style="text-align:right;" {{!}} '''[[Localization|l10n]]:'''
{{!}} style="text-align:right;" {{!}} '''[[Localization|l10n]]:'''
{{!}} style="text-align:left;" {{!}} {{ #ifexist: {{PAGENAME}}/Localization|[[{{PAGENAME}}/Localization]]|{{{l10n|''<span class="plainlinks">[{{fullurl:{{PAGENAME}}}}/Localization add it here]</span>''}}} }} }} <!-- ENDIF l10n --> <!--
{{!}} style="text-align:left;" {{!}} {{ #ifexist: {{PAGENAME}}/Localization|[[{{PAGENAME}}/Localization]]|{{{l10n|''<span class="plainlinks">[{{fullurl:{{PAGENAME}}}}/Localization add it here]</span>''}}} }}<!-- ELSE l10n -->|}}<!--
ENDIF l10n --><!--
IF testplan --> {{ #if: {{{testplan|{{#ifexist:{{PAGENAME}}/Test plan|gotpage|}}}}} |
IF testplan -->{{ #if: {{{testplan|{{#ifexist:{{PAGENAME}}/Test plan|gotpage|}}|}}}<!-- THEN testplan -->|<nowiki />
{{!}}-
{{!}}-
{{!}} style="text-align:right;" {{!}} '''[[:Category:Test Plans|Test plans]]:'''
{{!}} style="text-align:right;" {{!}} '''[[:Category:Test Plans|Test plans]]:'''
{{!}} style="text-align:left;" {{!}} {{#ifexist:{{PAGENAME}}/Test plan|[[{{PAGENAME}}/Test plan]]|{{{testplan}}}}}
{{!}} style="text-align:left;" {{!}} {{#ifexist:{{PAGENAME}}/Test plan|[[{{PAGENAME}}/Test plan]]|{{{testplan}}}}}<!-- ELSE testplan -->|}}<!--
| <!-- ELSE testplan -->
ENDIF testplan --><!-- ELSE source -->|}}<!--
}} <!-- ENDIF testplan -->
ENDIF source -->
|-
|-
| colspan="2" style="text-align:center;" | '''Contributors'''
| colspan="2" style="text-align:center;" | '''Contributors'''
Line 86: Line 80:


<nowiki>{{</nowiki>Status box
<nowiki>{{</nowiki>Status box
| ''component'' = &lt;!-- OPTIONAL -- Name of the component (defaults to page title) --&gt;
| ''component'' = &lt;!-- OPTIONAL &mdash; Name of the component (defaults to page title) --&gt;
| type = &lt;!-- Type of the component {activity, core, support} --&gt;
| ''type'' = &lt;!-- OPTIONAL &mdash; Type of the component {activity, core, support} --&gt;
| ''icon'' = &lt;!-- OPTIONAL -- ''file name.ext'' (sans <tt><nowiki>[[Image:</nowiki>''file name.ext''<nowiki>]]</nowiki></tt> --&gt;
| ''icon'' = &lt;!-- OPTIONAL &mdash; ''file name.ext'' (sans <tt><nowiki>[[Image:</nowiki>''file name.ext''<nowiki>]]</nowiki></tt> --&gt;
| status = &lt;!-- Status of the activity --&gt;
| contributors = &lt;!-- List of people contributing to the activity --&gt;
| ''build'' = &lt;!-- OPTIONAL -- Build # where it first appeared --&gt;
| ''source'' = &lt;!-- OPTIONAL &mdash; Repository / location of the source --&gt;
| ''source'' = &lt;!-- OPTIONAL -- Repository / location of the source --&gt;
&lt;!-- The following only make sense (and will '''only''' show) if there's a ''source'' value --&gt;
| ''language'' = &lt;!-- OPTIONAL -- Computer language of the ''source'' --&gt;
| ''status'' = &lt;!-- OPTIONAL &mdash; Status of the activity --&gt;
| ''l10n'' = &lt;!-- OPTIONAL -- Repository / location of the l10n resources --&gt;
| ''build'' = &lt;!-- OPTIONAL &mdash; Build # where it first appeared --&gt;
| [[:Category:Test Plans|''testplan'']] = &lt;!-- OPTIONAL -- link to the [[:Category:Test Plans|test plan page]] --&gt;
| ''language'' = &lt;!-- OPTIONAL &mdash; Computer language of the ''source'' --&gt;
| contributors = &lt;!-- People contributing to the activity --&gt;
| ''l10n'' = &lt;!-- OPTIONAL &mdash; Repository / location of the l10n resources --&gt;
| [[:Category:Test Plans|''testplan'']] = &lt;!-- OPTIONAL &mdash; link to the [[:Category:Test Plans|test plan page]] --&gt;
| <s>version = &lt;!-- Current/latest version available --&gt;</s>''dropping it''
| <s>version = &lt;!-- Current/latest version available --&gt;</s>''dropping it''
| <s>base = &lt;!-- Yes/No if it's included in the [[OS images]]
| <s>base = &lt;!-- Yes/No if it's included in the [[OS images]]

Revision as of 03:39, 3 July 2007

Many times you may want to just 'test' an idea for a template, I haven't found a sensible way of fully testing templates by themselves (as they will not get included in the edited version, but rather the saved version).

The idea of this Template:Sandbox is to have that, a simple testing zone that will not interfere with others and avoid leaving a trail of botched attempts.

Please leave this comment/text for others to read.
See Also http://meta.wikimedia.org/wiki/Help:Template
Testing: Status box


Sandbox
(activity)
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Software idea]]
    source => {{{source}}} | no source
    type => {{{type}}} | {{{type}}}
    status => {{{status}}} | {{{status}}}

This template automatically includes the page in the [[:Category:{{{type}}}]].

Many of the 'parameters' only make sense under certain circumstances (ie: no point in mentioning l10n if there's no source code).

Usage

{{Status box
 | component    = <!-- OPTIONAL — Name of the component (defaults to page title) -->
 | type         = <!-- OPTIONAL — Type of the component {activity, core, support} -->
 | icon         = <!-- OPTIONAL — file name.ext (sans [[Image:file name.ext]] -->
 | contributors = <!-- List of people contributing to the activity -->
 | source       = <!-- OPTIONAL — Repository / location of the source -->
<!-- The following only make sense (and will only show) if there's a source value -->
 | status       = <!-- OPTIONAL — Status of the activity -->
 | build        = <!-- OPTIONAL — Build # where it first appeared -->
 | language     = <!-- OPTIONAL — Computer language of the source -->
 | l10n         = <!-- OPTIONAL — Repository / location of the l10n resources -->
 | testplan     = <!-- OPTIONAL — link to the test plan page -->
 | version      = <!-- Current/latest version available -->dropping it
 | base         = <!-- Yes/No if it's included in the OS images
                       / Could be the first build number -->dropping it
 }}

Sample

Empty

Raw invocation.


Sandbox
(activity)
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Software idea]]
    source => {{{source}}} | no source
    type => {{{type}}} | {{{type}}}
    status => {{{status}}} | {{{status}}}

{{ Sandbox }}
Notes
Nothing else should show.
Simplest
Basically an idea; using the page name; and misclassified by type, so defaults to a Unknown Component. Nothing else should show.


Sandbox
(Bar)
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Software idea]]
    source => {{{source}}} | no source
    type => Bar | bar
    status => {{{status}}} | {{{status}}}

{{ Sandbox
| type = Bar
}}
Simple 1
Basically an idea; using the page name; and misclassified by type.


Sandbox
(activity)
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Software idea]]
    source => {{{source}}} | no source
    type => activity | activity
    status => {{{status}}} | {{{status}}}

{{ Sandbox
| type = activity
}}
Notes
the type is recognized. Nothing else should show.
Simple 2
Basically an idea for a named component of the activity type, and an icon.


Foo
(activity)
Xo s.png
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Software idea]]
    source => {{{source}}} | no source
    type => activity | activity
    status => {{{status}}} | {{{status}}}

{{ Sandbox
| component = Foo
| type = activity
| icon = Xo s.png
}}
Simple 3
An activity idea that has code and an icon, in beta status, with l10n resources


Foo
(activity)
Xo s.png
Status: beta
Source: foo
l10n: Localization
Contributors
{{{contributors}}}
Testing parameterized categorizations:

[[Category:Activity beta]]
    source => foo | has source
    type => activity | activity
    status => beta | beta

{{ Sandbox
| component = Foo
| type = activity
| icon = Xo s.png
| source = [[foo]]
| l10n = [[Localization]]
| status = beta
}}