<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:meta="http://xml.zope.org/namespaces/meta"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      meta:interpolation="true"
      i18n:domain="euphorie"
      tal:define="client nocall:request/client; webhelpers nocall:context/@@webhelpers; tools nocall:context/@@tools">

<head>
    <title i18n:translate="title_tool">OiRA - Online interactive Risk Assessment</title>
    <metal:meta use-macro="webhelpers/macros/headers"/>
    <metal:css use-macro="webhelpers/macros/css"/>
    <style>
        ol.toc:before { content: "<tal:span i18n:translate='toc_header'>Contents</tal:span>"; }
    </style>
</head>

<body class="report ${webhelpers/extra_css}"
    tal:define="survey_url python:webhelpers.survey_url(phase='actionplan');
                company view/session/company;">

<h1>${view/report_title}</h1>
<div class="buttonBar super">
    <a class="button-medium"
        href="${python:view.url(name='download')}"
        i18n:translate="button_download">Download</a>
</div>

<div class="message notice comments" tal:condition="view/session/report_comment" tal:content="view/session/report_comment">
    Extra remarks for this particular survey.
</div>

<ol class="toc">
    <li>
        <em>
        <strong tal:condition="view/actioned_nodes" i18n:translate="header_present_risks">Risks that have been identified, evaluated and have an Action Plan</strong>
        </em>
    </li>
    <tal:node repeat="node view/actioned_nodes">
        <li tal:condition="python:node.depth==1 and node.type!='risk'"><a href="#node-${node/id}-evaluated">${node/title}</a></li>
    </tal:node>
    <li>
        <em>
        <strong tal:condition="view/unactioned_nodes" i18n:translate="header_unevaluated_risks">Risks that have been identified but do NOT have an Action Plan</strong>
        </em>
    </li>
    <tal:node repeat="node view/unactioned_nodes">
        <li tal:condition="python:node.depth==1 and node.type!='risk'"><a href="#node-${node/id}-unevaluated">${node/title}</a></li>
    </tal:node>
    <li>
        <em>
        <strong tal:condition="view/unanswered_nodes" i18n:translate="header_unanswered_risks">Hazards/problems that have been "parked" and are still to be dealt with</strong>
        </em>
    </li>
    <tal:node repeat="node view/unanswered_nodes">
        <li tal:condition="python:node.depth==1 and node.type!='risk'"><a href="#node-${node/id}-parked">${node/title}</a></li>
    </tal:node>
    <li>
        <em>
        <strong tal:condition="view/risk_not_present_nodes" i18n:translate="header_risks_not_present">Hazards/problems that have been managed or are not present in your organisation</strong>
        </em>
    </li>
    <tal:node repeat="node view/risk_not_present_nodes">
        <li tal:condition="python:node.depth==1 and node.type!='risk'"><a href="#node-${node/id}-not-present">${node/title}</a></li>
    </tal:node>
</ol>

