Skip to content

Commit

Permalink
Add GDPR (personal data page) when social tool is disabled BT#15080
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Nov 20, 2018
1 parent ac173d6 commit b621f2d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
10 changes: 8 additions & 2 deletions main/inc/lib/userportal.lib.php
Expand Up @@ -885,6 +885,7 @@ public function return_profile_block()
'link' => api_get_path(WEB_PATH).'main/messages/inbox.php',
'title' => get_lang('Inbox').$cant_msg,
];

$items[] = [
'class' => 'new-message-social',
'icon' => Display::return_icon('new-message.png', get_lang('Compose')),
Expand All @@ -900,6 +901,13 @@ public function return_profile_block()
'link' => api_get_path(WEB_PATH).'main/social/invitations.php',
'title' => get_lang('PendingInvitations').$total_invitations,
];
} else {
$items[] = [
'class' => 'personal-data',
'icon' => Display::return_icon('database.png', get_lang('PersonalDataReport')),
'link' => api_get_path(WEB_CODE_PATH).'social/personal_data.php',
'title' => get_lang('PersonalDataReport'),
];
}

if (api_get_configuration_value('allow_my_files_link_in_homepage')) {
Expand Down Expand Up @@ -947,7 +955,6 @@ public function return_profile_block()
}

if (true === api_get_configuration_value('whispeak_auth_enabled')) {
//if (!WhispeakAuthPlugin::checkUserIsEnrolled($userId)) {
$itemTitle = WhispeakAuthPlugin::create()->get_title();

$items[] = [
Expand All @@ -956,7 +963,6 @@ public function return_profile_block()
'link' => WhispeakAuthPlugin::getEnrollmentUrl(),
'title' => $itemTitle,
];
//}
}

return $items;
Expand Down
1 change: 0 additions & 1 deletion main/social/personal_data.php
Expand Up @@ -51,7 +51,6 @@
$formDelete->addButtonDelete(get_lang('DeleteAccount'));
$formToString .= $formDelete->returnForm();
}

switch ($action) {
case 'send_legal':
$language = api_get_interface_language();
Expand Down
17 changes: 11 additions & 6 deletions main/template/default/social/personal_data.tpl
Expand Up @@ -3,13 +3,18 @@

{% block content %}
<div class="row">
<div class="col-md-3">
<div class="social-network-menu">
{{ social_avatar_block }}
{{ social_menu_block }}
{% set columns = '12' %}
{% if social_menu_block %}
<div class="col-md-3">
<div class="social-network-menu">
{{ social_avatar_block }}
{{ social_menu_block }}
</div>
</div>
</div>
<div class="col-md-9">
{% set columns = '9' %}
{% endif %}

<div class="col-md-{{ columns }}">
{{ display.panel('PersonalDataIntroductionTitle' | get_lang , 'PersonalDataIntroductionText' | get_lang) }}
{{ display.collapse('', 'PersonalDataKeptOnYou' | get_lang, personal_data.data, false, 'false') }}

Expand Down

0 comments on commit b621f2d

Please sign in to comment.