mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-01 02:08:44 +00:00
add file doc and fix html preview for spreadsheets
This commit is contained in:
parent
dc756961cf
commit
5019eb681b
|
|
@ -1,4 +1,16 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 8.0
|
||||
*
|
||||
* @package Modules\Media
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
// @todo: is this chunked/streamed output or bulk output
|
||||
// if it is streamed it is not working because of ob_* in the actual response rendering
|
||||
|
|
|
|||
|
|
@ -1,12 +1,23 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 8.0
|
||||
*
|
||||
* @package Modules\Media
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
|
||||
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Csv;
|
||||
use phpOMS\Autoloader;
|
||||
|
||||
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
||||
|
||||
$media = $this->getData('media');
|
||||
|
||||
$reader = IOFactory::createReaderforFile(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
|
||||
|
|
|
|||
|
|
@ -1,12 +1,23 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 8.0
|
||||
*
|
||||
* @package Modules\Media
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
|
||||
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Html;
|
||||
use phpOMS\Autoloader;
|
||||
|
||||
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
|
||||
|
||||
$media = $this->getData('media');
|
||||
|
||||
$reader = IOFactory::createReaderforFile(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
|
||||
|
|
@ -18,4 +29,4 @@ $writer->writeAllSheets();
|
|||
|
||||
$writer->save('php://output');
|
||||
|
||||
echo '<style>body { margin: 0; } table { width: 100%; }</style>';
|
||||
echo '<style>body { margin: 0; } table { width: 100%; } table .n, table .s { text-align: left; } td { padding: .5rem; }</style>';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,16 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 8.0
|
||||
*
|
||||
* @package Modules\Media
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpOffice\PhpWord\IOFactory;
|
||||
use PhpOffice\PhpWord\Writer\HTML;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user