Fixes Jinja code to match new structure of StudyInfo documents
This commit is contained in:
parent
6a96ccffa2
commit
098cf10926
|
@ -13,10 +13,14 @@
|
|||
<bpmn:documentation># Documents & Approvals
|
||||
|
||||
> ## Protocol Document Management
|
||||
{% if StudyInfo.protocol is defined -%}
|
||||
{%- set p = StudyInfo.protocol -%}
|
||||
|
||||
> [{{p.name}}](/study/{{p.study_id}}/workflow/{{p.workflow_id}}/task/{{p.task_id}})
|
||||
{% if StudyInfo.documents.Study_Protocol_Document is defined -%}
|
||||
{%- set p = StudyInfo.documents.Study_Protocol_Document -%}
|
||||
{% if p.files|length -%}
|
||||
{%- set f = p.files[0] -%}
|
||||
> [{{p.display_name}}](/study/{{p.study_id}}/workflow/{{f.workflow_id}}/task/{{f.task_id}})
|
||||
{%- else -%}
|
||||
> No protocol uploaded yet.
|
||||
{% endif %}
|
||||
{%- else -%}
|
||||
> No protocol uploaded yet.
|
||||
{% endif %}
|
||||
|
@ -31,13 +35,14 @@
|
|||
> ## Documents
|
||||
> | Name | Status | Help | Download |
|
||||
|:---- |:------ |:---- |:-------- |
|
||||
{% for doc in StudyInfo.documents_status -%}
|
||||
{% if doc.file_id is defined -%}
|
||||
{% for key, doc in StudyInfo.documents.items() %}{% if doc.required -%}
|
||||
{% if doc.files|length -%}
|
||||
| [{{doc.display_name}}](/study/{{doc.study_id}}/workflow/{{doc.workflow_id}}/task/{{doc.task_id}}) | {{doc.status}} | [Context here](/help/documents/{{doc.code}}) | [Download](/file/{{doc.file_id}}/data) |
|
||||
{%- else -%}
|
||||
| {{doc.display_name}} | Not started | [?](/help/documents/{{doc.code}}) | No file yet |
|
||||
{%- endif %}
|
||||
{% endfor %}</bpmn:documentation>
|
||||
{% endif %}{% endfor %}
|
||||
</bpmn:documentation>
|
||||
<bpmn:extensionElements>
|
||||
<camunda:properties>
|
||||
<camunda:property name="display_name" value="Documents and Approvals" />
|
||||
|
@ -52,25 +57,19 @@
|
|||
<bpmn:script>StudyInfo approvals</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:scriptTask id="Activity_1aju60t" name="Load Documents">
|
||||
<bpmn:incoming>Flow_0w20w9j</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_1k3su2q</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0c7ryff</bpmn:outgoing>
|
||||
<bpmn:script>StudyInfo documents_status</bpmn:script>
|
||||
<bpmn:script>StudyInfo documents</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_142jtxs" sourceRef="Activity_0a14x7j" targetRef="Activity_DisplayDocsAndApprovals" />
|
||||
<bpmn:sequenceFlow id="Flow_0c7ryff" sourceRef="Activity_1aju60t" targetRef="Activity_0a14x7j" />
|
||||
<bpmn:sequenceFlow id="Flow_1k3su2q" sourceRef="StartEvent_1" targetRef="Activity_0b4ojeq" />
|
||||
<bpmn:scriptTask id="Activity_0b4ojeq" name="Load Protocol">
|
||||
<bpmn:incoming>Flow_1k3su2q</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0w20w9j</bpmn:outgoing>
|
||||
<bpmn:script>StudyInfo protocol</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_0w20w9j" sourceRef="Activity_0b4ojeq" targetRef="Activity_1aju60t" />
|
||||
<bpmn:sequenceFlow id="Flow_1k3su2q" sourceRef="StartEvent_1" targetRef="Activity_1aju60t" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1gmf4la">
|
||||
<bpmndi:BPMNEdge id="Flow_1k3su2q_di" bpmnElement="Flow_1k3su2q">
|
||||
<di:waypoint x="188" y="117" />
|
||||
<di:waypoint x="240" y="117" />
|
||||
<di:waypoint x="390" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0c7ryff_di" bpmnElement="Flow_0c7ryff">
|
||||
<di:waypoint x="490" y="117" />
|
||||
|
@ -99,13 +98,6 @@
|
|||
<bpmndi:BPMNShape id="Activity_07ytvmv_di" bpmnElement="Activity_1aju60t">
|
||||
<dc:Bounds x="390" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_0wf6u3m_di" bpmnElement="Activity_0b4ojeq">
|
||||
<dc:Bounds x="240" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0w20w9j_di" bpmnElement="Flow_0w20w9j">
|
||||
<di:waypoint x="340" y="117" />
|
||||
<di:waypoint x="390" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
||||
|
|
Loading…
Reference in New Issue