Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Target_Blank option to open External links in a new tab (link with External module Issue #74) #27725

Conversation

ChrisCano66
Copy link
Contributor

@ChrisCano66 ChrisCano66 commented Jun 30, 2021

Fix nextcloud/external#79
** External module Issue : #74 "Open in new tab" **
** External module pull request : "Implementation of Target_Blank option to open External links in a new tab #268" **

Hi !

We are a team that contributes to the improvement and production of free software for the general public. Moreover, being a NextCloud user, we wanted to improve it and especially the External module.

Thus, we wanted to respond to Issue #74 which requires the opening of external links to a new tab.
We have therefore improved the source code of the External module by modifying the following:

On External front-end, we added the possibility to check the "New Tab" option.
We have modified the files "admin.js", "site.handlebars" and "style.css" in the External module where we added a "target" option.
But we needed to modify some Nextcloud files too : "layout.user.php" and "MainMenu.js". So we also made a contribution on NextCloud Server in order for the implementation to be done properly.

For setting up the data option in the database and link the front-end to back-end, we had to modify the following files in External module :
"Application.php", "APIController.php", "SitesManager.php", "Personnal.php", "BeforeTemplateRenderedListener.php" and " Capabilites.php".
In all of this files, we added the "target" option which allows us to follow the activation of the front-end option to the back-end and the database.

If you have any questions about the implementation of the option, please do not hesitate to contact us by email at the following address: contact@fcclvandoeuvre.fr or christophecanovas66@gmail.com.

Regards.

@szaimen
Copy link
Contributor

szaimen commented Jun 30, 2021

Linked to nextcloud/external#268

Signed-off-by: christophe canovas <christophecanovas66@gmail.com>
@ChrisCano66 ChrisCano66 force-pushed the Add_Target_Blank_To_Links_Menu branch from edb2140 to 7b1b21a Compare July 1, 2021 09:27
@fccl-vandoeuvre
Copy link

If you have any questions about the implementation of the option, please do not hesitate to contact us by email at the following address: contact@fcclvandoeuvre.fr or christophecanovas66@gmail.com.

contact@fccl-vandoeuvre.fr :)

@@ -55,6 +55,7 @@
<?php foreach ($_['navigation'] as $entry): ?>
<li data-id="<?php p($entry['id']); ?>" class="hidden" tabindex="-1">
<a href="<?php print_unescaped($entry['href']); ?>"
<?php if ($entry['target']): ?> target="_blank"<?php endif; ?>
Copy link
Member

@nickvergessen nickvergessen Jul 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also set rel="noreferrer noopener" ?

@szaimen
Copy link
Contributor

szaimen commented Aug 31, 2021

@ChrisCano66 please address the review. Thanks!

@szaimen szaimen added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Aug 31, 2021
@fccl-vandoeuvre
Copy link

Hello,

@ChrisCano66 please address the review. Thanks!

Chris was on vacation, he will work on the project again very soon.

Sincerely, Axel for the FCCL.

@nickvergessen
Copy link
Member

Rebased and fixed in #31180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open in new tab
5 participants