diff --git a/apps/maarch_entreprise/show_technicalInfo_tab.php b/apps/maarch_entreprise/show_technicalInfo_tab.php index ccb3d862ddbbfd710d45374ca0bee4a9579571ff..dea90bdc63c0d90eba051d7a44ba7284cac09241 100755 --- a/apps/maarch_entreprise/show_technicalInfo_tab.php +++ b/apps/maarch_entreprise/show_technicalInfo_tab.php @@ -81,6 +81,7 @@ $db = new Database(); $fileName = $res->filename; $creationDate = functions::format_date_db($res->creation_date, false); $fingerprint = $res->fingerprint; + $workBatch = $res->work_batch; $isMultiDs = $res->is_multi_docservers; if ($isMultiDs == 'Y') { $adr = array(); @@ -139,6 +140,12 @@ $db = new Database(); </th> <td align="left"><?php echo _FINGERPRINT; ?> :</td> <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($fingerprint); ?>" title="<?php functions::xecho($fingerprint); ?>" alt="<?php functions::xecho($fingerprint); ?>" /></td> + + <th align="left" class="picto"> + <i class="fa fa-cogs fa-2x" title="<?php echo _WORK_BATCH; ?>"></i> + </th> + <td align="left"><?php echo _WORK_BATCH; ?> :</td> + <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($workBatch); ?>" title="<?php functions::xecho($workBatch); ?>" alt="<?php functions::xecho($workBatch); ?>" /></td> </tr> </table> <br> @@ -209,25 +216,6 @@ $db = new Database(); <td align="left" width="200px"><?php echo _FILE; ?> :</td> <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($fileName); ?>" /></td> </tr> - <tr> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _FORMAT; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($format); ?>"/></td> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _FINGERPRINT; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($fingerprint); ?>" /></td> - </tr> - <tr> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _ADR_PRIORITY; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="1" /></td> - </tr> </table> <?php } diff --git a/apps/maarch_entreprise/view_technical_infos.php b/apps/maarch_entreprise/view_technical_infos.php deleted file mode 100755 index 89d405c3b0b3a073c8c1793223d3bd90a9ae5fbf..0000000000000000000000000000000000000000 --- a/apps/maarch_entreprise/view_technical_infos.php +++ /dev/null @@ -1,229 +0,0 @@ -<?php - -/* -* Copyright 2008-2011 Maarch -* -* This file is part of Maarch Framework. -* -* Maarch Framework is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* Maarch Framework is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* -* @brief view technical informations -* -* @file -* @author Laurent Giovannoni <dev@maarch.org> -* @date $date$ -* @version $Revision$ -* @ingroup apps -*/ - -require_once 'core'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR - .'class_request.php'; -require_once 'core'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR - .'class_functions.php'; -require_once 'core'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR - .'class_security.php'; -require_once 'core'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR - .'class_resource.php'; -require_once 'core'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR - .'docservers_controler.php'; -$func = new functions(); -$coreTools = new core_tools(); -$coreTools->test_user(); -$coreTools->load_lang(); -$security = new security(); -$db = new Database(); - -if ($coreTools->test_service('view_technical_infos', 'apps', false)) { - $collId = $_SESSION['collection_id_choice']; - $table = $security->retrieve_view_from_coll_id($collId); - $isView = true; - if (empty($table)) { - $table = $security->retrieve_table_from_coll($collId); - $isView = false; - } - for ($cptColl = 0; $cptColl < count($_SESSION['collections']); ++$cptColl) { - if ($table == $_SESSION['collections'][$cptColl]['table'] - || $table == $_SESSION['collections'][$cptColl]['view'] - ) { - $adrTable = $_SESSION['collections'][$cptColl]['adr']; - } - } - $selectRes = 'SELECT * FROM '.$table.' WHERE res_id = ?'; - $stmt = $db->query($selectRes, array($_SESSION['doc_id'])); - $res = $stmt->fetchObject(); - $typist = $res->typist; - $format = $res->format; - $filesize = $res->filesize; - $docserverId = $res->docserver_id; - $path = $res->path; - $fileName = $res->filename; - $creationDate = functions::format_date_db($res->creation_date, false); - $fingerprint = $res->fingerprint; - $isMultiDs = $res->is_multi_docservers; - if ($isMultiDs == 'Y') { - $adr = array(); - $resource = new resource(); - $whereClause = ' and 1=1'; - $adr = $resource->getResourceAdr( - $table, - $_SESSION['doc_id'], - $whereClause, - $adrTable - ); - } ?> - <dt class="fa fa-cogs" style="font-size:2em;padding-left: 15px;padding-right: 15px;" title="<?php echo _TECHNICAL_INFORMATIONS; ?>"><sup><span style="font-size: 10px;display: none;" class="nbResZero"></span></sup></dt> - <dd> - <h2> - <span class="date"> - <b><?php echo _SOURCE_FILE_PROPERTIES; ?></b> - </span> - </h2> - <br/> - <table cellpadding="2" cellspacing="2" border="0" class="block forms details" width="100%"> - <tr> - <th align="left" class="picto"> - <i class="fa fa-user fa-2x" title="<?php echo _TYPIST; ?>"></i> - </th> - <td align="left" width="200px"><?php echo _TYPIST; ?> :</td> - <td> - <input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($typist); ?>" /> - </td> - <th align="left" class="picto"> - <i class="fa fa-square fa-2x" title="<?php echo _SIZE; ?>"></i> - </th> - <td align="left" width="200px"><?php echo _SIZE; ?> :</td> - <?php - $txtByte = ''; - if (isset($_SESSION['lang'])) { - $txtByte = $_SESSION['lang']['txt_byte']; - } ?> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($filesize.' '.$txtByte.' ( '.round($filesize / 1024, 2).'K )'); ?>" /></td> - </tr> - <tr class="col"> - <th align="left" class="picto"> - <i class="fa fa-file-image fa-2x" title="<?php echo _FORMAT; ?>"></i> - </th> - <td align="left"><?php echo _FORMAT; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($format); ?>" size="40" /></td> - <th align="left" class="picto"> - <i class="fa fa-calendar-alt fa-2x" title="<?php echo _CREATION_DATE; ?>"></i> - </th> - <td align="left"><?php echo _CREATION_DATE; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($func->format_date_db($creationDate, false)); ?>"/></td> - </tr> - <tr> - <th align="left" class="picto"> - <i class="fa fa-lock fa-2x" title="<?php echo _FINGERPRINT; ?>"></i> - </th> - <td align="left"><?php echo _FINGERPRINT; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($fingerprint); ?>" title="<?php functions::xecho($fingerprint); ?>" alt="<?php functions::xecho($fingerprint); ?>" /></td> - </tr> - </table> - <br> - <h2> - <span class="date"> - <b><?php echo _DOCSERVERS; ?></b> - </span> - </h2> - <br/> - <?php - $docserversControler = new docservers_controler(); - if ($isMultiDs == 'Y') { - for ($cptAdr = 0; $cptAdr < count($adr[0]); ++$cptAdr) { - $docserver = $docserversControler->get( - $adr[0][$cptAdr]['docserver_id'] - ); - echo '<h4>'.functions::xssafe($adr[0][$cptAdr]['docserver_id']) - .' ('.functions::xssafe($docserver->device_label).')</h4>'; ?> - <table cellpadding="2" cellspacing="2" border="0" class="block forms details" width="100%"> - <tr> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _PATH_TEMPLATE; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php echo str_replace('#', '/', functions::xssafe($adr[0][$cptAdr]['path'])); ?>"/></td> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _FILE; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($adr[0][$cptAdr]['filename']); ?>" /></td> - </tr> - <tr> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _FORMAT; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($adr[0][$cptAdr]['format']); ?>"/></td> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _FINGERPRINT; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($adr[0][$cptAdr]['fingerprint']); ?>" /></td> - </tr> - <tr> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _ADR_PRIORITY; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($adr[0][$cptAdr]['adr_priority']); ?>" /></td> - </tr> - </table> - <?php - } - } else { - $docserver = $docserversControler->get($docserverId); - echo '<h4>'.functions::xssafe($docserverId) - .' ('.functions::xssafe($docserver->device_label).')</h4>'; ?> - <table cellpadding="2" cellspacing="2" border="0" class="block forms details" width="100%"> - <tr> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _PATH_TEMPLATE; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php echo functions::xssafe(str_replace('#', '/', $path)); ?>"/></td> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _FILE; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($fileName); ?>" /></td> - </tr> - <tr> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _FORMAT; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($format); ?>"/></td> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _FINGERPRINT; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="<?php functions::xecho($fingerprint); ?>" /></td> - </tr> - <tr> - <th align="left" class="picto"> - - </th> - <td align="left" width="200px"><?php echo _ADR_PRIORITY; ?> :</td> - <td><input type="text" class="readonly" readonly="readonly" value="1" /></td> - </tr> - </table> - <?php - } ?> - <br> - - </dd> - <?php -} diff --git a/apps/maarch_entreprise/xml/services.xml b/apps/maarch_entreprise/xml/services.xml index 125a131ab133306cc0a06ddd548631efb14c37d4..abbea09d431be3acdd8aed7a1ff06e9f67e36fa0 100755 --- a/apps/maarch_entreprise/xml/services.xml +++ b/apps/maarch_entreprise/xml/services.xml @@ -251,7 +251,6 @@ <id>view_technical_infos</id> <name>_VIEW_TECHNICAL_INFORMATIONS</name> <comment>_VIEW_TECHNICAL_INFORMATIONS</comment> - <servicepage>view_technical_infos.php</servicepage> <servicetype>use</servicetype> <system_service>false</system_service> <enabled>true</enabled> diff --git a/sql/develop.sql b/sql/develop.sql index d6b7a51c2cf2e5336bd3ec3920406ddca2f5c49d..61405ad688132e9efedc273fb4a1fa9788989277 100644 --- a/sql/develop.sql +++ b/sql/develop.sql @@ -211,7 +211,6 @@ ALTER TABLE res_version_attachments DROP COLUMN IF EXISTS envelop_id; ALTER TABLE res_letterbox DROP COLUMN IF EXISTS approver; ALTER TABLE res_attachments DROP COLUMN IF EXISTS approver; ALTER TABLE res_version_attachments DROP COLUMN IF EXISTS approver; -ALTER TABLE res_letterbox DROP COLUMN IF EXISTS work_batch; ALTER TABLE res_attachments DROP COLUMN IF EXISTS work_batch; ALTER TABLE res_version_attachments DROP COLUMN IF EXISTS work_batch; ALTER TABLE res_letterbox DROP COLUMN IF EXISTS is_ingoing; @@ -280,6 +279,7 @@ CREATE OR REPLACE VIEW res_view_letterbox AS r.offset_doc, r.filesize, r.status, + r.work_batch, r.doc_date, r.description, r.source, diff --git a/sql/structure.sql b/sql/structure.sql index d14e70e80de3e6204202ceeec7ed9412651fd778..943381caa1a87c319ed8840647f54562ad86b5ec 100755 --- a/sql/structure.sql +++ b/sql/structure.sql @@ -1307,6 +1307,7 @@ CREATE TABLE res_letterbox status character varying(10) NOT NULL, destination character varying(50) DEFAULT NULL::character varying, validation_date timestamp without time zone, + work_batch bigint, origin character varying(50) DEFAULT NULL::character varying, priority character varying(16), policy_id character varying(32) DEFAULT NULL::character varying, @@ -1647,6 +1648,7 @@ CREATE OR REPLACE VIEW res_view_letterbox AS r.offset_doc, r.filesize, r.status, + r.work_batch, r.doc_date, r.description, r.source,