]> source.dussan.org Git - gitblit.git/commitdiff
Move admin links. Drop extra GitBlit link. Line numbers on Blob page.
authorJames Moger <james.moger@gitblit.com>
Mon, 16 May 2011 20:45:51 +0000 (16:45 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 16 May 2011 20:45:51 +0000 (16:45 -0400)
src/com/gitblit/utils/JGitUtils.java
src/com/gitblit/wicket/BasePage.html
src/com/gitblit/wicket/pages/BlobPage.java
src/com/gitblit/wicket/pages/RepositoriesPage.html
src/com/gitblit/wicket/pages/RepositoriesPage.java
src/com/gitblit/wicket/resources/gitblit.css

index f86596d502cc7595cf775ab0d9d932fbfe2ea6c8..c9c13c565fca97ec198d21f2c01516ee80d97a10 100644 (file)
@@ -80,6 +80,9 @@ public class JGitUtils {
        public static List<String> getNestedRepositories(File repositoriesFolder, File folder, boolean exportAll, boolean readNested) {\r
                String basefile = repositoriesFolder.getAbsolutePath();\r
                List<String> list = new ArrayList<String>();\r
+               if (folder == null || !folder.exists()) {\r
+                       return list;\r
+               }\r
                for (File file : folder.listFiles()) {\r
                        if (file.isDirectory() && !file.getName().equalsIgnoreCase(Constants.DOT_GIT)) {\r
                                // if this is a git repository add it to the list\r
index 0ec9e181988afb69e8c1f1287398ea9b3f1643f1..0e8705c6d5272664d745d568cbef36181acb6bf8 100644 (file)
@@ -32,7 +32,7 @@
                <!-- page footer -->\r
                <div class="page_footer">\r
                        <div style="float:right">\r
-                               <a href="http://gitblit.com"><span wicket:id="gbVersion"></span></a\r
+                               <span wicket:id="gbVersion"></span\r
                        </div>\r
                        <div wicket:id="userPanel">[user panel]</div>\r
                </div>\r
index 938eaabe4a005d9ba39c7e0b4ded0cb0f1553ab9..d28ff32462147132e5c4e93c34f84163e204cde8 100644 (file)
@@ -75,7 +75,7 @@ public class BlobPage extends RepositoryPage {
                        case 1:\r
                                // PrettyPrint blob text\r
                                c = new Label("blobText", JGitUtils.getRawContentAsString(r, commit, blobPath));\r
-                               WicketUtils.setCssClass(c, "prettyprint");\r
+                               WicketUtils.setCssClass(c, "prettyprint linenums");\r
                                break;\r
                        case 2:\r
                                // TODO image blobs\r
index c33e530d18ed55b7a63371e448134a30f81e539a..9c27f79399fc68887c95ed66ca3d6a618dfa0801 100644 (file)
 </wicket:head>\r
 \r
 <body>\r
-<wicket:extend>\r
-       <div wicket:id="adminPanel">[admin links]</div>\r
+<wicket:extend>        \r
+       <div style="text-align:center;padding-top:5px;" wicket:id="feedback">[Feedback Panel]</div>\r
        \r
-       <div style="text-align:center;padding-top:20px;" wicket:id="feedback">[Feedback Panel]</div>\r
+       <div class="markdown" style="padding-top:5px;" wicket:id="repositoriesMessage">[repositories message]</div>\r
        \r
-       <div class="markdown" wicket:id="repositoriesMessage">[repositories message]</div>\r
+       <div style="padding-top:5px;" wicket:id="adminPanel">[admin links]</div>\r
                \r
        <table class="repositories">\r
                <tr>\r
@@ -40,7 +40,7 @@
        \r
        <wicket:fragment wicket:id="adminLinks">\r
                <!-- page nav links --> \r
-               <div class="page_nav">\r
+               <div style="text-align: right;" class="admin_nav">\r
                        <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>\r
                </div>  \r
        </wicket:fragment>\r
index acdc02fab67e5c92c50b2ec319b6fb8ebc023820..53e3c2f80b5c41ce51a1d1945bb2ea88297922bd 100644 (file)
@@ -96,9 +96,6 @@ public class RepositoriesPage extends BasePage {
                        }\r
                }\r
                Component repositoriesMessage = new Label("repositoriesMessage", message).setEscapeModelStrings(false);\r
-               if (!showAdmin) {\r
-                       WicketUtils.setCssStyle(repositoriesMessage, "padding-top:10px");\r
-               }\r
                add(repositoriesMessage);\r
 \r
                final Map<AccessRestrictionType, String> accessRestrictionTranslations = getAccessRestrictions();\r
index 13e761d482a3d4fdf7bea3f5e6f0a406c964c0d7..2d41872241cdbb2e6ff32c8f7bb50c56d5da5578 100644 (file)
@@ -17,8 +17,7 @@ body {
        background-color: #ffffff;\r
        color: #000000;\r
     margin-right: auto;\r
-    margin-left: auto;\r
-    margin-top: none;\r
+    margin-left: auto;    \r
     padding: 0px;\r
     background: url(background.png) repeat-x scroll 0 0 #FFFFFF;\r
 }\r
@@ -144,7 +143,7 @@ div.page_header a:visited {
 }\r
 \r
 div.page_header a:hover {\r
-       color: E66C2C;\r
+       color: #E66C2C;\r
        text-decoration: underline;\r
 }\r
 \r
@@ -182,6 +181,18 @@ div.page_nav2 {
        padding: 2px 5px 7px 5px;       \r
 }\r
 \r
+div.admin_nav {\r
+       padding: 5px 5px 5px 2px;       \r
+}\r
+\r
+div.admin_nav a {\r
+       text-decoration: none;\r
+}\r
+\r
+div.admin_nav a:hover {        \r
+       text-decoration: underline;\r
+}\r
+\r
 div.search {\r
        color:yellow;\r
        text-align:right;\r
@@ -670,4 +681,23 @@ span .headRef {
        font-weight: bold;      \r
        padding:0;\r
        margin:0;\r
-}
\ No newline at end of file
+}\r
+\r
+/* google-code-prettify line numbers */\r
+li.L0,\r
+li.L1,\r
+li.L2,\r
+li.L3,\r
+li.L4,\r
+li.L5,\r
+li.L6,\r
+li.L7,\r
+li.L8,\r
+li.L9 { color: #888; border-left: 1px solid #ccc; padding-left:5px; list-style-type: decimal !important; }\r
+\r
+/* Alternate shading for lines */\r
+li.L1,\r
+li.L3,\r
+li.L5,\r
+li.L7,\r
+li.L9 { background: #fafafa !important; }
\ No newline at end of file