Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to using govuk_admin_template and Bootstrap 3 #2241

Merged
merged 71 commits into from Jul 2, 2015
Merged

Commits on Jun 26, 2015

  1. Start using admin gem

    * Add govuk_admin_template
    * Remove jquery-rails and Bootstrap gems, they’re provided via gem
    fofr committed Jun 26, 2015
    Copy the full SHA
    3e08dba View commit details
    Browse the repository at this point in the history
  2. Switch to using govuk_admin_template layout

    * Use nested layouts
    * Remove bootstrap and custom variables from admin.scss
    * Remove now unnecessary javascript includes
    fofr committed Jun 26, 2015
    Copy the full SHA
    0dd8ff4 View commit details
    Browse the repository at this point in the history
  3. Add Bootstrap form classes to form builder

    In Bootstrap 3 all form elements that want to pickup the Bootstrap
    styles need:
    * A `form-control` class
    * A `form-group` wrapper for correct spacing
    
    Horizontal forms no longer use `controls`, and the space between label
    and field is set using newer grid classes. Setup horizontal forms for
    text fields and textareas.
    fofr committed Jun 26, 2015
    Copy the full SHA
    6bac4cd View commit details
    Browse the repository at this point in the history
  4. Remove pre-gem environment indicator shims

    Environment indicators are now provided by the admin gem
    fofr committed Jun 26, 2015
    Copy the full SHA
    6878832 View commit details
    Browse the repository at this point in the history
  5. Remove generic form styles

    These overly generic styles clash with the Bootstrap defaults and
    patterns. Forms should look and behave as they do in other admin apps.
    fofr committed Jun 26, 2015
    Copy the full SHA
    8f39a92 View commit details
    Browse the repository at this point in the history
  6. Render form errors using Bootstrap 3 alert

    `error` was renamed to `danger`
    fofr committed Jun 26, 2015
    Copy the full SHA
    da9e5d0 View commit details
    Browse the repository at this point in the history
  7. Cleanup adding, editing and index of topics

    * Switch to Bootstrap 3 grids where required
    * Include Bootstrap 3 alert and btn default classes
    * Switch featured link form away from horizontal styles, improve
    rendering and capitalise `URL`
    fofr committed Jun 26, 2015
    Copy the full SHA
    818112b View commit details
    Browse the repository at this point in the history
  8. Make header work with template & Bootstrap 3

    * Use styles and markup patterns from admin template, remove original
    shims and assets
    * Fix favicon image location
    * Visually match existing header
    fofr committed Jun 26, 2015
    Copy the full SHA
    8cb8cea View commit details
    Browse the repository at this point in the history
  9. Cleanup dashboard

    * Use BS3 grid and label classes
    * Use list-unstyled and list-inline classes and remove custom document
    list styles
    fofr committed Jun 26, 2015
    Copy the full SHA
    5bcb350 View commit details
    Browse the repository at this point in the history
  10. Bump Bootstrap Kaminari views gem

    Pickup latest Bootstrap 3 templates
    fofr committed Jun 26, 2015
    Copy the full SHA
    b5666a3 View commit details
    Browse the repository at this point in the history
  11. Cleanup edition index

    * Use BS3 grid, form and button classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    eff332e View commit details
    Browse the repository at this point in the history
  12. Cleanup edition show page

    * Reduce custom styles in favour of Bootstrap defaults
    * Remove default indenting within lists (`list-unstyled`)
    * Add missing btn-default to buttons
    * Tweak spacing
    * Switch absolute_time to use a `<time>` element, and avoid styling as
    an abbreviation with a help cursor and dotted underline
    * Switch alerts from `-error` to `-danger`
    * Small typography fixes
    * Use no content styles for empty sections
    * Switch from `icon-` to `glyphicon-`
    * Update modals to latest syntax
    fofr committed Jun 26, 2015
    Copy the full SHA
    d7696b7 View commit details
    Browse the repository at this point in the history
  13. Update checkbox and radio inputs to Bootstrap 3

    * The radio/checkbox classes no longer go on the labels, they need to
    wrap the label and the input. See http://getbootstrap.com/css/#forms
    fofr committed Jun 26, 2015
    Copy the full SHA
    2b3fa7e View commit details
    Browse the repository at this point in the history
  14. Cleanup edit publication

    * Switch to new grid classes
    * Fix checkboxes that aren’t using form_builder methods
    fofr committed Jun 26, 2015
    Copy the full SHA
    22b150d View commit details
    Browse the repository at this point in the history
  15. Cleanup attachments list view

    * Update to work with admin gem’s approach to non-js checking
    * Prevent `ul` elements from indenting list items
    fofr committed Jun 26, 2015
    Copy the full SHA
    ec8170d View commit details
    Browse the repository at this point in the history
  16. Cleanup corporate information pages

    * Remove, simplify or update grid classes
    * Use smart quotes in copy
    * Add borders to tables to match table style
    fofr committed Jun 26, 2015
    Copy the full SHA
    9a89eff View commit details
    Browse the repository at this point in the history
  17. Cleanup edition unpublish/withdraw forms

    * Remove grid classes
    * Put form in well to match other editing interfaces
    * Use Bootstrap 3 radio classes
    * Remove strong tags from label text
    fofr committed Jun 26, 2015
    Copy the full SHA
    902be95 View commit details
    Browse the repository at this point in the history
  18. Fix force publish modal

    If `data-toggle=modal` and `data-target` are used on a link element in
    Bootstrap 3, then Bootstrap attempts to load the contents of the link's
    href remotely, putting it into the modal container. There's no way of
    disabling this. (The feature is being removed in Bootstrap 4)
    
    We still want a link that works when js is broken or disabled. Use
    `data-module=linked-modal` rather than `data-toggle=modal`
    
    * The workaround doesn’t work in conjunction with the confirm dialogue,
    remove the dialogue as the edition still requires a reason before it
    can be published
    fofr committed Jun 26, 2015
    Copy the full SHA
    e58aff8 View commit details
    Browse the repository at this point in the history
  19. Cleanup broken links report

    * Use glyphicons, link and margin helpers
    * Remove custom styles which are now provided by Bootstrap/gem
    fofr committed Jun 26, 2015
    Copy the full SHA
    84da286 View commit details
    Browse the repository at this point in the history
  20. Cleanup first published form fields

    * Remove custom styles, use Bootstrap defaults
      * Labels are now bold by default
    * Wrap radio elements in `radio` container
    fofr committed Jun 26, 2015
    Copy the full SHA
    edd36a6 View commit details
    Browse the repository at this point in the history
  21. Fix words to avoid highlighter

    * Reset styles that were being inherited from the admin template due to
    a class clash.
    * Stop using `badge` styles in alert
    * Explicitly remove `hide` class from alert
    fofr committed Jun 26, 2015
    Copy the full SHA
    092c500 View commit details
    Browse the repository at this point in the history
  22. Update file input builder to Bootstrap 3

    Wrap generated markup in the `form-group` class
    fofr committed Jun 26, 2015
    Copy the full SHA
    af3d52b View commit details
    Browse the repository at this point in the history
  23. Cleanup new document forms for all types

    * Switch to Bootstrap 3 grid classes
    * Add `form-group` wrappers and `form-control` classes where missing
    * Add `form-inline` around date input fields to prevent wrapping
    * Use ellipses rather than …
    fofr committed Jun 26, 2015
    Copy the full SHA
    8ae55c5 View commit details
    Browse the repository at this point in the history
  24. Fix 'designate as foreign language' fields

    * Stop link clicks from changing the URL fragment using `preventDefault`
    * The fieldset is no longer the direct parent of the input, user
    `parents` instead to find the correct HTML element
    * Remove cancel button custom styles
    fofr committed Jun 26, 2015
    Copy the full SHA
    6610249 View commit details
    Browse the repository at this point in the history
  25. Remove style guide and style shims

    Before adopting the admin gem, some of the styles were ported across
    for use in statistics announcements. These can now be removed.
    fofr committed Jun 26, 2015
    Copy the full SHA
    d50f415 View commit details
    Browse the repository at this point in the history
  26. Cleanup statistics announcements

    * Cleanup index view, new and edit forms, cancel form and reschedule
    forms
    * Update `muted` to `text-muted`
    * Use new Bootstrap alert, grid and form classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    3b0fe55 View commit details
    Browse the repository at this point in the history
  27. Cleanup featured documents view

    * Remove unused column headers from tables
    * Use grid glasses in current feature list over custom styles
    * Add missing `btn-default` classes
    * Switch to Bootstrap 3 grid classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    4c9b7cf View commit details
    Browse the repository at this point in the history
  28. Cleanup offsite link form

    * Use new Bootstrap 3 form classes
    * Use smart quotes
    fofr committed Jun 26, 2015
    Copy the full SHA
    3e2e503 View commit details
    Browse the repository at this point in the history
  29. Cleanup organisation list and forms

    * Use Bootstrap 3 grid and form classes
    * Add missing `btn-default` classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    0c100d0 View commit details
    Browse the repository at this point in the history
  30. Cleanup contacts list and forms

    * Use glyphicons from Bootstrap 3 in icon helper (colour is now
    inherited from text colour, which will be white on a dark button)
    * Use Bootstrap 3 form classes (`form-group`, `form-control`, etc)
    * Remove horizontal inputs and nest contact form in well so it looks
    and behaves like other forms
    fofr committed Jun 26, 2015
    Copy the full SHA
    5979522 View commit details
    Browse the repository at this point in the history
  31. Cleanup social media list and forms

    * Use Bootstrap 3 form classes (`form-group`, `form-control`, etc)
    * Remove horizontal inputs and nest form in well so it looks and
    behaves like other forms
    * Make social media URLs clickable
    fofr committed Jun 26, 2015
    Copy the full SHA
    19dbc8f View commit details
    Browse the repository at this point in the history
  32. Cleanup governance group list and forms

    * Use Bootstrap 3 grid classes
    * Use admin template table styles
    fofr committed Jun 26, 2015
    Copy the full SHA
    f641ba0 View commit details
    Browse the repository at this point in the history
  33. Cleanup ordering of people forms

    * Use Bootstrap 3 grid classes
    * Labels default to being bold, use `normal` class so that first line
    of person continues to be a normal font weight
    fofr committed Jun 26, 2015
    Copy the full SHA
    391cb0b View commit details
    Browse the repository at this point in the history
  34. Cleanup org translations list and form

    * Use Bootstrap 3 grid classes
    * Use admin gem table styles
    * When there are no translations, show a no content message rather than
    an empty table
    fofr committed Jun 26, 2015
    Copy the full SHA
    65cfb41 View commit details
    Browse the repository at this point in the history
  35. Cleanup financial reports index and form

    * Use Bootstrap 3 grid classes
    * Use admin gem table styles
    * When there are no reports, show a no content message rather than an
    empty table
    fofr committed Jun 26, 2015
    Copy the full SHA
    9cd7e08 View commit details
    Browse the repository at this point in the history
  36. Remove IE6 admin styles

    Since January there’ve been four IE6 sessions (<0.01% of users).
    
    * Remove IE6 stylesheet
    * Remove IE6 shims
    
    The admin gem still includes helpers for IE7 and below so that pages
    render acceptably using Bootstrap 3.
    
    In dev, this will mean one less admin file to compile when styles are
    changed.
    fofr committed Jun 26, 2015
    Copy the full SHA
    6c02a07 View commit details
    Browse the repository at this point in the history
  37. Cleanup policy groups index and form

    * Use Bootstrap 3 grid classes
    * Add missing `btn-default` class
    fofr committed Jun 26, 2015
    Copy the full SHA
    d165005 View commit details
    Browse the repository at this point in the history
  38. Cleanup add, edit attachment forms

    * Use Bootstrap 3 grid classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    57ec672 View commit details
    Browse the repository at this point in the history
  39. Cleanup role lists and forms

    * Use Bootstrap 3 grid and form classes
    * Add well around role translate forms to match other form styles
    * Add missing `btn-default` styles
    * Use smart quotes
    fofr committed Jun 26, 2015
    Copy the full SHA
    2499bd7 View commit details
    Browse the repository at this point in the history
  40. Cleanup people lists and forms

    * Use Bootstrap 3 grid and form classes
    * Add well around translate forms to match other form styles
    * Add missing `btn-default` styles
    * Use smart quotes
    * Add no content messages when there are no translations or historic
    accounts for people
    fofr committed Jun 26, 2015
    Copy the full SHA
    f279613 View commit details
    Browse the repository at this point in the history
  41. Cleanup classification featuring forms

    * Use Bootstrap 3 grid and form classes
    * Add well around forms to match other form styles
    * Add missing `btn-default` styles
    * Use smart quotes
    * Use no content messages styles
    * Use glyphicons
    * Stop using horizontal form styles
    fofr committed Jun 26, 2015
    Copy the full SHA
    e84bc96 View commit details
    Browse the repository at this point in the history
  42. Cleanup topical events form

    * Remove horizontal form fields
    * Use Bootstrap 3 form classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    2ba866e View commit details
    Browse the repository at this point in the history
  43. Cleanup worldwide org list and forms

    * Use Bootstrap 3 grid and form classes
    * Add well around role translate forms to match other form styles
    * Add missing `btn-default` styles
    * Use smart quotes
    * Remove horizontal form styles
    fofr committed Jun 26, 2015
    Copy the full SHA
    468aa94 View commit details
    Browse the repository at this point in the history
  44. Cleanup worldwide location list and forms

    * Use Bootstrap 3 grid and form classes
    * Add missing `btn-default` styles
    * Prevent featurable offsite links partial from erroring when passed a
    world location
    fofr committed Jun 26, 2015
    Copy the full SHA
    3227458 View commit details
    Browse the repository at this point in the history
  45. Cleanup fields of operation forms

    * Use Bootstrap 3 form classes
    * Add missing `btn-default` class
    fofr committed Jun 26, 2015
    Copy the full SHA
    c61b989 View commit details
    Browse the repository at this point in the history
  46. Cleanup cabinet minister ordering

    * Use Bootstrap 3 grid classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    07c8946 View commit details
    Browse the repository at this point in the history
  47. Cleanup take part pages forms

    * Add missing btn-default class
    * Use Bootstrap 3 grid classes
    * Stop using horizontal form controls
    fofr committed Jun 26, 2015
    Copy the full SHA
    4aa8bbe View commit details
    Browse the repository at this point in the history
  48. Cleanup sitewide settings pages

    * Use Bootstrap 3 grid classes
    * Use admin template table styles
    * Add missing `btn-default` class
    fofr committed Jun 26, 2015
    Copy the full SHA
    ad31307 View commit details
    Browse the repository at this point in the history
  49. Cleanup promotional features list and forms

    * Use Bootstrap 3 grid and form classes
    * Stop using horizontal form styles
    * Add missing `btn-default` classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    885fdc2 View commit details
    Browse the repository at this point in the history
  50. Copy the full SHA
    a216f84 View commit details
    Browse the repository at this point in the history
  51. Copy the full SHA
    b2d5f6f View commit details
    Browse the repository at this point in the history
  52. Remove last uses of old grid classes

    * Switch from `spanX` to `col-md-X`
    * Remove spanX specific styles
    fofr committed Jun 26, 2015
    Copy the full SHA
    e804354 View commit details
    Browse the repository at this point in the history
  53. Add missing btn-default classes

    In Bootstrap 3 `btn` buttons must also specify a style class,
    `btn-default` is the grey one.
    fofr committed Jun 26, 2015
    Copy the full SHA
    8c65820 View commit details
    Browse the repository at this point in the history
  54. Update icon to glyphicon

    fofr committed Jun 26, 2015
    Copy the full SHA
    ce68cee View commit details
    Browse the repository at this point in the history
  55. Use new Bootstrap 3 button size classes

    `btn-small` to `btn-sm`
    `btn-mini` to `btn-xs`
    `btn-large` to `btn-lg`
    fofr committed Jun 26, 2015
    Copy the full SHA
    30de728 View commit details
    Browse the repository at this point in the history
  56. Remove horizontal form options

    * Remove last use of `horizontal: true`
    * Simplify form builder to avoid use of horizontal forms, keeping all
    forms consistent and avoiding the more complex (but more flexible)
    implementation of horizontal forms in Bootstrap 3, which uses grid
    classes.
    * Remove horizontal tests and update others to test for new syntax
    fofr committed Jun 26, 2015
    Copy the full SHA
    6eab563 View commit details
    Browse the repository at this point in the history
  57. Update date formats in governments feature

    The governments table already used the `.to_s(:govuk_date)` feature,
    even though those date formats weren’t present without the admin gem.
    
    Now the gem is included these dates render in a user friendly way and
    the tests can be updated.
    fofr committed Jun 26, 2015
    Copy the full SHA
    7c16e23 View commit details
    Browse the repository at this point in the history
  58. Fix multiple image uploads

    The javascript that searched for, cloned and updated the IDs of image
    inputs was closely coupled with the markup structure. When the new
    bootstrap form wrappers were added the javascript couldn’t find the
    reference input.
    
    * Use a js- class name to show that javascript is using the element
    * Update from the old `delegate` method to the newer `on` one
    * Use `find` over `children` to search more than one level deep
    * Avoid `input:first`, be specific and use the new js- class name
    fofr committed Jun 26, 2015
    Copy the full SHA
    7477d96 View commit details
    Browse the repository at this point in the history
  59. Copy the full SHA
    28e25af View commit details
    Browse the repository at this point in the history
  60. Use text-muted class on speed tagger

    `muted` has been replaced with `text-muted`
    fofr committed Jun 26, 2015
    Copy the full SHA
    f97d244 View commit details
    Browse the repository at this point in the history
  61. Use admin gem’s js enabled classes

    Replace `.js-enabled` with `.js` so that elements that depend on
    javascript running adopt the same styles.
    
    `js-enabled` was replaced with `.js` when the base admin template was
    adopted. See:
    
    https://github.com/alphagov/govuk_admin_template/blob/master/app/views/l
    ayouts/govuk_admin_template.html.erb#L15
    
    This only affects admin uses of `js-enabled`
    fofr committed Jun 26, 2015
    Copy the full SHA
    432e098 View commit details
    Browse the repository at this point in the history
  62. Cleanup document collections

    * Remove indenting from lists using `list-unstyled`
    * Switch to Bootstrap 3 button classes
    * Use `no-content` styles for empty group
    * Remove use of hgroup
    fofr committed Jun 26, 2015
    Copy the full SHA
    912e487 View commit details
    Browse the repository at this point in the history
  63. Cleanup imports table, errors and forms

    * Use admin gem table styles
    * Use Bootstrap 3 alert classes
    * Add form classes to new import form
    fofr committed Jun 26, 2015
    Copy the full SHA
    d6a1cde View commit details
    Browse the repository at this point in the history
  64. Replace alert-error with alert-danger

    Bootstrap 3 changed the alert-error class to alert-danger
    fofr committed Jun 26, 2015
    Copy the full SHA
    8c71087 View commit details
    Browse the repository at this point in the history
  65. Fix first published field toggle

    * Toggle `if-js-hide` class rather than show/hide
    * Use Bootstrap 3 form classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    52de908 View commit details
    Browse the repository at this point in the history
  66. Cleanup attachment forms

    * Use Bootstrap 3 form classes
    fofr committed Jun 26, 2015
    Copy the full SHA
    319ea97 View commit details
    Browse the repository at this point in the history
  67. Fix formatting help expansion

    Update the js/non-js overrides to work with the new Bootstrap 3
    collapse implementation.
    fofr committed Jun 26, 2015
    Copy the full SHA
    b443711 View commit details
    Browse the repository at this point in the history
  68. Use Bootstrap 3 chosen theme

    * Use pre-built Bootstrap 3 chosen theme from:
    http://github.com/alxlit/bootstrap-chosen
    * Update `chzn-select` inputs to include a `form-control` class for
    better non-js styling
    fofr committed Jun 26, 2015
    Copy the full SHA
    7106b82 View commit details
    Browse the repository at this point in the history
  69. Wrap text in govspeak help sections

    Prevent users from having to sideways scroll to see content.
    fofr committed Jun 26, 2015
    Copy the full SHA
    1519190 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2015

  1. Cleanup featured policies

    * Remove Bootstrap 2 classes
    * Switch to glyphicons
    * Use no content styles from admin gem
    fofr committed Jun 29, 2015
    Copy the full SHA
    e183048 View commit details
    Browse the repository at this point in the history
  2. Use image-url for chosen sprite

    Ensure the stylesheet includes the correct asset path when assets are
    compiled.
    fofr committed Jun 29, 2015
    Copy the full SHA
    25295ee View commit details
    Browse the repository at this point in the history