$def with(work, edition, reader_observations, work_title, key)

Reader Observations

$work_title
$if reader_observations['total_respondents']:

$:ungettext('Based on observations from %(count)s patron', 'Based on observations from %(count)s patrons', reader_observations['total_respondents'], count=reader_observations['total_respondents']).


$for o in reader_observations['observations']: $ total = o['total_respondents_for_type']

$o['description']

$for v in o['values']: $ percentage = (v['count'] / total) * 100 $v['value'].capitalize(): $int(percentage)%

$else:
No observations submitted for this work.

$if ctx.user: $if reader_observations['total_respondents']: $:macros.UserMetadata(work, edition, 'Share your observations', 'stats', 'stats-link') $else: $:macros.UserMetadata(work, edition, 'Be the first to share your observations', 'stats', 'stats-link') $else: Log in to share your observations