blob: e0ed3988b556d538e627715b5c2e381b3f2cc30f [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 * HTML page for /.
18 *
19 * @param hostName host name.
20 * @param? menuEntries menu entries.
Dave Borowitz76bbefd2014-03-11 16:57:45 -070021 * @param? headerVariant variant name for custom header.
Dave Borowitz9de65952012-08-13 16:09:45 -070022 * @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 Borowitz76bbefd2014-03-11 16:57:45 -070031 {param headerVariant: $headerVariant /}
Dave Borowitz9de65952012-08-13 16:09:45 -070032{/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 Horohoe74c93ac2012-11-12 12:33:18 -080072 <div class="formats">
Dave Borowitz9de65952012-08-13 16:09:45 -070073 <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}