Відмінності між версіями «Шаблон:Documentation»

Матеріал з Аероскан Сервіс
Перейти до: навігація, пошук
(copy from sandbox: {{SUBJECTPAGENAME}}/doc -> {{Documentation/docname}})
м (174 версії)
 
(не показані 89 проміжних версій 46 учасників)
Рядок 1: Рядок 1:
<noinclude>
+
<!--
{{ #ifeq: {{SUBPAGENAME}} | sandbox
+
   Automatically add {{pp-template}} to protected templates.
   | {{Template sandbox notice}}
+
-->{{template other
  | {{pp-semi-template|small=yes}}
+
| {{#ifeq: {{PROTECTIONLEVEL:move}} | sysop
}}
+
   | {{pp-template}}
{{intricate}}
+
   | {{#if: {{PROTECTIONLEVEL:edit}}
{{
+
     | {{pp-template}}
  #ifeq: {{FULLPAGENAME}} | Template:Documentation |
+
     | <!--Not protected, or only semi-move-protected-->
   <!-- Moved to: Template:Documentation, template
+
    {{Mergingfrom|Template doc|date=November 2007}}
+
    [[User:ConradPino]] 21:45, 9 November 2007 (UTC)
+
  -->
+
}}
+
</noinclude><div class="template-documentation">{{
+
  #if: {{{heading|Documentation}}}
+
   |<!-- has heading --><div style="padding-bottom: {{{heading-padding|3px}}}; border-bottom: 1px solid #aaa; margin-bottom: {{{heading-margin|1ex}}}"><span class="editsection plainlinks" id="doc_editlinks">{{
+
     #ifexist: {{{1|{{Documentation/docname}}}}}
+
    |<!-- /doc exists -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}}} view]] [[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit]]
+
     |<!-- no /doc -->{{
+
      #if: {{{content|}}}
+
      |<!-- has content -->
+
      |<!-- no content -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit&preload=Template:Documentation/preload}} edit]]
+
 
     }}
 
     }}
  }}</span> <span style="{{{heading-style|font-size: 150%}}}">{{{heading|Documentation}}}</span></div>
 
  |<!-- empty heading -->
 
}}<div id="template_doc_page_transcluded" class="dablink plainlinks">{{
 
  #ifeq: {{{transcluded|show}}} | show
 
  |<!-- transcluded show -->{{
 
    #ifexist: {{{1|{{Documentation/docname}}}}}
 
    |<!-- /doc exists -->This [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{1|{{Documentation/docname}}}}}]]. <small style="font-style: normal">([[{{{1|{{Documentation/docname}}}}}|view]] &#124; [{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit] &#124; [{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} history])</small><br />
 
    |<!-- no /doc -->
 
 
   }}
 
   }}
  |<!-- transcluded hide -->
+
}}<!--
}}{{
+
  Start of green doc box.
  #switch: {{SUBPAGENAME}}
+
-->{{documentation/core2
   |sandbox=<!-- sandbox -->
+
| heading = {{{heading|¬}}}  <!--Empty but defined means no header-->
  |testcases=<!-- testcases -->
+
| heading-style = {{{heading-style|}}}
  |#default={{
+
| content = {{{content|}}}
    #switch: {{SUBJECTSPACE}}/{{{sandbox-testcases|show}}}
+
| link box = {{{link box|}}<!--So "link box=off" works-->
    |{{ns:template}}/show|{{ns:user}}/show=<!-- show /sandbox /testcases -->This template has {{
+
 
      #ifexist: {{ #rel2abs: /sandbox }}
+
<!--Some namespaces must have the /doc in talk space-->
      |<!-- /sandbox -->a [[/sandbox|sandbox]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} edit])</small> {{
+
| docspace =
        #ifexist: {{ #rel2abs: /testcases }}
+
  {{#switch: {{SUBJECTSPACE}}
        |<!-- /sandbox AND /testcases -->and [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small>
+
  | {{ns:0}}
        |<!-- /sandbox AND no /testcases -->but '''no''' [{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} testcases]
+
  | {{ns:File}}
      }}
+
  | {{ns:MediaWiki}}
      |<!-- no /sandbox -->'''no''' [{{fullurl:{{ #rel2abs: /sandbox }}|action=edit&preload={{{preload-sandbox|Template:Documentation/preload/sandbox}}}}} sandbox] {{
+
  | {{ns:Category}} = {{TALKSPACE}}
        #ifexist: {{ #rel2abs: /testcases }}
+
  | #default = {{SUBJECTSPACE}}
        |<!-- no /sandbox AND /testcases -->but has [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small>
+
        |<!-- no /sandbox AND  no /testcases -->and '''no''' [{{fullurl:{{ #rel2abs: /testcases }}|action=edit&preload={{{preload-testcases|Template:Documentation/preload/testcases}}}}} testcases]
+
        }}
+
    }} for editors to experiment.
+
    |<!-- hide /sandbox /testcases -->
+
 
   }}
 
   }}
}}</div>
+
 
{{{content|{{ {{ #ifexist: {{{1|{{Documentation/docname}}}}} | {{{1|{{Documentation/docname}}}}} | ns:0 }} }}}}}
+
<!--For debug purposes-->
</div>
+
| not-docspace =
 +
  {{#switch: {{SUBJECTSPACE}}
 +
  | {{ns:0}}
 +
  | {{ns:File}}
 +
  | {{ns:MediaWiki}}
 +
  | {{ns:Category}} = {{SUBJECTSPACE}}
 +
  | #default = {{TALKSPACE}}
 +
  }}
 +
 
 +
| 1 = {{{1|}}}   <!--Other docname, if fed-->
 +
 
 +
<!--The namespace is added in /core2-->
 +
| template page =
 +
  {{#switch: {{SUBPAGENAME}}
 +
  | sandbox
 +
  | testcases = {{BASEPAGENAME}}
 +
  | #default = {{PAGENAME}}
 +
  }}
 +
 
 +
}}<!--End of green doc box--><noinclude>
 +
 
 +
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 +
</noinclude>

Поточна версія на 20:11, 25 травня 2015

30px Template documentation[create]