Sjabloon:Bericht form: verschil tussen versies

Uit Dorpsbelang Den Hout
Ga naar:navigatie, zoeken
Regel 1: Regel 1:
__NOTOC__ __NOTITLE__<!--
+
<div class="main-wrapper"><wsform action="addToWiki" >{{#ifeq:{{#urlget:mode}}|edit|<wscreate mwtemplate="Bericht" mwwrite="{{FULLPAGENAME}}" />}}<!--{{#ifeq:{{{Domein|}}}|{{SERVERNAME}}| |{{#widget:Redirect|url=https://{{{Domein|}}}/index.php/{{FULLPAGENAME}} }} }}-->__NOTOC__ __NOTITLE__<!--
--><div class="main-wrapper"><!--
+
--><div class="d-flex justify-content-end align-items-center">{{#ifeq:{{#urlget:mode}}|edit|<!--  
--><h1 class="mt-0 pt-0">{{#if:{{{Titel|}}}|{{{Titel|}}} bewerken|Nieuw bericht maken}}</h1><!--  
+
--><wsfield type="hidden" name="Pagename" value="{{FULLPAGENAME}}" /><!--  
-->{{#if:{{{Titel|}}}||Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes<br><br>}}<!--
+
-->Layout {{#tag:html|<select  class="inpt mr-1" name="Layout" id="multi-select3"  onchange="$('.bericht-grid').attr('class', 'bericht-grid '+this.value);console.log(this.value)" >
--></div><!--
+
  {{#arraymap:layout1, layout2|,|@@@|<option value="@@@" {{#ifeq:@@@|{{{Layout|}}}|selected="selected"}}>@@@</option>|}}
--><wsform  ><div class="row bg-gray pb-2"><div class="row main-wrapper"><!--  
+
  </select>}}<!--  
--><!-- <wscreate mwwrite="Bericht/" mwoption="range:00001-99999" mwtemplate="Bericht" mwfollow /> --><!--  
+
--> Auteur <wsfield type="text" class="inpt" name="Auteur" value="{{#if:{{{Auteur|}}}|{{{Auteur|}}}|{{CURRENTLOGGEDUSER}}}}" /><!--  
  --><div class="col-md-9 "><!--  
+
--><wsfield type="hidden"  name="Prefix" value="{{#explode:{{FULLPAGENAME}}|/|0}}"  /><!--  
  --><div class="mt-4"><b>Titel</b></div><!--  
+
--><wsfield type="hidden" name="Domein" value="{{#if:{{{Domein|}}}|{{{Domein|}}}|{{SERVERNAME}}}}" placeholder="domein"  /><!--  
--><wsfield type="text" class="form-control" name="Titel" value="{{{Titel|}}}"/><!--  
+
--><wsfield type="button" class="btn pull-right" onclick="uploadFiles()" >Opslaan</wsfield><!--
--><div class="mt-4"><b>Samenvatting</b></div><!--  
+
--><wsfield type="submit" class="btn pull-right d-none" id="real-submit" value="save" /><!--  
--><wsfield type="text" class="form-control" name="Samenvatting" value="{{{Samenvatting|}}}"/><!--  
+
  -->{{#widget:link|type=a|class=btn flex-end|text={{fa|arrow-left}}|href={{fullurl:{{FULLPAGENAME}}}} }}<!--  
--><div class="mt-4"><b>Bericht</b></div><!--  
+
-->|<!--
  -->{{#widget:editor|html={{{Bericht|}}} }}<!--  
+
-->{{#widget:link|type=a|class=btn float-right|text={{fa|edit}}|href={{fullurl:{{FULLPAGENAME}}|mode=edit}} }}<!--
--><wsfield type="textarea" class="form-control mb-4 d-none" name="Bericht" style="min-height:60vh" ></wsfield><!--  
+
--> }}</div><!--  
  --><b>Tags</b><div class="multi-select-wrapper" >{{#arraydefine:@tags|{{#ask:[[Class::Bericht]]|?Tags|format=array|mainlabel=-}} }}{{#arrayunique:@tags}}<span class="out">{{#arraymap:{{{Tags|}}}|,|@@@|{{#tag:wsfield|@@@{{#tag:wsfield||type=hidden|name=tags[]|value=@@@}}|type=button|class=btn btn-succes|onclick=this.remove()}}|}}</span>{{#tag:html|<input list="tags" name="browser" id="multi-select2" multiple>
+
--><div class="bericht-grid {{{Layout|}}}"><!--  
 +
  --><div class="grid-tags"><!--
 +
    -->{{#ifeq:{{#urlget:mode}}|edit|<div class="multi-select-wrapper" >{{#arraydefine:@tags|{{#ask:[[Class::Bericht]][[Domein::{{SERVERNAME}}]]|?Tags|format=array|mainlabel=-}} }}{{#arrayunique:@tags}}<span class="out">{{#arraymap:{{{tags|}}}|,|@@@|{{#tag:wsfield|@@@{{#tag:wsfield||type=hidden|name=tags[]|value=@@@}}|type=button|class=botn|onclick=this.remove()}}|}}</span>{{#tag:html|<input list="tags" name="browser" id="multi-select2" multiple>
 
   <datalist id="tags">
 
   <datalist id="tags">
 
     {{#arraymap:{{#arrayprint:@tags}}|,|@@@|
 
     {{#arraymap:{{#arrayprint:@tags}}|,|@@@|
 
     <option value="@@@">  |}}
 
     <option value="@@@">  |}}
     </datalist>}}</div></div><!--
+
     </datalist>}}</div>|<h1 class="mt-0 pt-0 mr-4 pr-4">{{uc:{{{tags|}}} }}</h1> }}<!--  
--><!--  
+
--></div><!--
  --><div class="col-md-3"><!--  
+
--><div class="grid-datum"><!--  
--><wsfield type="text" name="Domein" value="{{#if:{{{Domein|}}}|{{{Domein|}}}|{{SERVERNAME}}}}" placeholder="domein" class="form-control d-none" /><!--  
+
  --><b>{{#ifeq:{{#urlget:mode}}|edit|<wsfield type="date" class="form-control" name="Datum" value="{{#if:{{{Datum|}}}|{{#time:Y-m-d|{{{Datum|}}}}}|{{#time:Y-m-d|Now}}}}" />|{{{Datum|}}} }}</b><!--
 
+
--></div><!--
  --> <div class="mt-4"><b>Auteur</b></div><!--  
+
--><div class="grid-titel"><!--  
 
+
  --><h2>{{#ifeq:{{#urlget:mode}}|edit|<wsfield type="text" class="form-control" placeholder="Titel" name="Titel" value="{{{Titel|}}}"/>|{{{Titel|}}} }}</h2><!--  
--><wsfield type="text" class="form-control" name="Auteur" value="{{#if:{{{Auteur|}}}|{{{Auteur|}}}|{{CURRENTLOGGEDUSER}}}}" /><!--  
+
--></div><!--
  -->  <div class="mt-4"><b>Datum</b></div><!--  
+
  --><div class="grid-bericht">
--><wsfield type="date" class="form-control" name="Datum" value="{{#if:{{{Datum|}}}|{{#time:Y-m-d|{{{Datum|}}}}}|{{#time:Y-m-d|Now}}}}" /><!--  
+
{{#ifeq:{{#urlget:mode}}|edit|<wsfield type="textarea"  name="Samenvatting"  class="inptext" placeholder="Samenvatting" >{{{Samenvatting|}}}</wsfield><!-- {{#widget:editor|html={{{Bericht|}}} }} --><wsfield type="textarea" class="tinyframe" name="Bericht" >{{#tool:get parameters |{{PAGEID}} |$params}}{{#caprint:$params[Bericht][Bericht]||true }} </wsfield>|
 
+
{{{Bericht|}}} }}<!--  
  -->  <div class="mt-4"><b>Afbeeldingen en aanvullende informatie</b></div><!--
+
--></div><!--
--><div class="upload-wrapper"><!--  
 
 
  --><!--  
 
  --><!--  
  -->{{#if:{{{Files|}}}|  {{#camap:@images|@@@|<!--  
+
  --><div class="grid-img"><!--  
--><div class="upload-group">{{#ifeq:@@@[Type][fulltext]|Pdf|<h2 class="w-100 rs-border text-center pt-3 pb-3">{{fa|file-pdf}} </h2>|[[@@@[catitle]]]}}<div class="d-flex"><div class="w-100">@@@[Caption]</div>{{#tag:wsfield|{{fa|times}}|type=button|class=btn|onclick=removeFile(this, '@@@[catitle]')}}{{#ifeq:@@@[Type][fulltext]|Pdf||{{#tag:wsfield||id=@@@[catitle]|type=radio|name=Image|class=d-none|value=@@@[catitle]|checked={{#ifeq:@@@[catitle]|Bestand:{{{Image|}}}|checked|{{#ifeq:@@@[catitle]|{{{Image|}}}|checked}} }} }}{{#tag:wslabel|<i class="fa fa-star btn ml-0"></i>|for=@@@[catitle]}} }}</div></div><!--  
+
  --><div class="image-wrapper">{{#vardefine:@img|{{#ask:[[Class::Bericht file]][[Page::{{FULLPAGENAME}}]]|link=none|limit=1}} }}{{#if:{{#var:@img}}|[[{{#var:@img}}|link=]]}}{{#ifeq:{{#urlget:mode}}|edit|{{#widget:File upload
  -->|}} }}<!--
+
|preview=true
--><!--
+
|caption=false
-->{{#Widget:Multi upload bericht}}<!--  
+
|type=png
 +
|drop=true
 +
|button=<div class="btn">{{fa|upload}}</div>
 +
|filepagetemplate=Bericht file
 +
|filepageparameters=Class:Bericht file;Domein:{{SERVERNAME}};Bericht:{{FULLPAGENAME}}
 +
|filename={{#if:{{#var:@img}}|{{#explode:{{#explode:{{#var:@img}}|:|1}}|.|0}}|{{#time:U|now}}<FILENAME>}}
 +
}} }}</div><!--  
 +
  --></div><!--
 
--></div><!--  
 
--></div><!--  
--><!--
+
--></wsform></div><!--
--><!--
 
  --></div><!--
 
--></div></div><!--
 
--><div class="main-wrapper mt-4"><wsfield type="button" class="btn pull-right" onclick="document.querySelector('textarea').value = document.querySelector('.__editor').innerHTML;uploadFiles()" >Opslaan</wsfield><wsfield type="button" class="btn pull-right d-none" onclick="postBericht(this, 'Bericht')" id="real-submit" >Opslaan</wsfield></div><!--  
 
--></wsform>
 

Versie van 17 nov 2020 13:53