mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-24 13:40:29 +01:00
report exclude readonly reports as default, added row preview
This commit is contained in:
parent
cd3c0f2113
commit
63dbedc1a8
@ -492,6 +492,8 @@ final class ReportService
|
||||
$testResult['messagetype'] = 'error';
|
||||
$testResult['message'] = sprintf("QUERY FAILED:\n%s", $e->getMessage());
|
||||
|
||||
$testResult['message'] .= "\n\r".$compiled;
|
||||
|
||||
return $testResult;
|
||||
}
|
||||
|
||||
@ -500,6 +502,9 @@ final class ReportService
|
||||
if(count($rows) < 101){
|
||||
$message = sprintf('Query successful: %s datasets found', count($rows));
|
||||
}
|
||||
|
||||
$message .= "\n\r".print_r($rows[0],true);
|
||||
|
||||
$testResult = [
|
||||
'messagetype' => 'success',
|
||||
'message' => $message,
|
||||
|
@ -26,7 +26,7 @@
|
||||
<input type="checkbox" id="report-list-filter-own">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="report-list-filter-own">{|Nur eigene|}</label>
|
||||
<label for="report-list-filter-own">{|Inkl. Vorlagen|}</label>
|
||||
</li>
|
||||
<li class="filter-item">
|
||||
<label for="report-list-filter-favorites" class="switch">
|
||||
|
@ -1113,10 +1113,10 @@ class Report
|
||||
{
|
||||
$filterCategory = $this->request->getPost('filter_category', '');
|
||||
$filterTerm = $this->request->getPost('filter_term', '');
|
||||
$filterOnlyOwn = $this->request->post->getBool('filter_own', false);
|
||||
$filterexcludeReadOnly = $this->request->post->getBool('filter_own', false);
|
||||
$filterOnlyFavorites = $this->request->post->getBool('filter_favorites', false);
|
||||
try {
|
||||
$html= $this->getTileView($filterCategory, $filterTerm, $filterOnlyOwn, $filterOnlyFavorites);
|
||||
$html= $this->getTileView($filterCategory, $filterTerm, !$filterexcludeReadOnly, $filterOnlyFavorites);
|
||||
$response = new JsonResponse(['success' => true, 'html' => $html]);
|
||||
} catch (Exception $e) {
|
||||
$response = new Response($e->getMessage(), Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||
@ -1176,14 +1176,14 @@ class Report
|
||||
*
|
||||
* @return string tiles html
|
||||
*/
|
||||
protected function getTileView($category = '', $searchTerm = '', $onlyOwn = false, $onlyFavs = false)
|
||||
protected function getTileView($category = '', $searchTerm = '', $excludeReadOnly = true, $onlyFavs = false)
|
||||
{
|
||||
try {
|
||||
$reportList = $this->gateway->getReportList(
|
||||
$category,
|
||||
$searchTerm,
|
||||
$this->app->User->GetID(),
|
||||
$onlyOwn,
|
||||
$excludeReadOnly,
|
||||
$onlyFavs
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
|
Loading…
Reference in New Issue
Block a user