-
Notifications
You must be signed in to change notification settings - Fork 786
Add current indexed version to repos table. #1262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,4 +138,5 @@ $(document).ready(function () { | |
|
||
return false; | ||
}); | ||
domReadyHistory(); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,7 @@ Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. | |
<td><b>Mirror</b></td> | ||
<td><b>SCM type</b></td> | ||
<td><b>Parent (branch)</b></td> | ||
<td><b>Current version</b></td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
@@ -175,8 +176,36 @@ Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. | |
if (branch == null) { | ||
branch = "N/A"; | ||
} | ||
String currentVersion = ri.getCurrentVersion(); | ||
if (currentVersion == null) { | ||
currentVersion = "N/A"; | ||
} | ||
%><td><%= Util.htmlize(type) %></td><% | ||
%><td><%= Util.htmlize(parent) %> (<%= Util.htmlize(branch) %>)</td><% | ||
%><td><% | ||
|
||
// Current index collapse threshold minimum of 10 | ||
int summaryLength = Math.max(10, cfg.getCurrentIndexedCollapseThreshold()); | ||
String cout = Util.htmlize(currentVersion); | ||
|
||
boolean showSummary = false; | ||
String coutSummary = currentVersion; | ||
if (coutSummary.length() > summaryLength) { | ||
showSummary = true; | ||
coutSummary = coutSummary.substring(0, summaryLength - 1); | ||
coutSummary = Util.htmlize(coutSummary); | ||
} | ||
if (showSummary) { | ||
%> | ||
<span class="rev-message-summary"><%= coutSummary %></span> | ||
<span class="rev-message-full rev-message-hidden"><%= cout %></span> | ||
<span data-toggle-state="less"><a class="rev-toggle-a rev-message-toggle " href="#">show more ... </a></span> | ||
<% | ||
} | ||
else { | ||
%><span class="rev-message-full"><%= cout %></span><% | ||
} | ||
%></td><% | ||
%></tr><% | ||
cnt++; | ||
} | ||
|
@@ -224,11 +253,12 @@ Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. | |
<div class="panel-body<% if (groups.size() > 0) {%>-accordion<% } %> <% if (pHelper.hasUngroupedFavourite()) { %> favourite<% } %>" | ||
<% if (pHelper.hasUngroupedFavourite()) { %>data-accordion-visible="true"<% } %>> | ||
<table> | ||
<thead> | ||
<thead> | ||
<tr> | ||
<td><b>Mirror</b></td> | ||
<td><b>SCM type</b></td> | ||
<td><b>Parent (branch)</b></td> | ||
<td><b>Current version</b></td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
@@ -270,8 +300,37 @@ Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. | |
if (branch == null) { | ||
branch = "N/A"; | ||
} | ||
String currentVersion = ri.getCurrentVersion(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are two places in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
if (currentVersion == null) { | ||
currentVersion = "N/A"; | ||
} | ||
%><td><%= Util.htmlize(type) %></td><% | ||
%><td><%= Util.htmlize(parent) %> (<%= Util.htmlize(branch) %>)</td><% | ||
%><td><% | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have to set the table column to be at fixed size so in case user choose to open the "show more..." it will not change the other columns size (which feel annoying in the eye..). Currently they are divided with default size (each column get the exact some size). I guess I can reduce the size of "SCM type" to something smaller but still fixed and give more space to "Parent (branch)" and "Current version". I'll give it a try. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm more talking about this, which is not like it was before (there was just single line with no margin). It's solved for me by replacing You can restrict the scm column to some small percentage of the width, and also you always know what is the longest scm supported by OpenGrok. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
|
||
// Current index message collapse threshold minimum of 10 | ||
int summaryLength = Math.max(10, cfg.getCurrentIndexedCollapseThreshold()); | ||
String cout = Util.htmlize(currentVersion); | ||
|
||
boolean showSummary = false; | ||
String coutSummary = currentVersion; | ||
if (coutSummary.length() > summaryLength) { | ||
showSummary = true; | ||
coutSummary = coutSummary.substring(0, summaryLength - 1); | ||
coutSummary = Util.htmlize(coutSummary); | ||
} | ||
|
||
if (showSummary) { | ||
%> | ||
<span class="rev-message-summary"><%= coutSummary %></span> | ||
<span class="rev-message-full rev-message-hidden"><%= cout %></span> | ||
<span data-toggle-state="less"><a class="rev-toggle-a rev-message-toggle " href="#">show more ... </a></span> | ||
<% | ||
} | ||
else { | ||
%><span class="rev-message-full"><%= cout %></span><% | ||
} | ||
%></td><% | ||
%></tr><% | ||
cnt++; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong copyright date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed