Add an extension point for Source Browser link

A plugin or a site theme (gerrit-theme.html) may register a custom
Element to be inserted into this endpoint.

``` js
Gerrit.install(plugin => {
  plugin.registerCustomComponent(
      'header-browse-source', 'gt-header-source', {replace: true});
});
```

``` html
<dom-module id="gt-header-source">
  <template>
    <a href="http://somecode.com/">Repositories</a>
  </template>
  <script>
    Polymer({is: 'gt-header-source'});
  </script>
</dom-module>
````

Feature: Issue 7120
Change-Id: Ib4b133de755c16ae32e464e7c4352310f29ef5b0
This commit is contained in:
Viktar Donich
2017-09-05 15:37:45 -07:00
parent ebf009cc5c
commit f3407cfb98
2 changed files with 8 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ limitations under the License.
<link rel="import" href="../../shared/gr-js-api-interface/gr-js-api-interface.html">
<dom-module id="gr-endpoint-decorator">
<template>
<template strip-whitespace>
<content></content>
</template>
<script src="gr-endpoint-decorator.js"></script>