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

    [% settings = c.cfg('settings'); # INCLUDE dumper.tt dump = settings %]

    [% load_views = settings.load_query_views %]

    <div class='itemhidden' id="[% div_name %]">
        <table style="margin-left: 30px">
        [%
            IF load_views; # otherwise insufficient to justify
                INCLUDE divider text = 'diagnosis';
            END;
            # IF c.user_can(''); # need to restrict ?
                INCLUDE row class_function = 'resources/diagnostic_terms'
                    title = 'Diagnostic terms';
            # END;
                INCLUDE row title = 'Diagnostic sub-categories'
                    class_function = 'resources/query_view/diagnostic_sub_categories';
            # IF c.user_can(''); # no need to restrict
                INCLUDE row class_function = 'resources/diagnosis_generated_lab_tests'
                title = 'Diagnosis-generated lab tests';
            # END;
            # IF c.user_can(''); # no need to restrict
                INCLUDE row class_function = 'resources/diagnosis_context_warnings'
                title = 'Diagnosis context warnings';
            # END;

            IF load_views; # otherwise insufficient to justify
                INCLUDE divider text = 'lab tests';
            END;
            # IF c.user_can(''); # need to restrict ?
                INCLUDE row class_function = 'resources/list_all_lab_tests'
                    title = 'List all lab tests';
            # END;

            # IF c.user_can(''); # need to restrict ?
                INCLUDE row class_function = 'resources/list_linked_lab_tests'
                title = 'List linked lab tests';
            # END;

            # IF c.user_can('screen'); # no need to restrict
                INCLUDE row class_function = 'resources/list_all_screen_tests'
                title = 'List all screen tests';
            # END;

            # IF c.user_can(''); # no need to restrict
                INCLUDE row class_function = 'resources/results_summary_generated_lab_tests'
                title = 'Results-summary-generated lab tests';
            # END;

            IF load_views;
                INCLUDE row title = 'Configured panel lab tests'
                    class_function = 'resources/query_view/panel_tests';
                INCLUDE row title = 'Outstanding lab tests'
                    class_function = 'resources/query_view/outstanding_lab_tests';
              INCLUDE divider text = 'misc';
            END;
           IF load_views;
                INCLUDE row title = 'Clinical trials'
                    class_function = 'resources/query_view/clinical_trials';
                INCLUDE row title = 'Local network locations'
                    class_function = 'resources/query_view/local_network_locations';
                INCLUDE row title = 'Error code assignments'
                    class_function = 'resources/query_view/error_code_assignments';
                INCLUDE row title = 'Reports emailed today'
                    class_function = 'resources/query_view/mailed_reports_today';
              INCLUDE divider text = 'outreach';
                INCLUDE row title = 'Outreach - no demographics'
                    class_function = 'resources/query_view/outreach_no_demographics';
                INCLUDE row title = 'Outreach - patients'
                    class_function = 'resources/query_view/outreach_patients';
            END;

            IF settings.have_outreach;
                INCLUDE row class_function
                    = 'resources/outreach_practice_blood_tube_overrides'
                    title = 'Practice blood tube overrides';
            END;

            IF settings.item('_centre').match('bristol');
                INCLUDE row title = 'HL7 records today'
                    class_function = 'resources/query_view/hl7_records_view';
                INCLUDE row title = 'Reports emailed today'
                    class_function = 'resources/query_view/emailed_reports_view';
            END;
        %]
        </table>
    </div>
<!-- END [% component.name %] -->
