Skip to content

Commit

Permalink
Merge pull request #8 from edilytics/web_report_refactor
Browse files Browse the repository at this point in the history
Cup script and if htmls statement
  • Loading branch information
Snicker7 authored Aug 3, 2023
2 parents ab74bc6 + d66ed48 commit 69cb5e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdn.plot.ly/plotly-2.11.1.min.js"></script>
<script src="/static/js/htmx-1.9.1.min.js"></script>
<style>
body {
font-family: 'Montserrat', sans-serif !important;
Expand Down
22 changes: 11 additions & 11 deletions templates/shared/partials/fig_summaries.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div id="fig_summary_{{plot_name}}">
{% if report_data['htmls'][plot_name] %}
{{report_data['htmls'][plot_name]|safe}}
{% else %}
<a href="{{report_data['crispresso_data_path']}}{{plot_name}}.pdf"><img src="{{report_data['crispresso_data_path']}}{{plot_name}}.png" width='70%'></a>
{% endif %}
<label class="labelpadding">{{report_data['labels'][plot_name]}}</label>
{% for (data_label,data_path) in report_data['datas'][plot_name] %}
<p class="m-0"><small>Data: <a href="{{report_data['crispresso_data_path']}}{{data_path}}">{{data_label}}</a></small></p>
{% endfor %}
</div>
<div id="fig_summary_{{plot_name}}">
{% if report_data['htmls'] and report_data['htmls'][plot_name]%}
{{report_data['htmls'][plot_name]|safe}}
{% else %}
<a href="{{report_data['crispresso_data_path']}}{{plot_name}}.pdf"><img src="{{report_data['crispresso_data_path']}}{{plot_name}}.png" width='70%'></a>
{% endif %}
<label class="labelpadding">{{report_data['labels'][plot_name]}}</label>
{% for (data_label,data_path) in report_data['datas'][plot_name] %}
<p class="m-0"><small>Data: <a href="{{report_data['crispresso_data_path']}}{{data_path}}">{{data_label}}</a></small></p>
{% endfor %}
</div>

0 comments on commit 69cb5e2

Please sign in to comment.