Centralize the templates used for review request page entries.

Review Request #9038 - Created June 27, 2017 and submitted

Christian Hammond
Review Board

Entries on the review request page (reviews, changes, and the initial
status updates) now share the same base templates, with information
provided by the entry classes on the Python side.

The base template provides the general structure used for boxes on the
review request page, handling anchors, avatars, labels, the header,
banners, and container for the main content. The specific entries
subclass this, filling out the necessary blocks to set the CSS classes,
header title, entry content, labels, etc. that are needed.

Avatars are based on a new avatar_user attribute on entries. If set,
and if avatars are enabled, that user's avatar will be rendered.
Templates can also provide custom images to use here.

There's now only a single JavaScript template for constructing the
model/view for each entry. The data and options are provided by new
methods on the entry classes on the Python side, as are the names of the
model/view JavaScript classes to use.

These changes make it easier to maintain entries, and will lead to
extension-provided entries for the review request page.

Tested that reviews, replies, changes (with and without status updates),
and the initial status updates entries all looked correct and all had
complete functionality (replying, collapsing, revoking Ship Its, etc. all

Tested with avatars enabled and disabled.

  • 0
  • 0
  • 14
  • 14
Description From Last Updated
David Trowbridge
Christian Hammond
David Trowbridge
Christian Hammond
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (dfa1389)