Definition at line 9 of file custom_report_list_view.inc.
◆ __construct()
CustomReportListView::__construct |
( |
|
$title, |
|
|
|
$id, |
|
|
|
$constraints, |
|
|
|
$pageSize |
|
) |
| |
Definition at line 17 of file custom_report_list_view.inc.
22 $this->reports = Query::create(
CustomReport,
"WHERE title != '' AND $constraints")->execute();
25 $this->list =
new PagedList($this->reports,
"{$id}_list", array($this,
formatReport));
27 $this->list->emptyList =
"<em>No reports found.</em>";
◆ drawView()
CustomReportListView::drawView |
( |
| ) |
|
Definition at line 70 of file custom_report_list_view.inc.
72 echo
"<div id='$this->id' class='custom_report_list_panel'>";
73 echo
"<h3>$this->title</h3>";
74 echo
"<div class='report_list'>";
75 $this->list->drawList();
◆ formatReport()
CustomReportListView::formatReport |
( |
|
$report | ) |
|
Definition at line 30 of file custom_report_list_view.inc.
34 $out =
"<div class='report_title'>";
37 $out .=
"<i class='fa-fw fas fa-share'></i> ";
40 $out .=
"{$report->title}</div><div class='report_description'>{$report->description}</div>";
42 $out .=
"<a class='button' href='custom_report_results?report_id={$report->report_id}'><i class='fa-fw far fa-file-alt'></i> Run Report</a>";
44 if (checkRole(
"admin,data") ||
$report->user_id ==
$user->user_id)
46 $out .=
" <a class='button' href='custom_report?report_id={$report->report_id}&edit=1'><i class='fa-fw fas fa-pencil-alt'></i> Edit</a>";
49 if (checkRole(
"admin,data"))
53 $out .=
" <a class='button' href='#' onclick='ReportManager.unshareReport({$report->report_id}); return false;'><i class='fa-fw far fa-share reverse'></i> Unshare</a>";
57 $out .=
" <a class='button' href='#' onclick='ReportManager.shareReport({$report->report_id}); return false;'><i class='fa-fw far fa-share'></i> Share</a>";
60 $out .=
" <a class='button' href='#' onclick='ReportManager.deleteReport({$report->report_id}); return false;'><i class='fa-fw far fa-trash-alt'></i> Delete</a>";
◆ writeScript()
CustomReportListView::writeScript |
( |
| ) |
|
◆ $id
CustomReportListView::$id |
◆ $list
CustomReportListView::$list |
◆ $reports
CustomReportListView::$reports |
◆ $resultsPage
CustomReportListView::$resultsPage |
◆ $title
CustomReportListView::$title |
The documentation for this class was generated from the following file: