$def with(work, tags=[]) $def render_subjects(label, subjects, prefix=""): $if subjects: $if work: $for tag in tags: $if tag=="Subjects": $:render_subjects(_("Subjects"), work.get_subjects()) $elif tag=="People": $:render_subjects(_("People"), work.subject_people, prefix="person:") $elif tag=="Places": $:render_subjects(_("Places"), work.subject_places, prefix="place:") $elif tag=="Times": $:render_subjects(_("Times"), work.subject_times, prefix="time:")