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