Skip to content

Commit dcb7712

Browse files
authored
add links to file revisions in side diff view (#4304)
* add links to file revisions * shorten the lines
1 parent 277a26a commit dcb7712

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

opengrok-web/src/main/webapp/diff.jsp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,12 @@ action=download">download diff</a></span><%
212212
if (type == DiffType.SIDEBYSIDE || type == DiffType.UNIFIED) {
213213
%><table class="plain" aria-label="table with old and new content"><%
214214
if (type == DiffType.SIDEBYSIDE) {
215+
String linkPrefix = request.getContextPath() + Prefix.XREF_P + Util.htmlize(cfg.getPath()) +
216+
"?" + QueryParameters.REVISION_PARAM_EQ;
215217
%>
216218
<thead><tr>
217-
<th><%= data.getFilename() %> (<%= data.getRev(0) %>)</th>
218-
<th><%= data.getFilename() %> (<%= data.getRev(1) %>)</th>
219+
<th><a href="<%= linkPrefix %><%= data.getRev(0) %>"><%= data.getFilename() %> (<%= data.getRev(0) %>)</a></th>
220+
<th><a href="<%= linkPrefix %><%= data.getRev(1) %>"><%= data.getFilename() %> (<%= data.getRev(1) %>)</a></th>
219221
</tr></thead><%
220222
}
221223
%>

0 commit comments

Comments
 (0)