summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-09-30 17:20:15 -0400
committerJames Moger <james.moger@gitblit.com>2011-09-30 17:20:15 -0400
commit94750e9faea7e383db64df6d2ac4290eaa267770 (patch)
treebde723962baf325c17f946374df2df609756ece2
parentfd6ac68c0b1136182b5d713ec88ea94e26c4a76d (diff)
downloadgitblit-94750e9faea7e383db64df6d2ac4290eaa267770.tar.gz
gitblit-94750e9faea7e383db64df6d2ac4290eaa267770.zip
More Bootstrap improvements.
* Strip leading group name from repositories page. * Put topbars on all pages. * Properly sort repositories in all locations. * White Gitblit logo.
-rw-r--r--docs/gitblit_logo_white.xcfbin0 -> 48611 bytes
-rw-r--r--resources/bootstrap.gb.css44
-rw-r--r--resources/gitblt2_white.pngbin0 -> 4408 bytes
-rw-r--r--resources/gitblt_25_white.pngbin0 -> 2150 bytes
-rw-r--r--src/com/gitblit/FederationServlet.java1
-rw-r--r--src/com/gitblit/models/FederationModel.java17
-rw-r--r--src/com/gitblit/models/RepositoryModel.java3
-rw-r--r--src/com/gitblit/utils/JGitUtils.java2
-rw-r--r--src/com/gitblit/utils/StringUtils.java42
-rw-r--r--src/com/gitblit/wicket/WicketUtils.java2
-rw-r--r--src/com/gitblit/wicket/pages/BasePage.html4
-rw-r--r--src/com/gitblit/wicket/pages/BasePage.java6
-rw-r--r--src/com/gitblit/wicket/pages/BlamePage.html4
-rw-r--r--src/com/gitblit/wicket/pages/ChangePasswordPage.html19
-rw-r--r--src/com/gitblit/wicket/pages/ChangePasswordPage.java12
-rw-r--r--src/com/gitblit/wicket/pages/EditRepositoryPage.html8
-rw-r--r--src/com/gitblit/wicket/pages/RepositoriesPage.java15
-rw-r--r--src/com/gitblit/wicket/pages/RepositoryPage.html4
-rw-r--r--src/com/gitblit/wicket/pages/RepositoryPage.java6
-rw-r--r--src/com/gitblit/wicket/pages/RootPage.html4
-rw-r--r--src/com/gitblit/wicket/pages/StandardPage.html6
-rw-r--r--src/com/gitblit/wicket/pages/StandardPage.java7
-rw-r--r--src/com/gitblit/wicket/panels/RepositoriesPanel.html2
-rw-r--r--src/com/gitblit/wicket/panels/RepositoriesPanel.java18
24 files changed, 147 insertions, 79 deletions
diff --git a/docs/gitblit_logo_white.xcf b/docs/gitblit_logo_white.xcf
new file mode 100644
index 00000000..d0d397c2
--- /dev/null
+++ b/docs/gitblit_logo_white.xcf
Binary files differ
diff --git a/resources/bootstrap.gb.css b/resources/bootstrap.gb.css
index 2ea2b5c2..f7c2f8ee 100644
--- a/resources/bootstrap.gb.css
+++ b/resources/bootstrap.gb.css
@@ -1,7 +1,33 @@
-.topbar{
+body, input, select {
+ color: #202020;
+}
+
+ul, ol {
+ margin:0 !important;
+}
+
+hr {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+.page-header h1, .page-header h2 {
+ color: #0069D6;
+}
+
+.topbar {
height:40px !important;
}
+.topbar a {
+ color: white;
+ text-shadow: none;
+}
+
+.nav a:hover {
+ color: #abd4ff !important;
+}
+
.topbar-inner,.topbar .fill{
height:40px !important;
background-color:#000050;
@@ -85,7 +111,7 @@ pre.prettyprint ol {
a.list {
text-decoration: none;
- color: #000000;
+ color: inherit;
}
a.list.subject {
@@ -489,8 +515,8 @@ table.repositories tr.group td {
color: black;
background-color: #ddd;
padding-left: 5px;
- border-top: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
+ border-top: 1px solid #aaa;
+ border-bottom: 1px solid #aaa;
}
table.palette { border:0; width: 0 !important; }
@@ -534,8 +560,6 @@ table.gitnotes td.message {
}
table.annotated {
- width: 100%;
- border: 1px solid #bbb;
}
table.annotated tr.even {
@@ -543,7 +567,7 @@ table.annotated tr.even {
}
table.annotated tr.odd {
- background-color: #fdfbdf;
+ background-color: #f5f5f5;
}
table.annotated td {
@@ -551,6 +575,11 @@ table.annotated td {
border: 0;
}
+tr th a { background-position: right; padding-right: 15px; background-repeat:no-repeat; }
+tr th.wicket_orderDown a {background-image: url(arrow_down.png); }
+tr th.wicket_orderUp a { background-image: url(arrow_up.png); }
+tr th.wicket_orderNone a { background-image: url(arrow_off.png); }
+
tr.light {
background-color: #ffffff;
}
@@ -661,6 +690,7 @@ span .localBranch {
.feedbackPanelERROR, .feedbackPanelINFO {
list-style: none;
+ line-height: 35px;
}
.feedbackPanelINFO span, .feedbackPanelERROR span {
diff --git a/resources/gitblt2_white.png b/resources/gitblt2_white.png
new file mode 100644
index 00000000..f4c5463d
--- /dev/null
+++ b/resources/gitblt2_white.png
Binary files differ
diff --git a/resources/gitblt_25_white.png b/resources/gitblt_25_white.png
new file mode 100644
index 00000000..eeea0214
--- /dev/null
+++ b/resources/gitblt_25_white.png
Binary files differ
diff --git a/src/com/gitblit/FederationServlet.java b/src/com/gitblit/FederationServlet.java
index 7dc5d6a9..2726a8ac 100644
--- a/src/com/gitblit/FederationServlet.java
+++ b/src/com/gitblit/FederationServlet.java
@@ -33,7 +33,6 @@ import com.gitblit.Constants.FederationRequest;
import com.gitblit.Constants.FederationToken;
import com.gitblit.models.FederationModel;
import com.gitblit.models.FederationProposal;
-import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
import com.gitblit.utils.FederationUtils;
import com.gitblit.utils.HttpUtils;
diff --git a/src/com/gitblit/models/FederationModel.java b/src/com/gitblit/models/FederationModel.java
index d67ae561..61c8576b 100644
--- a/src/com/gitblit/models/FederationModel.java
+++ b/src/com/gitblit/models/FederationModel.java
@@ -198,22 +198,7 @@ public class FederationModel implements Serializable, Comparable<FederationModel
@Override
public int compareTo(RepositoryStatus o) {
if (status.equals(o.status)) {
- // sort root repositories first, alphabetically
- // then sort grouped repositories, alphabetically
- int s1 = name.indexOf('/');
- int s2 = o.name.indexOf('/');
- if (s1 == -1 && s2 == -1) {
- // neither grouped
- return name.compareTo(o.name);
- } else if (s1 > -1 && s2 > -1) {
- // both grouped
- return name.compareTo(o.name);
- } else if (s1 == -1) {
- return -1;
- } else if (s2 == -1) {
- return 1;
- }
- return 0;
+ return StringUtils.compareRepositoryNames(name, o.name);
}
return status.compareTo(o.status);
}
diff --git a/src/com/gitblit/models/RepositoryModel.java b/src/com/gitblit/models/RepositoryModel.java
index e85fd6a5..d70866fb 100644
--- a/src/com/gitblit/models/RepositoryModel.java
+++ b/src/com/gitblit/models/RepositoryModel.java
@@ -22,6 +22,7 @@ import java.util.List;
import com.gitblit.Constants.AccessRestrictionType;
import com.gitblit.Constants.FederationStrategy;
+import com.gitblit.utils.StringUtils;
/**
* RepositoryModel is a serializable model class that represents a Gitblit
@@ -74,6 +75,6 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel
@Override
public int compareTo(RepositoryModel o) {
- return name.compareTo(o.name);
+ return StringUtils.compareRepositoryNames(name, o.name);
}
} \ No newline at end of file
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index bfbc6240..80147d46 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -299,7 +299,7 @@ public class JGitUtils {
}
list.addAll(getRepositoryList(repositoriesFolder.getAbsolutePath(), repositoriesFolder,
exportAll, searchSubfolders));
- Collections.sort(list);
+ StringUtils.sortRepositorynames(list);
return list;
}
diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java
index 77d3cbbc..f4e9256f 100644
--- a/src/com/gitblit/utils/StringUtils.java
+++ b/src/com/gitblit/utils/StringUtils.java
@@ -19,6 +19,8 @@ import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import java.util.regex.PatternSyntaxException;
@@ -395,4 +397,44 @@ public class StringUtils {
}
return false;
}
+
+ /**
+ * Compare two repository names for proper group sorting.
+ *
+ * @param r1
+ * @param r2
+ * @return
+ */
+ public static int compareRepositoryNames(String r1, String r2) {
+ // sort root repositories first, alphabetically
+ // then sort grouped repositories, alphabetically
+ int s1 = r1.indexOf('/');
+ int s2 = r2.indexOf('/');
+ if (s1 == -1 && s2 == -1) {
+ // neither grouped
+ return r1.compareTo(r2);
+ } else if (s1 > -1 && s2 > -1) {
+ // both grouped
+ return r1.compareTo(r2);
+ } else if (s1 == -1) {
+ return -1;
+ } else if (s2 == -1) {
+ return 1;
+ }
+ return 0;
+ }
+
+ /**
+ * Sort grouped repository names.
+ *
+ * @param list
+ */
+ public static void sortRepositorynames(List<String> list) {
+ Collections.sort(list, new Comparator<String>() {
+ @Override
+ public int compare(String o1, String o2) {
+ return compareRepositoryNames(o1, o2);
+ }
+ });
+ }
}
diff --git a/src/com/gitblit/wicket/WicketUtils.java b/src/com/gitblit/wicket/WicketUtils.java
index 36f74a15..3ffd6cd7 100644
--- a/src/com/gitblit/wicket/WicketUtils.java
+++ b/src/com/gitblit/wicket/WicketUtils.java
@@ -102,7 +102,7 @@ public class WicketUtils {
}
public static void setAlternatingBackground(Component c, int i) {
- String clazz = i % 2 == 0 ? "dark" : "light";
+ String clazz = i % 2 == 0 ? "light" : "dark";
setCssClass(c, clazz);
}
diff --git a/src/com/gitblit/wicket/pages/BasePage.html b/src/com/gitblit/wicket/pages/BasePage.html
index 3fa1a4d5..a089e2a9 100644
--- a/src/com/gitblit/wicket/pages/BasePage.html
+++ b/src/com/gitblit/wicket/pages/BasePage.html
@@ -22,7 +22,9 @@
<!-- page footer -->
<div class="page_footer">
<div style="float:right">
- <span wicket:id="gbVersion"></span>
+ <a title="gitblit homepage" href="http://gitblit.com/">
+ <span wicket:id="gbVersion"></span>
+ </a>
</div>
<div wicket:id="userPanel">[user panel]</div>
</div>
diff --git a/src/com/gitblit/wicket/pages/BasePage.java b/src/com/gitblit/wicket/pages/BasePage.java
index 0cb91d57..d31979dd 100644
--- a/src/com/gitblit/wicket/pages/BasePage.java
+++ b/src/com/gitblit/wicket/pages/BasePage.java
@@ -29,6 +29,7 @@ import org.apache.wicket.RestartResponseException;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.protocol.http.WebRequest;
@@ -44,6 +45,7 @@ import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.models.UserModel;
import com.gitblit.wicket.GitBlitWebSession;
+import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.panels.LinkPanel;
public abstract class BasePage extends WebPage {
@@ -92,6 +94,10 @@ public abstract class BasePage extends WebPage {
add(new Label("title", getServerName()));
}
+ ExternalLink rootLink = new ExternalLink("rootLink", urlFor(RepositoriesPage.class, null).toString());
+ WicketUtils.setHtmlTooltip(rootLink, GitBlit.getString(Keys.web.siteName, Constants.NAME));
+ add(rootLink);
+
// Feedback panel for info, warning, and non-fatal error messages
add(new FeedbackPanel("feedback"));
diff --git a/src/com/gitblit/wicket/pages/BlamePage.html b/src/com/gitblit/wicket/pages/BlamePage.html
index 2e20c189..ccbfcecb 100644
--- a/src/com/gitblit/wicket/pages/BlamePage.html
+++ b/src/com/gitblit/wicket/pages/BlamePage.html
@@ -19,12 +19,12 @@
<div wicket:id="breadcrumbs">[breadcrumbs]</div>
<!-- blame content -->
- <table class="annotated" style="border-top: 0px; margin-bottom:5px;">
+ <table class="annotated" style="margin-bottom:5px;">
<tbody>
<tr>
<th>Commit</th>
<th>Line</th>
- <th>Data</th>
+ <th>Content</th>
</tr>
<tr wicket:id="annotation">
<td><span class="sha1" wicket:id="commit"></span></td>
diff --git a/src/com/gitblit/wicket/pages/ChangePasswordPage.html b/src/com/gitblit/wicket/pages/ChangePasswordPage.html
index 031352eb..938e0eca 100644
--- a/src/com/gitblit/wicket/pages/ChangePasswordPage.html
+++ b/src/com/gitblit/wicket/pages/ChangePasswordPage.html
@@ -4,20 +4,9 @@
xml:lang="en"
lang="en">
- <!-- Head with Wicket-controlled resources in this package -->
- <wicket:head>
- <title wicket:id="title">[page title]</title>
- <link rel="stylesheet" type="text/css" href="gitblit.css"/>
- <link rel="shortcut icon" href="gitblt-favicon.png" type="image/png" />
- </wicket:head>
-
+ <wicket:extend>
<body onload="document.getElementById('password').focus();">
<div>
- <div style="padding-top: 10px;text-align:center;">
- <img src="gitblt_25.png" alt="Gitblit"/><br/>
- <div style="padding-top:30px;font-weight:bold;" wicket:id="name"></div>
- </div>
- <p/>
<form style="text-align:center;" wicket:id="passwordForm">
<center>
<table class="plain">
@@ -30,11 +19,11 @@
<td class="edit"><input type="password" wicket:id="confirmPassword" size="30" tabindex="2" /></td>
</tr>
</table>
- <input type="submit" wicket:message="value:gb.save" wicket:id="save" tabindex="3" />
- <input type="submit" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="4" />
- <div style="padding-top:10px;" wicket:id="feedback"></div>
+ <input class="btn" type="submit" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="3" />
+ <input class="btn primary" type="submit" wicket:message="value:gb.save" wicket:id="save" tabindex="4" />
</center>
</form>
</div>
</body>
+ </wicket:extend>
</html> \ No newline at end of file
diff --git a/src/com/gitblit/wicket/pages/ChangePasswordPage.java b/src/com/gitblit/wicket/pages/ChangePasswordPage.java
index 054b3430..660a8131 100644
--- a/src/com/gitblit/wicket/pages/ChangePasswordPage.java
+++ b/src/com/gitblit/wicket/pages/ChangePasswordPage.java
@@ -18,17 +18,13 @@ package com.gitblit.wicket.pages;
import java.text.MessageFormat;
import org.apache.wicket.RestartResponseException;
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.StatelessForm;
-import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.protocol.http.WebResponse;
-import com.gitblit.Constants;
import com.gitblit.GitBlit;
import com.gitblit.GitBlitException;
import com.gitblit.Keys;
@@ -36,7 +32,7 @@ import com.gitblit.models.UserModel;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.GitBlitWebSession;
-public class ChangePasswordPage extends WebPage {
+public class ChangePasswordPage extends StandardPage {
IModel<String> password = new Model<String>("");
IModel<String> confirmPassword = new Model<String>("");
@@ -54,10 +50,7 @@ public class ChangePasswordPage extends WebPage {
// no authentication enabled
throw new RestartResponseException(getApplication().getHomePage());
}
-
- add(new Label("title", GitBlit.getString(Keys.web.siteName, Constants.NAME)));
- add(new Label("name", getString("gb.changePassword") + ": "
- + GitBlitWebSession.get().getUser().username));
+ setupPage(getString("gb.changePassword"), GitBlitWebSession.get().getUser().username);
StatelessForm<Void> form = new StatelessForm<Void>("passwordForm") {
@@ -115,7 +108,6 @@ public class ChangePasswordPage extends WebPage {
confirmPassword);
confirmPasswordField.setResetPassword(false);
form.add(confirmPasswordField);
- form.add(new FeedbackPanel("feedback"));
form.add(new Button("save"));
Button cancel = new Button("cancel") {
diff --git a/src/com/gitblit/wicket/pages/EditRepositoryPage.html b/src/com/gitblit/wicket/pages/EditRepositoryPage.html
index f9a0f793..7f09f75c 100644
--- a/src/com/gitblit/wicket/pages/EditRepositoryPage.html
+++ b/src/com/gitblit/wicket/pages/EditRepositoryPage.html
@@ -12,19 +12,19 @@
<tbody>
<tr><th><wicket:message key="gb.name"></wicket:message></th><td class="edit"><input class="span6" type="text" wicket:id="name" id="name" size="40" tabindex="1" /> &nbsp;<i><wicket:message key="gb.nameDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.description"></wicket:message></th><td class="edit"><input class="span6" type="text" wicket:id="description" size="40" tabindex="2" /></td></tr>
- <tr><th><wicket:message key="gb.origin"></wicket:message></th><td class="edit"><input class="span6" type="text" wicket:id="origin" size="80" tabindex="3" /></td></tr>
+ <tr><th><wicket:message key="gb.origin"></wicket:message></th><td class="edit"><input class="span7" type="text" wicket:id="origin" size="80" tabindex="3" /></td></tr>
<tr><th><wicket:message key="gb.owner"></wicket:message></th><td class="edit"><select wicket:id="owner" tabindex="4" /> &nbsp;<i><wicket:message key="gb.ownerDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.enableTickets"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="useTickets" tabindex="5" /> &nbsp;<i><wicket:message key="gb.useTicketsDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.enableDocs"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="useDocs" tabindex="6" /> &nbsp;<i><wicket:message key="gb.useDocsDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.showRemoteBranches"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="showRemoteBranches" tabindex="7" /> &nbsp;<i><wicket:message key="gb.showRemoteBranchesDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.showReadme"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="showReadme" tabindex="8" /> &nbsp;<i><wicket:message key="gb.showReadmeDescription"></wicket:message></i></td></tr>
<tr><th><wicket:message key="gb.isFrozen"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="isFrozen" tabindex="9" /> &nbsp;<i><wicket:message key="gb.isFrozenDescription"></wicket:message></i></td></tr>
- <tr><td style="padding-top:10px;" colspan="2"><hr></hr></td></tr>
+ <tr><td colspan="2"><hr></hr></td></tr>
<tr><th><wicket:message key="gb.accessRestriction"></wicket:message></th><td class="edit"><select class="span6" wicket:id="accessRestriction" tabindex="10" /></td></tr>
<tr><th style="vertical-align: top;"><wicket:message key="gb.permittedUsers"></wicket:message></th><td style="padding:2px;"><span wicket:id="users"></span></td></tr>
- <tr><td style="padding-top:10px;" colspan="2"><hr></hr></td></tr>
+ <tr><td colspan="2"><hr></hr></td></tr>
<tr><th><wicket:message key="gb.federationStrategy"></wicket:message></th><td class="edit"><select class="span6" wicket:id="federationStrategy" tabindex="11" /></td></tr>
- <tr><th style="vertical-align: top;"><wicket:message key="gb.federationSets"></wicket:message></th><td style="padding:2px;"><span wicket:id="federationSets"></span></td></tr>
+ <tr><th style="vertical-align: top;"><wicket:message key="gb.federationSets"></wicket:message></th><td style="padding:2px;"><span wicket:id="federationSets"></span></td></tr>
<tr><th></th><td class="editButton"><input class="btn" type="submit" value="Cancel" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="12" /> &nbsp; <input class="btn primary" type="submit" value="Save" wicket:message="value:gb.save" wicket:id="save" tabindex="13" /> </td></tr>
</tbody>
</table>
diff --git a/src/com/gitblit/wicket/pages/RepositoriesPage.java b/src/com/gitblit/wicket/pages/RepositoriesPage.java
index ce532a76..5339760e 100644
--- a/src/com/gitblit/wicket/pages/RepositoriesPage.java
+++ b/src/com/gitblit/wicket/pages/RepositoriesPage.java
@@ -34,11 +34,11 @@ import com.gitblit.wicket.panels.RepositoriesPanel;
public class RepositoriesPage extends RootPage {
public RepositoriesPage() {
- super();
+ super();
// Load the markdown welcome message
String messageSource = GitBlit.getString(Keys.web.repositoriesMessage, "gitblit");
- String message = "<br/>";
+ String message = "";
if (messageSource.equalsIgnoreCase("gitblit")) {
// Read default welcome message
try {
@@ -69,8 +69,15 @@ public class RepositoriesPage extends RootPage {
}
}
Component repositoriesMessage = new Label("repositoriesMessage", message)
- .setEscapeModelStrings(false);
+ .setEscapeModelStrings(false).setVisible(message.length() > 0);
add(repositoriesMessage);
- add(new RepositoriesPanel("repositoriesPanel", showAdmin, null, getAccessRestrictions()));
+ RepositoriesPanel repositories = new RepositoriesPanel("repositoriesPanel", showAdmin,
+ null, getAccessRestrictions());
+ // push the panel down if we are hiding the admin controls and the
+ // welcome message
+ if (!showAdmin && !repositoriesMessage.isVisible()) {
+ WicketUtils.setCssStyle(repositories, "padding-top:5px;");
+ }
+ add(repositories);
}
}
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.html b/src/com/gitblit/wicket/pages/RepositoryPage.html
index 8a8b177e..100016f1 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.html
+++ b/src/com/gitblit/wicket/pages/RepositoryPage.html
@@ -12,8 +12,8 @@
<div class="topbar">
<div class="fill">
<div class="container">
- <a class="brand" title="gitblit homepage" href="http://gitblit.com/">
- <img src="gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>
+ <a class="brand" wicket:id="rootLink">
+ <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>
</a>
<ul class="nav">
<li><a wicket:id="repositories"><wicket:message key="gb.repositories"></wicket:message></a></li>
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.java b/src/com/gitblit/wicket/pages/RepositoryPage.java
index af29f591..777401a1 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/com/gitblit/wicket/pages/RepositoryPage.java
@@ -137,7 +137,7 @@ public abstract class RepositoryPage extends BasePage {
PageRegistration pageReg = registeredPages.get(extra);
item.add(new LinkPanel("extraLink", null, getString(pageReg.translationKey),
pageReg.pageClass, WicketUtils.newRepositoryParameter(repositoryName))
- .setEnabled(!extra.equals(pageWicketId)));
+ /*.setEnabled(!extra.equals(pageWicketId))*/);
}
};
add(extrasView);
@@ -182,8 +182,8 @@ public abstract class RepositoryPage extends BasePage {
if (!StringUtils.isEmpty(wicketId)) {
Component c = get(wicketId);
if (c != null) {
- //c.setEnabled(false);
- WicketUtils.setCssClass(c, "active");
+// c.setEnabled(false);
+// WicketUtils.setCssClass(c, "selected");
}
}
}
diff --git a/src/com/gitblit/wicket/pages/RootPage.html b/src/com/gitblit/wicket/pages/RootPage.html
index 59a0fe14..0fa6cfc6 100644
--- a/src/com/gitblit/wicket/pages/RootPage.html
+++ b/src/com/gitblit/wicket/pages/RootPage.html
@@ -8,8 +8,8 @@
<div class="topbar">
<div class="fill">
<div class="container">
- <a class="brand" title="gitblit homepage" href="http://gitblit.com/">
- <img src="gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>
+ <a class="brand" wicket:id="rootLink">
+ <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>
</a>
<ul class="nav">
diff --git a/src/com/gitblit/wicket/pages/StandardPage.html b/src/com/gitblit/wicket/pages/StandardPage.html
index cb6dcd5c..14ec15c8 100644
--- a/src/com/gitblit/wicket/pages/StandardPage.html
+++ b/src/com/gitblit/wicket/pages/StandardPage.html
@@ -10,9 +10,9 @@
<div class="topbar">
<div class="fill">
<div class="container">
- <a class="brand" title="gitblit homepage" href="http://gitblit.com/">
- <img src="gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>
- </a>
+ <a class="brand" wicket:id="rootLink">
+ <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>
+ </a>
</div>
</div>
</div>
diff --git a/src/com/gitblit/wicket/pages/StandardPage.java b/src/com/gitblit/wicket/pages/StandardPage.java
index ff16b631..45989317 100644
--- a/src/com/gitblit/wicket/pages/StandardPage.java
+++ b/src/com/gitblit/wicket/pages/StandardPage.java
@@ -18,6 +18,8 @@ package com.gitblit.wicket.pages;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.basic.Label;
+import com.gitblit.utils.StringUtils;
+
public abstract class StandardPage extends BasePage {
public StandardPage() {
@@ -34,7 +36,10 @@ public abstract class StandardPage extends BasePage {
protected void setupPage(String pageName, String subName) {
add(new Label("pageName", pageName));
- add(new Label("pageSubName", "/ " + subName));
+ if (!StringUtils.isEmpty(subName)) {
+ subName = "/ " + subName;
+ }
+ add(new Label("pageSubName", subName));
super.setupPage("", pageName);
}
}
diff --git a/src/com/gitblit/wicket/panels/RepositoriesPanel.html b/src/com/gitblit/wicket/panels/RepositoriesPanel.html
index 11484e23..41741e89 100644
--- a/src/com/gitblit/wicket/panels/RepositoriesPanel.html
+++ b/src/com/gitblit/wicket/panels/RepositoriesPanel.html
@@ -71,7 +71,7 @@
</wicket:fragment>
<wicket:fragment wicket:id="repositoryRow">
- <td class="left"><div class="list" wicket:id="repositoryName">[repository name]</div></td>
+ <td class="left" style="padding-left:10px;" ><div class="list" wicket:id="repositoryName">[repository name]</div></td>
<td><div class="list" wicket:id="repositoryDescription">[repository description]</div></td>
<td class="author"><span wicket:id="repositoryOwner">[repository owner]</span></td>
<td style="text-align: right;padding-right:10px;"><img class="inlineIcon" wicket:id="ticketsIcon" /><img class="inlineIcon" wicket:id="docsIcon" /><img class="inlineIcon" wicket:id="frozenIcon" /><img class="inlineIcon" wicket:id="federatedIcon" /><img class="inlineIcon" wicket:id="accessRestrictionIcon" /></td>
diff --git a/src/com/gitblit/wicket/panels/RepositoriesPanel.java b/src/com/gitblit/wicket/panels/RepositoriesPanel.java
index 63b512c2..e5149761 100644
--- a/src/com/gitblit/wicket/panels/RepositoriesPanel.java
+++ b/src/com/gitblit/wicket/panels/RepositoriesPanel.java
@@ -125,12 +125,13 @@ public class RepositoriesPanel extends BasePanel {
} else {
dp = new SortableRepositoriesProvider(models);
}
-
+
final String baseUrl = WicketUtils.getGitblitURL(getRequest());
DataView<RepositoryModel> dataView = new DataView<RepositoryModel>("row", dp) {
private static final long serialVersionUID = 1L;
int counter;
+ String currGroupName;
@Override
protected void onBeforeRender() {
@@ -141,23 +142,32 @@ public class RepositoriesPanel extends BasePanel {
public void populateItem(final Item<RepositoryModel> item) {
final RepositoryModel entry = item.getModelObject();
if (entry instanceof GroupRepositoryModel) {
+ currGroupName = entry.name;
Fragment row = new Fragment("rowContent", "groupRepositoryRow", this);
item.add(row);
row.add(new Label("groupName", entry.toString()));
WicketUtils.setCssClass(item, "group");
+ // reset counter so that first row is light background
+ counter = 0;
return;
}
Fragment row = new Fragment("rowContent", "repositoryRow", this);
item.add(row);
+
+ // try to strip group name for less cluttered list
+ String repoName = entry.name;
+ if (!StringUtils.isEmpty(currGroupName) && (repoName.indexOf('/') > -1)) {
+ repoName = repoName.substring(currGroupName.length() + 1);
+ }
+
if (entry.hasCommits && linksActive) {
PageParameters pp = WicketUtils.newRepositoryParameter(entry.name);
- row.add(new LinkPanel("repositoryName", "list", entry.name, SummaryPage.class,
- pp));
+ row.add(new LinkPanel("repositoryName", "list", repoName, SummaryPage.class, pp));
row.add(new LinkPanel("repositoryDescription", "list", entry.description,
SummaryPage.class, pp));
} else {
// new/empty repository OR proposed repository
- row.add(new Label("repositoryName", entry.name));
+ row.add(new Label("repositoryName", repoName));
row.add(new Label("repositoryDescription", entry.description));
}