Difference between pages "Template:News" and "Form:News"

(Difference between pages)
 
 
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
Use like so:
+
__NOTOC__
  
<pre>
+
== Create a News Item ==
{{News
+
|Summary=Test News Item
+
|News Category=General
+
|Author=Drobbins
+
|Publication Status=Draft
+
|Publication Date=2014/10/16
+
|Deprecated By=News:NewsPageThatContainsNewerInfo
+
|Icon=File:foobar.jpg
+
|News Format=Short (or Extended)
+
}}
+
</pre>
+
  
 +
{{#forminput:form=News|query string=namespace=News}}
 
</noinclude><includeonly>
 
</noinclude><includeonly>
<div class="container" style="margin-top: 20px;"><div class="row"><div class="col-xs-12">
+
{{{for template|News}}}
= {{PAGENAME}} =
+
{{TableStart}}
{{#if:{{{Deprecated By|}}}|{{Important|This news item is not current. You can find updated information on this topic at [[Deprecated By::News:{{{Deprecated By}}}|{{{Deprecated By}}}]].}}}}
+
<tr><th class="active">Summary</th><td>{{{field|Summary|input type=textarea|placeholder=Specify a short summary of the news item. One or two sentences max. If a "short" item, this is the only text that will be displayed.}}}</td></tr>
{{#ifeq:{{{Publication Status|}}|Draft|{{NotYetPublished}}}}{{#set:Summary={{{Summary|}}}|News Category={{{News Category|}}}|Publication Status={{{Publication Status|}}}|Icon={{{Icon|}}}|Publication Date={{{Publication Date|}}}|News Format={{{News Format}}}}}
+
<tr><th class="active">Format</th><td>{{{field|News Format|input type=dropdown|values=Short,Extended|default=Short}}}
{{#set:Author=User:{{{Author|}}}|Gravatar MD5={{#show: User:{{{Author}}} | ?Gravatar MD5}}}}
+
<tr><th class="active">Category</th><td>{{{field|News Category|input type=dropdown|values=Security,Infrastructure,General,Development,Packages}}}</td></tr>
{{#ifeq:{{{News Format|}}}|Extended|
+
<tr><th class="active">Author</th><td>{{{field|Author|autocomplete on namespace=User|size=100|placeholder=Specify username|default=current user}}}</td></tr>
{{#widget:NewsInfo|body={{{Summary|}}}|user={{{Author|}}}|icon_url={{#if:{{{Icon|}}}|{{filepath:{{#sub:{{{Icon}}}|5}}|80}}|http://www.gravatar.com/avatar/{{#show: User:{{{Author}}} | ?Gravatar MD5}}/?s=80&d=retro&r=g}}|date={{#time:F j, Y|{{{Publication Date}}}}}
+
<tr><th class="active">Publication Status</th><td>{{{field|Publication Status|input type=dropdown|values=Draft,Published|default=Draft}}}</td></tr>
}}}}
+
<tr><th class="active">Deprecated by</th><td>{{{field|Deprecated By|placeholder=page of news item that deprecates/replaces this out-of-date news item.|values from namespace=News|remote autocompletion|size=100}}}</td></tr>
</div></div><div class="row"><div class="col-xs-12">
+
<tr><th class="active">Publication Date</th><td>{{{field|Publication Date|input type=datepicker|default=now}}}</td></tr>
</includeonly>
+
<tr><th class="active">Icon</th><td>{{{field|Icon|uploadable|placeholder=Image file. Leave blank to use your gravatar|values from namespace=File|size=100}}}</td></tr>
 +
{{TableEnd}}
 +
{{{end template}}}
 +
== Documentation ==
 +
 
 +
If an extended news item, enter info here:
 +
 
 +
{{{standard input|free text|rows=30}}}
 +
 
 +
{{{for template|NewsFooter}}}
 +
{{{end template}}}
 +
 
 +
{{{standard input|summary}}}
 +
 
 +
{{{standard input|minor edit}}} {{{standard input|watch}}}
 +
 
 +
{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}}

Latest revision as of 19:32, November 6, 2014


Create a News Item