2016-03-08 17:35:39 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Implementation of ImportFS view
|
|
|
|
*
|
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @license GPL 2
|
|
|
|
* @version @version@
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
|
|
|
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
|
|
|
* 2010-2012 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Include parent class
|
|
|
|
*/
|
|
|
|
require_once("class.Bootstrap.php");
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class which outputs the html page for ImportFS view
|
|
|
|
*
|
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
|
|
|
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
|
|
|
* 2010-2012 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
|
|
|
class SeedDMS_View_ImportFS extends SeedDMS_Bootstrap_Style {
|
|
|
|
|
|
|
|
function js() { /* {{{ */
|
|
|
|
header('Content-Type: application/javascript');
|
|
|
|
|
2020-08-28 09:54:52 +00:00
|
|
|
// $this->printFolderChooserJs("form1");
|
2016-03-08 17:35:39 +00:00
|
|
|
$this->printDropFolderChooserJs("form1", 1);
|
|
|
|
} /* }}} */
|
|
|
|
|
|
|
|
function show() { /* {{{ */
|
|
|
|
$dms = $this->params['dms'];
|
|
|
|
$user = $this->params['user'];
|
|
|
|
$dropfolderdir = $this->params['dropfolderdir'];
|
|
|
|
|
|
|
|
$this->htmlStartPage(getMLText("import_fs"));
|
|
|
|
$this->globalNavigation();
|
|
|
|
$this->contentStart();
|
|
|
|
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
|
|
|
|
|
|
|
|
$this->contentHeading(getMLText("import_fs"));
|
|
|
|
|
2016-07-06 07:05:21 +00:00
|
|
|
if($dropfolderdir && file_exists($dropfolderdir.'/'.$user->getLogin())) {
|
2018-06-21 09:30:58 +00:00
|
|
|
$this->warningMsg(getMLText("import_fs_warning"));
|
2016-07-06 07:05:21 +00:00
|
|
|
$this->contentContainerStart();
|
|
|
|
print "<form class=\"form-horizontal\" action=\"../op/op.ImportFS.php\" name=\"form1\">";
|
2018-06-21 09:30:58 +00:00
|
|
|
$this->formField(getMLText("choose_target_folder"), $this->getFolderChooserHtml("form1", M_READWRITE));
|
|
|
|
$this->formField(
|
|
|
|
getMLText("dropfolder_folder"),
|
|
|
|
$this->getDropFolderChooserHtml("form1", "", 1)
|
|
|
|
);
|
2019-07-30 04:34:16 +00:00
|
|
|
$this->formField(
|
|
|
|
getMLText("dropfolder_metadata"),
|
|
|
|
$this->getDropFolderChooserHtml("form2", "", 0)
|
|
|
|
);
|
2018-04-23 13:50:46 +00:00
|
|
|
$this->formField(
|
|
|
|
getMLText("removeFolderFromDropFolder"),
|
2018-06-07 05:46:19 +00:00
|
|
|
array(
|
|
|
|
'element'=>'input',
|
|
|
|
'type'=>'checkbox',
|
|
|
|
'name'=>'remove',
|
|
|
|
'value'=>'1'
|
|
|
|
)
|
2018-04-23 13:50:46 +00:00
|
|
|
);
|
2018-09-18 16:31:15 +00:00
|
|
|
$this->formField(
|
|
|
|
getMLText("setDateFromFile"),
|
|
|
|
array(
|
|
|
|
'element'=>'input',
|
|
|
|
'type'=>'checkbox',
|
|
|
|
'name'=>'setfiledate',
|
|
|
|
'value'=>'1'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
$this->formField(
|
|
|
|
getMLText("setDateFromFolder"),
|
|
|
|
array(
|
|
|
|
'element'=>'input',
|
|
|
|
'type'=>'checkbox',
|
|
|
|
'name'=>'setfolderdate',
|
|
|
|
'value'=>'1'
|
|
|
|
)
|
|
|
|
);
|
2020-08-27 05:52:52 +00:00
|
|
|
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('import'));
|
2016-07-06 07:05:21 +00:00
|
|
|
print "</form>\n";
|
|
|
|
$this->contentContainerEnd();
|
|
|
|
} else {
|
|
|
|
echo "<div class=\"alert alert-warning\">";
|
|
|
|
printMLText("dropfolderdir_missing");
|
|
|
|
echo "</div>\n";
|
2016-03-08 17:35:39 +00:00
|
|
|
}
|
|
|
|
|
2016-03-15 07:30:53 +00:00
|
|
|
$this->contentEnd();
|
2016-03-08 17:35:39 +00:00
|
|
|
$this->htmlEndPage();
|
|
|
|
} /* }}} */
|
|
|
|
}
|
|
|
|
|