Difference between revisions of "Form:News"

From Earth Science Information Partners (ESIP)
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
{{{info|page name=News_{{#timel: YmdHis}} }}}
+
{{{info|page name=<News[Portal]>/{{#time:Y-m-d|<News[Start date]>}}:_<News[News title]>}}}
 
{{{for template|News}}}
 
{{{for template|News}}}
 +
<div class="card bg-light shadow-sm">
 +
<div class="card-body">
 
{{form-row
 
{{form-row
 
   |label=Title
 
   |label=Title
Line 12: Line 14:
 
|mandatory
 
|mandatory
 
}}}
 
}}}
}}
+
}}<!--
{{form-row
+
 
  |label=[[Property:News feed|<i class="fas fa-pencil-alt"></i> News feed]]
+
-->{{{field
  |field={{{field
+
|Portal
 +
|input type=dropdown
 +
|values from category=Portals
 +
|class=form-control
 +
|hidden
 +
}}}<!--
 +
 
 +
-->{{{field
 
|News feed
 
|News feed
 
|input type=dropdown
 
|input type=dropdown
 
|property=News feed
 
|property=News feed
 
|class=form-control
 
|class=form-control
|mandatory
+
|hidden
 
}}}
 
}}}
}}
 
 
{{form-row
 
{{form-row
 
   |label=Display
 
   |label=Display
Line 28: Line 36:
 
|Start date
 
|Start date
 
|input type=datepicker
 
|input type=datepicker
|default={{#timel:Y/m/d|now}}  
+
|default={{#time:Y/m/d|now}}  
 
}}} until {{{field
 
}}} until {{{field
 
|End date
 
|End date
 
|input type=datepicker
 
|input type=datepicker
|default={{#timel:Y/m/d|now + 1 month}}  
+
|default={{#time:Y/m/d|now + 1 month}}  
 
}}}
 
}}}
 
}}
 
}}
Line 38: Line 46:
 
   |label=&#32;
 
   |label=&#32;
 
   |field=<div>{{{field
 
   |field=<div>{{{field
|Repeat every year
+
|News repeat every year
 
|input type=checkbox
 
|input type=checkbox
 
|label=Repeat every year
 
|label=Repeat every year
Line 45: Line 53:
 
}}}</div>
 
}}}</div>
 
<div>{{{field
 
<div>{{{field
|Is sticky
+
|News is sticky
 
|input type=checkbox
 
|input type=checkbox
|label=Is sticky
+
|label=Sticky
 
|default=No
 
|default=No
 
|class=mr-2
 
|class=mr-2
 
}}}</div>
 
}}}</div>
 
<div>{{{field
 
<div>{{{field
|Suppress
+
|News suppress
 
|input type=checkbox
 
|input type=checkbox
|label=Suppress
+
|label=Draft
 
|default=No
 
|default=No
 
|class=mr-2
 
|class=mr-2
Line 61: Line 69:
 
{{form-row
 
{{form-row
 
   |label=News body
 
   |label=News body
 +
  |label-style=align-self: start !important
 
   |field={{{field
 
   |field={{{field
 
|News body
 
|News body
Line 81: Line 90:
 
}}}
 
}}}
 
}}
 
}}
 +
</div>
 +
</div>
 
{{{field
 
{{{field
|Attachments
+
|News attachments
 
|holds template
 
|holds template
 
}}}
 
}}}
 
{{{end template}}}
 
{{{end template}}}
  
{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|cancel}}}
+
{{{standard input|save|class=mw-ui-button mw-ui-progressive}}} {{{standard input|preview|class=mw-ui-button}}} <span class="d-inline-block ml-3 text-danger">{{{standard input|cancel}}}</span>
  
{{{for template|Attachment|multiple|add button text=Attach|embed in field=News[Attachments]}}}
+
{{{for template|News attachment|multiple|add button text=Attach|embed in field=News[News attachments]}}}
 
{{form-row
 
{{form-row
 
   |label=Type
 
   |label=Type
 
   |field={{{field
 
   |field={{{field
|Attachment type
+
|News attachment type
 
|input type=radiobutton
 
|input type=radiobutton
 
|values=Picture,File,URL,Video,Wiki
 
|values=Picture,File,URL,Video,Wiki
 
|default=Picture
 
|default=Picture
 
|mandatory
 
|mandatory
|show on select=Picture=>media-type-image;File=>media-type-image;URL=>media-type-url;Video=>media-type-url;Wiki=>media-type-wiki;
+
|show on select=Picture=>media-type-image;File=>media-type-image;Picture=>pic-label;File=>file-label;URL=>media-type-url;Video=>media-type-url;Wiki=>media-type-wiki;
 
}}}
 
}}}
 
}}
 
}}
 
<div id="media-type-image">
 
<div id="media-type-image">
 
{{form-row
 
{{form-row
   |label=&#32;
+
   |label=<span id="pic-label">Picture</span><span id="file-label">File</span>
 
   |field={{{field
 
   |field={{{field
 
|File
 
|File
Line 128: Line 139:
 
|input type=text
 
|input type=text
 
|class=form-control
 
|class=form-control
}}}
 
}}
 
{{form-row
 
  |label=&#32;
 
  |field={{{field
 
|Inclusion
 
|input type=radiobutton
 
|values=Display as a link,Insert
 
|default=Display as a link
 
|show on select=Display as a link=>display-link;
 
|mandatory
 
 
}}}
 
}}}
 
}}
 
}}
 
</div>
 
</div>
<div id="display-link">
 
 
{{form-row
 
{{form-row
   |label=Link text
+
   |label=Link text / Caption
 
   |field={{{field
 
   |field={{{field
 
|Link text
 
|Link text
 
|input type=text
 
|input type=text
|class=form-control
+
|class=form-control mt-1
 
}}}
 
}}}
 
}}
 
}}
</div>
 
 
{{{end template}}}
 
{{{end template}}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>

Latest revision as of 08:36, July 23, 2020