github.com/bcampbell/scrapeomat@v0.0.0-20220820232205-23e64141c89e/cmd/slurpserver/templates/browse.html (about)

     1  {{define "body"}}
     2  <form action="" method="GET">
     3    <label for="pubfrom" >PubFrom:</label>
     4    <input id="pubfrom" name="pubfrom" type="date" value="{{.Filt.PubFromString}}" />
     5    <label for="pubto" >PubTo:</label>
     6    <input id="pubto" name="pubto" type="date" value="{{.Filt.PubToString}}" />
     7    <select id="pub" name="pub" multiple>
     8      {{ $f := .Filt}}
     9      {{ range .Pubs }}
    10      <option value="{{.Code}}"{{if $f.IsPubSet .Code}} selected{{end}}>{{.Code}}</option>
    11      {{end}}
    12    </select>
    13  <input type="submit" value="submit" />
    14  </form>
    15    <table class="table">
    16      <thead>
    17        <tr>
    18          <th>ID</th>
    19          <th>Headline</th>
    20          <th>PubCode</th>
    21          <th>Published</th>
    22          <th>Authors</th>
    23        </tr>
    24      </thead>
    25      <tbody>
    26      {{range .Arts}}
    27      <tr>
    28          <td>{{.ID}}</td>
    29          <td><a href="browse/art?id={{.ID}}">{{.Headline}}</td>
    30          <td>{{.Publication.Code}}</td>
    31          <td>{{.Published}}</td>
    32          <td>{{range .Authors}}{{.Name}}, {{end}}</td>
    33      </tr>
    34      {{end}}
    35      </tbody>
    36    </table>
    37    <a href="{{.MoreURL}}">more...</a>
    38  
    39  {{end}}