diff options
Diffstat (limited to 'src/view/FooterBuilder.php')
| -rw-r--r-- | src/view/FooterBuilder.php | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/view/FooterBuilder.php b/src/view/FooterBuilder.php index c1e0f7a..fcb78e0 100644 --- a/src/view/FooterBuilder.php +++ b/src/view/FooterBuilder.php | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | declare(strict_types=1); | 4 | declare(strict_types=1); |
| 5 | 5 | ||
| 6 | use App\Entity\Node; | 6 | use App\Entity\Node; |
| 7 | use App\Entity\Asset; | ||
| 7 | 8 | ||
| 8 | class FooterBuilder extends AbstractBuilder | 9 | class FooterBuilder extends AbstractBuilder |
| 9 | { | 10 | { |
| @@ -13,28 +14,35 @@ class FooterBuilder extends AbstractBuilder | |||
| 13 | 14 | ||
| 14 | if(file_exists($viewFile)) | 15 | if(file_exists($viewFile)) |
| 15 | { | 16 | { |
| 16 | // $adresses postale et e-mail | 17 | $node_data = $node->getNodeData(); |
| 17 | if(!empty($node->getNodeData()->getData())) | 18 | // nom du contact, adresse et e-mail |
| 19 | if(!empty($node_data->getData())) | ||
| 18 | { | 20 | { |
| 19 | extract($node->getNodeData()->getData()); | 21 | extract($node_data->getData()); |
| 20 | } | 22 | } |
| 21 | 23 | ||
| 24 | $footer_logo = Asset::USER_PATH . $node_data->getAssetByRole('footer_logo')?->getFileName() ?? ''; | ||
| 25 | |||
| 22 | $this->useChildrenBuilder($node); | 26 | $this->useChildrenBuilder($node); |
| 23 | $breadcrumb = $this->html; | 27 | $breadcrumb = $this->html; |
| 24 | 28 | ||
| 25 | // zone admin | ||
| 26 | $empty_admin_zone = ''; | 29 | $empty_admin_zone = ''; |
| 27 | if($_SESSION['admin']) | 30 | if($_SESSION['admin']) |
| 28 | { | 31 | { |
| 29 | $buttons_footer_name = '<img id="footer_name_open" class="action_icon" src="assets/edit.svg" onclick="footer_name.openTextInput()"> | 32 | // données du footer |
| 30 | <img id="footer_name_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_name.submitTextInput()"> | 33 | $buttons_footer_name = '<img id="footer_name_open" class="action_icon" src="assets/edit.svg" onclick="footer_name.open()"> |
| 31 | <img id="footer_name_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_name.cancelTextInput()">'; | 34 | <img id="footer_name_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_name.submit()"> |
| 32 | $buttons_footer_address = '<img id="footer_address_open" class="action_icon" src="assets/edit.svg" onclick="footer_address.openTextInput()"> | 35 | <img id="footer_name_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_name.cancel()">'; |
| 33 | <img id="footer_address_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_address.submitTextInput()"> | 36 | $buttons_footer_address = '<img id="footer_address_open" class="action_icon" src="assets/edit.svg" onclick="footer_address.open()"> |
| 34 | <img id="footer_address_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_address.cancelTextInput()">'; | 37 | <img id="footer_address_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_address.submit()"> |
| 35 | $buttons_footer_email = '<img id="footer_email_open" class="action_icon" src="assets/edit.svg" onclick="footer_email.openTextInput()"> | 38 | <img id="footer_address_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_address.cancel()">'; |
| 36 | <img id="footer_email_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_email.submitTextInput()"> | 39 | $buttons_footer_email = '<img id="footer_email_open" class="action_icon" src="assets/edit.svg" onclick="footer_email.open()"> |
| 37 | <img id="footer_email_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_email.cancelTextInput()">'; | 40 | <img id="footer_email_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_email.submit()"> |
| 41 | <img id="footer_email_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_email.cancel()">'; | ||
| 42 | |||
| 43 | $buttons_footer_logo = '<img id="footer_logo_open" class="action_icon" src="assets/edit.svg" onclick="footer_logo.open()"> | ||
| 44 | <img id="footer_logo_submit" class="action_icon hidden" src="assets/save.svg" onclick="footer_logo.submit()"> | ||
| 45 | <img id="footer_logo_cancel" class="action_icon hidden" src="assets/close.svg" onclick="footer_logo.cancel()">'; | ||
| 38 | 46 | ||
| 39 | // zone admin | 47 | // zone admin |
| 40 | $empty_admin_zone = 'empty_admin_zone'; | 48 | $empty_admin_zone = 'empty_admin_zone'; |
| @@ -76,6 +84,7 @@ class FooterBuilder extends AbstractBuilder | |||
| 76 | $buttons_footer_name = ''; | 84 | $buttons_footer_name = ''; |
| 77 | $buttons_footer_address = ''; | 85 | $buttons_footer_address = ''; |
| 78 | $buttons_footer_email = ''; | 86 | $buttons_footer_email = ''; |
| 87 | $buttons_footer_logo = ''; | ||
| 79 | } | 88 | } |
| 80 | 89 | ||
| 81 | ob_start(); | 90 | ob_start(); |
