$def with(work, tags=[]) $def render_subjects(label, subjects, track_value, prefix=""): $if subjects:

### $label

$for subject in subjects: $subject$cond(not loop.last, ",", "")
$if work: $for tag in tags: $if tag=="Subjects": $:render_subjects(_("Subjects"), work.get_subjects(),"BookOverview|SubjectClick") $if tag=="People": $:render_subjects(_("People"), work.subject_people,"BookOverview|SubjectPeopleClick", prefix="person:") $if tag=="Places": $:render_subjects(_("Places"), work.subject_places,"BookOverview|SubjectPlacesClick", prefix="place:") $if tag=="Times": $:render_subjects(_("Times"), work.subject_times,"BookOverview|SubjectTimesClick", prefix="time:")