Skip to content

Commit

Permalink
Merge branch 'release/4.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sbearcsiro committed Sep 6, 2023
2 parents 465f449 + 5232b3e commit e54de44
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
}
}

version "4.2.0"
version "4.3.0"
group "org.grails.plugins"

apply plugin:"eclipse"
Expand Down
6 changes: 5 additions & 1 deletion grails-app/conf/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ grails:
fixtaglib: true

headerAndFooter:
baseURL: https://www.ala.org.au/commonui-bs3
baseURL: https://www.ala.org.au/commonui-bs3

userdetails:
url: https://auth.ala.org.au/userdetails/
profilePath: myprofile
3 changes: 3 additions & 0 deletions grails-app/i18n/messages.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
survey.title=Welcome to the Atlas of Living Australia
survey.p=Welcome to the Atlas of Living Australia (ALA). Please add your country and institutional affiliation to <a href="{0}" rel="noreferrer noopener">your profile</a>, to complete your account setup.
survey.p2=This information helps us enhance your experience and fulfil reporting requirements to our principal funding body, NCRIS. We prioritise your privacy and only utilise aggregated data in doing so.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ class HeaderFooterTagLib {
out << tagLinkService.buildLoginLink(request, attrs)
}

def nagger = { attrs, body ->
if (request.getAttribute('ala.affiliation-required')) {
if (!session['shownAffiliation']) {
session['shownAffiliation'] = true
out << body()
}
}
}

/*
* This g:paginate tag fix is based on:
* https://github.com/grails/grails-core/blob/master/grails-plugin-gsp/src/main/groovy/org/codehaus/groovy/grails/plugins/web/taglib/RenderTagLib.groovy
Expand Down
27 changes: 27 additions & 0 deletions grails-app/views/layouts/_main.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,33 @@
</head>
<body class="${pageProperty(name:'body.class')}" id="${pageProperty(name:'body.id')}" onload="${pageProperty(name:'body.onload')}">
<g:set var="fluidLayout" value="${pageProperty(name:'meta.fluidLayout')?:grailsApplication.config.getProperty('skin.fluidLayout', Boolean, false)}"/>
<%-- Nag Banner --%>
<hf:nagger>
<div id="overlay">
<div id="nag-modal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"><g:message message="survey.title"/></h4>
</div>
<div class="modal-body">
<p><g:message message="survey.p" args="[u.createLink(baseProperty:'userdetails.url', pathsProperty: 'userdetails.profilePath')]"/></p>
<p><g:message message="survey.p2" /></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<asset:script type="text/javascript">
$(document).ready(function(){
$("#nag-modal").modal('show');
});
</asset:script>
</div>
</hf:nagger>
<!-- Header -->
<hf:banner logoutUrl="${g.createLink(controller: "logout", action: "logout", absolute: true)}"
ignoreCookie="${grailsApplication.config.getProperty('ignoreCookie', Boolean, false)}" fluidLayout="${grailsApplication.config.getProperty('skin.fluidLayout', Boolean, false)}"/>
Expand Down

0 comments on commit e54de44

Please sign in to comment.