## 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, show_index=False, resize_js='')"> <% num_cs = len(cs_range) %>

%for cnt,cs in enumerate(cs_range):
%if show_checkbox: ${h.checkbox(cs.raw_id,class_="changeset_range")} %endif %if show_index: | <% index = num_cs - cnt if index == 1: title = _('First (oldest) changeset in this list') elif index == num_cs: title = _('Last (most recent) changeset in this list') else: title = _('Position in this list of changesets') %> ${index} %endif | %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)} <% message_lines = cs.message.strip().splitlines() or [_("(No commit message)")] %> %if len(message_lines) > 1: | %else: | %endif | ${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: ${h.urlify_text(cs.message, repo_name)} %endif %if cs_comments.get(cs.raw_id): ${len(cs_comments[cs.raw_id])} %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 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 %if show_branch: %for branch in cs.branches: ${h.link_to(branch,h.url('changelog_home',repo_name=repo_name,branch=branch))} %endfor %endif
%endfor