Skip to content

Commit

Permalink
Merge pull request #15 from legiongis/8_inspect_report_print
Browse files Browse the repository at this point in the history
8 inspect report print
  • Loading branch information
mradamcox authored Dec 28, 2023
2 parents a3799d6 + 33928cf commit c8bcaca
Show file tree
Hide file tree
Showing 10 changed files with 667 additions and 613 deletions.
217 changes: 79 additions & 138 deletions pkg/graphs/resource_models/Actor.json

Large diffs are not rendered by default.

246 changes: 119 additions & 127 deletions pkg/graphs/resource_models/Advocacy.json

Large diffs are not rendered by default.

381 changes: 198 additions & 183 deletions pkg/graphs/resource_models/Easement.json

Large diffs are not rendered by default.

173 changes: 89 additions & 84 deletions pkg/graphs/resource_models/Preservation Directory.json

Large diffs are not rendered by default.

191 changes: 112 additions & 79 deletions pkg/graphs/resource_models/Revolving Loan.json

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions presutah/media/css/print.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.carousel-container {
display: none;
visibility: hidden;
}

.img-report-print-only {
display: block;
visibility: visible;
height: 100%;
width: auto;
flex: 1;
object-fit: cover;
}

.img-report-print-only-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
/* max-height: 350px; */
}

.scroll-y {
/* height: auto; */
}
5 changes: 5 additions & 0 deletions presutah/media/css/project.css
Original file line number Diff line number Diff line change
Expand Up @@ -489,3 +489,8 @@ h4.card-summary-name {
width: 25%;
}
}

.img-report-print-only-container {
display: none;
visibility: hidden;
}
10 changes: 8 additions & 2 deletions presutah/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@
},
},
'handlers': {
'file-debug': {
'level': 'DEBUG', # INFO, WARNING, ERROR
'class': 'logging.FileHandler',
'filename': os.path.join(APP_ROOT, 'arches-debug.log'),
'formatter': 'console'
},
'file': {
'level': 'WARNING', # DEBUG, INFO, WARNING, ERROR
'class': 'logging.FileHandler',
Expand All @@ -120,8 +126,8 @@
},
'loggers': {
'arches': {
'handlers': ['file', 'console'],
'level': 'WARNING',
'handlers': ['file', 'file-debug', 'console'],
'level': 'DEBUG',
'propagate': True
}
}
Expand Down
7 changes: 7 additions & 0 deletions presutah/templates/views/report-templates/default.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{% load i18n %}

{% load static %}
{% block css %}
{{ block.super }}
<link href="{% static 'css/print.css' %}" media="print" rel="stylesheet" type="text/css" />
{% endblock css %}

<!-- ko if: !$data.configForm -->
<!-- ko if: !$data.summary -->
{% block report %}
Expand Down
26 changes: 26 additions & 0 deletions presutah/templates/views/report-templates/image.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% extends "views/report-templates/default.htm" %}
{% load i18n %}

{% block header %}
<div class="carousel-container" data-bind="carousel: { content: { name: 'carouselItemTemplate', data: imgs } }"></div>

<template id="carouselItemTemplate">
</template>

<!-- ko if: ko.unwrap(imgs) -->
<div class="img-report-print-only-container">
<!-- ko foreach: {data: imgs, as: 'img'} -->
<img class="img-report-print-only" data-bind="attr: {src: img.src, style: ('max-width: calc(100% /' + Math.round(ko.unwrap($parent.imgs).length/2) + ')')}" />
<!-- /ko -->
</div>
<!-- /ko -->
{% endblock header %}

{% block header_form %}
<div class="control-label">
{% trans "Included Image Nodes" %}
</div>
<div class="col-xs-12 pad-no crud-widget-container">
<select class="design" data-placeholder="{% trans "Select image nodes to include..." %}" multiple data-bind="selectedOptions: nodes, options: nodeOptions, optionsText: 'name', optionsValue: 'nodeid', chosen: {disable_search_threshold: 10, width: '100%'}"></select>
</div>
{% endblock header_form %}

0 comments on commit c8bcaca

Please sign in to comment.