summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/wicket/panels
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/gitblit/wicket/panels')
-rw-r--r--src/com/gitblit/wicket/panels/BasePanel.java8
-rw-r--r--src/com/gitblit/wicket/panels/BranchesPanel.java27
-rw-r--r--src/com/gitblit/wicket/panels/CommitHeaderPanel.java5
-rw-r--r--src/com/gitblit/wicket/panels/CommitLegendPanel.java11
-rw-r--r--src/com/gitblit/wicket/panels/HistoryPanel.java40
-rw-r--r--src/com/gitblit/wicket/panels/LogPanel.java44
-rw-r--r--src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java14
-rw-r--r--src/com/gitblit/wicket/panels/RefsPanel.java16
-rw-r--r--src/com/gitblit/wicket/panels/RepositoriesPanel.java91
-rw-r--r--src/com/gitblit/wicket/panels/SearchPanel.java34
-rw-r--r--src/com/gitblit/wicket/panels/TagsPanel.java43
-rw-r--r--src/com/gitblit/wicket/panels/UsersPanel.java16
12 files changed, 227 insertions, 122 deletions
diff --git a/src/com/gitblit/wicket/panels/BasePanel.java b/src/com/gitblit/wicket/panels/BasePanel.java
index a527833f..02789fb4 100644
--- a/src/com/gitblit/wicket/panels/BasePanel.java
+++ b/src/com/gitblit/wicket/panels/BasePanel.java
@@ -37,7 +37,8 @@ public abstract class BasePanel extends Panel {
}
protected TimeZone getTimeZone() {
- return GitBlit.self().settings().getBoolean(Keys.web.useClientTimezone, false) ? GitBlitWebSession.get().getTimezone() : TimeZone.getDefault();
+ return GitBlit.getBoolean(Keys.web.useClientTimezone, false) ? GitBlitWebSession.get()
+ .getTimezone() : TimeZone.getDefault();
}
protected void setPersonSearchTooltip(Component component, String value, SearchType searchType) {
@@ -48,7 +49,7 @@ public abstract class BasePanel extends Panel {
}
}
- public class JavascriptEventConfirmation extends AttributeModifier {
+ public static class JavascriptEventConfirmation extends AttributeModifier {
private static final long serialVersionUID = 1L;
@@ -57,7 +58,8 @@ public abstract class BasePanel extends Panel {
}
protected String newValue(final String currentValue, final String replacementValue) {
- String prefix = "var conf = confirm('" + replacementValue + "'); " + "if (!conf) return false; ";
+ String prefix = "var conf = confirm('" + replacementValue + "'); "
+ + "if (!conf) return false; ";
String result = prefix;
if (currentValue != null) {
result = prefix + currentValue;
diff --git a/src/com/gitblit/wicket/panels/BranchesPanel.java b/src/com/gitblit/wicket/panels/BranchesPanel.java
index 70fc5ba4..357c7c2c 100644
--- a/src/com/gitblit/wicket/panels/BranchesPanel.java
+++ b/src/com/gitblit/wicket/panels/BranchesPanel.java
@@ -43,7 +43,8 @@ public class BranchesPanel extends BasePanel {
private static final long serialVersionUID = 1L;
- public BranchesPanel(String wicketId, final RepositoryModel model, Repository r, final int maxCount) {
+ public BranchesPanel(String wicketId, final RepositoryModel model, Repository r,
+ final int maxCount) {
super(wicketId);
// branches
@@ -61,31 +62,38 @@ public class BranchesPanel extends BasePanel {
if (maxCount > 0) {
// summary page
// show branches page link
- add(new LinkPanel("branches", "title", new StringResourceModel("gb.branches", this, null), BranchesPage.class, WicketUtils.newRepositoryParameter(model.name)));
+ add(new LinkPanel("branches", "title", new StringResourceModel("gb.branches", this,
+ null), BranchesPage.class, WicketUtils.newRepositoryParameter(model.name)));
} else {
// branches page
// show repository summary page link
- add(new LinkPanel("branches", "title", model.name, SummaryPage.class, WicketUtils.newRepositoryParameter(model.name)));
+ add(new LinkPanel("branches", "title", model.name, SummaryPage.class,
+ WicketUtils.newRepositoryParameter(model.name)));
}
ListDataProvider<RefModel> branchesDp = new ListDataProvider<RefModel>(branches);
DataView<RefModel> branchesView = new DataView<RefModel>("branch", branchesDp) {
private static final long serialVersionUID = 1L;
- int counter = 0;
+ int counter;
public void populateItem(final Item<RefModel> item) {
final RefModel entry = item.getModelObject();
item.add(WicketUtils.createDateLabel("branchDate", entry.getDate(), getTimeZone()));
- item.add(new LinkPanel("branchName", "list name", StringUtils.trimString(entry.getDisplayName(), 28), LogPage.class, WicketUtils.newObjectParameter(model.name, entry.getName())));
+ item.add(new LinkPanel("branchName", "list name", StringUtils.trimString(
+ entry.displayName, 28), LogPage.class, WicketUtils.newObjectParameter(
+ model.name, entry.getName())));
// only show branch type on the branches page
boolean remote = entry.getName().startsWith(Constants.R_REMOTES);
- item.add(new Label("branchType", remote ? getString("gb.remote") : getString("gb.local")).setVisible(maxCount <= 0));
+ item.add(new Label("branchType", remote ? getString("gb.remote")
+ : getString("gb.local")).setVisible(maxCount <= 0));
- item.add(new BookmarkablePageLink<Void>("log", LogPage.class, WicketUtils.newObjectParameter(model.name, entry.getName())));
- item.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils.newObjectParameter(model.name, entry.getName())));
+ item.add(new BookmarkablePageLink<Void>("log", LogPage.class, WicketUtils
+ .newObjectParameter(model.name, entry.getName())));
+ item.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils
+ .newObjectParameter(model.name, entry.getName())));
WicketUtils.setAlternatingBackground(item, counter);
counter++;
@@ -95,7 +103,8 @@ public class BranchesPanel extends BasePanel {
if (branches.size() < maxCount || maxCount <= 0) {
add(new Label("allBranches", "").setVisible(false));
} else {
- add(new LinkPanel("allBranches", "link", new StringResourceModel("gb.allBranches", this, null), BranchesPage.class, WicketUtils.newRepositoryParameter(model.name)));
+ add(new LinkPanel("allBranches", "link", new StringResourceModel("gb.allBranches",
+ this, null), BranchesPage.class, WicketUtils.newRepositoryParameter(model.name)));
}
}
}
diff --git a/src/com/gitblit/wicket/panels/CommitHeaderPanel.java b/src/com/gitblit/wicket/panels/CommitHeaderPanel.java
index 68cd4a99..cb80321a 100644
--- a/src/com/gitblit/wicket/panels/CommitHeaderPanel.java
+++ b/src/com/gitblit/wicket/panels/CommitHeaderPanel.java
@@ -28,8 +28,9 @@ public class CommitHeaderPanel extends BasePanel {
public CommitHeaderPanel(String id, String repositoryName, RevCommit c) {
super(id);
- add(new LinkPanel("shortmessage", "title", c.getShortMessage(), CommitPage.class, WicketUtils.newObjectParameter(repositoryName, c.getName())));
- add(new Label("commitid", "(" + c.getName().substring(0, 8) + ")"));
+ add(new LinkPanel("shortmessage", "title", c.getShortMessage(), CommitPage.class,
+ WicketUtils.newObjectParameter(repositoryName, c.getName())));
+ add(new Label("commitid", "(" + c.getName().substring(0, 8) + ")"));
add(new Label("author", c.getAuthorIdent().getName()));
add(WicketUtils.createDateLabel("date", c.getAuthorIdent().getWhen(), getTimeZone()));
}
diff --git a/src/com/gitblit/wicket/panels/CommitLegendPanel.java b/src/com/gitblit/wicket/panels/CommitLegendPanel.java
index 417241b9..ee81c695 100644
--- a/src/com/gitblit/wicket/panels/CommitLegendPanel.java
+++ b/src/com/gitblit/wicket/panels/CommitLegendPanel.java
@@ -38,8 +38,9 @@ public class CommitLegendPanel extends Panel {
public CommitLegendPanel(String id, List<PathChangeModel> paths) {
super(id);
- final Map<ChangeType, AtomicInteger> stats = JGitUtils.getChangedPathsStats(paths);
- ListDataProvider<ChangeType> legendDp = new ListDataProvider<ChangeType>(new ArrayList<ChangeType>(stats.keySet()));
+ final Map<ChangeType, AtomicInteger> stats = JGitUtils.getChangedPathsStats(paths);
+ ListDataProvider<ChangeType> legendDp = new ListDataProvider<ChangeType>(
+ new ArrayList<ChangeType>(stats.keySet()));
DataView<ChangeType> legendsView = new DataView<ChangeType>("legend", legendDp) {
private static final long serialVersionUID = 1L;
@@ -50,8 +51,8 @@ public class CommitLegendPanel extends Panel {
WicketUtils.setChangeTypeCssClass(changeType, entry);
item.add(changeType);
int count = stats.get(entry).intValue();
- String description = "";
- switch(entry) {
+ String description = "";
+ switch (entry) {
case ADD:
description = MessageFormat.format(getString("gb.filesAdded"), count);
break;
@@ -67,7 +68,7 @@ public class CommitLegendPanel extends Panel {
case RENAME:
description = MessageFormat.format(getString("gb.filesRenamed"), count);
break;
- }
+ }
item.add(new Label("description", description));
}
};
diff --git a/src/com/gitblit/wicket/panels/HistoryPanel.java b/src/com/gitblit/wicket/panels/HistoryPanel.java
index 7a8f9b28..d65b02c7 100644
--- a/src/com/gitblit/wicket/panels/HistoryPanel.java
+++ b/src/com/gitblit/wicket/panels/HistoryPanel.java
@@ -51,12 +51,13 @@ public class HistoryPanel extends BasePanel {
private static final long serialVersionUID = 1L;
- private boolean hasMore = false;
+ private boolean hasMore;
- public HistoryPanel(String wicketId, final String repositoryName, final String objectId, final String path, Repository r, int limit, int pageOffset) {
+ public HistoryPanel(String wicketId, final String repositoryName, final String objectId,
+ final String path, Repository r, int limit, int pageOffset) {
super(wicketId);
boolean pageResults = limit <= 0;
- int itemsPerPage = GitBlit.self().settings().getInteger(Keys.web.itemsPerPage, 50);
+ int itemsPerPage = GitBlit.getInteger(Keys.web.itemsPerPage, 50);
if (itemsPerPage <= 1) {
itemsPerPage = 50;
}
@@ -77,7 +78,8 @@ public class HistoryPanel extends BasePanel {
List<RevCommit> commits;
if (pageResults) {
// Paging result set
- commits = JGitUtils.getRevLog(r, objectId, path, pageOffset * itemsPerPage, itemsPerPage);
+ commits = JGitUtils.getRevLog(r, objectId, path, pageOffset * itemsPerPage,
+ itemsPerPage);
} else {
// Fixed size result set
commits = JGitUtils.getRevLog(r, objectId, path, 0, limit);
@@ -95,7 +97,7 @@ public class HistoryPanel extends BasePanel {
ListDataProvider<RevCommit> dp = new ListDataProvider<RevCommit>(commits);
DataView<RevCommit> logView = new DataView<RevCommit>("commit", dp) {
private static final long serialVersionUID = 1L;
- int counter = 0;
+ int counter;
public void populateItem(final Item<RevCommit> item) {
final RevCommit entry = item.getModelObject();
@@ -105,7 +107,9 @@ public class HistoryPanel extends BasePanel {
// author search link
String author = entry.getAuthorIdent().getName();
- LinkPanel authorLink = new LinkPanel("commitAuthor", "list", author, SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId, author, SearchType.AUTHOR));
+ LinkPanel authorLink = new LinkPanel("commitAuthor", "list", author,
+ SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId,
+ author, SearchType.AUTHOR));
setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);
item.add(authorLink);
@@ -118,7 +122,9 @@ public class HistoryPanel extends BasePanel {
String shortMessage = entry.getShortMessage();
String trimmedMessage = StringUtils.trimShortLog(shortMessage);
- LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject", trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName()));
+ LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject",
+ trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(
+ repositoryName, entry.getName()));
if (!shortMessage.equals(trimmedMessage)) {
WicketUtils.setHtmlTooltip(shortlog, shortMessage);
}
@@ -128,14 +134,20 @@ public class HistoryPanel extends BasePanel {
if (isTree) {
Fragment links = new Fragment("historyLinks", "treeLinks", this);
- links.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
- links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
+ links.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils
+ .newObjectParameter(repositoryName, entry.getName())));
+ links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry.getName())));
item.add(links);
} else {
Fragment links = new Fragment("historyLinks", "blobLinks", this);
- links.add(new BookmarkablePageLink<Void>("view", BlobPage.class, WicketUtils.newPathParameter(repositoryName, entry.getName(), path)));
- links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
- links.add(new BookmarkablePageLink<Void>("difftocurrent", BlobDiffPage.class, WicketUtils.newBlobDiffParameter(repositoryName, entry.getName(), objectId, path)).setEnabled(counter > 0));
+ links.add(new BookmarkablePageLink<Void>("view", BlobPage.class, WicketUtils
+ .newPathParameter(repositoryName, entry.getName(), path)));
+ links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry.getName())));
+ links.add(new BookmarkablePageLink<Void>("difftocurrent", BlobDiffPage.class,
+ WicketUtils.newBlobDiffParameter(repositoryName, entry.getName(),
+ objectId, path)).setEnabled(counter > 0));
item.add(links);
}
@@ -157,7 +169,9 @@ public class HistoryPanel extends BasePanel {
// more
if (commits.size() == limit) {
// show more
- add(new LinkPanel("moreHistory", "link", new StringResourceModel("gb.moreHistory", this, null), HistoryPage.class, WicketUtils.newPathParameter(repositoryName, objectId, path)));
+ add(new LinkPanel("moreHistory", "link", new StringResourceModel(
+ "gb.moreHistory", this, null), HistoryPage.class,
+ WicketUtils.newPathParameter(repositoryName, objectId, path)));
} else {
// no more
add(new Label("moreHistory", "").setVisible(false));
diff --git a/src/com/gitblit/wicket/panels/LogPanel.java b/src/com/gitblit/wicket/panels/LogPanel.java
index c774f8ed..b321917c 100644
--- a/src/com/gitblit/wicket/panels/LogPanel.java
+++ b/src/com/gitblit/wicket/panels/LogPanel.java
@@ -46,13 +46,14 @@ import com.gitblit.wicket.pages.TreePage;
public class LogPanel extends BasePanel {
private static final long serialVersionUID = 1L;
-
- private boolean hasMore = false;
- public LogPanel(String wicketId, final String repositoryName, final String objectId, Repository r, int limit, int pageOffset) {
+ private boolean hasMore;
+
+ public LogPanel(String wicketId, final String repositoryName, final String objectId,
+ Repository r, int limit, int pageOffset) {
super(wicketId);
boolean pageResults = limit <= 0;
- int itemsPerPage = GitBlit.self().settings().getInteger(Keys.web.itemsPerPage, 50);
+ int itemsPerPage = GitBlit.getInteger(Keys.web.itemsPerPage, 50);
if (itemsPerPage <= 1) {
itemsPerPage = 50;
}
@@ -68,24 +69,26 @@ public class LogPanel extends BasePanel {
}
// inaccurate way to determine if there are more commits.
- // works unless commits.size() represents the exact end.
+ // works unless commits.size() represents the exact end.
hasMore = commits.size() >= itemsPerPage;
// header
if (pageResults) {
// shortlog page
// show repository summary page link
- add(new LinkPanel("header", "title", repositoryName, SummaryPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
+ add(new LinkPanel("header", "title", repositoryName, SummaryPage.class,
+ WicketUtils.newRepositoryParameter(repositoryName)));
} else {
// summary page
// show shortlog page link
- add(new LinkPanel("header", "title", new StringResourceModel("gb.log", this, null), LogPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
+ add(new LinkPanel("header", "title", new StringResourceModel("gb.log", this, null),
+ LogPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
}
ListDataProvider<RevCommit> dp = new ListDataProvider<RevCommit>(commits);
DataView<RevCommit> logView = new DataView<RevCommit>("commit", dp) {
private static final long serialVersionUID = 1L;
- int counter = 0;
+ int counter;
public void populateItem(final Item<RevCommit> item) {
final RevCommit entry = item.getModelObject();
@@ -95,7 +98,9 @@ public class LogPanel extends BasePanel {
// author search link
String author = entry.getAuthorIdent().getName();
- LinkPanel authorLink = new LinkPanel("commitAuthor", "list", author, SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId, author, SearchType.AUTHOR));
+ LinkPanel authorLink = new LinkPanel("commitAuthor", "list", author,
+ SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId,
+ author, SearchType.AUTHOR));
setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);
item.add(authorLink);
@@ -105,11 +110,13 @@ public class LogPanel extends BasePanel {
} else {
item.add(WicketUtils.newBlankImage("commitIcon"));
}
-
+
// short message
String shortMessage = entry.getShortMessage();
String trimmedMessage = StringUtils.trimShortLog(shortMessage);
- LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject", trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName()));
+ LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject",
+ trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(
+ repositoryName, entry.getName()));
if (!shortMessage.equals(trimmedMessage)) {
WicketUtils.setHtmlTooltip(shortlog, shortMessage);
}
@@ -117,9 +124,12 @@ public class LogPanel extends BasePanel {
item.add(new RefsPanel("commitRefs", repositoryName, entry, allRefs));
- item.add(new BookmarkablePageLink<Void>("view", CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
- item.add(new BookmarkablePageLink<Void>("diff", CommitDiffPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
- item.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
+ item.add(new BookmarkablePageLink<Void>("view", CommitPage.class, WicketUtils
+ .newObjectParameter(repositoryName, entry.getName())));
+ item.add(new BookmarkablePageLink<Void>("diff", CommitDiffPage.class, WicketUtils
+ .newObjectParameter(repositoryName, entry.getName())));
+ item.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils
+ .newObjectParameter(repositoryName, entry.getName())));
WicketUtils.setAlternatingBackground(item, counter);
counter++;
@@ -139,7 +149,9 @@ public class LogPanel extends BasePanel {
// more
if (commits.size() == limit) {
// show more
- add(new LinkPanel("moreLogs", "link", new StringResourceModel("gb.moreLogs", this, null), LogPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
+ add(new LinkPanel("moreLogs", "link", new StringResourceModel("gb.moreLogs",
+ this, null), LogPage.class,
+ WicketUtils.newRepositoryParameter(repositoryName)));
} else {
// no more
add(new Label("moreLogs", "").setVisible(false));
@@ -147,7 +159,7 @@ public class LogPanel extends BasePanel {
}
}
}
-
+
public boolean hasMore() {
return hasMore;
}
diff --git a/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java b/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java
index d4ce4426..2693cc2b 100644
--- a/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java
+++ b/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java
@@ -33,9 +33,10 @@ public class PathBreadcrumbsPanel extends Panel {
private static final long serialVersionUID = 1L;
- private final String ROOT = "--ROOT--";
+ private static final String ROOT = "--ROOT--";
- public PathBreadcrumbsPanel(String id, final String repositoryName, String pathName, final String objectId) {
+ public PathBreadcrumbsPanel(String id, final String repositoryName, String pathName,
+ final String objectId) {
super(id);
List<BreadCrumb> crumbs = new ArrayList<BreadCrumb>();
crumbs.add(new BreadCrumb("[" + repositoryName + "]", ROOT, false));
@@ -47,8 +48,8 @@ public class PathBreadcrumbsPanel extends Panel {
for (int i = 0; i < paths.length; i++) {
String path = paths[i];
sb.append(path);
- crumbs.add(new BreadCrumb(path, sb.toString(), (i == (paths.length - 1))));
- sb.append("/");
+ crumbs.add(new BreadCrumb(path, sb.toString(), i == (paths.length - 1)));
+ sb.append('/');
}
}
@@ -63,7 +64,8 @@ public class PathBreadcrumbsPanel extends Panel {
item.add(new Label("pathLink", entry.name));
item.add(new Label("pathSeparator", "").setVisible(false));
} else {
- item.add(new LinkPanel("pathLink", null, entry.name, TreePage.class, WicketUtils.newPathParameter(repositoryName, objectId, path)));
+ item.add(new LinkPanel("pathLink", null, entry.name, TreePage.class,
+ WicketUtils.newPathParameter(repositoryName, objectId, path)));
item.add(new Label("pathSeparator", "/"));
}
}
@@ -71,7 +73,7 @@ public class PathBreadcrumbsPanel extends Panel {
add(pathsView);
}
- private class BreadCrumb implements Serializable {
+ private static class BreadCrumb implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/com/gitblit/wicket/panels/RefsPanel.java b/src/com/gitblit/wicket/panels/RefsPanel.java
index 63042806..b6e4b0bb 100644
--- a/src/com/gitblit/wicket/panels/RefsPanel.java
+++ b/src/com/gitblit/wicket/panels/RefsPanel.java
@@ -39,7 +39,8 @@ public class RefsPanel extends Panel {
private static final long serialVersionUID = 1L;
- public RefsPanel(String id, final String repositoryName, RevCommit c, Map<ObjectId, List<String>> refs) {
+ public RefsPanel(String id, final String repositoryName, RevCommit c,
+ Map<ObjectId, List<String>> refs) {
super(id);
List<String> refNames = refs.get(c.getId());
if (refNames == null) {
@@ -57,19 +58,24 @@ public class RefsPanel extends Panel {
Component c = null;
if (entry.startsWith(Constants.R_HEADS)) {
// local head
- c = new LinkPanel("refName", null, entry.substring(Constants.R_HEADS.length()), LogPage.class, WicketUtils.newObjectParameter(repositoryName, entry));
+ c = new LinkPanel("refName", null, entry.substring(Constants.R_HEADS.length()),
+ LogPage.class, WicketUtils.newObjectParameter(repositoryName, entry));
WicketUtils.setCssClass(c, "headRef");
} else if (entry.startsWith(Constants.R_REMOTES)) {
// remote head
- c = new LinkPanel("refName", null, entry.substring(Constants.R_REMOTES.length()), LogPage.class, WicketUtils.newObjectParameter(repositoryName, entry));
+ c = new LinkPanel("refName", null,
+ entry.substring(Constants.R_REMOTES.length()), LogPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry));
WicketUtils.setCssClass(c, "remoteRef");
} else if (entry.startsWith(Constants.R_TAGS)) {
// tag
- c = new LinkPanel("refName", null, entry.substring(Constants.R_TAGS.length()), TagPage.class, WicketUtils.newObjectParameter(repositoryName, entry));
+ c = new LinkPanel("refName", null, entry.substring(Constants.R_TAGS.length()),
+ TagPage.class, WicketUtils.newObjectParameter(repositoryName, entry));
WicketUtils.setCssClass(c, "tagRef");
} else {
// other
- c = new LinkPanel("refName", null, entry, CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry));
+ c = new LinkPanel("refName", null, entry, CommitPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry));
WicketUtils.setCssClass(c, "otherRef");
}
WicketUtils.setHtmlTooltip(c, entry);
diff --git a/src/com/gitblit/wicket/panels/RepositoriesPanel.java b/src/com/gitblit/wicket/panels/RepositoriesPanel.java
index 12f6152d..a566b595 100644
--- a/src/com/gitblit/wicket/panels/RepositoriesPanel.java
+++ b/src/com/gitblit/wicket/panels/RepositoriesPanel.java
@@ -57,7 +57,8 @@ public class RepositoriesPanel extends BasePanel {
private static final long serialVersionUID = 1L;
- public RepositoriesPanel(String wicketId, final boolean showAdmin, final Map<AccessRestrictionType, String> accessRestrictionTranslations) {
+ public RepositoriesPanel(String wicketId, final boolean showAdmin,
+ final Map<AccessRestrictionType, String> accessRestrictionTranslations) {
super(wicketId);
final UserModel user = GitBlitWebSession.get().getUser();
@@ -68,12 +69,12 @@ public class RepositoriesPanel extends BasePanel {
adminLinks.add(new BookmarkablePageLink<Void>("newRepository", EditRepositoryPage.class));
add(adminLinks.setVisible(showAdmin));
- if (GitBlit.self().settings().getString(Keys.web.repositoryListType, "flat").equalsIgnoreCase("grouped")) {
+ if (GitBlit.getString(Keys.web.repositoryListType, "flat").equalsIgnoreCase("grouped")) {
Map<String, List<RepositoryModel>> groups = new HashMap<String, List<RepositoryModel>>();
for (RepositoryModel model : models) {
String rootPath = StringUtils.getRootPath(model.name);
if (StringUtils.isEmpty(rootPath)) {
- rootPath = GitBlit.self().settings().getString(Keys.web.repositoryRootGroupName, " ");
+ rootPath = GitBlit.getString(Keys.web.repositoryRootGroupName, " ");
}
if (!groups.containsKey(rootPath)) {
groups.put(rootPath, new ArrayList<RepositoryModel>());
@@ -95,7 +96,7 @@ public class RepositoriesPanel extends BasePanel {
DataView<RepositoryModel> dataView = new DataView<RepositoryModel>("row", dp) {
private static final long serialVersionUID = 1L;
- int counter = 0;
+ int counter;
@Override
protected void onBeforeRender() {
@@ -117,28 +118,34 @@ public class RepositoriesPanel extends BasePanel {
if (entry.hasCommits) {
// Existing repository
PageParameters pp = WicketUtils.newRepositoryParameter(entry.name);
- row.add(new LinkPanel("repositoryName", "list", entry.name, SummaryPage.class, pp));
- row.add(new LinkPanel("repositoryDescription", "list", entry.description, SummaryPage.class, pp));
+ row.add(new LinkPanel("repositoryName", "list", entry.name, SummaryPage.class,
+ pp));
+ row.add(new LinkPanel("repositoryDescription", "list", entry.description,
+ SummaryPage.class, pp));
} else {
// New repository
- row.add(new Label("repositoryName", entry.name + "<span class='empty'>(empty)</span>").setEscapeModelStrings(false));
+ row.add(new Label("repositoryName", entry.name
+ + "<span class='empty'>(empty)</span>").setEscapeModelStrings(false));
row.add(new Label("repositoryDescription", entry.description));
}
if (entry.useTickets) {
- row.add(WicketUtils.newImage("ticketsIcon", "bug_16x16.png", getString("gb.tickets")));
+ row.add(WicketUtils.newImage("ticketsIcon", "bug_16x16.png",
+ getString("gb.tickets")));
} else {
row.add(WicketUtils.newBlankImage("ticketsIcon"));
}
if (entry.useDocs) {
- row.add(WicketUtils.newImage("docsIcon", "book_16x16.png", getString("gb.docs")));
+ row.add(WicketUtils
+ .newImage("docsIcon", "book_16x16.png", getString("gb.docs")));
} else {
row.add(WicketUtils.newBlankImage("docsIcon"));
}
if (entry.isFrozen) {
- row.add(WicketUtils.newImage("frozenIcon", "cold_16x16.png", getString("gb.isFrozen")));
+ row.add(WicketUtils.newImage("frozenIcon", "cold_16x16.png",
+ getString("gb.isFrozen")));
} else {
row.add(WicketUtils.newClearPixel("frozenIcon").setVisible(false));
}
@@ -147,13 +154,16 @@ public class RepositoriesPanel extends BasePanel {
row.add(WicketUtils.newBlankImage("accessRestrictionIcon"));
break;
case PUSH:
- row.add(WicketUtils.newImage("accessRestrictionIcon", "lock_go_16x16.png", accessRestrictionTranslations.get(entry.accessRestriction)));
+ row.add(WicketUtils.newImage("accessRestrictionIcon", "lock_go_16x16.png",
+ accessRestrictionTranslations.get(entry.accessRestriction)));
break;
case CLONE:
- row.add(WicketUtils.newImage("accessRestrictionIcon", "lock_pull_16x16.png", accessRestrictionTranslations.get(entry.accessRestriction)));
+ row.add(WicketUtils.newImage("accessRestrictionIcon", "lock_pull_16x16.png",
+ accessRestrictionTranslations.get(entry.accessRestriction)));
break;
case VIEW:
- row.add(WicketUtils.newImage("accessRestrictionIcon", "shield_16x16.png", accessRestrictionTranslations.get(entry.accessRestriction)));
+ row.add(WicketUtils.newImage("accessRestrictionIcon", "shield_16x16.png",
+ accessRestrictionTranslations.get(entry.accessRestriction)));
break;
default:
row.add(WicketUtils.newBlankImage("accessRestrictionIcon"));
@@ -166,10 +176,13 @@ public class RepositoriesPanel extends BasePanel {
row.add(lastChangeLabel);
WicketUtils.setCssClass(lastChangeLabel, TimeUtils.timeAgoCss(entry.lastChange));
- boolean showOwner = user != null && user.getUsername().equalsIgnoreCase(entry.owner);
+ boolean showOwner = user != null && user.username.equalsIgnoreCase(entry.owner);
if (showAdmin) {
- Fragment repositoryLinks = new Fragment("repositoryLinks", "repositoryAdminLinks", this);
- repositoryLinks.add(new BookmarkablePageLink<Void>("editRepository", EditRepositoryPage.class, WicketUtils.newRepositoryParameter(entry.name)));
+ Fragment repositoryLinks = new Fragment("repositoryLinks",
+ "repositoryAdminLinks", this);
+ repositoryLinks.add(new BookmarkablePageLink<Void>("editRepository",
+ EditRepositoryPage.class, WicketUtils
+ .newRepositoryParameter(entry.name)));
Link<Void> deleteLink = new Link<Void>("deleteRepository") {
private static final long serialVersionUID = 1L;
@@ -184,16 +197,21 @@ public class RepositoriesPanel extends BasePanel {
((RepositoriesProvider) dp).remove(entry);
}
} else {
- error(MessageFormat.format("Failed to delete repository ''{0}''!", entry));
+ error(MessageFormat.format("Failed to delete repository ''{0}''!",
+ entry));
}
}
};
- deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format("Delete repository \"{0}\"?", entry)));
+ deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(
+ "Delete repository \"{0}\"?", entry)));
repositoryLinks.add(deleteLink);
row.add(repositoryLinks);
} else if (showOwner) {
- Fragment repositoryLinks = new Fragment("repositoryLinks", "repositoryOwnerLinks", this);
- repositoryLinks.add(new BookmarkablePageLink<Void>("editRepository", EditRepositoryPage.class, WicketUtils.newRepositoryParameter(entry.name)));
+ Fragment repositoryLinks = new Fragment("repositoryLinks",
+ "repositoryOwnerLinks", this);
+ repositoryLinks.add(new BookmarkablePageLink<Void>("editRepository",
+ EditRepositoryPage.class, WicketUtils
+ .newRepositoryParameter(entry.name)));
row.add(repositoryLinks);
} else {
row.add(new Label("repositoryLinks"));
@@ -220,11 +238,11 @@ public class RepositoriesPanel extends BasePanel {
}
}
- private class GroupRepositoryModel extends RepositoryModel {
+ private static class GroupRepositoryModel extends RepositoryModel {
private static final long serialVersionUID = 1L;
- int count = 0;
+ int count;
GroupRepositoryModel(String name, int count) {
super(name, "", "", new Date(0));
@@ -241,7 +259,8 @@ public class RepositoriesPanel extends BasePanel {
repository, description, owner, date;
}
- protected OrderByBorder newSort(String wicketId, SortBy field, SortableDataProvider<?> dp, final DataView<?> dataView) {
+ protected OrderByBorder newSort(String wicketId, SortBy field, SortableDataProvider<?> dp,
+ final DataView<?> dataView) {
return new OrderByBorder(wicketId, field.name(), dp) {
private static final long serialVersionUID = 1L;
@@ -252,7 +271,7 @@ public class RepositoriesPanel extends BasePanel {
};
}
- private class RepositoriesProvider extends ListDataProvider<RepositoryModel> {
+ private static class RepositoriesProvider extends ListDataProvider<RepositoryModel> {
private static final long serialVersionUID = 1L;
@@ -279,7 +298,8 @@ public class RepositoriesPanel extends BasePanel {
}
} else if (index < (getData().size() - 1)) {
// not last element. check next element for group match.
- if (getData().get(index - 1) instanceof GroupRepositoryModel && getData().get(index + 1) instanceof GroupRepositoryModel) {
+ if (getData().get(index - 1) instanceof GroupRepositoryModel
+ && getData().get(index + 1) instanceof GroupRepositoryModel) {
// repository is sandwiched by group headers so this
// repository is the only element in the group. remove
// group.
@@ -304,9 +324,11 @@ public class RepositoriesPanel extends BasePanel {
}
}
- private class SortableRepositoriesProvider extends SortableDataProvider<RepositoryModel> {
+ private static class SortableRepositoriesProvider extends SortableDataProvider<RepositoryModel> {
+
private static final long serialVersionUID = 1L;
- private List<RepositoryModel> list = null;
+
+ private List<RepositoryModel> list;
protected SortableRepositoriesProvider(List<RepositoryModel> list) {
this.list = list;
@@ -319,8 +341,9 @@ public class RepositoriesPanel extends BasePanel {
@Override
public int size() {
- if (list == null)
+ if (list == null) {
return 0;
+ }
return list.size();
}
@@ -339,8 +362,9 @@ public class RepositoriesPanel extends BasePanel {
Collections.sort(list, new Comparator<RepositoryModel>() {
@Override
public int compare(RepositoryModel o1, RepositoryModel o2) {
- if (asc)
+ if (asc) {
return o1.lastChange.compareTo(o2.lastChange);
+ }
return o2.lastChange.compareTo(o1.lastChange);
}
});
@@ -348,8 +372,9 @@ public class RepositoriesPanel extends BasePanel {
Collections.sort(list, new Comparator<RepositoryModel>() {
@Override
public int compare(RepositoryModel o1, RepositoryModel o2) {
- if (asc)
+ if (asc) {
return o1.name.compareTo(o2.name);
+ }
return o2.name.compareTo(o1.name);
}
});
@@ -357,8 +382,9 @@ public class RepositoriesPanel extends BasePanel {
Collections.sort(list, new Comparator<RepositoryModel>() {
@Override
public int compare(RepositoryModel o1, RepositoryModel o2) {
- if (asc)
+ if (asc) {
return o1.owner.compareTo(o2.owner);
+ }
return o2.owner.compareTo(o1.owner);
}
});
@@ -366,8 +392,9 @@ public class RepositoriesPanel extends BasePanel {
Collections.sort(list, new Comparator<RepositoryModel>() {
@Override
public int compare(RepositoryModel o1, RepositoryModel o2) {
- if (asc)
+ if (asc) {
return o1.description.compareTo(o2.description);
+ }
return o2.description.compareTo(o1.description);
}
});
diff --git a/src/com/gitblit/wicket/panels/SearchPanel.java b/src/com/gitblit/wicket/panels/SearchPanel.java
index 51244cf8..8c63c423 100644
--- a/src/com/gitblit/wicket/panels/SearchPanel.java
+++ b/src/com/gitblit/wicket/panels/SearchPanel.java
@@ -43,12 +43,13 @@ public class SearchPanel extends BasePanel {
private static final long serialVersionUID = 1L;
- private boolean hasMore = false;
+ private boolean hasMore;
- public SearchPanel(String wicketId, final String repositoryName, final String objectId, final String value, SearchType searchType, Repository r, int limit, int pageOffset) {
+ public SearchPanel(String wicketId, final String repositoryName, final String objectId,
+ final String value, SearchType searchType, Repository r, int limit, int pageOffset) {
super(wicketId);
boolean pageResults = limit <= 0;
- int itemsPerPage = GitBlit.self().settings().getInteger(Keys.web.itemsPerPage, 50);
+ int itemsPerPage = GitBlit.getInteger(Keys.web.itemsPerPage, 50);
if (itemsPerPage <= 1) {
itemsPerPage = 50;
}
@@ -59,7 +60,8 @@ public class SearchPanel extends BasePanel {
List<RevCommit> commits;
if (pageResults) {
// Paging result set
- commits = JGitUtils.searchRevlogs(r, objectId, value, searchType, pageOffset * itemsPerPage, itemsPerPage);
+ commits = JGitUtils.searchRevlogs(r, objectId, value, searchType, pageOffset
+ * itemsPerPage, itemsPerPage);
} else {
// Fixed size result set
commits = JGitUtils.searchRevlogs(r, objectId, value, searchType, 0, limit);
@@ -70,12 +72,14 @@ public class SearchPanel extends BasePanel {
hasMore = commits.size() >= itemsPerPage;
// header
- add(new LinkPanel("header", "title", commit == null ? "":commit.getShortMessage(), CommitPage.class, WicketUtils.newObjectParameter(repositoryName, commit == null ? "":commit.getName())));
+ add(new LinkPanel("header", "title", commit == null ? "" : commit.getShortMessage(),
+ CommitPage.class, WicketUtils.newObjectParameter(repositoryName,
+ commit == null ? "" : commit.getName())));
ListDataProvider<RevCommit> dp = new ListDataProvider<RevCommit>(commits);
DataView<RevCommit> searchView = new DataView<RevCommit>("commit", dp) {
private static final long serialVersionUID = 1L;
- int counter = 0;
+ int counter;
public void populateItem(final Item<RevCommit> item) {
final RevCommit entry = item.getModelObject();
@@ -85,7 +89,9 @@ public class SearchPanel extends BasePanel {
// author search link
String author = entry.getAuthorIdent().getName();
- LinkPanel authorLink = new LinkPanel("commitAuthor", "list", author, SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId, author, SearchType.AUTHOR));
+ LinkPanel authorLink = new LinkPanel("commitAuthor", "list", author,
+ SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId,
+ author, SearchType.AUTHOR));
setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);
item.add(authorLink);
@@ -98,8 +104,9 @@ public class SearchPanel extends BasePanel {
String shortMessage = entry.getShortMessage();
String trimmedMessage = StringUtils.trimShortLog(shortMessage);
- // TODO highlight matches
- LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject", trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName()));
+ LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject",
+ trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(
+ repositoryName, entry.getName()));
if (!shortMessage.equals(trimmedMessage)) {
WicketUtils.setHtmlTooltip(shortlog, shortMessage);
}
@@ -107,9 +114,12 @@ public class SearchPanel extends BasePanel {
item.add(new RefsPanel("commitRefs", repositoryName, entry, allRefs));
- item.add(new BookmarkablePageLink<Void>("commit", CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
- item.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
- item.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
+ item.add(new BookmarkablePageLink<Void>("commit", CommitPage.class, WicketUtils
+ .newObjectParameter(repositoryName, entry.getName())));
+ item.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry.getName())));
+ item.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils
+ .newObjectParameter(repositoryName, entry.getName())));
WicketUtils.setAlternatingBackground(item, counter);
counter++;
diff --git a/src/com/gitblit/wicket/panels/TagsPanel.java b/src/com/gitblit/wicket/panels/TagsPanel.java
index d63069fe..1d8eec7d 100644
--- a/src/com/gitblit/wicket/panels/TagsPanel.java
+++ b/src/com/gitblit/wicket/panels/TagsPanel.java
@@ -49,17 +49,19 @@ public class TagsPanel extends BasePanel {
if (maxCount > 0) {
// summary page
// show tags page link
- add(new LinkPanel("header", "title", new StringResourceModel("gb.tags", this, null), TagsPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
+ add(new LinkPanel("header", "title", new StringResourceModel("gb.tags", this, null),
+ TagsPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
} else {
// tags page
// show repository summary page link
- add(new LinkPanel("header", "title", repositoryName, SummaryPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
+ add(new LinkPanel("header", "title", repositoryName, SummaryPage.class,
+ WicketUtils.newRepositoryParameter(repositoryName)));
}
ListDataProvider<RefModel> tagsDp = new ListDataProvider<RefModel>(tags);
DataView<RefModel> tagView = new DataView<RefModel>("tag", tagsDp) {
private static final long serialVersionUID = 1L;
- int counter = 0;
+ int counter;
public void populateItem(final Item<RefModel> item) {
RefModel entry = item.getModelObject();
@@ -72,8 +74,10 @@ public class TagsPanel extends BasePanel {
} else {
item.add(WicketUtils.newBlankImage("tagIcon"));
}
-
- item.add(new LinkPanel("tagName", "list name", entry.getDisplayName(), CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getCommitId().getName())));
+
+ item.add(new LinkPanel("tagName", "list name", entry.displayName, CommitPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry.getCommitId()
+ .getName())));
String message;
if (maxCount > 0) {
message = StringUtils.trimString(entry.getShortLog(), 40);
@@ -81,17 +85,29 @@ public class TagsPanel extends BasePanel {
message = entry.getShortLog();
}
if (entry.isAnnotatedTag()) {
- item.add(new LinkPanel("tagDescription", "list", message, TagPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getObjectId().getName())));
+ item.add(new LinkPanel("tagDescription", "list", message, TagPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry.getObjectId()
+ .getName())));
Fragment fragment = new Fragment("tagLinks", "annotatedLinks", this);
- fragment.add(new BookmarkablePageLink<Void>("view", TagPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getObjectId().getName())).setEnabled(entry.isAnnotatedTag()));
- fragment.add(new BookmarkablePageLink<Void>("commit", CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getCommitId().getName())));
- fragment.add(new BookmarkablePageLink<Void>("log", LogPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
+ fragment.add(new BookmarkablePageLink<Void>("view", TagPage.class, WicketUtils
+ .newObjectParameter(repositoryName, entry.getObjectId().getName()))
+ .setEnabled(entry.isAnnotatedTag()));
+ fragment.add(new BookmarkablePageLink<Void>("commit", CommitPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry.getCommitId()
+ .getName())));
+ fragment.add(new BookmarkablePageLink<Void>("log", LogPage.class, WicketUtils
+ .newObjectParameter(repositoryName, entry.getName())));
item.add(fragment);
} else {
- item.add(new LinkPanel("tagDescription", "list", message, CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getObjectId().getName())));
+ item.add(new LinkPanel("tagDescription", "list", message, CommitPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry.getObjectId()
+ .getName())));
Fragment fragment = new Fragment("tagLinks", "lightweightLinks", this);
- fragment.add(new BookmarkablePageLink<Void>("commit", CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getCommitId().getName())));
- fragment.add(new BookmarkablePageLink<Void>("log", LogPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName())));
+ fragment.add(new BookmarkablePageLink<Void>("commit", CommitPage.class,
+ WicketUtils.newObjectParameter(repositoryName, entry.getCommitId()
+ .getName())));
+ fragment.add(new BookmarkablePageLink<Void>("log", LogPage.class, WicketUtils
+ .newObjectParameter(repositoryName, entry.getName())));
item.add(fragment);
}
@@ -103,7 +119,8 @@ public class TagsPanel extends BasePanel {
if (tags.size() < maxCount || maxCount <= 0) {
add(new Label("allTags", "").setVisible(false));
} else {
- add(new LinkPanel("allTags", "link", new StringResourceModel("gb.allTags", this, null), TagsPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
+ add(new LinkPanel("allTags", "link", new StringResourceModel("gb.allTags", this, null),
+ TagsPage.class, WicketUtils.newRepositoryParameter(repositoryName)));
}
}
}
diff --git a/src/com/gitblit/wicket/panels/UsersPanel.java b/src/com/gitblit/wicket/panels/UsersPanel.java
index c227ef94..27bc334b 100644
--- a/src/com/gitblit/wicket/panels/UsersPanel.java
+++ b/src/com/gitblit/wicket/panels/UsersPanel.java
@@ -42,10 +42,11 @@ public class UsersPanel extends BasePanel {
add(adminLinks.setVisible(showAdmin));
final List<String> usernames = GitBlit.self().getAllUsernames();
- DataView<String> usersView = new DataView<String>("userRow", new ListDataProvider<String>(usernames)) {
+ DataView<String> usersView = new DataView<String>("userRow", new ListDataProvider<String>(
+ usernames)) {
private static final long serialVersionUID = 1L;
- private int counter = 0;
-
+ private int counter;
+
@Override
protected void onBeforeRender() {
super.onBeforeRender();
@@ -54,11 +55,13 @@ public class UsersPanel extends BasePanel {
public void populateItem(final Item<String> item) {
final String entry = item.getModelObject();
- LinkPanel editLink = new LinkPanel("username", "list", entry, EditUserPage.class, WicketUtils.newUsernameParameter(entry));
+ LinkPanel editLink = new LinkPanel("username", "list", entry, EditUserPage.class,
+ WicketUtils.newUsernameParameter(entry));
WicketUtils.setHtmlTooltip(editLink, getString("gb.edit") + " " + entry);
item.add(editLink);
Fragment userLinks = new Fragment("userLinks", "userAdminLinks", this);
- userLinks.add(new BookmarkablePageLink<Void>("editUser", EditUserPage.class, WicketUtils.newUsernameParameter(entry)));
+ userLinks.add(new BookmarkablePageLink<Void>("editUser", EditUserPage.class,
+ WicketUtils.newUsernameParameter(entry)));
Link<Void> deleteLink = new Link<Void>("deleteUser") {
private static final long serialVersionUID = 1L;
@@ -73,7 +76,8 @@ public class UsersPanel extends BasePanel {
}
}
};
- deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format("Delete user \"{0}\"?", entry)));
+ deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(
+ "Delete user \"{0}\"?", entry)));
userLinks.add(deleteLink);
item.add(userLinks);