blob: cdd5005cd4eef763f9f3154368f48e9b2fbd1648 [file] [log] [blame]
// Copyright 2012 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
{namespace gitiles autoescape="contextual"}
/**
* Index page for a repository.
*
* @param repositoryName name of this repository.
* @param? menuEntries menu entries.
* @param? headerVariant variant name for custom header.
* @param breadcrumbs breadcrumbs for this page.
* @param cloneUrl clone URL for this repository.
* @param description description text of the repository.
* @param? mirroredFromUrl URL this repository is mirrored from.
* @param branches list of branch objects with url, name, and isHead keys.
* @param? moreBranchesUrl URL to show more branches, if necessary.
* @param tags list of tag objects with url and name keys.
* @param? moreTagsUrl URL to show more branches, if necessary.
* @param? nextUrl URL for the next page of log results.
* @param? previousUrl URL for the previous page of log results.
* @param? logEntryVariant variant name for log entry template.
* @param entries list of log entries; see .logEntry.
*/
{template .repositoryIndex}
{call .header}
{param title: $repositoryName /}
{param repositoryName: null /}
{param menuEntries: $menuEntries /}
{param headerVariant: $headerVariant /}
{param breadcrumbs: $breadcrumbs /}
{/call}
{if $description or $mirroredFromUrl}
<div class="repository-description">
{$description}
{if $mirroredFromUrl}
<div class="repository-mirrored-from">
{msg desc="Informational text describing source of repository"}
mirrored from {$mirroredFromUrl}
{/msg}
</div>
{/if}
</div>
{/if}
<textarea rows="1" cols="150" class="clone-line"
onclick="this.focus();this.select();"
readonly="readonly">
git clone {$cloneUrl}
</textarea>
{if length($entries) and (length($branches) or length($tags))}
<div class="repository-shortlog-wrapper">
<div class="repository-shortlog">
{call .logEntries data="all" /}
</div>
</div>
<div class="repository-refs">
{call .branches_ data="all" /}
{call .tags_ data="all" /}
</div>
{elseif length($entries)}
{call .logEntries data="all" /}
{elseif length($branches) or length($tags)}
{call .branches_ data="all" /}
{call .tags_ data="all" /}
{/if}
{call .footer /}
{/template}
/**
* List of branches.
*
* @param? branches list of branch objects with url and name keys.
* @param? moreBranchesUrl URL to show more branches, if necessary.
*/
{template .branches_ private="true"}
{if length($branches)}
{call .refList}
{param type: 'Branches' /}
{param refs: $branches /}
{/call}
{if $moreBranchesUrl}
<a href="{$moreBranchesUrl}">{msg desc="link to view more branches"}More...{/msg}</a>
{/if}
{/if}
{/template}
/**
* List of tags.
*
* @param? tags list of branch objects with url and name keys.
* @param? moreTagsUrl URL to show more tags, if necessary.
*/
{template .tags_ private="true"}
{if length($tags)}
{call .refList}
{param type: 'Tags' /}
{param refs: $tags /}
{/call}
{if $moreTagsUrl}
<a href="{$moreTagsUrl}">{msg desc="link to view more tags"}More...{/msg}</a>
{/if}
{/if}
{/template}