diff --git a/out/out.Search.php b/out/out.Search.php index 1f14ac23f..09c079f50 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -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); diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 428bc3923..bb7e754b3 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -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(" ".getMLText('export')); print $this->html_link('Search', array_merge($_GET, array('action'=>'export')), array('class'=>'btn btn-primary', 'id'=>'export'), " ".getMLText("batch_export"), false, true)."\n"; $content = ob_get_clean();