results.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Search results for "{{.SearchPhrase}}"</title>
  5. <style>
  6. table, th, td {
  7. border: 1px solid black;
  8. border-collapse: collapse;
  9. }
  10. th {
  11. cursor: pointer;
  12. }
  13. </style>
  14. <script type="text/javascript" src="/static/processResults.js"></script>
  15. </head>
  16. <body onload="app.sortTable()">
  17. <div><a href="/"><b>Search again</b></a></div>
  18. <br/>
  19. <div>Filter:
  20. <input id="filter" type="text" name="name" placeholder="type phrase<ENTER>" onchange="app.filterTable(this.value)" autocomplete="off">
  21. <button class="btn" onclick="app.clearFilter()">Clear filter</button>
  22. <i>Click on column to sort</i>
  23. </div>
  24. <table>
  25. <thead>
  26. <tr style='text-align: left'>
  27. <th>Source</th>
  28. <th>Translation</th>
  29. <th>TM</th>
  30. </tr>
  31. </thead>
  32. <tbody id="dataRows">
  33. {{range $result := .Results}}
  34. {{range $segment := $result.Segments}}
  35. <tr style='text-align: left'>
  36. <td>{{$segment.Source}}</td>
  37. <td>{{$segment.Target}}</td>
  38. <td>{{$result.TMName}}</td>
  39. </tr>
  40. {{end}}
  41. {{end}}
  42. </tbody>
  43. </table>
  44. <br/>
  45. <a href="/">Search again</a>
  46. </body>
  47. </html>