Core pr 5

The reservation buttons have been changed from forms to ajax links to fix cache issues and slow site.
This seems to be a convoluted way to determine a preferred branch. Why is a regular expression needed?

If this is necessary I would at least prefer to move it to a helper function.