Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8 inspect report print #15

Merged
merged 7 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 %}