summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMichael Weimann <mail@michael-weimann.eu>2018-12-16 18:39:01 +0100
committerMichael Weimann <mail@michael-weimann.eu>2019-01-14 00:07:34 +0100
commit107fab9dfad01ac8d6532e1a3e3758d444a114b0 (patch)
tree3a4a014488a3deb01e0094475e5239cd454000f9 /settings
parent71e26d12c0f82ebf4046a9265e2594b469be9e7b (diff)
downloadnextcloud-server-107fab9dfad01ac8d6532e1a3e3758d444a114b0.tar.gz
nextcloud-server-107fab9dfad01ac8d6532e1a3e3758d444a114b0.zip
Add the "where is your data?" frontend
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'settings')
-rw-r--r--settings/css/settings.scss17
-rw-r--r--settings/templates/settings/personal/partials/where-is-your-data.php76
-rw-r--r--settings/templates/settings/personal/personal.info.php6
3 files changed, 94 insertions, 5 deletions
diff --git a/settings/css/settings.scss b/settings/css/settings.scss
index d384ef26577..65e66370887 100644
--- a/settings/css/settings.scss
+++ b/settings/css/settings.scss
@@ -98,6 +98,7 @@ input {
#personal-settings-avatar-container {
display: inline-grid;
+ grid-row: span 3;
grid-template-columns: 1fr;
grid-template-rows: 2fr 1fr;
vertical-align: top;
@@ -178,6 +179,15 @@ select {
grid-template-columns: 1fr;
#personal-settings-avatar-container {
grid-template-rows: 1fr;
+
+ // swap "Where is my data" and "Detail"
+ *:nth-child(2) {
+ order: 3;
+ }
+
+ *:nth-child(3) {
+ order: 2;
+ }
}
.personal-settings-container {
grid-template-columns: 1fr 1fr;
@@ -1614,3 +1624,10 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
}
}
}
+
+.where-is-your-data {
+ // @todo replace by common Nextcloud link style as soon as available
+ a {
+ border-bottom: 1px dotted;
+ }
+}
diff --git a/settings/templates/settings/personal/partials/where-is-your-data.php b/settings/templates/settings/personal/partials/where-is-your-data.php
new file mode 100644
index 00000000000..0888bcfc006
--- /dev/null
+++ b/settings/templates/settings/personal/partials/where-is-your-data.php
@@ -0,0 +1,76 @@
+<div class="personal-settings-setting-box personal-settings-group-box section where-is-your-data">
+ <h3>
+ <?php p($l->t('Where is your data?')); ?>
+ <a
+ target="_blank"
+ rel="noreferrer noopener"
+ class="icon-info"
+ title=""
+ href="https://nextcloud.com/yourdata/"
+ data-original-title="Open documentation"></a>
+ </h3>
+ <?php if (empty($_['dataLocation']) === false): ?>
+ <div class="personal-info icon-address">
+ <p>
+ <?php echo $l->t('Your data is located in <b>%s</b>.', [$_['dataLocation']]); ?>
+ </p>
+ </div>
+ <?php endif; ?>
+
+ <?php if (empty($_['provider']) === false): ?>
+ <div class="personal-info icon-category-integration">
+ <p>
+ <?php
+ if (empty($_['providerLink']) === false) {
+ echo $l->t('Your provider is %s%s%s.', [
+ '<a href="' . $_['providerLink'] . '" target="_blank" title="" rel="noreferrer noopener">',
+ $_['provider'],
+ '</a>'
+ ]);
+ } else {
+ echo $l->t('Your provider is %s.', [$_['provider']]);
+ }
+ ?>
+ <?php
+ if (empty($_['providerPrivacyLink']) === false) {
+ echo $l->t('Read the %sprivacy policy%s now.', [
+ '<a href="' . $_['providerPrivacyLink'] . '" target="_blank" title="" rel="noreferrer noopener">',
+ '</a>'
+ ]);
+ }
+ ?>
+ </p>
+ </div>
+ <?php endif; ?>
+
+ <?php if ($_['encryptionEnabled'] === true): ?>
+ <div class="personal-info icon-password">
+ <p>
+ <?php echo $l->t(
+ 'Your data is protected by %sserver side encryption%s.',
+ [
+ '<a href="https://nextcloud.com/blog/encryption-in-nextcloud/" target="_blank" title="" rel="noreferrer noopener">',
+ '</a>'
+ ]
+ ); ?>
+ </p>
+ </div>
+ <?php endif; ?>
+
+ <?php if (empty($_['adminName']) === false): ?>
+ <div class="personal-info icon-user-admin">
+ <p>
+ <?php echo $l->t(
+ '%s%s%s is your admin. If you have any issues, %scontact them%s.',
+ [
+ '<a href="mailto:' . $_['adminMail'] . '" target="_blank" title="" rel="noreferrer noopener">',
+ $_['adminName'],
+ '</a>',
+ '<a href="mailto:' . $_['adminMail'] . '" target="_blank" title="" rel="noreferrer noopener">',
+ '</a>'
+ ]
+ ); ?>
+ </p>
+ </div>
+ <?php endif; ?>
+</div>
diff --git a/settings/templates/settings/personal/personal.info.php b/settings/templates/settings/personal/personal.info.php
index d873f6821b8..5743777b4b9 100644
--- a/settings/templates/settings/personal/personal.info.php
+++ b/settings/templates/settings/personal/personal.info.php
@@ -95,6 +95,7 @@ script('settings', [
<progress value="<?php p($_['usage_relative']); ?>" max="100"<?php if($_['usage_relative'] > 80): ?> class="warn" <?php endif; ?>></progress>
</div>
</div>
+ <?php include __DIR__ . '/partials/where-is-your-data.php' ?>
</div>
<div class="personal-settings-container">
@@ -375,9 +376,4 @@ script('settings', [
</div>
<span class="msg"></span>
</div>
-
- <div id="personal-settings-group-container">
-
- </div>
-
</div>