ChangeScreen2: Show rename/copy source paths in file table
Display below a renamed or copied file the source path the file came from. This is displayed in one font size smaller than the new path text, and using the lighter grey that is used for common path prefixes. The idea is to make the information available, but the old path is usually less important, and should therefore be less obvious in the UI. Change-Id: Ic6bc6bbf594199d13a43f09eca612b55b492a765
This commit is contained in:
@@ -63,16 +63,18 @@ class FileTable extends FlowPanel {
|
||||
}
|
||||
|
||||
interface FileTableCss extends CssResource {
|
||||
String table();
|
||||
String pointer();
|
||||
String reviewed();
|
||||
String status();
|
||||
String pathColumn();
|
||||
String commonPrefix();
|
||||
String renameCopySource();
|
||||
String draftColumn();
|
||||
String newColumn();
|
||||
String commentColumn();
|
||||
String deltaColumn1();
|
||||
String deltaColumn2();
|
||||
String commonPrefix();
|
||||
String inserted();
|
||||
String deleted();
|
||||
}
|
||||
@@ -335,6 +337,7 @@ class FileTable extends FlowPanel {
|
||||
this.comments = comments;
|
||||
this.drafts = drafts;
|
||||
this.hasUser = Gerrit.isSignedIn();
|
||||
table.addStyleName(R.css().table());
|
||||
}
|
||||
|
||||
public boolean execute() {
|
||||
@@ -474,8 +477,14 @@ class FileTable extends FlowPanel {
|
||||
lastPath = path;
|
||||
}
|
||||
|
||||
sb.closeAnchor()
|
||||
.closeTd();
|
||||
sb.closeAnchor();
|
||||
if (info.old_path() != null) {
|
||||
sb.br();
|
||||
sb.openSpan().setStyleName(R.css().renameCopySource())
|
||||
.append(info.old_path())
|
||||
.closeSpan();
|
||||
}
|
||||
sb.closeTd();
|
||||
}
|
||||
|
||||
private int commonPrefix(String path) {
|
||||
|
@@ -19,6 +19,10 @@
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.table tr {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.status {
|
||||
padding-right: 4px;
|
||||
color: #888;
|
||||
@@ -34,6 +38,10 @@
|
||||
.commonPrefix {
|
||||
color: #888;
|
||||
}
|
||||
.renameCopySource {
|
||||
color: #888;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.draftColumn,
|
||||
.newColumn,
|
||||
|
Reference in New Issue
Block a user