Template:Draft header: Difference between revisions

From Our World of Text Wiki
Jump to navigation Jump to search
(Added link to see differences from the main article and categorization.)
(Now automatically detects whether it is on a draft of an existing article or not.)
 
Line 1: Line 1:
{{#ifeq:{{NAMESPACE}}|Draft|{{Ombox
{{#ifeq:{{NAMESPACE}}|Draft|{{Ombox
| image = [[File:Under_construction_icon-blue.svg|40px|alt=|link=]]
| image = [[File:Under_construction_icon-blue.svg|40px|alt=|link=]]
| text  = '''This is a {{wp|WP:Drafts|draft}}<!-- [[Help:Editing guide#Drafts|draft]] --> of [[{{PAGENAME}}]]{{#ifeq:{{{creation|yes}}}|yes||<nowiki /> ([{{fullurl:Special:ComparePages|page1={{urlencode:{{PAGENAME}}}}&page2={{urlencode:{{FULLPAGENAME}}}}}} see changes])}}.''' It is a space to store, preview, and collaborate on {{#ifeq:{{{creation|yes}}}|yes|this work-in-progress article before it is finalized and published into the mainspace as an official article.|large edits to the existing article that are not yet ready to be incorporated into the main article for general viewing.}}
| text  = '''This is a {{wp|WP:Drafts|draft}}<!-- [[Help:Editing guide#Drafts|draft]] --> of [[{{PAGENAME}}]]{{#ifexist:{{PAGENAME}}|<nowiki /> ([{{fullurl:Special:ComparePages|page1={{urlencode:{{PAGENAME}}}}&page2={{urlencode:{{FULLPAGENAME}}}}}} see changes])}}.''' It is a space to store, preview, and collaborate on {{#ifexist:{{PAGENAME}}|large edits to the existing article that are not yet ready to be incorporated into the main article for general viewing.|this work-in-progress article before it is finalized and published into the mainspace as an official article.}}
----
----
{{#ifeq:{{{creation|yes}}}|yes|<div style="float:right;">Finished drafting? {{Clickable button|{{fullurl:Special:MovePage|wpOldTitle={{urlencode:{{FULLPAGENAME}}}}&wpNewTitle={{urlencode:{{PAGENAME}}}}&wpMovetalk=1&wpReason=Publishing%20draft%20article}}|Publish now|class=mw-ui-progressive}}</div>|{{#if:{{{created|}}}|<small>This draft was created at {{{created|}}}. Any edits made to [[{{PAGENAME}}]] since then should be accounted for before this draft is published.</small>}}}}
{{#ifexist:{{PAGENAME}}|{{#if:{{{created|}}}|<small>This draft was created at {{{created|}}}. Any edits made to [[{{PAGENAME}}]] since then should be accounted for before this draft is published.</small>}}|<div style="float:right;">Finished drafting? {{Clickable button|{{fullurl:Special:MovePage|wpOldTitle={{urlencode:{{FULLPAGENAME}}}}&wpNewTitle={{urlencode:{{PAGENAME}}}}&wpMovetalk=1&wpReason=Publishing%20draft%20article}}|Publish now|class=mw-ui-progressive}}</div>}}
}}{{#ifeq:{{NAMESPACE}}|Draft|{{#ifeq:{{{creation|yes}}}|yes|[[Category:Drafts under creation]]|[[Category:Drafts of existing articles]]}}}}
}}{{#ifeq:{{NAMESPACE}}|Draft|{{#ifexist:{{PAGENAME}}|[[Category:Drafts of existing articles]]|[[Category:Drafts under creation]]}}}}
|{{if preview|{{Error|{{tlx|Draft}} and {{tlx|Draft header}} should only be used in the "Draft:" namespace.}}|}}
|{{if preview|{{Error|{{tlx|Draft}} and {{tlx|Draft header}} should only be used in the "Draft:" namespace.}}|}}
}}<noinclude>
}}<noinclude>
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 20:25, 9 December 2024