{{! Create a collapsible div in which to nest the reporting for a workunit.
    To add content to this div, append it to ${'#WORKUNITID-content'}.
}}
<div id="__{{workunit.id}}__content">{{#collapsible}}id={{workunit.id}}&title={{header_text}}{{#workunit.target_addresses}}&targets={{.}}{{/workunit.target_addresses}}{{#initially_open}}&initially_open=1{{/initially_open}}&spinner=1{{#is_tool}}&icon=icon-cog{{/is_tool}}{{#is_multitool}}&icon=icon-cogs{{/is_multitool}}{{/collapsible}}</div>
<script>
  $(function(){
    pants.append('#__{{workunit.id}}__content', '#{{workunit.parent.id}}-content');
    $('#{{workunit.parent.id}}-icon').removeClass('hidden');
      {{! The definitive workunit timing is done in pants, but this client-side timer
          allows us to show a running timer in the browser while the workunit is executing. }}
    pants.timerManager.startTimer('{{workunit.id}}', '#{{workunit.id}}-timer', 1000 * {{workunit.start_time}});
  });
</script>
