|
10 | 10 | {% endfor %} |
11 | 11 | </tr> |
12 | 12 |
|
13 | | - {% with submission=row.record %} |
14 | | - <tr class="all-submissions-table__child" data-parent-id="{{ submission.id }}"> |
15 | | - <td colspan="{{ table.columns|length }}"> |
16 | | - <table class="submission-meta"> |
17 | | - <tr class="submission-meta__row"> |
18 | | - <th><h6 class="heading heading--normal heading--no-margin">{% trans "Applicant" %}</h6></th> |
19 | | - <th><h6 class="heading heading--normal heading--no-margin">{% trans "Last updated" %}</h6></th> |
20 | | - <th><h6 class="heading heading--normal heading--no-margin">{% trans "Screening decisions" %}</h6></th> |
21 | | - <th><h6 class="heading heading--normal heading--no-margin">{% trans "Review outcomes" %}</h6></th> |
22 | | - </tr> |
23 | | - <tr class="submission-meta__row submission-meta__row--black"> |
24 | | - <td><strong>{{ submission.full_name }}</strong></td> |
25 | | - <td> |
26 | | - {% if submission.last_update %} |
27 | | - <strong>{% trans "by" %} {{ submission.last_user_update }}</strong><br/> |
28 | | - {{ submission.last_update|date:"SHORT_DATETIME_FORMAT" }} |
29 | | - {% else %} |
30 | | - — |
31 | | - {% endif %} |
32 | | - </td> |
33 | | - <td> |
34 | | - {% trans "Awaiting" as awaiting %} |
35 | | - <strong>{{ submission.joined_screening_statuses|default:awaiting }}</strong> |
36 | | - </td> |
37 | | - |
38 | | - <td> |
39 | | - <ul class="list list--no-margin"> |
40 | | - {% for reviewer in submission.has_reviewed %} |
41 | | - <li class="list__item list__item--reviewer"> |
42 | | - <span class="list__item--reviewer-name"> |
43 | | - {{ reviewer }} |
44 | | - {% if reviewer.role %}{% image reviewer.role.icon max-12x12 %}{% endif %} |
45 | | - </span> |
46 | | - <span class="list__item list__item--reviewer-outcome"> |
47 | | - {{ reviewer.review.get_recommendation_display }} |
48 | | - </span> |
49 | | - </li> |
50 | | - {% for opinion in reviewer.review.opinions.all %} |
51 | | - {% if forloop.first %} |
52 | | - <ul class="list list--opinion"> |
53 | | - {% endif %} |
| 13 | + {% comment %} |
| 14 | + <!-- @todo: remove this if no longer needed --> |
| 15 | + {% with submission=row.record %} |
| 16 | + <tr class="all-submissions-table__child" data-parent-id="{{ submission.id }}"> |
| 17 | + <td colspan="{{ table.columns|length }}"> |
| 18 | + <table class="submission-meta"> |
| 19 | + <tr class="submission-meta__row"> |
| 20 | + <th><h6 class="heading heading--normal heading--no-margin">{% trans "Applicant" %}</h6></th> |
| 21 | + <th><h6 class="heading heading--normal heading--no-margin">{% trans "Last updated" %}</h6></th> |
| 22 | + <th><h6 class="heading heading--normal heading--no-margin">{% trans "Screening decisions" %}</h6></th> |
| 23 | + <th><h6 class="heading heading--normal heading--no-margin">{% trans "Review outcomes" %}</h6></th> |
| 24 | + </tr> |
| 25 | + <tr class="submission-meta__row submission-meta__row--black"> |
| 26 | + <td><strong>{{ submission.full_name }}</strong></td> |
| 27 | + <td> |
| 28 | + {% if submission.last_update %} |
| 29 | + <strong>{% trans "by" %} {{ submission.last_user_update }}</strong><br/> |
| 30 | + {{ submission.last_update|date:"SHORT_DATETIME_FORMAT" }} |
| 31 | + {% else %} |
| 32 | + — |
| 33 | + {% endif %} |
| 34 | + </td> |
| 35 | + <td> |
| 36 | + {% trans "Awaiting" as awaiting %} |
| 37 | + <strong>{{ submission.joined_screening_statuses|default:awaiting }}</strong> |
| 38 | + </td> |
54 | 39 |
|
55 | | - <li class="list__item list__item--reviewer list__item--opinion"> |
| 40 | + <td> |
| 41 | + <ul class="list list--no-margin"> |
| 42 | + {% for reviewer in submission.has_reviewed %} |
| 43 | + <li class="list__item list__item--reviewer"> |
56 | 44 | <span class="list__item--reviewer-name"> |
57 | | - {{ opinion.author }} |
58 | | - {% if opinion.author.role %} |
59 | | - {% image opinion.author.role.icon max-12x12 %} |
60 | | - {% endif %} |
| 45 | + {{ reviewer }} |
| 46 | + {% if reviewer.role %}{% image reviewer.role.icon max-12x12 %}{% endif %} |
61 | 47 | </span> |
62 | | - <span class="list__item list__item--reviewer-outcome {{ opinion.get_opinion_display|lower }}"> |
63 | | - {{ opinion.get_opinion_display }} |
| 48 | + <span class="list__item list__item--reviewer-outcome"> |
| 49 | + {{ reviewer.review.get_recommendation_display }} |
64 | 50 | </span> |
65 | 51 | </li> |
| 52 | + {% for opinion in reviewer.review.opinions.all %} |
| 53 | + {% if forloop.first %} |
| 54 | + <ul class="list list--opinion"> |
| 55 | + {% endif %} |
| 56 | + |
| 57 | + <li class="list__item list__item--reviewer list__item--opinion"> |
| 58 | + <span class="list__item--reviewer-name"> |
| 59 | + {{ opinion.author }} |
| 60 | + {% if opinion.author.role %} |
| 61 | + {% image opinion.author.role.icon max-12x12 %} |
| 62 | + {% endif %} |
| 63 | + </span> |
| 64 | + <span class="list__item list__item--reviewer-outcome {{ opinion.get_opinion_display|lower }}"> |
| 65 | + {{ opinion.get_opinion_display }} |
| 66 | + </span> |
| 67 | + </li> |
66 | 68 |
|
67 | | - {% if forloop.last %} |
68 | | - </ul> |
69 | | - {% endif %} |
| 69 | + {% if forloop.last %} |
| 70 | + </ul> |
| 71 | + {% endif %} |
| 72 | + {% endfor %} |
70 | 73 | {% endfor %} |
71 | | - {% endfor %} |
72 | | - {% for reviewer in submission.hasnt_reviewed %} |
73 | | - <li class="list__item list__item--reviewer"> |
74 | | - <span class="list__item--reviewer-name"> |
75 | | - {{ reviewer }} |
76 | | - {% if reviewer.role %}{% image reviewer.role.icon max-12x12 %}{% endif %} |
77 | | - </span> |
78 | | - <span class="list__item list__item--reviewer-outcome">—</span> |
79 | | - </li> |
80 | | - {% endfor %} |
81 | | - </ul> |
82 | | - </td> |
83 | | - </tr> |
84 | | - </table> |
85 | | - </td> |
86 | | - </tr> |
87 | | - {% endwith %} |
| 74 | + {% for reviewer in submission.hasnt_reviewed %} |
| 75 | + <li class="list__item list__item--reviewer"> |
| 76 | + <span class="list__item--reviewer-name"> |
| 77 | + {{ reviewer }} |
| 78 | + {% if reviewer.role %}{% image reviewer.role.icon max-12x12 %}{% endif %} |
| 79 | + </span> |
| 80 | + <span class="list__item list__item--reviewer-outcome">—</span> |
| 81 | + </li> |
| 82 | + {% endfor %} |
| 83 | + </ul> |
| 84 | + </td> |
| 85 | + </tr> |
| 86 | + </table> |
| 87 | + </td> |
| 88 | + </tr> |
| 89 | + {% endwith %} |
88 | 90 |
|
89 | | - {% if row.record.previous %} |
90 | | - {# we have a linked application, re-render the header row #} |
91 | | - <tr class="all-submissions-table__child" data-parent-id="{{ row.record.id }}"> |
92 | | - <td colspan="{{ table.columns|length }}"> |
93 | | - <table class="submission-meta"> |
94 | | - <tr class="submission-meta__row"> |
95 | | - {% for column in row.table.columns %} |
96 | | - {% if forloop.first %} |
97 | | - {% elif forloop.counter == 2 %} |
98 | | - <th>{% trans "Linked" %} {{ row.record.previous.stage }}</th> |
99 | | - {% else %} |
100 | | - <th class="th th--{{ column.header|lower }}">{{ column.header }}</th> |
101 | | - {% endif %} |
102 | | - {% endfor %} |
103 | | - </tr> |
104 | 91 |
|
105 | | - {# mutate the row to render the data for the child row #} |
106 | | - {% with row=row|row_from_record:row.record.previous %} |
107 | | - <tr {{ row.attrs.as_html }}> |
108 | | - {% for column, cell in row.items %} |
109 | | - {% if column.name != "selected" %} |
110 | | - <td {{ column.attrs.td.as_html }}> |
111 | | - {% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %}{{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %} |
112 | | - </td> |
| 92 | + {% if row.record.previous %} |
| 93 | + {# we have a linked application, re-render the header row #} |
| 94 | + <tr class="all-submissions-table__child" data-parent-id="{{ row.record.id }}"> |
| 95 | + <td colspan="{{ table.columns|length }}"> |
| 96 | + <table class="submission-meta"> |
| 97 | + <tr class="submission-meta__row"> |
| 98 | + {% for column in row.table.columns %} |
| 99 | + {% if forloop.first %} |
| 100 | + {% elif forloop.counter == 2 %} |
| 101 | + <th>{% trans "Linked" %} {{ row.record.previous.stage }}</th> |
| 102 | + {% else %} |
| 103 | + <th class="th th--{{ column.header|lower }}">{{ column.header }}</th> |
113 | 104 | {% endif %} |
114 | 105 | {% endfor %} |
115 | 106 | </tr> |
116 | | - {% endwith %} |
117 | | - </table> |
118 | | - </td> |
119 | | - </tr> |
120 | | - {% endif %} |
| 107 | + |
| 108 | + {# mutate the row to render the data for the child row #} |
| 109 | + {% with row=row|row_from_record:row.record.previous %} |
| 110 | + <tr {{ row.attrs.as_html }}> |
| 111 | + {% for column, cell in row.items %} |
| 112 | + {% if column.name != "selected" %} |
| 113 | + <td {{ column.attrs.td.as_html }}> |
| 114 | + {% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %}{{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %} |
| 115 | + </td> |
| 116 | + {% endif %} |
| 117 | + {% endfor %} |
| 118 | + </tr> |
| 119 | + {% endwith %} |
| 120 | + </table> |
| 121 | + </td> |
| 122 | + </tr> |
| 123 | + {% endif %} |
| 124 | + {% endcomment %} |
121 | 125 |
|
122 | 126 | {% endblock %} |
123 | 127 |
|
|
0 commit comments