« Modèle:Documentation » : différence entre les versions

Contenu supprimé Contenu ajouté
imported>Jomegat
restore pre-import version
Aucun résumé des modifications
Ligne 1 :
<div style="clear:both;margin:0.3em 0;border:1px solid #AAAAAA;background-color:#EEEEFF;padding:5px" class="template-documentation"><!--
<!--
Voici des définitions littérales de classe pour common.css :
Automatically add {{pp-template}} to protected templates.
/* Pour la documentation des modèles */
-->{{template other
.template-documentation {
| {{#ifeq: {{PROTECTIONLEVEL:move}} | sysop
clear: both;
| {{pp-template}}
margin: 0.3em 0;
| {{#if: {{PROTECTIONLEVEL:edit}}
border: 1px solid #AAAAAA;
| {{pp-template}}
background-color: #ECFCF4;
| <!--Not protected, or only semi-move-protected-->
}}padding: 5px;
}}
}}<!--
Start of green doc box.
-->{{documentation/core2
| heading = {{{heading|¬}}} <!--Empty but defined means no header-->
| heading-style = {{{heading-style|}}}
| content = {{{content|}}}
| link box = {{{link box|}}} <!--So "link box=off" works-->
 
** ENTÊTE STANDARD AVEC ICÔNE **
<!--Some namespaces must have the /doc in talk space-->
-->{{#ifeq:{{{heading|μ}}}|<!-- heading DÉFINI MAIS VIDE -->|<!--
| docspace =
** SUPPRIME L’ENTÊTE AVANT LES LIENS, content OU SOUS-PAGE DE DOCUMENTATION **
{{#switch: {{SUBJECTSPACE}}
-->|<!--
| {{ns:0}}
--><div style="border-bottom: 1px solid #AAAAAA;padding-bottom:3px;margin-bottom:1ex"><!--
| {{ns:File}}
--><span style="<!--
| {{ns:MediaWiki}}
-->{{#if:{{{heading-style|}}}|<!--
| {{ns:Category}} = {{TALKSPACE}}
| #default = -->{{SUBJECTSPACE{heading-style}}}<!--
-->|<!--
}}
-->{{#ifeq:{{NAMESPACE}}|{{ns:template}}|<!--
-->font-weight:bold;font-size:125%<!--
-->|<!--
-->font-size:150%<!--
-->}}<!--
-->}}"><!--
-->{{#if:{{{heading|}}}|<!--
-->{{{heading}}}<!--
-->|<!--
-->{{#ifeq:{{NAMESPACE}}|{{ns:template}}|<!--
-->[[Image:Template-info.svg|50px]] Documentation du modèle<!--
-->|<!--
-->Documentation<!--
-->}}<!--
-->}}<!--
--></span><!--
--></div><!--
-->}}<!--
 
** LIENS VERS SOUS-PAGES DE DOCUMENTATION, BAC À SABLE ET TESTS **
<!--For debug purposes-->
--><div id="template_doc_page_transcluded" class="dablink"><!--
| not-docspace =
{{#switch: {{SUBJECTSPACE}}
| {{ns:0}}
| {{ns:File}}
| {{ns:MediaWiki}}
| {{ns:Category}} = {{SUBJECTSPACE}}
| #default = {{TALKSPACE}}
}}
 
-->{{#ifeq:{{{1|{{Documentation/docname}}}}}|{{FULLPAGENAME}}|<!--
| 1 = {{{1|}}} <!--Other docname, if fed-->
** LIEN VERS LA PAGE DU MODÈLE, AFFICHÉ SUR UNE SOUS-PAGE DE DOCUMENTATION**
--><nowiki />
: ''Ceci est la page de documentation de '''[[{{NAMESPACE}}:{{BASEPAGENAME}}]]'''.'' <!--
--><small class="plainlinks" style="font-style:normal"><!--
-->[[{{fullurl:{{FULLPAGENAME}}|action=purge}} rafraîchir]]<!--
--> '''·''' <!--
-->{{#ifexist:{{{1|{{NAMESPACE}}:{{BASEPAGENAME}}}}}|<!--
** LE MODÈLE DE BASE EXISTE DÉJÀ **
-->[[{{fullurl:{{{1|{{NAMESPACE}}:{{BASEPAGENAME}}}}}|action=edit}} modifier]]<!--
-->|<!--
** LE MODÈLE DE BASE N’EXISTE PAS ENCORE **
-->[[{{fullurl:{{{1|{{NAMESPACE}}:{{BASEPAGENAME}}}}}|action=edit}} créer]]<!--
-->}}<!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{NAMESPACE}}:{{BASEPAGENAME}}}}}|action=history}} historique]]<!--
--></small><!--
-->|<!--
** LIEN VERS SOUS-PAGE DE DOCUMENTATION, AFFICHÉ SUR LA PAGE DU MODÈLE ELLE-MÊME **
-->{{#ifexist:{{{1|{{Documentation/docname}}}}}|<!--
** /Documentation EXISTE **
--><nowiki />
: ''Cette [[Wikilivres:Modèles|documentation]] est [[w:Aide:Inclusion|incluse]] depuis '''[[{{{1|{{Documentation/docname}}}}}]]'''.''{{#if:{{{nocat|}}}||[[Catégorie:Modèles|{{PAGENAME}}]]}}<!--
--><small class="plainlinks" style="font-style:normal"><!--
-->[[{{fullurl:{{FULLPAGENAME}}|action=purge}} rafraîchir]]<!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} modifier]] <!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} historique]]<!--
--></small><!--
-->|<!--
** /Documentation N’EXISTE PAS ENCORE **
--><nowiki />
: ''Documentation de '''[[{{NAMESPACE}}:{{BASEPAGENAME}}]]'''.''{{#ifeq:{{NAMESPACE}}|Modèle|{{#if:{{{nocat|}}}||[[Catégorie:Documentations des modèles|{{PAGENAME}}]]}}}}<!--
--><small class="plainlinks" style="font-style:normal"><!--
-->[[{{fullurl:{{FULLPAGENAME}}|action=purge}} rafraîchir]]<!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit&preload={{urlencode:Modèle:documentation/patron}}}} créer]]<!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} historique]]<!--
--></small><!--
-->}}<!--
-->}}<!--
 
