| <!-- |
| Copyright (C) 2019 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <dom-module id="gr-task-plugin"> |
| <template> |
| <style> |
| ul { padding-left: 0.5em; } |
| h3 { padding-left: 0.1em; } |
| </style> |
| |
| <div id="tasks" hidden$="[[!_tasks.length]]"> |
| <h3>Tasks: (Needs + Blocked)</h3> |
| <ul style="list-style-type:none;"> |
| <gr-task-plugin-tasks tasks="[[_tasks]]"></gr-task-plugin-tasks> |
| </ul> |
| </div> |
| </template> |
| <script src="gr-task-plugin.js"></script> |
| </dom-module> |
| |
| <dom-module id="gr-task-plugin-tasks"> |
| <template> |
| <template is="dom-repeat" as="task" items="[[tasks]]"> |
| <template is="dom-if" if="[[task.message]]"> |
| <li> |
| <style> |
| .green { |
| color: greenyellow |
| } |
| .red { |
| color: chocolate |
| } |
| </style> |
| <template is="dom-if" if="[[task.icon.id]]"> |
| <gr-tooltip-content |
| has-tooltip |
| title="In Progress"> |
| <iron-icon |
| icon="gr-icons:hourglass" |
| class="green" |
| hidden$="[[!task.in_progress]]"> |
| </iron-icon> |
| </gr-tooltip-content> |
| <gr-tooltip-content |
| has-tooltip |
| title$="[[task.icon.tooltip]]"> |
| <iron-icon |
| icon="[[task.icon.id]]" |
| class$="[[task.icon.color]]"> |
| </iron-icon> |
| </gr-tooltip-content> |
| </template> |
| [[task.message]] |
| </li> |
| </template> |
| <gr-task-plugin-tasks tasks="[[task.sub_tasks]]"></gr-task-plugin-tasks> |
| </template> |
| </template> |
| <script> |
| Polymer({ |
| is: 'gr-task-plugin-tasks', |
| properties: { |
| tasks: { |
| type: Array, |
| notify: true, |
| value() { return []; }, |
| }, |
| }, |
| }); |
| </script> |
| </dom-module> |