$def with(work, reader_observations, key) $if reader_observations['total_respondents']: $ total_reviews = reader_observations['total_respondents'] $else: $ total_reviews = 0

$_('Community Reviews') ($total_reviews)

Feedback?
$if total_reviews > 0:
$for o in reader_observations['observations']: $ total_respondents = o['total_respondents_for_type'] $o['label'] $total_respondents $ total_responses = o['total_responses'] $for v in o['values']: $ percentage = (v['count'] / total_responses) * 100 $v['value'] $int(percentage)%
$else:
$_('No community reviews have been submitted for this work.')
$if ctx.user: $:macros.ObservationsModal(work, _('+ Add your community review'), 'stats', 'stats-link') $else: