diff options
author | James Moger <james.moger@gitblit.com> | 2011-05-16 16:45:51 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-05-16 16:45:51 -0400 |
commit | 7812236b90f39fd92699017f376f1b50c4ea24cb (patch) | |
tree | 58a8cce90311566bb2ef6b9b79f19340b081dc5c | |
parent | a098da747052eb8d9f612f78dece8ac027a72caa (diff) | |
download | gitblit-7812236b90f39fd92699017f376f1b50c4ea24cb.tar.gz gitblit-7812236b90f39fd92699017f376f1b50c4ea24cb.zip |
Move admin links. Drop extra GitBlit link. Line numbers on Blob page.
-rw-r--r-- | src/com/gitblit/utils/JGitUtils.java | 3 | ||||
-rw-r--r-- | src/com/gitblit/wicket/BasePage.html | 2 | ||||
-rw-r--r-- | src/com/gitblit/wicket/pages/BlobPage.java | 2 | ||||
-rw-r--r-- | src/com/gitblit/wicket/pages/RepositoriesPage.html | 10 | ||||
-rw-r--r-- | src/com/gitblit/wicket/pages/RepositoriesPage.java | 3 | ||||
-rw-r--r-- | src/com/gitblit/wicket/resources/gitblit.css | 38 |
6 files changed, 44 insertions, 14 deletions
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java index f86596d5..c9c13c56 100644 --- a/src/com/gitblit/utils/JGitUtils.java +++ b/src/com/gitblit/utils/JGitUtils.java @@ -80,6 +80,9 @@ public class JGitUtils { public static List<String> getNestedRepositories(File repositoriesFolder, File folder, boolean exportAll, boolean readNested) {
String basefile = repositoriesFolder.getAbsolutePath();
List<String> list = new ArrayList<String>();
+ if (folder == null || !folder.exists()) {
+ return list;
+ }
for (File file : folder.listFiles()) {
if (file.isDirectory() && !file.getName().equalsIgnoreCase(Constants.DOT_GIT)) {
// if this is a git repository add it to the list
diff --git a/src/com/gitblit/wicket/BasePage.html b/src/com/gitblit/wicket/BasePage.html index 0ec9e181..0e8705c6 100644 --- a/src/com/gitblit/wicket/BasePage.html +++ b/src/com/gitblit/wicket/BasePage.html @@ -32,7 +32,7 @@ <!-- page footer -->
<div class="page_footer">
<div style="float:right">
- <a href="http://gitblit.com"><span wicket:id="gbVersion"></span></a>
+ <span wicket:id="gbVersion"></span>
</div>
<div wicket:id="userPanel">[user panel]</div>
</div>
diff --git a/src/com/gitblit/wicket/pages/BlobPage.java b/src/com/gitblit/wicket/pages/BlobPage.java index 938eaabe..d28ff324 100644 --- a/src/com/gitblit/wicket/pages/BlobPage.java +++ b/src/com/gitblit/wicket/pages/BlobPage.java @@ -75,7 +75,7 @@ public class BlobPage extends RepositoryPage { case 1:
// PrettyPrint blob text
c = new Label("blobText", JGitUtils.getRawContentAsString(r, commit, blobPath));
- WicketUtils.setCssClass(c, "prettyprint");
+ WicketUtils.setCssClass(c, "prettyprint linenums");
break;
case 2:
// TODO image blobs
diff --git a/src/com/gitblit/wicket/pages/RepositoriesPage.html b/src/com/gitblit/wicket/pages/RepositoriesPage.html index c33e530d..9c27f793 100644 --- a/src/com/gitblit/wicket/pages/RepositoriesPage.html +++ b/src/com/gitblit/wicket/pages/RepositoriesPage.html @@ -10,12 +10,12 @@ </wicket:head>
<body>
-<wicket:extend>
- <div wicket:id="adminPanel">[admin links]</div>
+<wicket:extend>
+ <div style="text-align:center;padding-top:5px;" wicket:id="feedback">[Feedback Panel]</div>
- <div style="text-align:center;padding-top:20px;" wicket:id="feedback">[Feedback Panel]</div>
+ <div class="markdown" style="padding-top:5px;" wicket:id="repositoriesMessage">[repositories message]</div>
- <div class="markdown" wicket:id="repositoriesMessage">[repositories message]</div>
+ <div style="padding-top:5px;" wicket:id="adminPanel">[admin links]</div>
<table class="repositories">
<tr>
@@ -40,7 +40,7 @@ <wicket:fragment wicket:id="adminLinks">
<!-- page nav links -->
- <div class="page_nav">
+ <div style="text-align: right;" class="admin_nav">
<a wicket:id="newRepository"><wicket:message key="gb.newRepository"></wicket:message></a> | <a wicket:id="newUser"><wicket:message key="gb.newUser"></wicket:message></a> | <a wicket:id="editUsers"><wicket:message key="gb.editUsers"></wicket:message></a>
</div>
</wicket:fragment>
diff --git a/src/com/gitblit/wicket/pages/RepositoriesPage.java b/src/com/gitblit/wicket/pages/RepositoriesPage.java index acdc02fa..53e3c2f8 100644 --- a/src/com/gitblit/wicket/pages/RepositoriesPage.java +++ b/src/com/gitblit/wicket/pages/RepositoriesPage.java @@ -96,9 +96,6 @@ public class RepositoriesPage extends BasePage { }
}
Component repositoriesMessage = new Label("repositoriesMessage", message).setEscapeModelStrings(false);
- if (!showAdmin) {
- WicketUtils.setCssStyle(repositoriesMessage, "padding-top:10px");
- }
add(repositoriesMessage);
final Map<AccessRestrictionType, String> accessRestrictionTranslations = getAccessRestrictions();
diff --git a/src/com/gitblit/wicket/resources/gitblit.css b/src/com/gitblit/wicket/resources/gitblit.css index 13e761d4..2d418722 100644 --- a/src/com/gitblit/wicket/resources/gitblit.css +++ b/src/com/gitblit/wicket/resources/gitblit.css @@ -17,8 +17,7 @@ body { background-color: #ffffff;
color: #000000;
margin-right: auto;
- margin-left: auto;
- margin-top: none;
+ margin-left: auto;
padding: 0px;
background: url(background.png) repeat-x scroll 0 0 #FFFFFF;
}
@@ -144,7 +143,7 @@ div.page_header a:visited { }
div.page_header a:hover {
- color: E66C2C;
+ color: #E66C2C;
text-decoration: underline;
}
@@ -182,6 +181,18 @@ div.page_nav2 { padding: 2px 5px 7px 5px;
}
+div.admin_nav {
+ padding: 5px 5px 5px 2px;
+}
+
+div.admin_nav a {
+ text-decoration: none;
+}
+
+div.admin_nav a:hover {
+ text-decoration: underline;
+}
+
div.search {
color:yellow;
text-align:right;
@@ -670,4 +681,23 @@ span .headRef { font-weight: bold;
padding:0;
margin:0;
-}
\ No newline at end of file +}
+
+/* google-code-prettify line numbers */
+li.L0,
+li.L1,
+li.L2,
+li.L3,
+li.L4,
+li.L5,
+li.L6,
+li.L7,
+li.L8,
+li.L9 { color: #888; border-left: 1px solid #ccc; padding-left:5px; list-style-type: decimal !important; }
+
+/* Alternate shading for lines */
+li.L1,
+li.L3,
+li.L5,
+li.L7,
+li.L9 { background: #fafafa !important; }
\ No newline at end of file |