Add PDF print button to result details
This commit is contained in:
@@ -131,6 +131,7 @@ COM_TESTQUESTIONS_RESULT_SCORE="Wynik"
|
||||
COM_TESTQUESTIONS_RESULT_POINTS_BEFORE_AFTER="Punkty przed / po korekcie"
|
||||
COM_TESTQUESTIONS_RESULT_GRADE="Ocena"
|
||||
COM_TESTQUESTIONS_RESULT_NOT_ASSESSED="Nie sprawdzono"
|
||||
COM_TESTQUESTIONS_RESULT_GENERATE_PDF="Generuj PDF / drukuj"
|
||||
COM_TESTQUESTIONS_RESULT_DATE="Data zakończenia"
|
||||
COM_TESTQUESTIONS_RESULT_ANSWERS="Odpowiedzi"
|
||||
COM_TESTQUESTIONS_RESULT_EXECUTION_TIME="Czas wykonania"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
-- Brak zmian w schemacie bazy danych w wersji 1.43.35.
|
||||
@@ -14,6 +14,32 @@ $resolveImageUrl = static function ($path) {
|
||||
};
|
||||
?>
|
||||
<div class="container-fluid">
|
||||
<div class="mb-3 no-print">
|
||||
<button type="button" class="btn btn-outline-secondary" id="result-pdf-button">
|
||||
<span class="icon-print" aria-hidden="true"></span>
|
||||
<?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_RESULT_GENERATE_PDF'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<style>
|
||||
@media print {
|
||||
@page { size: A4; margin: 15mm; }
|
||||
.no-print, .toolbar, #toolbar, .subhead, .sidebar-wrapper, #sidebar, .navbar,
|
||||
#system-message-container, #adminForm input, #adminForm textarea,
|
||||
#adminForm select, #adminForm button { display: none !important; }
|
||||
body, .container-main, .container-fluid { background: #fff !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
|
||||
.container-fluid { max-width: none !important; }
|
||||
article { break-inside: auto; border-color: #aaa !important; }
|
||||
img { max-width: 100% !important; max-height: 150mm; object-fit: contain; }
|
||||
.alert { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.getElementById('result-pdf-button')?.addEventListener('click', function () {
|
||||
window.print();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<dl class="row">
|
||||
<div class="row"<?php echo (int) $this->item->extra_time > 0 ? ' style="background-color: #fff3cd;"' : ''; ?>>
|
||||
<dt class="col-sm-3"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_RESULT_PARTICIPANT'); ?></dt>
|
||||
|
||||
Reference in New Issue
Block a user