Formats and beautifies parsing error message
| 72 | begin | begin | 72 |
|---|---|---|---|
| 73 | @renderer.render_wiki_text(text) | @renderer.render_wiki_text(text) | 73 |
| 74 | rescue | rescue | 74 |
| 75 | content_tag(:div, ('The following wiki code contains an error that ' + | content_tag(:div, | 75 |
| 76 | 'prevents it from being correctly formatted.').t, | image_tag('error.png') + | 76 |
| 77 | :class => 'wikierror') + | content_tag(:p, ('The following wiki code contains an ' + | 77 |
'error that prevents it from being ' + | 78 | ||
'correctly formatted.').t), | 79 | ||
:class => 'message wikierror') + | 80 | ||
| 78 | content_tag(:pre, h(text), :class => 'wikisource') | content_tag(:pre, h(text), :class => 'wikisource') | 81 |
| 79 | end | end | 82 |
| 80 | end | end | 83 |
| 50 | display: table; | display: table; | 50 |
|---|---|---|---|
| 51 | } | } | 51 |
| 52 | 52 | ||
div.pagetext div.wikierror { | 53 | ||
border: 1px solid #ff6330; | 54 | ||
background-color: #eeeeb0; | 55 | ||
width: 28em; | 56 | ||
} | 57 | ||
| 58 | |||
| 53 | div.message img { | div.message img { | 59 |
| 54 | float: left; | float: left; | 60 |
| 55 | margin: 0 .2em .1em .2em; | margin: 0 .2em .1em .2em; | 61 |
| 532 | :done => '0', | :done => '0', | 532 |
|---|---|---|---|
| 533 | :kind => 'common', :editors => '' } | :kind => 'common', :editors => '' } | 533 |
| 534 | follow_redirect | follow_redirect | 534 |
| 535 | assert_tag :div, :attributes => { :class => "wikierror" } | assert_tag :div, :attributes => { :class => "message wikierror" } | 535 |
| 536 | assert_tag :pre, :content => '' | assert_tag :pre, :content => '' | 536 |
| 537 | end | end | 537 |
| 538 | 538 |