|
53 | 53 |
|
54 | 54 | $template = new Template($templateName);
|
55 | 55 |
|
| 56 | +$toolbar = Display::url( |
| 57 | + Display::returnFontAwesomeIcon('file-excel-o'). |
| 58 | + get_lang('GenerateReport'), |
| 59 | + api_get_path(WEB_PLUGIN_PATH).'buycourses/src/export_report.php', |
| 60 | + ['class' => 'btn btn-primary'] |
| 61 | +); |
| 62 | + |
56 | 63 | if ($paypalEnable == 'true' && $commissionsEnable == 'true') {
|
57 |
| - $toolbar = Display::toolbarButton( |
| 64 | + $toolbar .= Display::toolbarButton( |
58 | 65 | $plugin->get_lang('PaypalPayoutCommissions'),
|
59 | 66 | api_get_path(WEB_PLUGIN_PATH).'buycourses/src/paypal_payout.php',
|
60 | 67 | 'paypal',
|
61 | 68 | 'primary',
|
62 | 69 | ['title' => $plugin->get_lang('PaypalPayoutCommissions')]
|
63 | 70 | );
|
64 |
| - |
65 |
| - $template->assign( |
66 |
| - 'actions', |
67 |
| - Display::toolbarAction('toolbar', [$toolbar]) |
68 |
| - ); |
69 | 71 | }
|
70 | 72 |
|
| 73 | +$template->assign( |
| 74 | + 'actions', |
| 75 | + Display::toolbarAction('toolbar', [$toolbar]) |
| 76 | +); |
| 77 | + |
71 | 78 | if ($commissionsEnable == 'true') {
|
72 | 79 | $toolbar = Display::toolbarButton(
|
73 | 80 | $plugin->get_lang('PayoutReport'),
|
|
92 | 99 | $template->assign('invoicing_enable', $invoicingEnable);
|
93 | 100 | $content = $template->fetch('buycourses/view/service_sales_report.tpl');
|
94 | 101 | $template->assign('content', $content);
|
| 102 | +$template->assign('header', $templateName); |
95 | 103 | $template->display_one_col_template();
|
0 commit comments