{extends "idf/review/base-full.html"} {block extraheader}{/block} {block docclass}yui-t1{assign $inCreate = true}{/block} {block body} {if !$user.isAnonymous() and $form.errors}

{trans 'The form contains some errors. Please correct them to submit your review.'}

{if $form.get_top_errors} {$form.render_top_errors|unsafe} {/if}
{/if} {if !$user.isAnonymous()}

{trans 'How to Participate in a Code Review'}

{blocktrans}Code review is a process in which after or before changes are commited into the code repository, different people discuss the code changes. The goal is to improve the quality of the code and the contributions, as such, you must be pragmatic when writing your review. Correctly mention the line numbers (in the old or in the new file) and try to keep a good balance between seriousness and fun. {/blocktrans}

{blocktrans} Proposing code for review is intimidating, you know you will receive critics, so please, as a reviewer, keep this process fun, use it to help your contributor learn your coding standards and the structure of the code and make them want to propose more contributions. {/blocktrans}

{/if} {if count($diff.files)} {/if} {aurl 'url', 'IDF_Views_Review::getPatch', array($project.shortname, $patch.id)}
{trans 'Created:'}{$patch.creation_dtime|date:"%Y-%m-%d %H:%M:%S"} ({$patch.creation_dtime|dateago})
{trans 'Updated:'}{$review.modif_dtime|dateago}
{trans 'Author:'}{$review.get_submitter()}
{trans 'Commit:'}{$patch.get_commit().scm_id}
{trans 'Description:'}{issuetext $review.summary, $request}

{issuetext $patch.description, $request}
{trans 'Reviewers:'}{if count($reviewers)}{foreach $reviewers as $r}{$r}, {/foreach}{else}{trans 'No reviewers at the moment.'}{/if}
{trans 'Files:'} {foreach $diff.files as $filename=>$diffdef} {assign $ndiff = count($diffdef['chunks'])} {assign $nc = $files[$filename][2]->count()} {$filename} ({blocktrans $ndiff}{$ndiff} diff{plural}{$ndiff} diffs{/blocktrans}{if $nc}, {blocktrans $nc}{$nc} comment{plural}{$nc} comments{/blocktrans}{/if})
{/foreach}
 {trans 'Archive'} {trans 'Download the corresponding diff file'}
{foreach $files as $file=>$def} {$def[0]} {assign $fcomments = $def[2]} {assign $nc = $fcomments.count()} {assign $i = 1} {foreach $fcomments as $c}
{assign $who = $c.get_comment().get_submitter()}{aurl 'whourl', 'IDF_Views_User::view', array($who.login)} {aurl 'url', 'IDF_Views_Review::view', array($project.shortname, $review.id)} {assign $id = $c.id} {assign $url = $url~'#ic'~$c.id} {blocktrans}Comment {$i} by {$who}, {$c.creation_dtime|date}{/blocktrans}

{issuetext $c.content, $request}
{assign $i = $i + 1} {/foreach} {if !$user.isAnonymous()}
 

{blocktrans}Your comments on the changes in file {$file}:{/blocktrans}
{$def[1]|safe}

{/if} {/foreach} {assign $i = 1} {assign $nc = $comments.count()} {if $nc}

{trans 'General Comments'}

{/if} {foreach $comments as $c}{ashowuser 'submitter', $c.get_submitter(), $request}{assign $submitter = $c.get_submitter()}{assign $submitter_data = $c.get_submitter_data()}
{if $submitter_data.avatar != ''}  {else}  {/if} {aurl 'url', 'IDF_Views_Review::view', array($project.shortname, $review.id)} {assign $id = $c.id} {assign $url = $url~'#ic'~$c.id}

{blocktrans}Comment {$i} by {$submitter}, {$c.creation_dtime|date}{/blocktrans}

{if strlen($c.content) > 0}
{issuetext $c.content, $request}
{/if} {if $c.changedReview()}
{foreach $c.changes as $w => $v} {if $w == 'su'}{trans 'Summary:'}{/if}{if $w == 'st'}{trans 'Status:'}{/if} {$v}
{/foreach}
{/if}
{assign $i = $i + 1}{if $i == $nc+1 and $user.isAnonymous()}
{aurl 'url', 'IDF_Views::login'}{blocktrans}Sign in to participate in the review.{/blocktrans}
{/if} {/foreach} {if !$user.isAnonymous()} {if !$nc}
{/if} {if $isOwner or $isMember} {/if}
{$form.f.content.labelTag}: {if $form.f.content.errors}{$form.f.content.fieldErrors}{/if} {$form.f.content|unsafe}
{$form.f.summary.labelTag}: {if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if} {$form.f.summary|unsafe}
{$form.f.status.labelTag}: {if $form.f.status.errors}{$form.f.status.fieldErrors}{/if} {$form.f.status|unsafe}
  | {trans 'Cancel'}
{/if}
{/block} {block javascript} {if $isOwner or $isMember}{include 'idf/issues/js-autocomplete.html'}{/if} {/block}