2022-03-28 00:56:00 +02:00
<! doctype html >
2023-09-27 17:21:17 +02:00
< html lang = " <?php echo $TRANSLATION_LANGUAGE ?> " dir = " <?php echo $DIRECTION_LANGUAGE ?> " style = " direction: <?php echo $DIRECTION_LANGUAGE ?>; " class = " <?php echo $DIRECTION_LANGUAGE ?> " >
2022-03-28 00:56:00 +02:00
< head >
<!-- Required meta tags -->
< meta charset = " utf-8 " >
< meta name = " viewport " content = " width=device-width, initial-scale=1 " >
2023-09-22 23:20:44 +02:00
< link href = " <?php echo $REVERSE_PROXY_URL ; ?>/vendor/bootstrap.<?php echo $DIRECTION_LANGUAGE ?>.min.css?5.1.1 " rel = " stylesheet " >
2023-09-25 00:17:47 +02:00
< link href = " <?php echo $REVERSE_PROXY_URL ; ?>/vendor/bootstrap-icons.css?1.11.1 " rel = " stylesheet " >
2023-09-04 16:47:10 +02:00
< link href = " <?php echo $REVERSE_PROXY_URL ; ?>/css/app.css?<?php echo ( $COMMIT ) ? $COMMIT : filemtime( $ROOT . " / public / css / app . css " ) ?> " rel = " stylesheet " >
< link rel = " icon " type = " image/x-icon " href = " <?php echo $REVERSE_PROXY_URL ; ?>/favicon-organization.ico " >
2022-03-28 00:56:00 +02:00
2023-09-06 13:20:29 +02:00
< title >< ? php _ ( " Organize PDF " ); ?> </title>
2022-03-28 00:56:00 +02:00
</ head >
2022-05-08 23:07:24 +02:00
< body >
2022-04-01 14:41:58 +02:00
< noscript >
< div class = " alert alert-danger text-center " role = " alert " >
2023-09-06 13:20:29 +02:00
< i class = " bi bi-exclamation-triangle " ></ i >< ? php echo _ ( " Site not functional without JavaScript enabled " ); ?>
2022-04-01 14:41:58 +02:00
</ div >
</ noscript >
2022-03-28 00:56:00 +02:00
< div id = " page-upload " >
2023-09-22 16:27:43 +02:00
< ? php include ( 'components/navtab.html.php' ); ?>
2022-10-16 23:38:37 +02:00
< div class = " px-4 py-4 text-center " >
2023-09-11 19:25:05 +02:00
< h1 class = " display-5 fw-bold mb-0 mt-3 " >< ? php echo sprintf ( _ ( " %s Organize PDF " ), '<i class="bi bi-ui-checks-grid"></i>' ); ?> </h1>
2023-09-06 13:20:29 +02:00
< p class = " fw-light mb-3 subtitle text-dark text-nowrap " style = " overflow: hidden; text-overflow: ellipsis; " >< ? php echo _ ( " Merge, sort, rotate, delete, extract pages " ); ?> </p>
2022-05-07 11:11:40 +02:00
< div class = " col-md-6 col-lg-5 col-xl-4 col-xxl-3 mx-auto " >
2022-03-28 00:56:00 +02:00
< div class = " col-12 " >
2023-11-09 01:22:03 +01:00
< label class = " form-label mt-3 " for = " input_pdf_upload " >< ? php echo _ ( " Choose a PDF " ); ?> </label>
2023-09-06 13:20:29 +02:00
< input id = " input_pdf_upload " placeholder = " <?php echo _( " Choose a PDF " ); ?> " class = " form-control form-control-lg " type = " file " accept = " .pdf,application/pdf " multiple = " true " />
2023-03-18 00:24:29 +01:00
< ? php if ( $PDF_DEMO_LINK ) : ?>
2023-11-09 01:22:03 +01:00
< p class = " mt-2 small fw-light text-dark " >& nbsp ; </ p >
2023-09-06 13:20:29 +02:00
< a class = " btn btn-sm btn-link opacity-75 " href = " #<?php echo $PDF_DEMO_LINK ?> " >< ? php echo _ ( " Test with a demo PDF " ); ?> </a>
2023-03-18 00:24:29 +01:00
< ? php endif ; ?>
2022-03-28 00:56:00 +02:00
</ div >
</ div >
</ div >
2022-10-10 23:26:20 +02:00
< footer class = " text-center text-muted mb-2 fixed-bottom opacity-75 " >
2023-09-06 16:45:33 +02:00
< small >< ? php echo _ ( " Free open-source software " ); ?> <span class="d-none d-md-inline"><?php echo _("under AGPL-3.0 license"); ?></span> : <a href="https://github.com/24eme/signaturepdf"><?php echo _("see the source code"); ?></a><?php if($COMMIT): ?> <span class="d-none d-md-inline small">[<a href="https://github.com/24eme/signaturepdf/tree/<?php echo $COMMIT ?>"><?php echo $COMMIT ?></a>]</span><?php endif; ?></small>
2022-03-28 00:56:00 +02:00
</ footer >
</ div >
2023-09-22 18:40:18 +02:00
< div id = " page-organization " class = " d-none decalage-pdf-div " >
2022-10-11 00:57:47 +02:00
< div id = " div-margin-top " style = " height: 88px; " class = " d-md-none " ></ div >
2023-09-06 13:20:29 +02:00
< div style = " top: 62px; " class = " w-100 position-absolute text-center text-muted opacity-50 d-md-none " >< em >< ? php echo _ ( " Touch a page to select it " ); ?> </em></div>
2022-10-14 00:22:47 +02:00
< div id = " container-main " >
2023-09-22 18:18:09 +02:00
< div id = " container-pages " class = " col-12 pt-1 vh-100 d-flex align-content-start flex-wrap position-relative " style = " overflow-y: scroll; overflow-x: hidden; " dir = " auto " >
2022-10-14 00:22:47 +02:00
</ div >
2022-04-28 19:09:56 +02:00
</ div >
2023-09-22 23:39:18 +02:00
< div id = " container-btn-zoom " class = " btn-group-vertical position-fixed " >
2022-04-28 19:09:56 +02:00
< button id = " btn-zoom-increase " class = " btn btn-outline-dark bg-white text-dark " >< i class = " bi bi-zoom-in " ></ i ></ button >
< button id = " btn-zoom-decrease " class = " btn btn-outline-dark bg-white text-dark " >< i class = " bi bi-zoom-out " ></ i ></ button >
2022-03-28 00:56:00 +02:00
</ div >
2022-10-08 11:05:03 +02:00
< div id = " div-margin-bottom " style = " height: 55px; " class = " d-md-none " ></ div >
2022-04-10 01:35:35 +02:00
< div class = " offcanvas offcanvas-end show d-none d-md-block shadow-sm " data - bs - backdrop = " false " data - bs - scroll = " true " data - bs - keyboard = " false " tabindex = " -1 " id = " sidebarTools " aria - labelledby = " sidebarToolsLabel " >
2023-09-06 13:20:29 +02:00
< a class = " btn btn-close btn-sm position-absolute opacity-25 d-none d-sm-none d-md-block " title = " <?php echo _( " Close this PDF and return to home " ); ?> " style = " position: absolute; top: 2px; right: 2px; font-size: 10px; " href = " <?php echo $REVERSE_PROXY_URL ; ?>/organization " ></ a >
2022-04-10 01:35:35 +02:00
< div class = " offcanvas-header mb-0 pb-0 " >
2023-09-06 13:20:29 +02:00
< h5 class = " mb-1 d-block w-100 " id = " sidebarToolsLabel " >< ? php echo _ ( " PDF organization " ); ?> <span class="float-end me-2" title="<?php echo _("This PDF is stored on your computer to be signed by you only"); ?>"><i class="bi-ui-checks-grid"></i></span></h5>
2022-04-10 01:35:35 +02:00
< button type = " button " class = " btn-close text-reset d-md-none " data - bs - dismiss = " offcanvas " aria - label = " Close " ></ button >
</ div >
2022-05-23 23:57:14 +02:00
< div class = " offcanvas-body pt-3 " style = " padding-bottom: 60px; " >
2022-10-17 00:49:32 +02:00
< div id = " list_pdf_container " >
< ul id = " list_pdf " class = " list-group " >
</ ul >
</ div >
2022-04-28 19:09:56 +02:00
< div class = " d-grid gap-2 mt-2 " >
2023-09-11 19:25:05 +02:00
< button type = " button " class = " btn btn-sm btn-outline-dark " onclick = " document.getElementById('input_pdf_upload_2').click(); " >< ? php echo sprintf ( _ ( " %s Add a PDF " ), '<i class="bi bi-plus-circle"></i>' ); ?> </button>
2022-05-23 23:57:14 +02:00
< input id = " input_pdf_upload_2 " class = " form-control d-none " type = " file " accept = " .pdf,application/pdf " multiple = " true " >
2022-04-28 19:09:56 +02:00
</ div >
2022-05-17 01:54:45 +02:00
< hr />
2022-05-18 10:04:49 +02:00
< div id = " container_btn_select " class = " opacity-50 card " >
2023-09-18 17:58:23 +02:00
< div class = " card-header small text-center p-1 " >< ? php echo sprintf ( _ ( " %s page(s) selected " ), '<span>0</span>' ); ?> <button id="btn_cancel_select" type="button" class="btn-close btn-close-white float-end" aria-label="Close"></button></div>
2022-05-21 01:43:49 +02:00
< div class = " card-body d-grid gap-2 p-2 " >
2023-09-11 19:25:05 +02:00
< button id = " btn_rotate_select " disabled = " disabled " type = " button " class = " btn btn-sm btn-outline-secondary " >< ? php echo sprintf ( _ ( " %s Rotate 90° " ), '<i class="bi bi-arrow-clockwise"></i>' ); ?> </button>
< button id = " btn_drag_select " disabled = " disabled " type = " button " class = " btn btn-sm btn-outline-secondary " >< ? php echo sprintf ( _ ( " %s Move " ), '<i class="bi bi-arrows-move"></i>' ); ?> </button>
< button id = " btn_delete_select " disabled = " disabled " type = " button " class = " btn btn-sm btn-outline-secondary " >< ? php echo sprintf ( _ ( " %s Delete " ), '<i class="bi bi-trash"></i>' ); ?> </button>
< button id = " save-select " class = " btn btn-sm btn-outline-secondary " disabled = " disabled " form = " form_pdf " type = " submit " >< ? php echo sprintf ( _ ( " %s Extract and download " ), '<i class="bi bi-download"></i>' ); ?> </button>
2022-05-18 10:04:49 +02:00
</ div >
2023-09-11 19:25:05 +02:00
< div class = " card-footer d-none small text-center p-1 border-primary bg-primary bg-opacity-25 " >< a id = " btn_cancel_select_footer " type = " button " aria - label = " Close " style = " text-decoration: none; " class = " text-primary " >< ? php echo sprintf ( _ ( " %s Cancel selection " ), '<i class="bi bi-x-lg"></i>' ); ?> </a></div>
2022-05-17 01:54:45 +02:00
</ div >
2022-04-10 01:35:35 +02:00
< div class = " position-absolute bottom-0 pb-2 ps-0 pe-4 w-100 " >
2023-09-04 16:47:10 +02:00
< form id = " form_pdf " action = " <?php echo $REVERSE_PROXY_URL ; ?>/organize " method = " post " enctype = " multipart/form-data " >
2022-04-10 01:35:35 +02:00
< input id = " input_pdf " name = " pdf[] " type = " file " class = " d-none " />
< input id = " input_pages " type = " hidden " value = " " name = " pages " />
2022-12-07 00:52:54 +01:00
< div id = " btn_container " class = " d-grid gap-2 mt-2 " >
2023-11-10 09:44:17 +01:00
< button class = " btn btn-primary " type = " submit " id = " save " >< ? php echo sprintf ( _ ( " %s Download the full PDF " ), '<i class="bi bi-download"></i>' ); ?> </button>
2022-03-29 01:05:43 +02:00
</ div >
2022-04-10 01:35:35 +02:00
</ form >
</ div >
</ div >
2022-03-28 00:56:00 +02:00
</ div >
2022-10-07 23:45:33 +02:00
< div id = " top_bar " class = " position-fixed top-0 start-0 bg-white w-100 shadow-sm d-md-none p-2 " >
2022-10-15 01:51:00 +02:00
< div id = " top_bar_action " >
< div class = " d-flex " role = " group " >
2023-11-11 00:41:33 +01:00
< button id = " btn_liste_pdf " type = " button " data - bs - toggle = " modal " data - bs - target = " #modalFichier " class = " btn btn-outline-dark flex-grow-1 me-2 " style = " white-space: nowrap; overflow: hidden; text-overflow: ellipsis; " >
2022-10-07 23:45:33 +02:00
< i class = " bi bi-files " ></ i > < span id = " liste_pdf_titre_mobile " ></ span >
</ button >
2023-09-11 19:25:05 +02:00
< button type = " button " class = " btn btn-outline-dark position-relative " style = " padding-left: 30px; " onclick = " document.getElementById('input_pdf_upload_2').click(); this.blur(); " >< ? php echo sprintf ( _ ( " %s Add a PDF " ), '<i class="bi bi-plus-circle position-absolute" style="left: 10px;"></i>' ); ?> </button>
2022-10-07 23:45:33 +02:00
</ div >
</ div >
< div id = " top_bar_action_selection " class = " d-none " >
2023-09-12 18:17:44 +02:00
< div id = " top_bar_action_selection_recap " class = " bg-primary text-white text-center rounded-top p-1 position-relative " >< button id = " btn_liste_pdf_bar " type = " button " style = " text-decoration: none;left: 0px; top:0px; " class = " btn bg-white bg-opacity-50 text-primary position-absolute p-0 ps-1 pe-1 mt-1 ms-1 " >< i class = " bi bi-files " ></ i >& nbsp ; < span ></ span > PDF </ button >< span id = " top_bar_action_selection_recap_nb_pages " >< ? php echo _ ( " No " ); ?> ></span> <?php echo _("page"); ?><button id="btn_cancel_select_mobile" type="button" style="text-decoration: none;right: 0px; top:0px;" class="btn bg-white bg-opacity-50 text-primary position-absolute p-0 ps-1 pe-1 mt-1 me-1"><i class="bi bi-x-lg"></i> <?php echo _("Cancel"); ?></button></div>
2022-10-07 23:45:33 +02:00
< div class = " btn-group w-100 " >
2023-09-11 19:25:05 +02:00
< button id = " btn_rotate_select_mobile " type = " button " class = " btn btn-outline-primary " style = " border-top-left-radius: 0 !important; " >< ? php echo sprintf ( _ ( " %s Turn " ), '<i class="bi bi-arrow-clockwise"></i>' ); ?> </button>
< button id = " btn_drag_select_mobile " type = " button " class = " btn btn-outline-primary " >< ? php echo sprintf ( _ ( " %s Move " ), '<i class="bi bi-arrows-move"></i>' ); ?> </button>
< button id = " btn_delete_select_mobile " type = " button " class = " btn btn-outline-primary " style = " border-top-right-radius: 0 !important; " >< ? php echo sprintf ( _ ( " %s Delete " ), '<i class="bi bi-trash"></i>' ); ?> </button>
2022-10-07 23:45:33 +02:00
</ div >
</ div >
2022-05-24 00:43:34 +02:00
</ div >
2022-10-07 23:45:33 +02:00
< div id = " bottom_bar " class = " position-fixed bottom-0 start-0 bg-white w-100 p-2 shadow-sm d-md-none " >
< div id = " bottom_bar_action " class = " d-grid gap-2 " >
2023-09-11 19:25:05 +02:00
< button class = " btn btn-primary " type = " submit " id = " save_mobile " >< ? php echo sprintf ( _ ( " %s Download the full PDF " ), '<i class="bi bi-download"></i>' ); ?> </button>
2022-05-21 10:05:17 +02:00
</ div >
2022-10-07 23:45:33 +02:00
< div id = " bottom_bar_action_selection " class = " d-grid gap-2 d-none " >
2023-11-10 09:44:17 +01:00
< button id = " save-select_mobile " class = " btn btn-outline-primary " type = " submit " form = " form_pdf " >< i class = " bi bi-download " ></ i > < ? php echo _ ( " Download the selection " ); ?> </button>
2022-10-07 23:45:33 +02:00
</ div >
2022-05-21 10:01:17 +02:00
</ div >
</ div >
2022-10-17 00:49:32 +02:00
< div class = " modal fade " id = " modalFichier " tabindex = " -1 " >
< div class = " modal-dialog " >
< div class = " modal-content " >
< div class = " modal-header " >
2023-09-12 18:17:44 +02:00
< h1 class = " modal-title fs-5 " id = " exampleModalLabel " >< ? php echo _ ( " PDF documents " ); ?> </h1>
2022-10-17 00:49:32 +02:00
< button type = " button " class = " btn-close " data - bs - dismiss = " modal " aria - label = " Close " ></ button >
</ div >
< div class = " modal-body " >
</ div >
</ div >
</ div >
</ div >
2022-05-21 10:05:17 +02:00
2022-03-28 00:56:00 +02:00
< span id = " is_mobile " class = " d-md-none " ></ span >
2023-09-12 18:17:44 +02:00
< script src = " <?php echo $REVERSE_PROXY_URL ; ?>/vendor/bootstrap.bundle.min.js?5.1.3 " ></ script >
2023-09-04 16:47:10 +02:00
< script src = " <?php echo $REVERSE_PROXY_URL ; ?>/vendor/pdf.js?legacy " ></ script >
2022-03-28 00:56:00 +02:00
< script >
2023-09-18 17:58:23 +02:00
var trad = < ? php echo json_encode ([
'Select this page' => _ ( 'Select this page' ),
'Delete this page' => _ ( 'Delete this page' ),
'Restore this page' => _ ( 'Restore this page' ),
'Move this page' => _ ( 'Move this page' ),
'Move here' => _ ( 'Move here' ),
'Turn this page' => _ ( 'Turn this page' ),
2023-09-22 18:32:49 +02:00
'Download this page' => _ ( 'Download this page' ),
2023-09-25 15:43:53 +02:00
'Page' => _ ( 'Page' )
2023-09-18 17:58:23 +02:00
]); ?> ;
2022-03-28 00:56:00 +02:00
</ script >
2023-09-04 16:47:10 +02:00
< script src = " <?php echo $REVERSE_PROXY_URL ; ?>/js/organization.js?<?php echo ( $COMMIT ) ? $COMMIT : filemtime( $ROOT . " / public / js / organization . js " ) ?> " ></ script >
2023-11-09 01:22:03 +01:00
< script src = " <?php echo $REVERSE_PROXY_URL ; ?>/vendor/pdf-lib.min.js?1.17.1 " ></ script >
2022-03-28 00:56:00 +02:00
</ body >
2023-04-20 15:47:12 +02:00
</ html >