Difference between revisions of "Form:Resources"

From Earth Science Information Partners (ESIP)
(Created page with "<includeonly> {{{info|page name=<Resources[Portal]>/{{#time:Y-m-d|<Resources[Resources topic]>}}/Resources}}} {{{for template|Resources}}} {{form-row |label=Portal |field=...")
 
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
{{{info|page name=<Resources[Portal]>/{{#time:Y-m-d|<Resources[Resources topic]>}}/Resources}}}
+
{{{info|page name=<Resources[Portal]>{{#if:<Resources[Resources topic]>|/{{#time:Y-m-d|<Resources[Resources topic]>}} }}/Resources}}}
 
{{{for template|Resources}}}
 
{{{for template|Resources}}}
{{form-row
+
<div class="card bg-light shadow-sm">
  |label=Portal
+
<div class="card-body">
  |field={{{field
+
{{{field
 
|Portal
 
|Portal
 
|input type=dropdown
 
|input type=dropdown
 
|values from category=Portals
 
|values from category=Portals
|class=form-control
+
|class=form-control mb-1
}}}
+
|hidden
}}
+
}}}<!-- -->{{{field
{{form-row
 
  |label=Topic
 
  |field={{{field
 
 
|Resources topic
 
|Resources topic
 
|input type=text with autocomplete
 
|input type=text with autocomplete
 
|values from property=Resources topic
 
|values from property=Resources topic
 
|remote autocompletion
 
|remote autocompletion
|class=form-control
+
|class=form-control mb-1
|mandatory
+
|hidden
}}}
+
}}}<!-- -->{{form-row
}}
 
{{form-row
 
 
   |label=Description
 
   |label=Description
 
   |label-style=align-self:start !important
 
   |label-style=align-self:start !important
Line 42: Line 37:
 
|delimiter=;
 
|delimiter=;
 
|max values=3
 
|max values=3
|class=form-control
+
|class=form-control my-1
 
}}}
 
}}}
 
}}
 
}}
 +
</div>
 +
</div>
 
{{{field
 
{{{field
 
|Resources list
 
|Resources list
Line 51: Line 48:
 
{{{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|Resources list item|multiple|add button text=Add a resource|embed in field=Resources[Resources list]}}}
 
{{{for template|Resources list item|multiple|add button text=Add a resource|embed in field=Resources[Resources list]}}}
Line 57: Line 54:
 
   |label=Type
 
   |label=Type
 
   |field={{{field
 
   |field={{{field
|News attachment type
+
|Resources 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 98: Line 95:
 
   |label=Link text / Caption
 
   |label=Link text / Caption
 
   |field={{{field
 
   |field={{{field
|Link text
+
|Resources text
 
|input type=text
 
|input type=text
 +
|class=form-control mt-1
 +
}}}
 +
}}
 +
{{form-row
 +
  |label=Author(s)
 +
  |field={{{field
 +
|Author
 +
|input type=tokens
 +
|values from property=Author
 +
|list
 +
|delimiter=;
 +
|class=form-control mt-1
 +
}}}
 +
}}
 +
{{form-row
 +
  |label=Date
 +
  |field={{{field
 +
|Has date
 +
|input type=datepicker
 +
}}}
 +
}}
 +
{{form-row
 +
  |label=Comment
 +
  |label-style=align-self:start !important
 +
  |class=mt-1
 +
  |field={{{field
 +
|Comment
 +
|input type=textarea
 +
|rows=3
 
|class=form-control
 
|class=form-control
 +
|editor=visualeditor
 
}}}
 
}}}
 
}}
 
}}
 
{{{end template}}}
 
{{{end template}}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
{{#formlink: form=Event
+
{{#formlink: form=Resources
   |link text=<span class="mw-ui-button mw-ui-progressive">Add an Event</span>
+
   |link text=<span class="mw-ui-button mw-ui-progressive">Add resources</span>
 
}}
 
}}
 
</noinclude>
 
</noinclude>

Latest revision as of 17:28, July 21, 2020