[#986] Create an errors component to be used in .tt files

Fixes #986.
Oh yeah, this component is primarily for non-foundation-page
use (pages converted from bml -> tt, but not to foundation) --
the alert/alert-box classes can still make sense on those
pages, but the .row and .columns don't make sense in that
context.





On Wed, Oct 15, 2014, at 03:17 PM, Mark Smith wrote:

  In views/entry/options.tt:
> @@ -23,9 +23,7 @@ the same terms as Perl itself.  For a copy of the li
cense, please reference
>  [%- IF use_js && errors.exist -%]
>  <div class="row">
>      <div class="columns large-12">
> -        [%- FOREACH err = errors.get_all -%]
> -            <div class="alert-box alert radius">[%- err.message -%]</
div>
> -        [%- END -%]
> +    [%- INCLUDE components/errors.tt errors = errors -%]

  Since the HTML inside the component requires the HTML
  outside, I feel like they should all be in the same place.
  That way you'll save typing in the future everywhere you use
  the component.

  I guess one reason you might not is if the surrounding HTML
  actually changes from place to place?

  —
  Reply to this email directly or [1]view it on GitHub.

References

1. https://github.com/dreamwidth/dw-free/pull/987/files#r18877790