This allows us to include a link in the flash message, without having
to use html_safe. Also refactor to avoid having html angle brackets in
the translation strings, while still allowing locale-specific urls.
In certain circumstance, due to either extreme narrow screen widths,
or due to padding on floating elements exceeding the header height,
some things could appear outwith the header. This clearfix avoids
this from happening.
Since flash objects can only be String, Hash or Array (notably excluding SafeBuffers), then this approach is necessary to render complex html in a safe manner.
Each local can be treated as an (unsafe) string, and therefore escaped normally when rendered into the template. The template (and translation strings) can
contain html since they are no longer stored in the flash as a plain string.
Fixes#3215
This improves the behaviour on small widths, where the tabs stack neatly. It also avoids the use of ml-auto which isn't RTL compatible.
The change in indentation is because it was previously coded with multiple li nested inside another li
- introduce bootstrap tabs to switch the views
- introduce `content_for :heading_class` to remove the padding below the bootstrap tabs
- update the rss-image to use a svg, adopted from https://icons.getbootstrap.com/icons/rss/ (without the outer border)
- move rss- and new-button away from the view-switching actions
- the `@tag` logic was broken. introduce new link to remove the tag-filter; the tabs keep the filter once given; use params[:tag] directly in the view
- use `&.` syntax nil-safety so we can remove `@display_name`
This saves every header, list, paragraph etc having to sort out their own padding. The couple of instances where we want edge-to-edge can be acheived using the negative margin spacing utilities.
The padding is based on $spacer so that it can be adjusted automatically via bootstrap configuration.
This also means that we can remove many (mis-)uses of the browse-section class, which is only supposed to be for cases where there are multiple browse-sections in sequence (e.g. multiple nodes in the node history browse pages).
It's really the upper and lower boundaries that we want to check,
and it's reasonable to assume all the intermediate values will work
fine if the boundary values are tested.
This also saves about 75% of the time taken and almost 85% of the
assertions when running all the model tests.
Passing `:count => nil` means that i18n.t will return the hash of translations, so use a default value of 0 when checking for hours to prevent this.
Refs #3210