Source: site.view [edit]
Function name: scenes
Arguments: scene
Description:
Page type: html
Render function:  
Module: demavu

Page source:

<webl>WubCall("demavu.top", []);</webl>

        <!-- partial -->
        <div class="main-panel">
          <div class="content-wrapper">


            <div class="row">
              <div class="col-sm-4 grid-margin">
                <div class="card">
                  <div class="card-body">
                    <h5>Scene</h5>
                    <div class="row">
                      <div class="col-8 col-sm-12 col-xl-8 my-auto">
                        <div id="name" class="d-flex d-sm-block d-md-flex align-items-center">
                          <h1 class="mb-0"><webl>WubCall("demavu.data2", ["-","-","games","-","scenes",scene,"name"]);</webl></h1>
                        </div>
                        <small class="text-muted"><a onclick="addHtmlBefore('name','<input id=&quot;editName&quot; type=&quot;text&quot; class=&quot;form-control editable&quot; title=&quot;-,games,-,scenes,<webl>scene</webl>,name&quot; value=&quot;<webl>WubCall("demavu.data2", ["-","-","games","-","scenes", scene, "name"])</webl>&quot;><p>')">(Edit)</a></small>

                         <textarea class="form-control editable" title="-,games,-,scenes,<webl>scene</webl>,description" id="description" rows="3"><webl>WubCall("demavu.data2", ["-","-","games","-","scenes",scene,"description"]);</webl></textarea>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="card">
                  <div class="card-body">
                    <h5>Description Text</h5>
                    <div class="form-group">
                      <textarea class="form-control editable" title="-,games,-,scenes,<webl>scene</webl>,longDescription" id="txtDescription" rows="6"><webl>WubCall("demavu.data2", ["-","-","games","-","scenes",scene,"longDescription"]);</webl></textarea>
                    </div>
                  </div>
                </div>

                <div class="card">
                  <div class="card-body">
                    <h5>Model</h5>
                    <div class="form-group">
                      <select name="models" id="models">
                        <option value="gpt4turbo">GPT-4 Turbo</option>
                        <option value="gpt4">GPT-4</option>
                        <option value="gpt35">GPT-3.5</option>
                        <option value="mixtral7b">Mixtral 7B</option>
                      </select>
                    </div>
                  </div>
                </div>


              </div>

              <div class="col-md-8 grid-margin stretch-card">
                <div class="card">
                  <div class="card-body">
                    <h5>Screenshot</h5>
                    <div class="owl-carousel owl-theme full-width owl-carousel-dash portfolio-carousel" id="owl-carousel-basic">
                      <div class="item">
                        <img id="imgSceneImage" src="<webl>var s = WubCall("demavu.data2", ["-","-","games","-","scenes",scene,"image"]); if s == "" then s = "/images/scene-screen.png" else s end;</webl>" alt="">
                      </div>
                    </div>
                    <input type="text" class="form-control imgtext editable" title="-,games,-,scenes,<webl>scene</webl>,image" id="txtSceneImage" 
                            placeholder="Enter image URL" value="<webl>var s = WubCall("demavu.data2", ["-","-","games","-","scenes",scene,"image"]); if s == "" then s = "/images/scene-screen.png" else s end;</webl>">
                  </div>
                </div>
              </div>

            </div>

            <div class="row">

              <div class="col-sm-2 grid-margin">
              </div>

              <div class="col-md-12 grid-margin stretch-card">
                <div class="card">
                  <div class="card-body">
                    <div class="d-flex flex-row justify-content-between">
                      <h4 class="card-title mb-1">Intents</h4>
                      <p class="text-muted mb-1">All intents a user may say on this screen.</p>
                    </div>
                    <div class="row">
                      <div class="col-12">
                        <div class="preview-list">

                <webl>
                   var intents = WubCall("demavu.data2", ["-","-","games","-","scenes",scene,"intents"]);
                   if Stringp(intents) then
                      if (intents == "") then
                         intents = []
                      else
                         intents = [intents]
                      end;
                   end;

                   var colors = ["bg-primary", "bg-success", "bg-info", "bg-warning", "bg-danger"];
                   var s = "";
                   var i = 0;
                   every intent in intents do    
                       var allIntents=WubCall("demavu.data2", ["-","-","games","-","intents","name",intent.value]);
              
                       var name = WubCall("demavu.data2", ["-","-","games","-","intents",intent.value,"name"]);
                       var args = [];
                       every arg in WubCall("demavu.data2", ["-","-","games","-","intents",intent.value,"arguments"]) do
                          args = args + [arg.lev6]
                       end;
                       s = s + `
                          <div class="preview-item border-bottom">
                            <div class="preview-thumbnail">
                              <div class="preview-icon ` + colors[i mod Size(colors)] + `">
                                <i class="` + WubCall("demavu.data2", ["-","-","games","-","intents",intent.value,"icon"]) + `"></i>
                              </div>
                            </div>
                            <div class="preview-item-content d-sm-flex flex-grow">
                              <div class="flex-grow">
                                <h6 class="preview-subject"><a href="/site/intents:` + name + `">` + name + `</a></h6>
                                <p class="text-muted mb-0">` + WubCall("demavu.data2", ["-","-","games","-","intents",intent.value,"description"]) + `</p>
                              </div>
                              <div class="mr-auto text-sm-right pt-2 pt-sm-0">
                                <p class="text-muted">Arguments</p>
                                <p class="text-muted">` + ToString(args)  + `</p>
                              </div>
                            </div>
                          </div>`;
                      i = i + 1
                   end;
                   s = s + `</div>
                      </div>
                    </div>
                    <div class="form-group">
                       <select class="form-control editable" title="-,games,-,scenes,` + scene + `,intents,` + ToString(i+1) + `,ADDLIST" id="addIntent">`;
                   s;
                </webl>
                       
                         
                <webl>
                   var s = "<option selected>Add Intent</option>\n";
                   var sceneIntents = [];
                   every intent in WubCall("demavu.data2", ["-","-","games","-","scenes",scene,"intents"]) do
                      sceneIntents = sceneIntents + [intent.value]
                   end;
                   var allIntents=WubCall("demavu.data2", ["-","-","games","-","intents","*","name"]);
                   every intent in allIntents do
                      if intent.value member sceneIntents then
                         s = s;
                      else
                         s = s + "<option value='" + intent.lev4 + "'>" + intent.value + "</option>\n";
                      end
                   end;
                   s; 
                   </webl>
                         </select>
                       </div>

                   </div>
                </div>
              </div>
            </div>
          </div>
          <!-- content-wrapper ends -->

<webl>WubCall("demavu.footer", []);</webl>