};
FOREACH serial IN ctx.mfhd_summaries;
-%]
- <tr>
- <td class="rdetail-mfhd-head" colspan="2">[% l('Holdings summary ([_1])', serial.location) %]</td>
- </tr>
-[%
+ printed_mfhd_header = 0;
FOREACH type IN mfhd.keys;
NEXT UNLESS serial.$type.size;
-%]
- <tr>
- <td class="rdetail-mfhd-type">[% mfhd.$type %]</td>
- <td class="rdetail-mfhd-contents">[%
- FOR thing IN serial.$type;
- thing.join(", ");
- END %]</td>
- </tr>
+ IF !printed_mfhd_header; %]
+ <tr>
+ <td class="rdetail-mfhd-head" colspan="2">[% l('Holdings summary ([_1])', serial.location) %]</td>
+ </tr>
+ [% printed_mfhd_header = 1;
+ END; %]
+ <tr>
+ <td class="rdetail-mfhd-type">[% mfhd.$type %]</td>
+ <td class="rdetail-mfhd-contents">[%
+ FOR thing IN serial.$type;
+ thing.join(", ");
+ END %]</td>
+ </tr>
+ [% END;
+ IF printed_mfhd_header; %]
+ <tr>
+ <td class="rdetail-mfhd-foot" colspan="2"> </td>
+ </tr>
+ [% END; %]
[% END %]
- <tr>
- <td class="rdetail-mfhd-foot" colspan="2"> </td>
- </tr>
- [% END %]
</tbody></table>
</div>
[% END %]