| OLD | NEW |
| 1 {# Copyright 2016 The Chromium Authors. All rights reserved. | 1 {# Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 Use of this source code is governed by a BSD-style license that can be | 2 Use of this source code is governed by a BSD-style license that can be |
| 3 found in the LICENSE file. | 3 found in the LICENSE file. |
| 4 #} | 4 #} |
| 5 | 5 |
| 6 {# Template for a page displaying a body and logs (optional) under a collapsible | 6 {# Template for a page displaying a body and logs (optional) under a collapsible |
| 7 section. | 7 section. |
| 8 #} | 8 #} |
| 9 {% extends "base.html" %} | 9 {% extends "base.html" %} |
| 10 | 10 |
| 11 {% block content %} | 11 {% block content %} |
| 12 | 12 |
| 13 <h2> Task Creation Status </h2> | 13 <h2> {{ title }} </h2> |
| 14 | 14 |
| 15 {{ body }} | 15 {{ body }} |
| 16 | 16 |
| 17 {% if log %} | 17 {% if log %} |
| 18 | 18 |
| 19 <p><a onclick="javascript:ShowHide('HiddenDiv'); return false;" href="#"> | 19 <p><a onclick="javascript:ShowHide('HiddenDiv'); return false;" href="#"> |
| 20 Show/hide details | 20 Show/hide details |
| 21 </a></p> | 21 </a></p> |
| 22 | 22 |
| 23 <div id="HiddenDiv" | 23 <div id="HiddenDiv" |
| 24 style="display:none; font: 0.8em 'Droid Sans Mono', monospace;"> | 24 style="display:none; font: 0.8em 'Droid Sans Mono', monospace;"> |
| 25 | 25 |
| 26 {# Loop over the lines of the log to add linebreaks. #} | 26 {# Loop over the lines of the log to add linebreaks. #} |
| 27 {%- for line in log -%} | 27 {%- for line in log -%} |
| 28 {{ line }}<br/> | 28 {{ line }}<br/> |
| 29 {%- endfor -%} | 29 {%- endfor -%} |
| 30 | 30 |
| 31 </div> | 31 </div> |
| 32 | 32 |
| 33 <script type="text/javascript"> | 33 <script type="text/javascript"> |
| 34 function ShowHide(divId) { | 34 function ShowHide(divId) { |
| 35 element = document.getElementById(divId) | 35 element = document.getElementById(divId) |
| 36 element.style.display = (element.style.display == 'none') ? 'block' : 'none'; | 36 element.style.display = (element.style.display == 'none') ? 'block' : 'none'; |
| 37 } | 37 } |
| 38 </script> | 38 </script> |
| 39 | 39 |
| 40 {% endif %} | 40 {% endif %} |
| 41 | 41 |
| 42 {% endblock %} | 42 {% endblock %} |
| OLD | NEW |