alphagov/panopticon — pull request #122 by JordanHatch (2014-02-06 15:40:42+00:00)
Title: New layout for the artefact form

This pull request adds a new layout for the artefact form in Panopticon.

The current artefact form has evolved over the last couple of years to include things like related items, section tags, language flags, user need information and more. At the same time, we've changed what can and can't be edited in Panopticon - for example the title and description fields are now edited in other publishing tools. The result has been a form which is very long, quite unclear, and which contains superfluous disabled fields.

We're about to start putting a greater focus on metadata and tagging as part of the search and navigation project, so it's important that we do give Panopticon some love before we add even more fields for an artefact.

I've rebuilt the form as a two-column view with the most common tasks (such as related items and tagging) on the left hand side, and other fields which may not be changed as frequently (such as the user need, language and font settings) on the right. I've also removed fields for the title, slug and description. The title and slug are shown at the top of the page, along with the state of the artefact, and the slug links through to the live content item on GOV.UK. I've split away the archive and history tabs as separate views, to make the code cleaner, and this won't have any noticeable impact to users.

The Whitehall artefact view remains largely the same as before, however I have included some of the layout changes so that it feels consistent with the regular artefact view.

To make these changes, I have updated Bootstrap to 2.3 and switched to using the bootstrap-sass gem. We made good use of this gem in Maslow, and it is also used by Transition. It gives us the ability to extend Bootstrap's CSS into our own style rules, meaning we can use more semantic class names in our HTML. Formtastic has also been updated to 2.2, and I've swapped out the Chosen files in `/vendor/assets` to use the chosen-rails gem, which provides the library through the asset pipeline.

I've had some helpful feedback from @markhurrell and @futurefabric throughout building this, and if anyone has any suggestions or good conventions that I should adopt, then I'd be really interested to hear them.

![artefact-vat-rates](https://f.cloud.github.com/assets/71922/2099915/3e551ed8-8f42-11e3-8317-1790dd0ffd6e.png)