| OLD | NEW |
| (Empty) | |
| 1 <!-- |
| 2 Copyright 2017 The LUCI Authors. All rights reserved. |
| 3 Use of this source code is governed under the Apache License, Version 2.0 |
| 4 that can be found in the LICENSE file. |
| 5 --> |
| 6 |
| 7 <link rel="import" href="../../bower_components/paper-item/paper-item.html"> |
| 8 <link rel="import" href="../../bower_components/polymer/polymer.html"> |
| 9 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html"> |
| 10 <link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layou
t.html"> |
| 11 |
| 12 <dom-module id="config-file-card"> |
| 13 <template> |
| 14 <style include="iron-flex iron-flex-alignment"> |
| 15 .center { |
| 16 margin: auto; |
| 17 width: 25%; |
| 18 border-style: solid; |
| 19 border-width: 2px; |
| 20 } |
| 21 |
| 22 iron-icon { |
| 23 float: right; |
| 24 } |
| 25 |
| 26 </style> |
| 27 |
| 28 <paper-item class="center"> |
| 29 <!-- TODO(cwpayton): Currently, each card contains a link to the |
| 30 corresponding file in gitiles. We would like to pretty print the |
| 31 contents of the file in the UI instead of externally linking. --> |
| 32 <div class="horizontal layout wrap" style="width: 100%"> |
| 33 [[name]] |
| 34 <iron-icon icon="icons:link" on-tap="_handleClick"></iron-icon> |
| 35 </div> |
| 36 |
| 37 </paper-item> |
| 38 </template> |
| 39 <script> |
| 40 Polymer({ |
| 41 is: "config-file-card", |
| 42 |
| 43 properties: { |
| 44 name: { |
| 45 type: String |
| 46 }, |
| 47 |
| 48 link: { |
| 49 type: String |
| 50 } |
| 51 }, |
| 52 |
| 53 _handleClick: function(event) { |
| 54 window.location = this.link; |
| 55 }, |
| 56 |
| 57 }); |
| 58 </script> |
| 59 </dom-module> |
| OLD | NEW |