<tal:if condition="view/actioned_nodes">
<h2 i18n:translate="header_present_risks">Risks that have been identified, evaluated and have an Action Plan</h2>
<tal:block repeat="node view/actioned_nodes">
    <tal:module condition="python:node.type!='risk'">
        <tal:tag replace="structure python:'&lt;h%s id=\'node-%s\'&gt;' % (node.depth+1, str(node.id)+'-evaluated')"/>
        <a href="${survey_url}/${python:'/'.join(node.short_path)}">${node/number} ${node/title}</a>
        <tal:tag replace="structure python:'&lt;/h%s&gt;' % (node.depth+1)"/>
    </tal:module>

    <tal:risk condition="python:node.type=='risk'">
    <tal:block define="zodbnode python:view.getZodbNode(node);
                        title python:view.title(node, zodbnode);
                        status python:view.risk_status(node, zodbnode)">
        <div class="message warning"
             tal:attributes="class python:{'unanswered':None, 'not-present':'success', 'present':'message warning', 'no-actionplans':'message warning', 'unevaluated':'message warning'}[status]"
             tal:define="show_negate_warning python:view.show_negate_warning(node, zodbnode)"
             tal:omit-tag="python:status=='unanswered'">
            <h4>
                <strong class="icon warning" tal:condition="python:not show_negate_warning and status=='present'">⚠</strong>
                <a href="${survey_url}/${python:'/'.join(node.short_path)}">${node/number} ${title}</a>
                <sup tal:condition="python:status=='not-present' and node.risk_type=='top5'"><a href="#top5-footnote">*</a></sup>
            </h4>
            <p tal:condition="node/priority" class="priority-${node/priority}" i18n:translate="risk_priority">
            This is a <strong i18n:name="priority_value"><tal:span tal:condition="python:node.priority=='low'" i18n:translate="risk_priority_low">low</tal:span><tal:span tal:condition="python:node.priority=='medium'" i18n:translate="risk_priority_medium">medium</tal:span><tal:span tal:condition="python:node.priority=='high'" i18n:translate="risk_priority_high">high</tal:span></strong> priority risk.</p>
        </div>
    </tal:block>

    <tal:plan repeat="actionplan python:node.action_plans[::-1]">
        <h5 i18n:translate="header_measure">Measure <tal:span i18n:name="index" content="repeat/actionplan/number">1</tal:span></h5>
        <dl tal:condition="python:actionplan.action_plan or actionplan.prevention_plan or actionplan.requirements">
        <tal:block condition="actionplan/action_plan">
            <dt i18n:translate="report_measure_actionplan">General approach (to eliminate or reduce the risk):</dt>
            <dd tal:content="actionplan/action_plan">Plan text here.</dd>
        </tal:block>
        <tal:block condition="actionplan/prevention_plan">
            <dt i18n:translate="report_measure_preventionplan">Specific action(s) required to implement this approach:</dt>
            <dd tal:content="actionplan/prevention_plan">Plan text here.</dd>
        </tal:block>
        <tal:block condition="actionplan/requirements">
            <dt i18n:translate="report_measure_requirements">Level of expertise and/or requirements needed:</dt>
            <dd tal:content="actionplan/requirements">Plan text here.</dd>
        </tal:block>
        </dl>


        <p class="discrete" tal:condition="python:actionplan.responsible or actionplan.planning_start or actionplan.planning_end or actionplan.budget">
        <tal:block condition="python:actionplan.responsible and not (actionplan.planning_start or actionplan.planning_end)"
            i18n:translate="report_measure_responsible"><strong i18n:name="responsible" tal:content="actionplan/responsible">The Hulk</strong> is responsible for this task.</tal:block>
        <tal:block condition="python:actionplan.responsible and actionplan.planning_start and not actionplan.planning_end"
            i18n:translate="report_measure_responsible_and_start"><strong i18n:name="responsible" tal:content="actionplan/responsible">The Hulk</strong> is responsible for this task
            which starts on <tal:span i18n:name="start" content="python:tools.formatDate(actionplan.planning_start)">14 April 2010</tal:span>.</tal:block>
        <tal:block condition="python:actionplan.responsible and actionplan.planning_end and not actionplan.planning_start"
            i18n:translate="report_measure_responsible_and_end"><strong i18n:name="responsible" tal:content="actionplan/responsible">The Hulk</strong> is responsible for this task
            which ends on <tal:span i18n:name="end" content="python:tools.formatDate(actionplan.planning_end)">14 April 2010</tal:span>.</tal:block>
        <tal:block condition="python:actionplan.planning_start and not (actionplan.responsible or actionplan.planning_end)"
            i18n:translate="report_measure_start_only">This task starts
            on <tal:span i18n:name="start" content="python:tools.formatDate(actionplan.planning_start)">14 April 2010</tal:span>.</tal:block>
        <tal:block condition="python:actionplan.planning_end and not (actionplan.responsible or actionplan.planning_start)"
            i18n:translate="report_measure_end_only">This task ends
            on <tal:span i18n:name="end" content="python:tools.formatDate(actionplan.planning_end)">14 April 2010</tal:span>.</tal:block>
        <tal:block condition="python:actionplan.planning_start and actionplan.planning_end and not actionplan.responsible"
            i18n:translate="report_measure_start_and_stop">This task starts
            on <tal:span i18n:name="start" content="python:tools.formatDate(actionplan.planning_start)">14 April 2010</tal:span> and
            ends on <tal:span i18n:name="end" content="python:tools.formatDate(actionplan.planning_end)">14 April 2010</tal:span>.</tal:block>
        <tal:block condition="python:actionplan.responsible and actionplan.planning_start and actionplan.planning_end"
            i18n:translate="report_measure_full"><strong i18n:name="responsible" tal:content="actionplan/responsible">The Hulk</strong> is responsible for this task
            which starts on <tal:span i18n:name="start" content="python:tools.formatDate(actionplan.planning_start)">14 April 2010</tal:span> and
            ends on <tal:span i18n:name="end" content="python:tools.formatDate(actionplan.planning_end)">14 April 2010</tal:span>.</tal:block>
            <tal:block condition="actionplan/budget" i18n:translate="report_measure_budget">There is a budget of
        <strong i18n:name="amount">€&nbsp;<tal:span replace="actionplan/budget">30</tal:span></strong> for this
        measure.</tal:block>
        </p>
    </tal:plan>

    <blockquote class="comments" tal:condition="python:node.comment and node.comment.strip()"><p tal:content="node/comment">
        Here are the comments the user has added to this risk.
    </p></blockquote>
    </tal:risk>
</tal:block>
</tal:if>

