dolibarr 21.0.0-beta
home.tpl.php
1<!-- file home.tpl.php -->
2<?php
3/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
4 */
5// Protection to avoid direct call of template
6if (empty($context) || !is_object($context)) {
7 print "Error, template page can't be called as URL";
8 exit(1);
9}
10'@phan-var-force Context $context';
11
12global $conf, $langs;
13
14?>
15
16<main class="container">
17 <div class="home-links-grid grid">
18 <?php
19 if (isModEnabled('propal') && getDolGlobalInt('WEBPORTAL_PROPAL_LIST_ACCESS')) : ?>
20 <article class="home-links-card --propal-list">
21 <div class="home-links-card__icon" ></div>
22 <?php print '<a class="home-links-card__link" href="' . $context->getControllerUrl('propallist') . '" title="' . $langs->trans('WebPortalPropalListDesc') . '">' . $langs->trans('WebPortalPropalListTitle') . '</a>'; ?>
23 </article>
24 <?php endif; ?>
25 <?php if (isModEnabled('order') && getDolGlobalInt('WEBPORTAL_ORDER_LIST_ACCESS')) : ?>
26 <article class="home-links-card --order-list">
27 <div class="home-links-card__icon" ></div>
28 <?php print '<a class="home-links-card__link" href="' . $context->getControllerUrl('orderlist') . '" title="' . $langs->trans('WebPortalOrderListDesc') . '">' . $langs->trans('WebPortalOrderListTitle') . '</a>'; ?>
29 </article>
30 <?php endif; ?>
31 <?php if (isModEnabled('invoice') && getDolGlobalInt('WEBPORTAL_INVOICE_LIST_ACCESS')) : ?>
32 <article class="home-links-card --invoice-list">
33 <div class="home-links-card__icon" ></div>
34 <?php print '<a class="home-links-card__link" href="' . $context->getControllerUrl('invoicelist') . '" title="' . $langs->trans('WebPortalInvoiceListDesc') . '">' . $langs->trans('WebPortalInvoiceListTitle') . '</a>'; ?>
35 </article>
36 <?php endif; ?>
37 </div>
38</main>
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
$context
@method int call_trigger(string $triggerName, User $user)
Definition logout.php:42