| {# Copyright 2016 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| #} |
| |
| {# Template for a page displaying a body and logs (optional) under a collapsible |
| section. |
| #} |
| {% extends "base.html" %} |
| |
| {% block content %} |
| |
| <h2> {{ title }} </h2> |
| |
| {{ body }} |
| |
| {% if log %} |
| |
| <p><a onclick="javascript:ShowHide('HiddenDiv'); return false;" href="#"> |
| Show/hide details |
| </a></p> |
| |
| <div id="HiddenDiv" |
| style="display:none; font: 0.8em 'Droid Sans Mono', monospace;"> |
| |
| {# Loop over the lines of the log to add linebreaks. #} |
| {%- for line in log -%} |
| {{ line }}<br/> |
| {%- endfor -%} |
| |
| </div> |
| |
| <script type="text/javascript"> |
| function ShowHide(divId) { |
| element = document.getElementById(divId) |
| element.style.display = (element.style.display == 'none') ? 'block' : 'none'; |
| } |
| </script> |
| |
| {% endif %} |
| |
| {% endblock %} |