Files
gerrit/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.html
Dave Borowitz 4b5f6c7ca9 Revert "PolyGerrit: Add support for showing or hiding the star from the change list"
Stars are not included by default, meaning they will disappear for
existing users without a schema migration. We can't add a schema
migration in a release branch, so we can't add this feature in
stable-2.15. In master, revert it to avoid breaking existing users
of googlesource.com.

This reverts commit f5f89beb70.

Bug: Issue 7573
Change-Id: I2ba9d55600e9621e8d02c67389b519dc90899534
2017-10-26 15:33:44 +00:00

182 lines
6.0 KiB
HTML

<!--
Copyright (C) 2015 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.
-->
<link rel="import" href="../../../behaviors/base-url-behavior/base-url-behavior.html">
<link rel="import" href="../../../behaviors/gr-change-table-behavior/gr-change-table-behavior.html">
<link rel="import" href="../../../behaviors/gr-url-encoding-behavior.html">
<link rel="import" href="../../../behaviors/rest-client-behavior/rest-client-behavior.html">
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../../styles/gr-change-list-styles.html">
<link rel="import" href="../../core/gr-navigation/gr-navigation.html">
<link rel="import" href="../../shared/gr-account-link/gr-account-link.html">
<link rel="import" href="../../shared/gr-change-star/gr-change-star.html">
<link rel="import" href="../../shared/gr-date-formatter/gr-date-formatter.html">
<link rel="import" href="../../shared/gr-limited-text/gr-limited-text.html">
<link rel="import" href="../../../styles/shared-styles.html">
<dom-module id="gr-change-list-item">
<template>
<style include="shared-styles">
:host {
display: table-row;
border-bottom: 1px solid #eee;
}
:host(:hover) {
background-color: #f5fafd;
}
:host([selected]) {
background-color: #ebf5fb;
}
:host([needs-review]) {
font-family: var(--font-family-bold);
}
:host([assigned]) {
background-color: #fcfad6;
}
:host([selected][assigned]) {
background-color: #fcfaa6;
}
.cell {
padding: .3em .5em;
}
.container {
position: relative;
}
.content {
overflow: hidden;
position: absolute;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.content a {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.spacer {
height: 0;
overflow: hidden;
}
a {
color: var(--default-text-color);
cursor: pointer;
display: inline-block;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.positionIndicator {
visibility: hidden;
}
:host([selected]) .positionIndicator {
visibility: visible;
}
.u-monospace {
font-family: var(--monospace-font-family);
}
.u-green {
color: #388E3C;
}
.u-red {
color: #D32F2F;
}
.u-gray-background {
background-color: #F5F5F5;
}
@media only screen and (max-width: 50em) {
:host {
display: flex;
}
}
</style>
<style include="gr-change-list-styles"></style>
<td class="cell keyboard">
<span class="positionIndicator">&#x25b6;</span>
</td>
<td class="cell star" hidden$="[[!showStar]]" hidden>
<gr-change-star change="{{change}}"></gr-change-star>
</td>
<td class="cell number" hidden$="[[!showNumber]]" hidden>
<a href$="[[changeURL]]"> [[change._number]]</a>
</td>
<td class="cell subject"
hidden$="[[isColumnHidden('Subject', visibleChangeTableColumns)]]">
<div class="container">
<div class="content">
<a title$="[[change.subject]]" href$="[[changeURL]]">
[[change.subject]]
</a>
</div>
<div class="spacer">
[[change.subject]]
</div>
<span>&nbsp;</span>
</div>
</td>
<td class="cell status"
hidden$="[[isColumnHidden('Status', visibleChangeTableColumns)]]">
[[changeStatusString(change)]]
</td>
<td class="cell owner"
hidden$="[[isColumnHidden('Owner', visibleChangeTableColumns)]]">
<gr-account-link account="[[change.owner]]"></gr-account-link>
</td>
<td class="cell assignee"
hidden$="[[isColumnHidden('Assignee', visibleChangeTableColumns)]]">
<template is="dom-if" if="[[change.assignee]]">
<gr-account-link account="[[change.assignee]]"></gr-account-link>
</template>
</td>
<td class="cell project"
hidden$="[[isColumnHidden('Project', visibleChangeTableColumns)]]">
<a href$="[[_computeProjectURL(change.project)]]">[[change.project]]</a>
</td>
<td class="cell branch"
hidden$="[[isColumnHidden('Branch', visibleChangeTableColumns)]]">
<a href$="[[_computeProjectBranchURL(change)]]">
[[change.branch]]
</a>
<template is="dom-if" if="[[change.topic]]">
(<a href$="[[_computeTopicURL(change)]]"><!--
--><gr-limited-text limit="30" text="[[change.topic]]">
</gr-limited-text><!--
--></a>)
</template>
</td>
<td class="cell updated"
hidden$="[[isColumnHidden('Updated', visibleChangeTableColumns)]]">
<gr-date-formatter
has-tooltip
date-str="[[change.updated]]"></gr-date-formatter>
</td>
<td class="cell size u-monospace"
hidden$="[[isColumnHidden('Size', visibleChangeTableColumns)]]">
<span class="u-green"><span>+</span>[[change.insertions]]</span>,
<span class="u-red"><span>-</span>[[change.deletions]]</span>
</td>
<template is="dom-repeat" items="[[labelNames]]" as="labelName">
<td title$="[[_computeLabelTitle(change, labelName)]]"
class$="[[_computeLabelClass(change, labelName)]]">
[[_computeLabelValue(change, labelName)]]
</td>
</template>
</template>
<script src="gr-change-list-item.js"></script>
</dom-module>