We are using Public Shares and we want to make it clear for internal users that upload documents to Public Shares that they are only allowed to upload unclassified documents. So we would like to have a banner in red on any Public Share page that says "Please do not upload any classified documents to this Share". On the Authenticated Shares page, we should not have that banner. Can this be done by using the custom Java Script option? And if so, what should the script look like? Many thanks.
With custom javasript is not a problem to place a generic banner on the Share page. i.e. like this: Code: if (!$('.not_logged_in ').length) { $('#share_title').after('<div class="alert alert-danger" role="alert"><strong>Please do not upload any classified documents to public Shares</strong></div>'); } But currently only with javascript itself we can't detect if a particular Share is publicly available or not.
Since v4.2.4 has been added a public_share class in the body classes for the Share pages (lf.domain.com/shares/someshare) so now it's possible to identify the public shares and show the banner accordingly only there. Code: $(function() { if ($('body').hasClass('public_share') && !$('.not_logged_in').length) { $('#share_title').after('<div class="alert alert-danger" role="alert"><strong>Please do not upload any classified documents to public Shares</strong></div>'); } });
We just upgraded to version 4.2.4. I have tested this new JavaScript and it works perfectly. Many thanks.