app/views/activities/show.html.haml
= content_for :title, @activity.name
- content_for :opengraph do
= tag("meta", property: "og:title", content: @activity.name)
- if @activity.description
= tag("meta", property: "og:description", content: og_description(@activity.description))
= tag("meta", property: "og:type", content: "website")
= tag("meta", property: "og:url", content: request.original_url)
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])
- content_for :breadcrumbs do
%li.breadcrumb-item= link_to 'Activities', activities_path
%li.breadcrumb-item= link_to @activity.owner, member_activities_path(@activity.owner)
%li.breadcrumb-item.active= link_to @activity.name, @activity
.activity
.row
.col-md-8.col-xs-12
.jumbotron
.d-flex.justify-content-between
%h1.display-3
%strong= @activity.name.titleize
%small.text-muted= @activity.category
%tt
= @activity.due_date
- if @activity.description.present?
:markdown
#{strip_tags markdownify(@activity.description)}
= render 'likes/likes', object: @activity
= render 'activities/actions', activity: @activity
.col-md-4.col-xs-12
= render 'activities/owner', planting: @activity
.col-md-8.col-xs-12
- if @activity.garden
%section.gardens
%a{name: 'gardens'}
= render 'gardens/card', garden: @activity.garden
- if @activity.planting
%section.plantings
%a{name: 'plantings'}
= render 'plantings/card', planting: @activity.planting
.col-md-4.col-xs-12