Skip to content

Commit

Permalink
Generating PDF report
Browse files Browse the repository at this point in the history
  • Loading branch information
Ederporto committed Nov 20, 2024
1 parent d4fe0fd commit f1437ea
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions metrics/templates/metrics/wmf_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
body {
font-weight: 200;
font-size: 14px;
font-family: "Montserrat", sans-serif;
}

h1 {
Expand All @@ -37,7 +38,7 @@
</div>
<div class="w3-container" style="background-color: var(--success-color); color:black;">
<h1 style="text-align: center;">{{ project }}</h1>
<table repeat="1" class="table table-striped table-fixed table-sara metrics_table">
<table repeat="1" class="table table-striped table-fixed table-sara metrics_table" style="border-spacing: 0; ">
<thead>
<tr>
<th>Metrics</th>
Expand All @@ -52,23 +53,25 @@ <h1 style="text-align: center;">{{ project }}</h1>
<tbody>
{% for metric in metrics %}
<tr>
<td style="padding:0.25em; border:1px solid black;" rowspan="2">{{ metric.metric }}</td>
<td style="padding:0.25em; border:1px solid black;" {% if metric.refs_short %}rowspan="2"{% endif %}>{{ metric.metric }}</td>
<td style="text-align:center; padding:0.25em; border:1px solid black;width: 11%">{{ metric.q1|bool_yesno }}</td>
<td style="text-align:center; padding:0.25em; border:1px solid black;width: 11%">{{ metric.q2|bool_yesno }}</td>
<td style="text-align:center; padding:0.25em; border:1px solid black;width: 11%">{{ metric.q3|bool_yesno }}</td>
<td style="text-align:center; padding:0.25em; border:1px solid black;width: 11%">{{ metric.q4|bool_yesno }}</td>
<td style="text-align:center; padding:0.25em; border:1px solid black;width: 11%">{{ metric.total|bool_yesno }}</td>
<td style="text-align:center; padding:0.25em; border:1px solid black;width: 11%">{{ metric.goal|bool_yesno }}</td>
</tr>
<tr>
<td style="padding:0.25em; border:1px solid black;" colspan="6">{% if metric.refs_short %}<small>Refs: {% for ref in metric.refs_short %}{{ ref }}{% if not forloop.last %}, {% endif %}{% endfor %}</small>{% endif %}</td>
</tr>
{% if metric.refs_short %}
<tr>
<td style="padding:0.25em; border:1px solid black;" colspan="6"><small>Refs: {% for ref in metric.refs_short %}{{ ref }}{% if not forloop.last %}, {% endif %}{% endfor %}</small></td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
<br><br>
<pdf:nextpage/>
<h2>References</h2>
<ul style="max-width: 100%; white-space: pre-wrap; overflow: scroll; word-wrap: break-word; word-break: break-word; overflow-wrap: break-word;">
<ul style="max-width: 100%;">
{% for ref in references %}
{{ ref|safe }}
{% endfor %}
Expand Down

0 comments on commit f1437ea

Please sign in to comment.