<!-- BEGIN [% component.name %] -->
  <table class="tree">
    <tr>
      <td>
		[% div_name = 'uploads'; INCLUDE site/snippets/toggleview.tt type = 'folder' %]
     </td>
      <td>
        <span class="title">File uploads</span>
      </td>
    </tr>
  </table>

    [%
	    base_addr = url_base.replace(':8000', '');
        resource_map = {
            request_forms => { # provide encrypted (Crypt::CRC) 'centre' token
                title   => 'Upload request forms',
                href    => "${base_addr}/script/cgi/request_forms.cgi?tkn=${token.centre}",
                new_tab => 1,
            },
            flow_datafile => {
                title   => 'Upload flow cytometry datafile',
                href    => "${base_addr}/script/cgi/flow_data.cgi",
                new_tab => 1,
            },
            outreach_datafile => {
                new_tab => 1,
                title   => 'Upload outreach datafile',
                href    => "${base_addr}/script/cgi/outreach_data.cgi",
            },
            bcr_abl_datafile => {
                title => 'Import BCR-ABL data file(s)',
                href  => app_url _ '/data-import/bcr_abl',
            },
            chimerism_datafile => {
                title => 'Import chimerism data file',
                href  => app_url _ '/data-import/chimerism',
            },
            cfh_datafile => {
                title => 'Upload new CfH data file',
                href  => app_url _ '/resources/data_file',
            },
            initial_request_forms => {
                new_tab => 1,
                title   => 'Upload initial request forms',
                href    => "${base_addr}/script/cgi/initial_requests.cgi",
            },
        };
    %]
  
  <div class='itemhidden' id='[% div_name %]'>
    <table style="margin-left: 30px">
        [% BLOCK request_form;
            import( resource_map.${entry} ); %]
            <tr>
                <td><img alt="" src="/images/text.gif" class="text" /></td>
                <td>
                    <a class="nav" href="[% href %]"
                       [% IF new_tab %]target="_blank"[% END %]>[% title %]</a>
                </td>
            </tr>
        [% END %]
        [%
            lfu = [
              'resources/menu/local/file_uploads', c.cfg('settings').item('_centre')
            ];
            local_file_uploads = lfu.join('.');
            PROCESS $local_file_uploads;
        %]
    </table>
  </div>
<!-- END [% component.name %] -->
