Skip to content

Commit

Permalink
#1042 - support breaks in field-notes description
Browse files Browse the repository at this point in the history
  • Loading branch information
teiling88 committed Apr 13, 2017
1 parent fe96f51 commit ab16685
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/app/Resources/views/field-notes/index.html.twig
Expand Up @@ -26,7 +26,7 @@
<tr class="testing-fieldNotes-row{{ loop.index }}">
<td class="{{ cycle(['search_listcolor1', 'search_listcolor2'], loop.index) }}"><input type="checkbox" id="testing-fieldNote-checkbox{{ loop.index }}" name="selected-field-notes[]" value="{{ fieldNote.id }}" /></td>
<td class="{{ cycle(['search_listcolor1', 'search_listcolor2'], loop.index) }}">{{ geocache.geocacheIcon(fieldNote.geocache.type) }}</td>
<td class="{{ cycle(['search_listcolor1', 'search_listcolor2'], loop.index) }}"><a href="/viewcache.php?cacheid={{ fieldNote.geocache.cacheId }}">{{ fieldNote.geocache.name }}</a><br />{{ fieldNote.text | truncate(65, true) }}</td>
<td class="{{ cycle(['search_listcolor1', 'search_listcolor2'], loop.index) }}"><a href="/viewcache.php?cacheid={{ fieldNote.geocache.cacheId }}">{{ fieldNote.geocache.name }}</a><br />{{ fieldNote.text | raw}}</td>
<td class="nowrap {{ cycle(['search_listcolor1', 'search_listcolor2'], loop.index) }}">{{ fieldNote.date | date('field_notes.date_format' | trans | desc('Y-m-d H:i')) }}</td>
<td class="nowrap {{ cycle(['search_listcolor1', 'search_listcolor2'], loop.index) }}">{{ ('field_notes.log_type.' ~ fieldNote.type) | trans({}, 'constants') }}</td>
<td class="nowrap {{ cycle(['search_listcolor1', 'search_listcolor2'], loop.index) }}"><a href="/log.php?fieldnoteid={{ fieldNote.id }}">{{ 'field_notes.btn.log_it' | trans }}</a>&nbsp;|&nbsp;<a href="{{ path('field-notes.delete', {id: fieldNote.id}) }}">{{ 'field_notes.btn.delete' | trans }}</a></td>
Expand Down
1 change: 1 addition & 0 deletions htdocs/src/AppBundle/Entity/FieldNote.php
Expand Up @@ -131,6 +131,7 @@ public function getDate()
*/
public function setText($text)
{
$text = str_replace("\n", '<br/>', $text);
$this->text = $text;

return $this;
Expand Down

0 comments on commit ab16685

Please sign in to comment.