<table class="tbl">
  <thead>
    <tr>
      [% IF c.user_exists AND !no_checkboxes %]
      <th>
        <input type="checkbox" />
      </th>
      [% END %]
      [% IF series_item_numbers %]
      <th style="width: 1em">[% l('#') %]</th>
      [% END %]
      <th>[% l('Work') %]</th>
      <th>[% l('Writers') %]</th>
      <th>[% l('Artists') %]</th>
      <th>[% l('ISWC') %]</th>
      <th>[% l('Type') %]</th>
      <th>[% l('Language') %]</th>
      <th>[% l('Attributes') %]</th>
      [% UNLESS no_ratings %]
      <th>[% l('Rating') %]</th>
      [% END %]
    </tr>
  </thead>
  <tbody>
    [% FOR work IN works %]
    <tr class="[% loop.parity %]">
      [% IF c.user_exists AND !no_checkboxes %]
      <td>
        <input type="checkbox" name="add-to-merge" value="[% work.id %]" />
      </td>
      [% END %]
      [% IF series_item_numbers %]
      <td style="width: 1em">
        [% work_id=work.id; series_item_numbers.$work_id %]
      </td>
      [% END %]
      <td>
        [% descriptive_link(work) %]
      </td>
      <td>
        <ul>
          [% FOR rel_artist=work.writers %]
            <li>
              [% l('{artist} ({roles})', { artist => link_artist(rel_artist.entity),
                   roles  => rel_artist.roles.join(', ') }) %]
            </li>
          [% END %]
        </ul>
      </td>
      <td>
        <ul>
          [% FOR rel_artist=work.artists %]
            <li>[% artist_credit(rel_artist) %]</li>
          [% END %]
        </ul>
      </td>
      <td class="iswc">
        <ul>
          [% FOR iswc=work.iswcs %]
            <li>[% link_iswc(iswc) %]</li>
          [% END %]
        </ul>
      </td>
      <td>
        [% work.l_type_name %]
      </td>
      <td>
        <abbr title="[% work.language.l_name %]">[% work.language.iso_code_3 %]</abbr>
      </td>
      <td>
        [% work_attributes_list(work) %]
      </td>
      [% UNLESS no_ratings %]
      <td>[% rating_stars(work) %]</td>
      [% END %]
    </tr>
    [% END %]
  </tbody>
</table>