-->{{#switch: {{SUBPAGENAME}}<!--
<!--The namespace is added in /core2-->
-->|bac à sable|tests<!--
| template page =
--><!--=--><!-- ne pas mettre le "=" en commentaire pour
{{#switch: {{SUBPAGENAME}}
** NE PAS AFFICHER CES LIENS SUR LES PAGES DE BAC À SABLE/TESTS **
| sandbox
-->|#default<!--
| testcases = {{BASEPAGENAME}}
-->=<!--
| #default = {{PAGENAME}}
-->{{#switch: {{SUBJECTSPACE}}<!--
}}
-->|{{ns:template}}<!--
-->|{{ns:user}}<!--
-->=<!--
-->{{#ifexist: {{FULLPAGENAME}}/bac à sable|<!--
--><br /><!--
-->Ce modèle dispose d’un [[/bac à sable|bac à sable]] <small style="font-style: normal">([{{fullurl:{{#rel2abs:/bac à sable}}|action=edit}} modifier])</small> <!--
-->{{#ifexist: {{FULLPAGENAME}}/tests|<!--
-->et d’une page de [[/tests|tests]] <small style="font-style:normal">([{{fullurl:{{#rel2abs:/tests}}|action=edit}} modifier])</small><!--
-->}}<!--
--> permettant aux éditeurs d’expérimenter leurs modifications.<!--
-->|<!--
-->{{#ifexist: {{FULLPAGENAME}}/tests|<!--
--><br /><!--
-->Ce modèle dispose d’une page de [[/tests|tests]] <small style="font-style:normal">([{{fullurl:{{#rel2abs:/tests}}|action=edit}} modifier])</small><!--
--> permettant aux éditeurs d’expérimenter avec ce modèle ou de démontrer des anomalies.<!--
-->}}<!--
-->}}<!-- endifexist
-->}}<!-- endswitch subjectspace
-->}}<!-- endswitch subpagename
--></div><!--
 
** AFFICHAGE DU CONTENU OU INCLUSION DE LA SOUS-PAGE DE DOCUMENTATION (SAUF SUR LA PAGE D’AIDE ELLE-MÊME) **
}}<!--End of green doc box--><noinclude>
-->{{#if:{{{contenu|{{{content|}}}}}}|<!--
--><nowiki />
{{{content|}}}<!--
-->|<!--
-->{{#ifeq:{{{1|{{Documentation/docname}}}}}|{{FULLPAGENAME}}|<!--
** PAS DE RÉCURSION SUR LA PAGE DOCUMENTATION ELLE-MÊME, QUI CONTIENT LE RESTE DU TEXTE APRÈS CE MODÈLE **
-->{{#if:{{{nocat|}}}||[[Catégorie:Documentations des modèles|{{PAGENAME}}]]}}|<!--
-->{{#ifexist:{{{1|{{Documentation/docname}}}}}|<!--
--><nowiki />
{{{{{1|{{Documentation/docname}}}}}|
{{{2|dummy}}}={{{3|}}}|
{{{4|dummy}}}={{{5|}}}|
{{{6|dummy}}}={{{7|}}}|
{{{8|dummy}}}={{{9|}}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
 
--><div style="clear:both"></div>
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</div><!--
 
NOTE :
TOUTE LA DOCUMENTATION POUR CE MODÈLE EST INCLUSE CI-DESSUS DEPUIS SA SOUS-PAGE /Documentation
Les catégories et interwikis sont donc inscrits dans [[Modèle:Documentation/Documentation]]
 
{{NoRobot}}
-->
<noinclude>
Ce modèle peut se poser sur tout [{{fullurl:Spécial:Toutes les pages|from=&to=&namespace=10}} autre], ou sur [[:Catégorie:Documentations_des_modèles|leurs documentations]]. Il affiche ensuite automatiquement un titre approprié avec la catégorie à appliquer à la page. <!--Il ne peut pas s'utiliser sur lui-même-->
 
Exemple :
<nowiki><noinclude>{{Documentation}}</noinclude></nowiki>
 
Si la page de documentation n'existe pas, ce modèle affiche un lien permettant de la créer, avec pour patron le contenu de la page suivante : [[Modèle:Documentation/patron]].
 
Si la page de documentation est située ailleurs, son titre peut être spécifié en paramètre.
Par exemple si le modèle contient lui-même sa documentation :
<nowiki><noinclude>{{Documentation|{{FULLPAGENAME}}}}</noinclude></nowiki>
 
[[Catégorie:Modèles|{{PAGENAME}}]]
</noinclude>