<tal:if condition="view/unactioned_nodes">
<h2 i18n:translate="header_unevaluated_risks">Risks that have been identified but do NOT have an Action Plan</h2>
<tal:block repeat="node view/unactioned_nodes">
    <tal:module condition="python:node.type!='risk'">
        <tal:tag replace="structure python:'&lt;h%s id=\'node-%s\'&gt;' % (node.depth+1, str(node.id)+'-unevaluated')"/>
        <a href="${survey_url}/${python:'/'.join(node.short_path)}">${node/number} ${node/title}</a>
        <tal:tag replace="structure python:'&lt;/h%s&gt;' % (node.depth+1)"/>
    </tal:module>

    <tal:risk condition="python:node.type=='risk'">
    <tal:block define="zodbnode python:view.getZodbNode(node);
                        title python:view.title(node, zodbnode);
                        status python:view.risk_status(node, zodbnode)">
    <div class="message warning"
            tal:attributes="class python:{'unanswered':None, 'not-present':'success', 'present':'message warning', 'no-actionplans':'message warning', 'unevaluated':'message warning'}[status]"
            tal:define="show_negate_warning python:view.show_negate_warning(node, zodbnode)"
            tal:omit-tag="python:status=='unanswered'">
        <h4>
            <a href="${survey_url}/${python:'/'.join(node.short_path)}">${node/number} ${title}</a>
            <sup tal:condition="python:status=='not-present' and node.risk_type=='top5'"><a href="#top5-footnote">*</a></sup>
        </h4>
        <p tal:condition="node/priority" class="priority-${node/priority}" i18n:translate="risk_priority">
        This is a <strong i18n:name="priority_value"><tal:span tal:condition="python:node.priority=='low'" i18n:translate="risk_priority_low">low</tal:span> <tal:span tal:condition="python:node.priority=='medium'" i18n:translate="risk_priority_medium">medium</tal:span> <tal:span tal:condition="python:node.priority=='high'" i18n:translate="risk_priority_high">high</tal:span></strong> priority risk.</p>
    </div>
    </tal:block>

    <blockquote class="comments" tal:condition="python:node.comment and node.comment.strip()"><p tal:content="node/comment">
        Here are the comments the user has added to this risk.
    </p></blockquote>
    </tal:risk>
</tal:block>
</tal:if>

<tal:if define="unanswered_nodes view/unanswered_nodes"
        condition="unanswered_nodes">
<h2 i18n:translate="header_unanswered_risks">Hazards/problems that have been "parked" and are still to be dealt with</h2>

<p i18n:translate="desc_unanswered_risks">
    The following risks have not yet been answered. Please do so at the soonest possibility.
</p>
<tal:block
        define="identification_url python:webhelpers.survey_url(phase='identification')"
        repeat="node unanswered_nodes">
    <tal:module condition="python:node.type!='risk'">
        <tal:tag replace="structure python:'&lt;h%s id=\'node-%s\'&gt;' % (node.depth+1, str(node.id)+'-parked')"/>
        <a href="${identification_url}/${python:'/'.join(node.short_path)}">${node/number} ${node/title}</a>
        <tal:tag replace="structure python:'&lt;/h%s&gt;' % (node.depth+1)"/>
    </tal:module>

    <tal:risk condition="python:node.type=='risk'">
    <tal:block define="zodbnode python:view.getZodbNode(node);
                        title python:view.title(node, zodbnode);
                        status python:view.risk_status(node, zodbnode)">
        <h4>
            <a href="${identification_url}/${python:'/'.join(node.short_path)}">${node/number} ${title}</a>
            <sup tal:condition="python:status=='not-present' and node.risk_type=='top5'"><a href="#top5-footnote">*</a></sup>
        </h4>
        <p tal:condition="node/priority" class="priority-${node/priority}" i18n:translate="risk_priority">
        This is a <strong i18n:name="priority_value"><tal:span tal:condition="python:node.priority=='low'" i18n:translate="risk_priority_low">low</tal:span><tal:span tal:condition="python:node.priority=='medium'" i18n:translate="risk_priority_medium">medium</tal:span><tal:span tal:condition="python:node.priority=='high'" i18n:translate="risk_priority_high">high</tal:span></strong> priority risk.</p>
    </tal:block>
    <blockquote class="comments" tal:condition="python:node.comment and node.comment.strip()"><p tal:content="node/comment">
        Here are the comments the user has added to this risk.
    </p></blockquote>
    </tal:risk>
</tal:block>
</tal:if>

<tal:if define="risk_not_present_nodes view/risk_not_present_nodes"
        condition="risk_not_present_nodes">
