From 4965331aa75460062f68a0756fb600cf0e1d3848 Mon Sep 17 00:00:00 2001 From: Greg Hecquet Date: Thu, 10 Mar 2016 19:00:28 +0100 Subject: [PATCH] Adding owner to the remote share alert box --- core/src/plugins/core.ajaxplorer/i18n/ca.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/cs.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/da.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/de.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/en.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/es.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/et.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/eus.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/fi.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/fr.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/gr.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/he.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/hu.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/it.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/ja.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/kr.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/nl.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/no.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/pl.php | 2 +- .../plugins/core.ajaxplorer/i18n/pt-br.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/pt.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/ru.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/si.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/sv.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/tr.php | 2 +- .../plugins/core.ajaxplorer/i18n/zh-tw.php | 2 +- core/src/plugins/core.ajaxplorer/i18n/zh.php | 2 +- .../core.ocs/src/Model/RemoteShare.php | 26 +++++++++++++++++-- .../core.ocs/src/Server/Federated/Server.php | 1 + .../res/js/ui/reactjs/jsx/LeftNavigation.js | 22 +++++++++++++--- 30 files changed, 71 insertions(+), 32 deletions(-) diff --git a/core/src/plugins/core.ajaxplorer/i18n/ca.php b/core/src/plugins/core.ajaxplorer/i18n/ca.php index ac4acaa1d7..7eb60a25e1 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/ca.php +++ b/core/src/plugins/core.ajaxplorer/i18n/ca.php @@ -641,7 +641,7 @@ "543" => "Resultats limitats a 100 de %s.", "544" => "Mostrar tot", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" ); diff --git a/core/src/plugins/core.ajaxplorer/i18n/cs.php b/core/src/plugins/core.ajaxplorer/i18n/cs.php index e78814d602..78090edf6c 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/cs.php +++ b/core/src/plugins/core.ajaxplorer/i18n/cs.php @@ -639,7 +639,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" ); diff --git a/core/src/plugins/core.ajaxplorer/i18n/da.php b/core/src/plugins/core.ajaxplorer/i18n/da.php index 65fa919259..54aec3881c 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/da.php +++ b/core/src/plugins/core.ajaxplorer/i18n/da.php @@ -642,7 +642,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/de.php b/core/src/plugins/core.ajaxplorer/i18n/de.php index 6235b7f7fe..5a641a9d92 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/de.php +++ b/core/src/plugins/core.ajaxplorer/i18n/de.php @@ -646,7 +646,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" ); diff --git a/core/src/plugins/core.ajaxplorer/i18n/en.php b/core/src/plugins/core.ajaxplorer/i18n/en.php index d198e5b8ce..910476f7b5 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/en.php +++ b/core/src/plugins/core.ajaxplorer/i18n/en.php @@ -639,7 +639,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" ); diff --git a/core/src/plugins/core.ajaxplorer/i18n/es.php b/core/src/plugins/core.ajaxplorer/i18n/es.php index c5f1861b43..97c7b8ae17 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/es.php +++ b/core/src/plugins/core.ajaxplorer/i18n/es.php @@ -644,7 +644,7 @@ "543" => "Resultados limitados a 100 de %s.", "544" => "Mostrar todo", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" ); diff --git a/core/src/plugins/core.ajaxplorer/i18n/et.php b/core/src/plugins/core.ajaxplorer/i18n/et.php index abad5670fa..303cb03fa6 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/et.php +++ b/core/src/plugins/core.ajaxplorer/i18n/et.php @@ -640,7 +640,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/eus.php b/core/src/plugins/core.ajaxplorer/i18n/eus.php index 116f949a47..edc3fca4ae 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/eus.php +++ b/core/src/plugins/core.ajaxplorer/i18n/eus.php @@ -638,7 +638,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/fi.php b/core/src/plugins/core.ajaxplorer/i18n/fi.php index 1496d3dbb9..d7bbfa1a8b 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/fi.php +++ b/core/src/plugins/core.ajaxplorer/i18n/fi.php @@ -640,7 +640,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/fr.php b/core/src/plugins/core.ajaxplorer/i18n/fr.php index 60f5ce0ade..5274903b92 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/fr.php +++ b/core/src/plugins/core.ajaxplorer/i18n/fr.php @@ -639,7 +639,7 @@ "543" => "Résultats limités au 100 premiers sur %s.", "544" => "Voir tout", "545" => "Partage à distance", -"546" => "Cet item provient d'un système distant. Souhaîtez-vous continuer ?", +"546" => "Cet item provient de %%OWNER%% d'un système distant. Souhaîtez-vous continuer ?", "547" => "Accepter", "548" => "Refuser" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/gr.php b/core/src/plugins/core.ajaxplorer/i18n/gr.php index 55697faa60..66c2d32db0 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/gr.php +++ b/core/src/plugins/core.ajaxplorer/i18n/gr.php @@ -637,7 +637,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/he.php b/core/src/plugins/core.ajaxplorer/i18n/he.php index c263264382..44d9ffe46b 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/he.php +++ b/core/src/plugins/core.ajaxplorer/i18n/he.php @@ -637,7 +637,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/hu.php b/core/src/plugins/core.ajaxplorer/i18n/hu.php index 7b52b27b0f..fca0bf20b0 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/hu.php +++ b/core/src/plugins/core.ajaxplorer/i18n/hu.php @@ -642,7 +642,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/it.php b/core/src/plugins/core.ajaxplorer/i18n/it.php index b61c862ae1..c613658c36 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/it.php +++ b/core/src/plugins/core.ajaxplorer/i18n/it.php @@ -657,7 +657,7 @@ "543" => "Risultati limitati a 100 su %s.", "544" => "Visualizza tutti", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/ja.php b/core/src/plugins/core.ajaxplorer/i18n/ja.php index 12ec6e2afb..47c6d01891 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/ja.php +++ b/core/src/plugins/core.ajaxplorer/i18n/ja.php @@ -642,7 +642,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* 文章はここまで */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/kr.php b/core/src/plugins/core.ajaxplorer/i18n/kr.php index 43e23f2776..849d09c2df 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/kr.php +++ b/core/src/plugins/core.ajaxplorer/i18n/kr.php @@ -646,7 +646,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/nl.php b/core/src/plugins/core.ajaxplorer/i18n/nl.php index 3c263710e1..fc37026833 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/nl.php +++ b/core/src/plugins/core.ajaxplorer/i18n/nl.php @@ -643,7 +643,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/no.php b/core/src/plugins/core.ajaxplorer/i18n/no.php index a8e6cb9716..1a5b302efc 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/no.php +++ b/core/src/plugins/core.ajaxplorer/i18n/no.php @@ -641,7 +641,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/pl.php b/core/src/plugins/core.ajaxplorer/i18n/pl.php index 7c78c02f49..786447eb6a 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/pl.php +++ b/core/src/plugins/core.ajaxplorer/i18n/pl.php @@ -637,7 +637,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/pt-br.php b/core/src/plugins/core.ajaxplorer/i18n/pt-br.php index 101a23651c..e178387776 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/pt-br.php +++ b/core/src/plugins/core.ajaxplorer/i18n/pt-br.php @@ -641,7 +641,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/pt.php b/core/src/plugins/core.ajaxplorer/i18n/pt.php index 2407d0214f..8094e1476a 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/pt.php +++ b/core/src/plugins/core.ajaxplorer/i18n/pt.php @@ -637,7 +637,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/ru.php b/core/src/plugins/core.ajaxplorer/i18n/ru.php index a1c5623717..30734804fa 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/ru.php +++ b/core/src/plugins/core.ajaxplorer/i18n/ru.php @@ -639,7 +639,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" ); diff --git a/core/src/plugins/core.ajaxplorer/i18n/si.php b/core/src/plugins/core.ajaxplorer/i18n/si.php index 9de4e12298..08361820ce 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/si.php +++ b/core/src/plugins/core.ajaxplorer/i18n/si.php @@ -638,7 +638,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/sv.php b/core/src/plugins/core.ajaxplorer/i18n/sv.php index 28636ed245..0b431846c2 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/sv.php +++ b/core/src/plugins/core.ajaxplorer/i18n/sv.php @@ -637,7 +637,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/tr.php b/core/src/plugins/core.ajaxplorer/i18n/tr.php index 6377dedd35..cec287f077 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/tr.php +++ b/core/src/plugins/core.ajaxplorer/i18n/tr.php @@ -640,7 +640,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/zh-tw.php b/core/src/plugins/core.ajaxplorer/i18n/zh-tw.php index 4175fc975b..48df2813c0 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/zh-tw.php +++ b/core/src/plugins/core.ajaxplorer/i18n/zh-tw.php @@ -640,7 +640,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ajaxplorer/i18n/zh.php b/core/src/plugins/core.ajaxplorer/i18n/zh.php index e762350d76..d77aeca934 100644 --- a/core/src/plugins/core.ajaxplorer/i18n/zh.php +++ b/core/src/plugins/core.ajaxplorer/i18n/zh.php @@ -649,7 +649,7 @@ "543" => "Results limited to 100 out of %s.", "544" => "Show All", "545" => "Remote Share Dialog", -"546" => "This item has been shared with you from a remote location. Do you want to continue ?", +"546" => "This item has been shared with you by %%OWNER%% from a remote location. Do you want to continue ?", "547" => "Accept", "548" => "Decline" /* END SENTENCE */ diff --git a/core/src/plugins/core.ocs/src/Model/RemoteShare.php b/core/src/plugins/core.ocs/src/Model/RemoteShare.php index baab89ed5c..26722164f5 100644 --- a/core/src/plugins/core.ocs/src/Model/RemoteShare.php +++ b/core/src/plugins/core.ocs/src/Model/RemoteShare.php @@ -57,6 +57,10 @@ class RemoteShare */ var $sender; + /** + * @var string + */ + var $host; /** * @var string */ @@ -133,14 +137,17 @@ public function buildVirtualRepository(){ "META_SOURCES" => array() ) ); + + $remoteHost = $this->getHost(); + $remoteHost = !empty($remoteHost) ? '@' . $remoteHost : ' [remote]'; $repo = \ConfService::createRepositoryFromArray($repositoryId, $data); $repo->setRepositoryType("remote"); $repo->setAccessStatus($this->getStatus() == OCS_INVITATION_STATUS_ACCEPTED ? "accepted":""); $repo->setWriteable(false); - $repo->setOwnerData(null, $this->getSender()." [remote]"); + $repo->setOwnerData(null, $this->getSender().$remoteHost); if($this->isDocumentIsLeaf()){ $contentFilter = new \ContentFilter(array()); - $contentFilter->filters["/".$this->getDocumentName()] = "/".$this->getDocumentName(); + $contentFilter->filters["/".$this->getDocumentName()] = "/"; // . $this->getDocumentName(); $repo->setContentFilter($contentFilter); } return $repo; @@ -237,6 +244,13 @@ public function getSender() return $this->sender; } + /** + * @return string + */ + public function getHost() + { + return $this->host; + } /** * @return string */ @@ -333,6 +347,14 @@ public function setSender($sender) $this->sender = $sender; } + /** + * @param string $host + */ + public function setHost($host) + { + $this->host = $host; + } + /** * @param string $ocsServiceUrl */ diff --git a/core/src/plugins/core.ocs/src/Server/Federated/Server.php b/core/src/plugins/core.ocs/src/Server/Federated/Server.php index 1e121fad1c..af8ce8f636 100644 --- a/core/src/plugins/core.ocs/src/Server/Federated/Server.php +++ b/core/src/plugins/core.ocs/src/Server/Federated/Server.php @@ -83,6 +83,7 @@ protected function actionReceive($parameters){ $share->setReceptionDate(time()); $share->setStatus(OCS_INVITATION_STATUS_PENDING); + $share->setHost(rtrim($remote, '/')); $share->setOcsServiceUrl(rtrim($remote, '/').$endpoints['share']); $share->setOcsDavUrl(rtrim($remote, '/').$endpoints['webdav']); diff --git a/core/src/plugins/gui.ajax/res/js/ui/reactjs/jsx/LeftNavigation.js b/core/src/plugins/gui.ajax/res/js/ui/reactjs/jsx/LeftNavigation.js index d89e2c1e34..be6cc92394 100644 --- a/core/src/plugins/gui.ajax/res/js/ui/reactjs/jsx/LeftNavigation.js +++ b/core/src/plugins/gui.ajax/res/js/ui/reactjs/jsx/LeftNavigation.js @@ -413,8 +413,17 @@ handleOpenAlert: function () { this.wrapper = document.body.appendChild(document.createElement('div')); this.wrapper.style.zIndex = 11; + var replacements = { + '%%OWNER%%': this.props.workspace.getOwner() + }; var component = React.render( - , this.wrapper); + , this.wrapper); }, handleCloseAlert: function() { @@ -513,22 +522,29 @@ render: function () { var messages = this.props.pydio.MessageHash, + messageTitle = messages[545], + messageBody = messages[546], actions = [ { text: messages[548], ref: 'decline', onClick: this.props.onDecline}, { text: messages[547], ref: 'accept', onClick: this.props.onAccept} ]; + for (var key in this.props.replacements) { + messageTitle = messageTitle.replace(new RegExp(key), this.props.replacements[key]); + messageBody = messageBody.replace(new RegExp(key), this.props.replacements[key]); + } + return
- {messages[546]} + {messageBody}
}