Skip to content

Commit

Permalink
Render place detail content with isHTML flag set as HTML
Browse files Browse the repository at this point in the history
To accommodate raw landmark HTML in shareabouts place models, render
content with the isHTML flag set as raw HTML in the place detail template.
Assume raw HTML content is stored under the 'description' field, and
that this field is of type 'textarea', as set in the dynamic form section
of the config.

Addresses: #407
  • Loading branch information
goldpbear committed Mar 27, 2017
1 parent 0b65d62 commit 6b1db59
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions src/flavors/raingardens/jstemplates/place-detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,39 @@ <h1 class="place-header-title {{#if story}}is-visuallyhidden{{/if}}">
{{^}}
<img src="{{ STATIC_URL }}css/images/user-50.png" class="avatar" />
{{/if}}
{{#if submitter.name }}
{{ submitter.name }}
{{^}}
{{#if submitter_name }}
{{ submitter_name }}
</h1>
<span class="place-submission-details">
{{#_}}<strong class="point-submitter">
{{#if submitter.avatar_url }}
<img src="{{ submitter.avatar_url }}" class="avatar" />
{{^}}
{{ anonymous_name }}
<img src="{{ STATIC_URL }}css/images/user-50.png" class="avatar" />
{{/if}}
{{/if}}
</strong> {{ action_text }} this {{ place_type_label location_type}}
{{#if submitter.name }}
{{ submitter.name }}
{{^}}
{{#if submitter_name }}
{{ submitter_name }}
{{^}}
{{ anonymous_name }}
{{/if}}
{{/if}}
</strong> {{ action_text }} this {{ place_type_label location_type}}

{{#if region}}
in {{ region }}
{{/if}}{{/_}}
{{#if region}}
in {{ region }}
{{/if}}{{/_}}

<time datetime="{{ created_datetime }}" class="response-date"><a href="/{{ datasetSlug }}/{{ id }}">{{ fromnow created_datetime }}</a></time>
<time datetime="{{ created_datetime }}" class="response-date"><a href="/{{ datasetSlug }}/{{ id }}">{{ fromnow created_datetime }}</a></time>

<span class="survey-count">{{ survey_count }} {{ survey_label_by_count }}</span>
<span class="survey-count">{{ survey_count }} {{ survey_label_by_count }}</span>

{{^if survey_config}}
<a rel="internal" href="/{{ datasetSlug }}/{{ id }}" class="view-on-map-btn btn btn-small">View On Map</a>
{{/if}}

</span>
</span>
{{/unless}}
</header>

<section class="place-items">
Expand Down

0 comments on commit 6b1db59

Please sign in to comment.