%PDF- %PDF-
| Direktori : /data/old/home/stash/atlassian-stash/static/feature/commits/ |
| Current File : //data/old/home/stash/atlassian-stash/static/feature/commits/commits-table-clientside.soy |
{namespace stash.feature.commits}
/**
* @param repository
* @param? webSections
* @param? changesetPage
* @param? tableId
* @param? extraClasses
*/
{template .commitsTableImpl private="true"}
{call stash.widget.pagedTable}
{param id: $tableId /}
{param page: $changesetPage /}
{param extraClasses: 'commits-table' + (($extraClasses) ? ' ' + $extraClasses : '') /}
{param theadContent}
{if ($changesetPage and ($changesetPage.size > 0 or $changesetPage.start > 0)) or not $changesetPage}
<tr>
{call .commitsTableHeaderCells}
{param webSections: $webSections /}
{/call}
</tr>
{/if}
{/param}
{param content}
{if $changesetPage}
{foreach $changeset in $changesetPage.values}
{call .commitsTableRow}
{param changeset: $changeset /}
{param cellsContent}
{call .commitsTableCells}
{param repository: $repository /}
{param changeset: $changeset /}
{param webSections: $webSections /}
{/call}
{/param}
{/call}
{/foreach}
{/if}
{/param}
{/call}
{/template}
/**
* @param webSections
*/
{template .commitsTableHeaderCells private="true"}
<th class="author">{getText('stash.web.repository.commits.col.author')}</th>
<th class="changeset">{getText('stash.web.repository.commits.col.commit')}</th>
<th class="message">{getText('stash.web.repository.commits.col.message')}</th>
<th class="comment-count"></th>
<th class="timestamp">{getText('stash.web.repository.commits.col.date')}</th>
{if $webSections}
{foreach $webSection in $webSections}
<th class="{$webSection.key}">{$webSection.labelText}</th>
{/foreach}
{/if}
{/template}
/**
* @param changeset
* @param cellsContent
*/
{template .commitsTableRow private="true"}
<tr data-changesetid="{$changeset.id}" class="commit-row {if length($changeset.parents) >= 2}merge{/if}">
{$cellsContent |noAutoescape}
</tr>
{/template}
/**
* @param repository
* @param? changeset
* @param? webSections
*/
{template .commitsTableCells private="true"}
<td class="author">
{call stash.widget.avatarWithName}
{param size: 'small' /}
{param person: $changeset.author /}
{param link: true /}
{param linkExtraClasses: 'secondary-link' /}
{/call}
</td>
<td class="changeset">
{call stash.feature.changeset.link}
{param repository: $repository /}
{param changeset: $changeset /}
{/call}
<!-- show merge lozenge/icon if is a merge commit, eg has 2+ parents -->
{if length($changeset.parents) >= 2}
{call stash.widget.lozenge.merge}
{param abbreviated: true /}
{/call}
{/if}
</td>
<td class="message"><span>{$changeset.message|truncate:500,true}</span></td>
<td class="comment-count">
{if $changeset.attributes and $changeset.attributes.commentCount}
// looped because $changeset.attributes has sets of values, should only ever loop once
{foreach $count in $changeset.attributes.commentCount}
{call stash.feature.commentCount}
{param count: $count /}
{/call}
{/foreach}
{/if}
</td>
<td class="timestamp">
{call widget.date.shortAge}
{param date: $changeset.authorTimestamp /}
{/call}
</td>
{if $webSections}
{call stash.feature.commits.commitsRowExtras}
{param webSections: $webSections /}
{param repository: $repository /}
{param changeset: $changeset /}
{/call}
{/if}
{/template}