From 706e0e1b51c6522e4da44205e0e5023a7be636ee Mon Sep 17 00:00:00 2001
From: Moritz Strohm <strohm@data-quest.de>
Date: Wed, 6 Oct 2021 10:22:58 +0000
Subject: [PATCH] =?UTF-8?q?TIC=20#160:=20Raumsuche:=20Aktion=20=E2=80=9EUR?=
 =?UTF-8?q?L=20zur=20Suche=20kopieren=E2=80=9C=20hinzuf=C3=BCgen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/controllers/resources/search.php | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/app/controllers/resources/search.php b/app/controllers/resources/search.php
index db73a13203e..3b89afdefc8 100644
--- a/app/controllers/resources/search.php
+++ b/app/controllers/resources/search.php
@@ -66,6 +66,7 @@ class Resources_SearchController extends AuthenticatedController
 
         $this->form_submitted = false;
 
+
         if ($this->tree_selected_resource) {
             $resource = Resource::find($this->tree_selected_resource);
             if (!$resource) {
@@ -97,6 +98,14 @@ class Resources_SearchController extends AuthenticatedController
             $this->booking_plan_action_params = [];
 
             if ($this->form_submitted) {
+                $actions = new ShareWidget();
+                $actions->addCopyableLink(
+                    _('URL zur Suche kopieren'),
+                    $_SERVER['REQUEST_URI'],
+                    Icon::create('group')
+                );
+                $sidebar->insertWidget($actions, ':first');
+
                 //Check if the time range criteria has been set.
                 //If so, set the begin date as parameter for the
                 //booking plan action URL.
@@ -108,6 +117,7 @@ class Resources_SearchController extends AuthenticatedController
                     }
                 }
             }
+
         }
     }
 }
-- 
GitLab