Difference between revisions of "Template:Documentation/link box"

From blackwiki
Jump to navigation Jump to search
(Undid revision 550832820 by 94.141.20.53 (talk))
Line 23: Line 23:
 
     | {{#if: {{{doc exist|yes}}}
 
     | {{#if: {{{doc exist|yes}}}
 
       | <!--/doc exists, link to it-->
 
       | <!--/doc exists, link to it-->
         The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{docpage|{{FULLPAGENAME}}/doc}}}]]. <small style="font-style: normal">([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] &#124; [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])</small><br>
+
         The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{docpage|{{FULLPAGENAME}}/doc}}}]]. <small style="font-style: normal">([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] &#124; [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])</small> <br />
 
       |<!-- /doc does not exist, ask to create one?
 
       |<!-- /doc does not exist, ask to create one?
 
   -->{{#switch: {{SUBJECTSPACE}}
 
   -->{{#switch: {{SUBJECTSPACE}}
Line 32: Line 32:
 
         Add links to /sandbox and /testcases when appropriate:
 
         Add links to /sandbox and /testcases when appropriate:
 
   -->{{#switch: {{SUBJECTSPACE}}
 
   -->{{#switch: {{SUBJECTSPACE}}
      | {{ns:Module}} =
 
        Editors can maintain {{
 
        #ifexist: {{{testcases| {{FULLPAGENAME}}/testcases }}}
 
        | [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small>
 
        | testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-module-testcases }} create])</small>
 
        }} to verify {{
 
        #ifexist: Module talk:{{PAGENAME}}/testcases
 
        | <small style="font-style: normal">([[Module talk:{{PAGENAME}}/testcases|run tests]])</small>
 
        }} expected functionality. <br />
 
 
       | {{ns:User}}
 
       | {{ns:User}}
 
       | {{ns:Module}}
 
       | {{ns:Module}}
 
       | {{ns:Template}} =  
 
       | {{ns:Template}} =  
         Editors can experiment in this template's {{
+
         Editors can experiment in this module {{
 
         #ifexist: {{{sandbox| {{FULLPAGENAME}}/sandbox }}}
 
         #ifexist: {{{sandbox| {{FULLPAGENAME}}/sandbox }}}
 
         | [[{{{sandbox| {{FULLPAGENAME}}/sandbox }}}|sandbox]] <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit }} edit] <nowiki>|</nowiki> [{{fullurl:Special:ComparePages | page1={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&page2={{urlencode:{{{sandbox|{{FULLPAGENAME}}/sandbox}}}}}}} diff])</small>  
 
         | [[{{{sandbox| {{FULLPAGENAME}}/sandbox }}}|sandbox]] <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit }} edit] <nowiki>|</nowiki> [{{fullurl:Special:ComparePages | page1={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&page2={{urlencode:{{{sandbox|{{FULLPAGENAME}}/sandbox}}}}}}} diff])</small>  
         | sandbox <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload=Template:Documentation/preload-sandbox }} create] <nowiki>|</nowiki> [{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&summary={{urlencode:Create sandbox version of [[{{{template page|{{FULLPAGENAME}}}}}]]}} }} mirror])</small>  
+
         | sandbox <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload=Template:Documentation/preload-sandbox }} create] <nowiki>|</nowiki> [{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&summary={{urlencode:Create sandbox version of [[{{{template page|{{FULLPAGENAME}}}}}]]}} }} mirror])</small>
 
         }} and {{
 
         }} and {{
 
         #ifexist: {{{testcases| {{FULLPAGENAME}}/testcases }}}
 
         #ifexist: {{{testcases| {{FULLPAGENAME}}/testcases }}}
Line 72: Line 63:
 
     }}
 
     }}
 
   }}
 
   }}
}}<!--End link box-->
+
}}<!--End link box--><!--
 +
 
 +
  Detect and report strange usage:
 +
-->{{#if:
 +
 
 +
  <!--Check if {{documentation}} is transcluded
 +
      on a /doc or /testcases page-->
 +
  {{#switch: {{SUBPAGENAME}}
 +
  | doc
 +
  | testcases = strange
 +
  }}
 +
  <!--More checks can be added here, just return anything
 +
      to make the surrounding if-case trigger-->
 +
 
 +
| <includeonly>[[Category:Wikipedia pages with strange ((documentation)) usage|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace --></includeonly>
 +
 
 +
}}<noinclude>
 +
{{pp-template|small=yes}}
 +
</noinclude>

Revision as of 17:52, 17 April 2013