RSS Git Download  Clone
Raw Blame History
<!-- BEGIN site/request_links.tt -->
	[% # PROCESS dumper.tt dump = is_locked %]
<p id="navbar">
	[% IF c.query.param('_return'); site.html.back_button; END %]
	
	[% # PROCESS dumper.tt dump = data.status_option %]

	[% # either auth not required, or authorised:
		can_view_if_reported = status_options.authorised.is_active.match('no') OR 
			( status_options.authorised.is_active.match('yes') AND history.authorised )
		? 1 : 0;
	%]

    <span style="margin-right: 1em">
      <i>Record status:</i>
      [% IF is_locked %]
        [% IF c.user_can('edit_pid') %]
          <a class="href" href="[% app_url %]/request/unlock_request/[% data.id %]">
            <img class="href" src="/images/locked.png" title="unlock record" alt="" />
          </a>
        [% ELSE %]
          <img src="/images/locked.png" alt="" />
        [% END %]
      [% ELSE %]
        <img src="/images/unlocked.png" alt="" />
      [% END %]
    </span>
	
	[% IF c.user_can('view_history') %]
		<a href="[% app_url %]/history/=/[% data.id %]">History</a>
	[% ELSE %]
		History
	[% END %]
		::
	[% IF c.user_can('modify_results') # AND NOT is_locked # moved to results tmpl %]
		<a href="[% app_url %]/result/=/[% data.id %]">Results</a>
	[% ELSE %]
		Results
	[% END %]
		::
	[% PROCESS site/report_link_options.tt # Report link - complex options %]
		::
	[% IF c.user_can('log_errors') %]
		<a href="[% app_url %]/error/=/[% data.id %]">Errors</a>
	[% ELSE %]
		Errors
	[% END %]
		::
	[% IF c.user_can('modify_results') %]
		[% class = has_phonelog ? 'red' : 'normal' %]
		<a class="[% class %]" href="[% app_url %]/phone-log/=/[% data.id %]">PhoneLog</a>
	[% ELSE %]
		PhoneLog
	[% END %]
		::
	[% IF c.user_can('view_history') %]
		<a href="[% app_url %]/image/=/[% data.id %]">DataFiles</a>
		::
	[% END %]
	
	[% IF c.user_can('view_clinical_data') AND clinical_data_link.is_elegible;
		class = clinical_data_link.has_data ? 'red' : 'normal' %]
		<a href="[% app_url %]/hmrn_data/=/[% data.id %]">
			<span class="[% class %]">HMRN</span>			
		</a>
		::
	[% END %]

	[% IF c.user_can('print_one') AND has_optional.report %]
		[% IF can_view_if_reported %]
			<a href="[% app_url %]/request/print_record/[% data.id %]">Print</a>
		[% ELSIF c.user_can('report') # reported but not authorised: %]
			<a href="[% app_url %]/request/print_draft/[% data.id %]">Draft</a>
		[% END %]
	[% ELSE %]
		Print
	[% END %]
	
	[% IF c.user_can('email_report') AND has_optional.report AND can_view_if_reported %]
		::
		<a href="[% app_url %]/request/email_report/[% data.id %]">Email</a>
	[% END %]

</p>
<!-- END site/request_links.tt -->