Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Migrated to asset pipeline
- Updated to ala-auth 2.x
- First cut, still to fix a few issues
  • Loading branch information
Javier Molina authored and Javier Molina committed Aug 9, 2017
1 parent 17d825a commit c6c999d
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 17 deletions.
12 changes: 12 additions & 0 deletions grails-app/assets/javascripts/alaBs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* This is a manifest file that'll be compiled into alaBs.js, which will include all the files
* listed below.
*
* Any JS file within this directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
* // require bootstrap
//= require hubCore
*/
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

if (typeof jQuery !== 'undefined') {
(function($) {
$('#spinner').ajaxStart(function() {
Expand Down
File renamed without changes.
12 changes: 12 additions & 0 deletions grails-app/assets/stylesheets/alaBs.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* This is a manifest file that'll be compiled into alaBs.css, which will include all the files
* listed below.
*
* Any CSS file within this directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
* // require bootstrap
*= require hubCore
*/
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
11 changes: 6 additions & 5 deletions grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ grails.project.source.level = 1.8

//grails.plugin.location.'biocache-hubs' = "../biocache-hubs"
//grails.plugin.location.'downloads-plugin' = "../downloads-plugin"
//grails.plugin.location.'images-client-plugin' = "../images-client-plugin"
//grails.plugin.location.'ala-bootstrap2' = "../ala-bootstrap2"

grails.project.fork = [
Expand Down Expand Up @@ -56,12 +57,12 @@ grails.project.dependency.resolution = {
compile ':cache:1.1.8'
compile ":cache-headers:1.1.6"
compile ":geoip:0.3.3"
runtime ":resources:1.2.14"
// compile ":asset-pipeline:2.14.1"
runtime ":cached-resources:1.0"
// runtime ":resources:1.2.14"
compile ":asset-pipeline:2.14.1"
// runtime ":cached-resources:1.0"
runtime ":biocache-hubs:1.5-SNAPSHOT"
runtime ":downloads-plugin:1.3.2"
runtime ":downloads-plugin:1.5-SNAPSHOT"
runtime ":ala-bootstrap2:2.6.0-SNAPSHOT"
runtime ":ala-auth:1.3.4"
runtime ":ala-auth:2.1.3"
}
}
10 changes: 9 additions & 1 deletion grails-app/conf/Config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ security.cas.casServerUrlPrefix = 'https://auth.ala.org.au/cas'
security.cas.bypass = false // set to true for non-ALA deployment
auth.admin_role = "ROLE_ADMIN"

security.cas.uriFilterPattern='/admin,/admin/.*,/download,/download/.*,/proxy/.*,/occurrences/.*,/occurrence/.*,/'
security.cas.uriExclusionFilterPattern='/occurrences/shapeUpload,/images.*,/css.*,/js.*,.*json,/help/.*'
security.cas.authenticateOnlyIfLoggedInFilterPattern='/occurrences/(?!.+userAssertions|facet.+).+,/explore/your-area,/query,/proxy/download/.*,/'


skin.fluidLayout = true
skin.useAlaSpatialPortal = true
skin.useAlaBie = true
Expand Down Expand Up @@ -159,6 +164,9 @@ environments {
// serverName='https://130.220.209.134:8080/'
// security.cas.appServerName = serverName
// security.cas.contextPath = "/${appName}"

// security.cas.appServerName = 'https://devt.ala.org.au:8080/'

}
production {
// grails.serverURL = 'https://biocache.ala.org.au'
Expand Down Expand Up @@ -206,6 +214,6 @@ log4j = {
}

//Restrict sandbox data access to drts by userid or admin
// uriFilterPattern=/proxy/.*,/occurrences/.*
// security.cas.uriFilterPattern=/proxy/.*,/occurrences/.*
// biocache.ajax.useProxy=true
// sandbox.access.restricted=true
10 changes: 3 additions & 7 deletions grails-app/views/layouts/ala.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@

<title><g:layoutTitle /></title>
<g:render template="/layouts/global" plugin="biocache-hubs"/>

<%-- Do not include JS & CSS files here - add them to your app's "application" module (in "Configuration/ApplicationResources.groovy") --%>
<r:require modules="alaBs"/>

%{--<r:layoutResources/>--}%
<asset:stylesheet src="alaBs.css" />
<asset:javascript src="alaBs.js" />

<g:layoutHead />
</head>
<body class="${pageProperty(name:'body.class')?:'nav-datasets'}" id="${pageProperty(name:'body.id')}" onload="${pageProperty(name:'body.onload')}">
Expand Down Expand Up @@ -50,8 +49,5 @@
%{--<a class="btn btn-small toggleResponsive"><i class="icon-resize-full"></i> Desktop version</a>--}%
</div>

<!-- JS resources-->
%{--<r:layoutResources/>--}%

</body>
</g:applyLayout>
8 changes: 4 additions & 4 deletions grails-app/views/layouts/generic.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<meta name="author" content="${grailsApplication.config.skin.orgNameLong}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><g:layoutTitle /></title>
<r:require modules="bootstrap, hubCore"/>
<asset:stylesheet src="alaBs.css" />
<asset:javascript src="alaBs.js" />

<g:layoutHead />
<hf:head/>
</head>
Expand All @@ -15,16 +17,14 @@
<g:set var="fluidLayout" value="${grailsApplication.config.skin.fluidLayout?.toBoolean()}"/>
<div class="${fluidLayout?'container-fluid':'container'}" id="main-content">
<g:layoutBody />
</div><!--/.container-->
</div>

<div class="${fluidLayout?'container-fluid':'container'} hidden-desktop">
<%-- Borrowed from https://marcusasplund.com/optout/ --%>
<a class="btn btn-small toggleResponsive"><i class="icon-resize-full"></i> <span>Desktop</span> version</a>
%{--<a class="btn btn-small toggleResponsive"><i class="icon-resize-full"></i> Desktop version</a>--}%
</div>

<!-- JS resources-->
%{--<r:layoutResources/>--}%

</body>
</g:applyLayout>

0 comments on commit c6c999d

Please sign in to comment.