Hi,
Is there a way to only show a banner when a user is not logged in?
What I am trying to do is only show the banner when a user is not authenticated. If the user logs in, the banner doesn't display.
Any tips? Something that checks whether a user is logged in , etc?
Thanks.
JIRA makes a javascript variable available (AJS.params) that has lots of information available, including the name of the logged in user, which is blank if the user is not authenticated. Based on that, you could do something like this:
<div id="my-announcement" class="hidden"> Your HTML here </div> <script> if (!AJS.params.loggedInUser) { jQuery("#my-announcement").removeClass("hidden"); } </script>
Hi,
Could somebody help me with the same functionality. Which files do i need to modify?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.