## Render changelog table with id 'changesets' with the range of changesets, ## statuses, and comments. ## Optionally, pass a js snippet to run whenever a table resize is triggered. <%def name="changelog(repo_name, cs_range, cs_statuses, cs_comments, show_checkbox=False, show_branch=True, resize_js='')"> %for cnt,cs in enumerate(cs_range): %if show_checkbox: %endif <% message_lines = cs.message.splitlines() %> %if len(message_lines) > 1: %else: %endif %endfor
${h.checkbox(cs.raw_id,class_="changeset_range")} %if cs_statuses.get(cs.raw_id): %if cs_statuses.get(cs.raw_id)[2]: %else: %endif %endif ${h.gravatar(h.email_or_none(cs.author), size=16)} ${h.person(cs.author)} ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=repo_name,revision=cs.raw_id), class_='changeset_hash')}
${h.age(cs.date,True)}
${h.urlify_text(message_lines[0], c.repo_name,h.url('changeset_home',repo_name=repo_name,revision=cs.raw_id))}
%if len(message_lines) > 1: %endif
%if cs_comments.get(cs.raw_id): ${len(cs_comments[cs.raw_id])} %endif %if cs.bumped: Bumped %endif %if cs.divergent: Divergent %endif %if cs.extinct: Extinct %endif %if cs.unstable: Unstable %endif %if cs.phase: ${cs.phase} %endif %for book in cs.bookmarks: ${h.link_to(book,h.url('changeset_home',repo_name=repo_name,revision=cs.raw_id))} %endfor %for tag in cs.tags: ${h.link_to(tag,h.url('changeset_home',repo_name=repo_name,revision=cs.raw_id))} %endfor %if show_branch and cs.branch: ${h.link_to(cs.branch,h.url('changelog_home',repo_name=repo_name,branch=cs.branch))} %endif