okfn/ckanext-sgdata — pull request #24 by johnmartin (2014-08-20 12:05:43+00:00)
Title: Front end testing

Overall it's looking really great @mintcanary & @seanh. There's not much I've done to change the actual site at all, most of the stuff in this pull request is simply either tidying up the templates or future proofing the template blocks.

Anyways, here's the main stuff for context:

1. I've simplified the templates to make them a little more future proof (in particular I've moved a lot of the customisations from `package/read.html` into `package/read_base.html` as `package/read_base.html` is extended from for a lot of the package templates... so therefore stuff in the secondary column now get's populated throughout all the package read pages)
2. I've also moved external dependancy management to [bower](http://bower.io/) [1]. Basically: it means that the site is self contained, all static resources can be handled with a `{% resource %}` tag and it's easier to ensure that CSS/JS is executing in a way that CKAN likes
3. I've made sure that there is a URL for the contact page (so that it's not just at `#contact`)
4. The rest of the tweaks are mainly whitespace / template / i18n tweaks

### General thoughts

Here's a couple of things that'll probably make templating a little simpler in the future:

1. Use the `*_base.html` / `base.html` templates whenever you want to affect multiple pages within a section (`package/base.html`, `package/read_base.html` and `package/edit_base.html` are really nice examples)
2. It might be worthwhile moving towards something like [gulp](http://gulpjs.com/) to handle less compilation/building the front end dependancies for ckanext's. Which leads me to:
3. (This ones more of a open ended question) Is it worthwhile providing a `ckanext-bootstrap` repo that has the scaffolding code that takes care of the general stuff we do in all ckanext's (compiling less, resource directory, front end dependancy management, etc...)

[1] So first install bower `npm install -g bower`, then do a `bower update` on the working directory to get all the dependancies for the project (you'll also need to do another `paster serve` the first time as the `resource` directory will be updated)