blob: 2bfabe0b0053982dc36fce006dffec09b21338c7 [file] [log] [blame]
Dave Borowitz9de65952012-08-13 16:09:45 -07001// Copyright 2012 Google Inc. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
Dave Borowitze16e4862014-06-26 12:23:18 -070014{namespace gitiles autoescape="strict"}
Dave Borowitz9de65952012-08-13 16:09:45 -070015
16/**
17 * Detail page about a single revision.
18 *
19 * @param title human-readable revision name.
20 * @param repositoryName name of this repository.
21 * @param? menuEntries menu entries.
Björn Pedersenbc0eaaa2016-03-29 15:30:29 +020022 * @param? customVariant variant name for styling.
Dave Borowitz9de65952012-08-13 16:09:45 -070023 * @param breadcrumbs breadcrumbs for this page.
24 * @param? hasBlob set to true if the revision or its peeled value is a blob.
Shawn Pearce73e34532015-02-12 16:27:54 -080025 * @param? hasReadme set to true if the treeDetail has readmeHtml.
Dave Borowitz9de65952012-08-13 16:09:45 -070026 * @param objects list of objects encountered when peeling this object. Each
27 * object has a "type" key with one of the
28 * org.eclipse.jgit.lib.Contants.TYPE_* constant strings, and a "data" key
29 * with an object whose keys correspond to the appropriate object detail
30 * template from ObjectDetail.soy.
31 */
32{template .revisionDetail}
33{if $hasBlob}
Dave Borowitzddc0efc2014-04-27 19:12:47 -060034 {call .header data="all"}
Dave Borowitz9de65952012-08-13 16:09:45 -070035 {param css: [gitiles.PRETTIFY_CSS_URL] /}
Dave Borowitz9de65952012-08-13 16:09:45 -070036 {/call}
Shawn Pearce73e34532015-02-12 16:27:54 -080037{elseif $hasReadme}
38 {call .header data="all"}
Shawn Pearced4d031d2015-07-09 21:32:20 -070039 {param css: [gitiles.DOC_CSS_URL, gitiles.PRETTIFY_CSS_URL] /}
Shawn Pearce73e34532015-02-12 16:27:54 -080040 {/call}
Dave Borowitz9de65952012-08-13 16:09:45 -070041{else}
42 {call .header data="all" /}
43{/if}
44
45{foreach $object in $objects}
46 {switch $object.type}
47 {case 'commit'}
48 {call .commitDetail data="$object.data" /}
49 {case 'tree'}
50 {call .treeDetail data="$object.data" /}
51 {case 'blob'}
52 {call .blobDetail data="$object.data" /}
53 {case 'tag'}
54 {call .tagDetail data="$object.data" /}
55 {default}
56 <div class="error">
57 {msg desc="Error message for an unknown object type"}Object has unknown type.{/msg}
58 </div>
59 {/switch}
60{/foreach}
61
Björn Pedersenbc0eaaa2016-03-29 15:30:29 +020062{call .footer}
63 {param customVariant: $customVariant /}
64{/call}
Dave Borowitz9de65952012-08-13 16:09:45 -070065{/template}