Source: site.view [edit]
Function name: scoreNewsRender
Arguments: data
Description:
Page type: webl
Render function:  
Module: geneticFinance

Page source:

var html = "";

if Size(data) == 1 then

  html = `
  
  <body>
      
    
    <form action="/webl/WubHub_DoIt" method="post">
  `;
    
  html = html + `<a href="/webl/WubHub_DoIt?cmdline=scoreNews(` + ToString(ToInt(data[0].num)-1) + `)">Prev</a> | `;
  html = html + `<a href="/webl/WubHub_DoIt?cmdline=scoreNews(` + ToString(ToInt(data[0].num)+1) + `)">Next</a> | `;
  html = html + `<a href="/webl/WubHub_DoIt?cmdline=scoreNews(?)">Next Unscored</a> --`;
    
  html = html + data[0].fullname + " (" + data[0].symbol + ")  ----   ";
  
  html = html + `
     <input name="cmdline" value="scoreNewsItem(num, score, txt)" type="hidden"/>
     BAD  `;
  
  var score = ToInt(data[0].score) ? 3;
  var i = 1;
  while i <= 5 do
     html = html + `<input type="radio" name="score" value="` + ToString(i) + `"`;
     if (i == score) then
        html = html + ` checked`
     end;
     html = html + `>` + ToString(i) + "\n";
     i = i + 1
  end;
  
  html = html + `GOOD --   
          <input type="radio" name="score" value="-1"`;
  
  if score == -1 then
     html = html + ` checked`
  end;
  
 html = html + `>  Wrong Company
          
          <input type="hidden" name="num" value="`;
  
  html = html + ToString(data[0].num) + `">
      <input type="text" name="txt" value="` + Wub_ReplaceAll(data[0].text, `"`, `&quot;`) + `">   
      <input type="submit" value="Submit Score">
     </form>
  `;
    
  html = html + `
    <hr>
    <iframe width="100%" height="100%" src="`;
  
  html = html + data[0].link + `"></iframe>
    
  </body>`;
else
  html = "Article not found."
end;  

NewPage(html, "text/html");