<h2 i18n:translate="header_risks_not_present">Hazards/problems that have been managed or are not present in your organisation</h2>
<tal:block
        define="identification_url python:webhelpers.survey_url(phase='identification')"
        repeat="node risk_not_present_nodes">

    <tal:module condition="python:node.type!='risk'">
        <tal:tag replace="structure python:'&lt;h%s id=\'node-%s\'&gt;' % (node.depth+1, str(node.id)+'-not-present')"/>
        <a href="${identification_url}/${python:'/'.join(node.short_path)}">${node/number} ${node/title}</a>
        <tal:tag replace="structure python:'&lt;/h%s&gt;' % (node.depth+1)"/>
    </tal:module>

    <tal:risk condition="python:node.type=='risk'">
    <tal:block define="
                    zodbnode python:view.getZodbNode(node);
                    title python:view.title(node, zodbnode);
                    status python:view.risk_status(node, zodbnode)">
        <h4>
            <a href="${identification_url}/${python:'/'.join(node.short_path)}">${node/number} ${title}</a>
            <sup tal:condition="python:status=='not-present' and node.risk_type=='top5'">
                <a href="#top5-footnote">*</a>
            </sup>
        </h4>
        <p tal:condition="node/priority" class="priority-${node/priority}" i18n:translate="risk_priority">
        This is a <strong i18n:name="priority_value"><tal:span tal:condition="python:node.priority=='low'" i18n:translate="risk_priority_low">low</tal:span>
        <tal:span tal:condition="python:node.priority=='medium'" i18n:translate="risk_priority_medium">medium</tal:span><tal:span tal:condition="python:node.priority=='high'" i18n:translate="risk_priority_high">high</tal:span></strong> priority risk.</p>
    </tal:block>

    <blockquote class="comments" tal:condition="python:node.comment and node.comment.strip()">
        <p tal:content="node/comment">
            Here are the comments the user has added to this risk.
        </p>
    </blockquote>
    </tal:risk>
</tal:block>
</tal:if>

<tal:starred tal:condition="view/nodes">
    <hr/>
    <p id="top5-footnote" class="discrete">*)
        <tal:span i18n:translate="top5_risk_not_present">
        This risk is not present in your organisation, but since the sector organisation considers this one of the priority risks it must be
        included in this report.
        </tal:span>
    </p>
</tal:starred>

<ol id="steps" tal:define="survey_url webhelpers/survey_url">
    <li class="complete" id="step-1">
    <a href="${survey_url}/start">
        <tal:span condition="not:webhelpers/is_iphone" i18n:translate="label_preparation">Preparation</tal:span>
        <tal:span condition="webhelpers/is_iphone" i18n:translate="iphone_label_preparation">Preparation</tal:span>
    </a>
    </li>
    <li class="complete" id="step-2">
    <a href="${survey_url}/identification">
        <tal:span condition="not:webhelpers/is_iphone" i18n:translate="label_identification">Identification</tal:span>
        <tal:span condition="webhelpers/is_iphone" i18n:translate="iphone_label_identification">Identification</tal:span>
    </a>
    </li>
    <li class="complete" id="step-3">
    <a href="${survey_url}/evaluation">
        <tal:span condition="not:webhelpers/is_iphone" i18n:translate="label_evaluation">Evaluation</tal:span>
        <tal:span condition="webhelpers/is_iphone" i18n:translate="iphone_label_evaluation">Evaluation</tal:span>
    </a>
    </li>
    <li class="complete" id="step-4">
    <a href="${survey_url}/actionplan">
        <tal:span condition="not:webhelpers/is_iphone" i18n:translate="label_action_plan">Action Plan</tal:span>
        <tal:span condition="webhelpers/is_iphone" i18n:translate="iphone_label_action_plan">Action Plan</tal:span>
    </a>
    </li>
    <li class="active current" id="step-5">
    <a href="${survey_url}/report">
        <tal:span condition="not:webhelpers/is_iphone" i18n:translate="label_report">Report</tal:span>
        <tal:span condition="webhelpers/is_iphone" i18n:translate="iphone_report">Report</tal:span>
    </a>
    </li>
</ol>

    <hr/>
    <ul class="discrete">
      <li tal:condition="python:isinstance(getattr(context, 'published', None), tuple)" i18n:translate="report_survey_revision">This report was based on the OiRA Tool '<tal:span i18n:name="title">${python:context.published[1]}</tal:span>' of revision date <tal:span i18n:name="date">${python:tools.formatDate(context.published[2])}</tal:span>.</li>
    </ul>

    <metal:css use-macro="webhelpers/macros/toplevel-navigation" tal:define="site_section string:actionplan"/>
    <metal:css use-macro="webhelpers/macros/appendix"/>
    <tal:block condition="not:view/download">
      <metal:css use-macro="webhelpers/macros/javascript"/>
      <tal:analytics replace="tile:client-analytics"/>
      <script type="text/javascript">
        $(document).ready(function() {
            $.localScroll();
        });
      </script>
    </tal:block>

</body>
</html>

