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

(Difference between pages)
 
 
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
__NOTOC__
+
Use like so:
  
== Create a News Item ==
+
<pre>
 +
{{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>
{{{for template|News}}}
+
<div class="container" style="margin-top: 20px;"><div class="row"><div class="col-xs-12">
{{TableStart}}
+
= {{PAGENAME}} =
<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>
+
{{#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}}}]].}}}}{{#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}}}}}{{#set:Author=User:{{{Author|}}}|Gravatar MD5={{#show: User:{{{Author}}} | ?Gravatar MD5}}}}
<tr><th class="active">Format</th><td>{{{field|News Format|input type=dropdown|values=Short,Extended|default=Short}}}
+
{{#ifeq:{{{News Format|}}}|Extended|
<tr><th class="active">Category</th><td>{{{field|News Category|input type=dropdown|values=Security,Infrastructure,General,Development,Packages}}}</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">Author</th><td>{{{field|Author|autocomplete on namespace=User|size=100|placeholder=Specify username|default=current user}}}</td></tr>
+
}}}}
<tr><th class="active">Publication Status</th><td>{{{field|Publication Status|input type=dropdown|values=Draft,Published|default=Draft}}}</td></tr>
+
</div></div><div class="row"><div class="col-xs-12">
<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>
+
</includeonly>
<tr><th class="active">Publication Date</th><td>{{{field|Publication Date|input type=datepicker|default=now}}}</td></tr>
+
<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}}}
+

Revision as of 19:42, November 6, 2014

Use like so:

{{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)
}}