Merge "Make bug report URL unset by default"
This commit is contained in:
@@ -1537,15 +1537,17 @@ same host as Gerrit.
|
||||
|
||||
[[gerrit.reportBugUrl]]gerrit.reportBugUrl::
|
||||
+
|
||||
URL to direct users to when they need to report a bug about the
|
||||
Gerrit service. By default this links to the upstream Gerrit
|
||||
Code Review's own bug tracker but could be directed to the system
|
||||
administrator's ticket queue.
|
||||
URL to direct users to when they need to report a bug.
|
||||
+
|
||||
By default unset, meaning no bug report URL will be displayed. Administrators
|
||||
should set this to the URL of their issue tracker, if necessary.
|
||||
|
||||
[[gerrit.reportBugText]]gerrit.reportBugText::
|
||||
+
|
||||
Text to be displayed in the link to the bug report URL.
|
||||
+
|
||||
Only used when `gerrit.reportBugUrl` is set.
|
||||
+
|
||||
Defaults to "Report Bug".
|
||||
|
||||
[[gerrit.changeScreen]]gerrit.changeScreen::
|
||||
|
@@ -472,14 +472,17 @@ public class Gerrit implements EntryPoint {
|
||||
|
||||
btmmenu.add(new InlineHTML(M.poweredBy(vs)));
|
||||
|
||||
final String reportBugText = getConfig().getReportBugText();
|
||||
Anchor a = new Anchor(
|
||||
reportBugText == null ? C.reportBug() : reportBugText,
|
||||
getConfig().getReportBugUrl());
|
||||
a.setTarget("_blank");
|
||||
a.setStyleName("");
|
||||
btmmenu.add(new InlineLabel(" | "));
|
||||
btmmenu.add(a);
|
||||
String reportBugUrl = getConfig().getReportBugUrl();
|
||||
if (reportBugUrl != null) {
|
||||
String reportBugText = getConfig().getReportBugText();
|
||||
Anchor a = new Anchor(
|
||||
reportBugText == null ? C.reportBug() : reportBugText,
|
||||
reportBugUrl);
|
||||
a.setTarget("_blank");
|
||||
a.setStyleName("");
|
||||
btmmenu.add(new InlineLabel(" | "));
|
||||
btmmenu.add(a);
|
||||
}
|
||||
btmmenu.add(new InlineLabel(" | "));
|
||||
btmmenu.add(new InlineLabel(C.keyHelp()));
|
||||
}
|
||||
|
@@ -148,9 +148,7 @@ class GerritConfigProvider implements Provider<GerritConfig> {
|
||||
|
||||
config.setNewFeatures(cfg.getBoolean("gerrit", "enableNewFeatures", true));
|
||||
|
||||
final String reportBugUrl = cfg.getString("gerrit", null, "reportBugUrl");
|
||||
config.setReportBugUrl(reportBugUrl != null ?
|
||||
reportBugUrl : "http://code.google.com/p/gerrit/issues/list");
|
||||
config.setReportBugUrl(cfg.getString("gerrit", null, "reportBugUrl"));
|
||||
config.setReportBugText(cfg.getString("gerrit", null, "reportBugText"));
|
||||
|
||||
final Set<Account.FieldName> fields = new HashSet<>();
|
||||
|
Reference in New Issue
Block a user