| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 1 | // 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. |
| 14 | {namespace gitiles autoescape="contextual"} |
| 15 | |
| 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. |
| Dave Borowitz | 76bbefd | 2014-03-11 16:57:45 -0700 | [diff] [blame] | 22 | * @param? headerVariant variant name for custom header. |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 23 | * @param breadcrumbs breadcrumbs for this page. |
| 24 | * @param? hasBlob set to true if the revision or its peeled value is a blob. |
| 25 | * @param objects list of objects encountered when peeling this object. Each |
| 26 | * object has a "type" key with one of the |
| 27 | * org.eclipse.jgit.lib.Contants.TYPE_* constant strings, and a "data" key |
| 28 | * with an object whose keys correspond to the appropriate object detail |
| 29 | * template from ObjectDetail.soy. |
| 30 | */ |
| 31 | {template .revisionDetail} |
| 32 | {if $hasBlob} |
| Dave Borowitz | ddc0efc | 2014-04-27 19:12:47 -0600 | [diff] [blame] | 33 | {call .header data="all"} |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 34 | {param css: [gitiles.PRETTIFY_CSS_URL] /} |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 35 | {/call} |
| 36 | {else} |
| 37 | {call .header data="all" /} |
| 38 | {/if} |
| 39 | |
| 40 | {foreach $object in $objects} |
| 41 | {switch $object.type} |
| 42 | {case 'commit'} |
| 43 | {call .commitDetail data="$object.data" /} |
| 44 | {case 'tree'} |
| 45 | {call .treeDetail data="$object.data" /} |
| 46 | {case 'blob'} |
| 47 | {call .blobDetail data="$object.data" /} |
| 48 | {case 'tag'} |
| 49 | {call .tagDetail data="$object.data" /} |
| 50 | {default} |
| 51 | <div class="error"> |
| 52 | {msg desc="Error message for an unknown object type"}Object has unknown type.{/msg} |
| 53 | </div> |
| 54 | {/switch} |
| 55 | {/foreach} |
| 56 | |
| 57 | {call .footer /} |
| 58 | {/template} |