<!-- BEGIN [% component.name %] -->
    [% # INCLUDE dumper.tt dump = token %]
    <table class="tree">
        <tr>
            <td>
				[% div_name = 'lab'; INCLUDE site/snippets/toggleview.tt type = 'folder' %]
            </td>
            <td>
                <span class="title">Lab functions</span>
            </td>
        </tr>
    </table>

    <div class='itemhidden' id="[% div_name %]">
        <table style="margin-left: 30px">
            [%
                IF c.is_lab_staff;
                    INCLUDE row class_function = 'resources/dashboard'
                        title = 'Dashboard view';
                END;

                IF c.user_can('modify_results');
                    INCLUDE row class_function = 'result/export_test_results'
                        title = 'Export test results';
                END;

                IF c.user_can('modify_results') AND c.cfg('settings').xtr_96_addr;
                    INCLUDE row class_function = 'storage/read_xtr_96'
                        title = 'Import Fluidx XTR-96 data';
                    INCLUDE row class_function = 'storage/remove_storage_plate'
                        title = 'Remove Fluidx plate from storage';
                END;

                IF c.is_lab_staff;
                    INCLUDE row class_function = 'search/deleted_record'
                        title = 'Deleted records search';
                END;

                IF c.user_can('register');
                    INCLUDE row class_function = 'referral-source'
                        title = 'Referrers & referral sources';
                END;

                IF c.user_can('patient_merge') %]
                    <tr>
                      <td><img alt="" src="/images/text.gif" class="text" /></td>
                      <td>
                          <a class="nav" href="[% app_url %]/admin/patient_merge"
                                target="_blank">
                            Merge patients
                          </a>
                      </td>
                    </tr>
                [% END %]
                [% cfg = c.cfg('settings'); # PROCESS dumper.tt dump = cfg;
					want_rfc = 0;
                    IF c.is_lab_staff AND cfg.item('_centre') == cfg.sysadmin_centre;
						want_rfc = 1;
					ELSIF cfg.item('_centre').match('genomics') AND c.user_can('do_admin');
						want_rfc = 1;
					END;
					IF want_rfc;
                        base_addr = url_base.replace(':8000', '') %]
                    <tr>
                      <td><img alt="" src="/images/text.gif" class="text" /></td>
                      <td>
                          <a class="nav" href="[% base_addr %]/script/cgi/rfc.cgi?u=[%
							token.username %]&c=[% token.centre %]" target="_blank">HILIS RfC</a>
                      </td>
                    </tr>
                [% END %]
        </table>
    </div>
<!-- END [% component.name %] -->
