| 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. |
| Dave Borowitz | e16e486 | 2014-06-26 12:23:18 -0700 | [diff] [blame^] | 14 | {namespace gitiles autoescape="strict"} |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 15 | |
| 16 | /** |
| 17 | * HTML page for /. |
| 18 | * |
| 19 | * @param hostName host name. |
| 20 | * @param? menuEntries menu entries. |
| Dave Borowitz | 76bbefd | 2014-03-11 16:57:45 -0700 | [diff] [blame] | 21 | * @param? headerVariant variant name for custom header. |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 22 | * @param baseUrl base URL for repositories. |
| 23 | * @param repositories list of repository description maps with name, cloneUrl, |
| 24 | * and optional description values. |
| 25 | */ |
| 26 | {template .hostIndex} |
| 27 | {call .header} |
| 28 | {param title: $hostName ? $hostName + ' Git repositories' : 'Git repositories' /} |
| 29 | {param menuEntries: $menuEntries /} |
| 30 | {param breadcrumbs: null /} |
| Dave Borowitz | 76bbefd | 2014-03-11 16:57:45 -0700 | [diff] [blame] | 31 | {param headerVariant: $headerVariant /} |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 32 | {/call} |
| 33 | |
| 34 | {if length($repositories)} |
| 35 | |
| 36 | <h2> |
| 37 | {msg desc="Git repositories available on the host"} |
| 38 | {$hostName} Git repositories |
| 39 | {/msg} |
| 40 | </h2> |
| 41 | |
| 42 | <div class="instructions"> |
| 43 | {msg desc="description on how to use this repository"} |
| 44 | To clone one of these repositories, install{sp} |
| 45 | <a href="http://www.git-scm.com/">git</a>, and run: |
| 46 | <pre>git clone {$baseUrl}<em>name</em></pre> |
| 47 | {/msg} |
| 48 | </div> |
| 49 | |
| 50 | <table class="list"> |
| 51 | <tr class="no-hover"> |
| 52 | <th width="25%"> |
| 53 | {msg desc="column header for repository name"} |
| 54 | Name |
| 55 | {/msg} |
| 56 | </th> |
| 57 | <th> |
| 58 | {msg desc="column header for repository description"} |
| 59 | Description |
| 60 | {/msg} |
| 61 | </th> |
| 62 | </tr> |
| 63 | {foreach $repo in $repositories} |
| 64 | <tr> |
| 65 | <td> |
| 66 | <a href="{$repo.url}">{$repo.name}</a> |
| 67 | </td> |
| 68 | <td>{$repo.description}</td> |
| 69 | </tr> |
| 70 | {/foreach} |
| 71 | </table> |
| Chad Horohoe | 74c93ac | 2012-11-12 12:33:18 -0800 | [diff] [blame] | 72 | <div class="formats"> |
| Dave Borowitz | 9de6595 | 2012-08-13 16:09:45 -0700 | [diff] [blame] | 73 | <a href="?format=TEXT">{msg desc="text format"}TXT{/msg}</a> |
| 74 | {sp} |
| 75 | <a href="?format=JSON">{msg desc="JSON format"}JSON{/msg}</a> |
| 76 | </div> |
| 77 | {/if} |
| 78 | {call .footer /} |
| 79 | {/template} |