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

$_('Reader Observations')

$work_title
$if reader_observations['total_respondents'] > 1:

$: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:
$_('At least two people must submit observations before this information can be displayed.')

$if ctx.user: $:macros.UserMetadata(work, edition, _('Add your observations'), 'stats', 'stats-link') $else: $_('Log in to add your observations')