seeddms-code/views/bootstrap/class.CreateDownloadLink.php
2016-12-19 14:26:38 +01:00

77 lines
2.7 KiB
PHP

<?php
/**
* Implementation of CreateDownloadLink 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 CreateDownloadLink 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_CreateDownloadLink extends SeedDMS_Bootstrap_Style {
function show() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$transmittals = $this->params['transmittals'];
$content = $this->params['version'];
$document = $content->getDocument();
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
$this->globalNavigation();
$this->contentStart();
$this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document);
$this->contentHeading(getMLText("create_download_link"));
$this->contentContainerStart();
?>
<form action="../op/op.CreateDownloadLink.php" name="form1" class="form-horizontal" method="post">
<input type="hidden" name="documentid" value="<?php print $content->getDocument()->getID();?>">
<input type="hidden" name="version" value="<?php print $content->getVersion();?>">
<input type="hidden" name="action" value="createdownloadlink">
<?php echo createHiddenFieldWithKey('createdownloadlink'); ?>
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("expires");?>:</label>
<div class="controls">
<span class="input-append date span12" id="expirationdate" data-date="<?php echo $expdate; ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>" data-checkbox="#expires">
<input class="span3" size="16" name="expdate" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>
</div>
</div>
<div>
<button type="submit" class="btn"><i class="icon-save"></i> <?php printMLText("save");?></button>
</div>
</form>
<?php
$this->contentContainerEnd();
$this->contentEnd();
$this->htmlEndPage();
} /* }}} */
}
?>