<!-- 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',
            },
			dna_concentration => {
				new_tab => 1,
				title   => 'Upload FluidX storage DNA concentration data file',
				href    => "${base_addr}/script/cgi/fileuploader.cgi/dna_concentration"
													_ "?c=${token.centre};u=${token.username}",
			},
            initial_request_forms => {
                new_tab => 1,
                title   => 'Upload initial request forms',
                # href  => "${base_addr}/script/cgi/initial_requests.cgi",
                href    => "${base_addr}/script/cgi/fileuploader.cgi/pre_registration"
													_ "?c=${token.centre};u=${token.username}",
            },
            genomics_fluidx_datafile => {
                new_tab => 1,
                title   => 'Upload Fluidx data-file',
                href    => "${base_addr}/script/cgi/fileuploader.cgi/fluidx_datafile"
							_ "?c=${token.centre};u=${token.username}",
            },
            generic_files => {
                title   => 'Upload generic files',
                href    => "${base_addr}/script/cgi/fileuploader.cgi/generic_files"
							_ "?conflict_action=rename;c=${token.centre};u=${token.username}",
                new_tab => 1,
            },
            results_files => {
                title   => 'Upload results files',
                href    => "${base_addr}/script/cgi/fileuploader.cgi/results_files"
							_ "?c=${token.centre};u=${token.username}",
                new_tab => 1,
            },
            new_request_forms => { # provide encrypted (Crypt::CRC) 'centre' token
                title   => 'Upload request forms',
                href    => "${base_addr}/script/cgi/fileuploader.cgi/request_forms"
							_ "?conflict_action=overwrite;c=${token.centre};u=${token.username}"
                new_tab => 1,
            },
            trial_edta_dna_results => {
				new_tab => 1,
				title   => 'Upload trial EDTA DNA concentrations data file',
				href    => "${base_addr}/script/cgi/fileuploader.cgi/trial_edta_dna_result"
							_ "?c=${token.centre};u=${token.username}",
            },
            trial_xna_extraction => {
				new_tab => 1,
				title   => 'Upload trial DNA/RNA concentrations data file',
				href    => "${base_addr}/script/cgi/fileuploader.cgi/trial_xna_extraction"
							_ "?c=${token.centre};u=${token.username}",
            },
        };
    %]

  <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 %] -->
