Шаблон:Documentation/core — различия между версиями

Материал из Аэроскан Сервис
Перейти к: навигация, поиск
(Adding the "link box = off" parameter.)
(Using the heading "Summary" instead of "Documentation" when in File space. Adding "Add categories and interwikis to the /doc". Adding link "Subpages of this template". Adding debug-reporting to a cat.)
Строка 17: Строка 17:
 
   }} <span style="{{#if: {{{heading-style|}}}
 
   }} <span style="{{#if: {{{heading-style|}}}
 
   | {{{heading-style|}}}
 
   | {{{heading-style|}}}
   | {{#ifeq: {{NAMESPACE}} | {{ns:Template}}
+
   | {{#ifeq: {{SUBJECTSPACE}} | {{ns:Template}}
 
     | font-weight: bold; font-size: 125%
 
     | font-weight: bold; font-size: 125%
 
     | font-size: 150%
 
     | font-size: 150%
Строка 24: Строка 24:
 
   | ¬ =   
 
   | ¬ =   
 
     <!--"heading" not defined in this or previous level-->
 
     <!--"heading" not defined in this or previous level-->
     {{#ifeq: {{NAMESPACE}} | {{ns:template}}
+
     {{#switch: {{SUBJECTSPACE}}  
    | [[Image:Template-info.svg|50px]] Template documentation
+
    | {{ns:Template}} = [[Image:Template-info.svg|50px]] Template documentation
     | Documentation
+
     | {{ns:File}} = Summary
 +
    | #default = Documentation
 
     }}
 
     }}
 
   | #default =  
 
   | #default =  
Строка 34: Строка 35:
 
}}<!--
 
}}<!--
 
   Load the /doc content:
 
   Load the /doc content:
   Note: The line break between this comment and the if-case
+
   Note: The line breaks between this comment and the if-case
   is necessary, it makes it so "=== Headings ===" at  
+
   and between the if-case and the following div are necessary so  
  start of docs are interpreted.
+
  "=== Headings ===" at the start and end of docs are interpreted.
 
-->
 
-->
 
{{#if: {{{content|}}}
 
{{#if: {{{content|}}}
Строка 44: Строка 45:
 
   }}
 
   }}
 
}}
 
}}
<div style="clear: both;"></div>
+
<div style="clear: both;"></div><!--So right or left floating items don't stick out of the doc box.-->
 
</div><!--End of green doc box--><!--
 
</div><!--End of green doc box--><!--
 
   Small box below for the doc meta-data.
 
   Small box below for the doc meta-data.
Строка 62: Строка 63:
 
   | image = none
 
   | image = none
 
   | style = background-color: #ecfcf4;
 
   | style = background-color: #ecfcf4;
 +
  | textstyle = font-style: italic;
 
   | text =  
 
   | text =  
     ''{{#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>
Строка 79: Строка 81:
 
       | [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small>
 
       | [[{{{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-testcases }} create])</small>
 
       | testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-testcases }} create])</small>
       }} pages.
+
       }} pages. <br>
     }}''
+
     }}{{#if: {{{content|}}} {{{docname fed|}}}
 +
    |
 +
    | Add categories and interwikis to the /doc subpage.
 +
    }} [[Special:PrefixIndex/{{{template page|{{FULLPAGENAME}}}}}/|Subpages of this template]].
 
   }}
 
   }}
 +
}}<!--
 +
  Detect and report strange usage:
 +
-->{{#if:
 +
  <!--Check if there are /doc, /sandbox and /testcases in talk space
 +
      when they should be in subject space, and the other way around-->
 +
  {{#ifexist:
 +
    {{{not-docspace|}}}:{{PAGENAME:{{{template page|{{FULLPAGENAME}}}}}}}/doc
 +
  | strange
 +
  }}{{#ifexist:
 +
    {{{not-docspace|}}}:{{PAGENAME:{{{template page|{{FULLPAGENAME}}}}}}}/sandbox
 +
  | strange
 +
  }}{{#ifexist:
 +
    {{{not-docspace|}}}:{{PAGENAME:{{{template page|{{FULLPAGENAME}}}}}}}/testcases
 +
  | strange
 +
  }}
 +
  <!--Check if {{documentation}} is transcluded
 +
      on a /doc or /testcases page-->
 +
  {{#switch: {{SUBPAGENAME}}
 +
  | doc
 +
  | testcases = strange
 +
  }}
 +
 +
| [[Category:Wikipedia pages with strange ((documentation)) usage|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
 
}}<noinclude>
 
}}<noinclude>
  

Версия 20:20, 11 февраля 2010

Шаблон:Fmbox

Шаблон:Pp-template