mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
new export flag to skip default columns
This commit is contained in:
parent
0fe367820f
commit
4352f95818
|
@ -52,6 +52,10 @@ $includecontent = false;
|
|||
if (isset($_GET["includecontent"]) && $_GET["includecontent"])
|
||||
$includecontent = true;
|
||||
|
||||
$skipdefaultcols = false;
|
||||
if (isset($_GET["skipdefaultcols"]) && $_GET["skipdefaultcols"])
|
||||
$skipdefaultcols = true;
|
||||
|
||||
$newowner = null;
|
||||
if (isset($_GET["newowner"]) && is_numeric($_GET["newowner"]) && $_GET['newowner'] > 0) {
|
||||
$newowner = $dms->getUser((int) $_GET['newowner']);
|
||||
|
@ -735,6 +739,7 @@ if($settings->_showSingleSearchHit && count($entries) == 1) {
|
|||
$view->setParam('accessobject', $accessop);
|
||||
$view->setParam('query', $query);
|
||||
$view->setParam('includecontent', $includecontent);
|
||||
$view->setParam('skipdefaultcols', $skipdefaultcols);
|
||||
$view->setParam('marks', isset($_GET['marks']) ? $_GET['marks'] : array());
|
||||
$view->setParam('newowner', $newowner);
|
||||
$view->setParam('newreviewer', $newreviewer);
|
||||
|
|
|
@ -57,7 +57,7 @@ $(document).ready( function() {
|
|||
$('#export').on('click', function(ev) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
var url = $(this).attr('href')+'&includecontent='+($('#includecontent').prop('checked') ? '1' : '0');
|
||||
var url = $(this).attr('href')+'&includecontent='+($('#includecontent').prop('checked') ? '1' : '0')+'&skipdefaultcols='+($('#skipdefaultcols').prop('checked') ? '1' : '0');
|
||||
var values = {};
|
||||
$('input[name^=\"marks\"]').each(function() {
|
||||
if(this.checked)
|
||||
|
@ -225,10 +225,12 @@ $(document).ready(function() {
|
|||
$user = $this->params['user'];
|
||||
$entries = $this->params['searchhits'];
|
||||
$includecontent = $this->params['includecontent'];
|
||||
$skipdefaultcols = $this->params['skipdefaultcols'];
|
||||
$marks = $this->params['marks'];
|
||||
|
||||
include("../inc/inc.ClassDownloadMgr.php");
|
||||
$downmgr = new SeedDMS_Download_Mgr();
|
||||
$downmgr->skipDefaultCols($skipdefaultcols);
|
||||
if($extraheader = $this->callHook('extraDownloadHeader'))
|
||||
$downmgr->addHeader($extraheader);
|
||||
foreach($entries as $entry) {
|
||||
|
@ -1487,6 +1489,16 @@ $(document).ready(function() {
|
|||
'value'=>1,
|
||||
)
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("skip_default_export_cols"),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'checkbox',
|
||||
'name'=>'skipdefaultcols',
|
||||
'id'=>'skipdefaultcols',
|
||||
'value'=>1,
|
||||
)
|
||||
);
|
||||
//$this->formSubmit("<i class=\"fa fa-download\"></i> ".getMLText('export'));
|
||||
print $this->html_link('Search', array_merge($_GET, array('action'=>'export')), array('class'=>'btn btn-primary', 'id'=>'export'), "<i class=\"fa fa-download\"></i> ".getMLText("batch_export"), false, true)."\n";
|
||||
$content = ob_get_clean();
|
||||
|
|
Loading…
Reference in New Issue
Block a user