]> source.dussan.org Git - gitblit.git/commitdiff
Html and Css simplifications.
authorJames Moger <james.moger@gitblit.com>
Wed, 13 Apr 2011 19:53:19 +0000 (15:53 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 13 Apr 2011 19:53:19 +0000 (15:53 -0400)
13 files changed:
src/com/gitblit/wicket/BasePage.java
src/com/gitblit/wicket/pages/CommitDiffPage.html
src/com/gitblit/wicket/pages/CommitPage.html
src/com/gitblit/wicket/pages/CommitPage.java
src/com/gitblit/wicket/pages/TagPage.html
src/com/gitblit/wicket/pages/TagPage.java
src/com/gitblit/wicket/pages/TicGitTicketPage.html
src/com/gitblit/wicket/pages/TreePage.html
src/com/gitblit/wicket/pages/TreePage.java
src/com/gitblit/wicket/panels/BranchesPanel.html
src/com/gitblit/wicket/panels/LogPanel.html
src/com/gitblit/wicket/panels/TagsPanel.html
src/com/gitblit/wicket/resources/gitblit.css

index 7a512d69c02fa75d5cabaea143e3a427a55ae4cb..3121804a309d7d10cc913a501d6a52fdd4c3bb4d 100644 (file)
@@ -39,7 +39,7 @@ public abstract class BasePage extends WebPage {
                        siteName = Constants.NAME;\r
                }\r
                add(new Label("siteName", siteName));\r
-               add(new LinkPanel("repositoryName", null, repositoryName, SummaryPage.class, new PageParameters("p=" + repositoryName)));\r
+               add(new LinkPanel("repositoryName", null, repositoryName, SummaryPage.class, WicketUtils.newRepositoryParameter(repositoryName)));\r
                add(new Label("pageName", pageName));\r
                \r
                // footer\r
index 2759de8f92478aea7cd794a3e4d129af3e0a7346..af731a0d8b69179dbd79f55966a57190fec25a8a 100644 (file)
@@ -23,9 +23,9 @@
                <tr wicket:id="changedPath">\r
                        <td class="path"><span wicket:id="pathName">[commit path]</span></td>                   \r
                        <td>\r
-                               <div class="link">\r
+                               <span class="link">\r
                                        <a wicket:id="patch"><wicket:message key="gb.patch"></wicket:message></a> | <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="blame"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
-                               </div>\r
+                               </span>\r
                        </td>\r
                </tr>\r
        </table>\r
index a65c5884fbd12f10cace251b817239c395589abd..a639f4a37ac9e66e121c6466da64103a2e7bcdba 100644 (file)
                <tr><th></th><td><span wicket:id="commitAuthorDate">[author date]</span></td></tr>\r
                <tr><th><wicket:message key="gb.committer">committer</wicket:message></th><td><span wicket:id="commitCommitter">[committer]</span></td></tr>\r
                <tr><th></th><td><span wicket:id="commitCommitterDate">[commit date]</span></td></tr>\r
-               <tr><th><wicket:message key="gb.commit">commit</wicket:message></th><td class="sha1"><span wicket:id="commitId">[commit id]</span></td></tr>\r
-               <tr><th><wicket:message key="gb.tree">tree</wicket:message></th><td class="sha1"><span wicket:id="commitTree">[commit tree]</span></td></tr>\r
-               <tr><th><wicket:message key="gb.parent">parent</wicket:message></th><td class="sha1"><span wicket:id="commitParents">\r
-                       <div wicket:id="commitParent">[commit parents]</div></span></td></tr>\r
+               <tr><th><wicket:message key="gb.commit">commit</wicket:message></th><td><span class="sha1" wicket:id="commitId">[commit id]</span></td></tr>\r
+               <tr><th><wicket:message key="gb.tree">tree</wicket:message></th><td><span class="sha1" wicket:id="commitTree">[commit tree]</span></td></tr>\r
+               <tr><th><wicket:message key="gb.parent">parent</wicket:message></th>\r
+                       <td>\r
+                               <span wicket:id="commitParents">\r
+                                       <span class="sha1" wicket:id="commitParent">[commit parents]</span>\r
+                                       <span class="link">\r
+                                               <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a>\r
+                                       </span>                                 \r
+                               </span>\r
+                       </td>\r
+               </tr>\r
        </table>\r
        \r
        <!-- full message -->\r
@@ -39,9 +47,9 @@
                <tr wicket:id="changedPath">\r
                        <td class="path"><span wicket:id="pathName">[commit path]</span></td>                   \r
                        <td>\r
-                               <div class="link">\r
+                               <span class="link">\r
                                        <a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a> | <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="blame"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
-                               </div>\r
+                               </span>\r
                        </td>\r
                </tr>\r
        </table>\r
index d906f075158a856c3d24e671b5093c4bb736b30c..7e3403ded6523747769acb256c7fd3e3b6cc2124 100644 (file)
@@ -67,6 +67,8 @@ public class CommitPage extends RepositoryPage {
                        public void populateItem(final Item<String> item) {\r
                                String entry = item.getModelObject();\r
                                item.add(new LinkPanel("commitParent", "list", entry, CommitPage.class, newCommitParameter(entry)));\r
+                               item.add(new BookmarkablePageLink<Void>("view", CommitPage.class, newCommitParameter(entry)));\r
+                               item.add(new BookmarkablePageLink<Void>("diff", CommitDiffPage.class, newCommitParameter(entry)));\r
                        }\r
                };\r
                add(parentsView);\r
index 4eb3b4b4eae1b9b740beff13972cffd67203515f..42a7585427ff72f155975df6db8281e290baac20 100644 (file)
@@ -15,7 +15,7 @@
        \r
        <!-- commit info -->\r
        <table class="plain">\r
-               <tr><th><wicket:message key="gb.object">object</wicket:message></th><td><span wicket:id="tagId">[tag id]</span></td></tr>\r
+               <tr><th><wicket:message key="gb.object">object</wicket:message></th><td><span class="sha1" wicket:id="tagId">[tag id]</span></td></tr>\r
                <tr><th><wicket:message key="gb.author">author</wicket:message></th><td><span wicket:id="tagAuthor">[tag author]</span></td></tr>\r
                <tr><th></th><td><span wicket:id="tagDate">[tag date]</span></td></tr>\r
        </table>\r
index 622c2b15d53fa625d9ca25f194e0d063f4eede92..e6f2fd6b2ce3ea67c81f54cc8544b4047692c6b6 100644 (file)
@@ -23,16 +23,25 @@ public class TagPage extends RepositoryPage {
                List<RefModel> tags = JGitUtils.getTags(r, -1);\r
                RevCommit c = JGitUtils.getCommit(r, objectId);\r
                \r
-               String name = c.getName();\r
+               RefModel tagRef = null;\r
+               // determine tag\r
                for (RefModel tag:tags) {\r
-                       if (tag.getName().equals(objectId)) {\r
-                               name = tag.getDisplayName();\r
+                       if (tag.getName().equals(objectId) || tag.getObjectId().getName().equals(objectId)) {\r
+                               tagRef = tag;\r
+                               break;\r
                        }\r
                }\r
 \r
-               add(new LinkPanel("commit", "title", name, CommitPage.class, newCommitParameter()));\r
-\r
-               add(new LinkPanel("tagId", "list", c.getName(), CommitPage.class, newCommitParameter(c.getName())));\r
+               if (tagRef == null) {\r
+                       // point to commit\r
+                       add(new LinkPanel("commit", "title", c.getShortMessage(), CommitPage.class, newCommitParameter()));\r
+                       add(new LinkPanel("tagId", "list", c.getName(), CommitPage.class, newCommitParameter(c.getName())));                    \r
+               } else {\r
+                       // TODO commit or tree or blob?\r
+                       add(new LinkPanel("commit", "title", tagRef.getDisplayName(), CommitPage.class, newCommitParameter()));\r
+                       add(new LinkPanel("tagId", "list", c.getName(), CommitPage.class, newCommitParameter(c.getName())));\r
+               }               \r
+               \r
                add(new Label("tagAuthor", JGitUtils.getDisplayName(c.getAuthorIdent())));\r
                add(WicketUtils.createTimestampLabel("tagDate", c.getAuthorIdent().getWhen(), getTimeZone()));\r
 \r
index 47fa87be224635211ff2c3e39a0a100391112d3a..174626622b7815091f87fcbb59f05f134e7f095c 100644 (file)
@@ -15,7 +15,7 @@
                \r
        <!-- ticket info -->\r
        <table class="plain">\r
-               <tr><th><wicket:message key="gb.ticketId">ticket id</wicket:message></th><td class="sha1"><span wicket:id="ticketId">[ticket id]</span></td></tr>\r
+               <tr><th><wicket:message key="gb.ticketId">ticket id</wicket:message></th><td><span class="sha1" wicket:id="ticketId">[ticket id]</span></td></tr>\r
                <tr><th><wicket:message key="gb.ticketAssigned">assigned</wicket:message></th><td><span wicket:id=ticketHandler>[ticket title]</span></td></tr>\r
                <tr><th><wicket:message key="gb.ticketOpenDate">open date</wicket:message></th><td><span wicket:id="ticketOpenDate">[ticket open date]</span></td></tr>\r
                <tr><th><wicket:message key="gb.ticketState">state</wicket:message></th><td><span wicket:id="ticketState">[ticket state]</span></td></tr>\r
index 85fbdfc8819dce5d387e2bdca55f2fe10ec525f1..add03ebd11bae45f7967a090f91cac562e1077d7 100644 (file)
 \r
        <!--  tree links -->\r
        <wicket:fragment wicket:id="treeLinks">\r
-               <div class="link">\r
+               <span class="link">\r
                        <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
-               </div>\r
+               </span>\r
        </wicket:fragment>\r
        \r
        <!-- blob links -->\r
        <wicket:fragment wicket:id="blobLinks">\r
-               <div class="link">\r
-                       <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="raw"><wicket:message key="gb.raw"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
-               </div>  \r
+               <span class="link">\r
+                       <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="raw"><wicket:message key="gb.raw"></wicket:message></a> | <a wicket:id="blame"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
+               </span> \r
        </wicket:fragment>\r
        \r
 </wicket:extend>       \r
index 2bea987d1dfb627bc72c560e2b2d53ab5d9b2dfa..d83939eac6d05e50f7b6b6edbf1ad98afef4898a 100644 (file)
@@ -82,6 +82,7 @@ public class TreePage extends RepositoryPage {
                                                Fragment links = new Fragment("pathLinks", "blobLinks", this);\r
                                                links.add(new BookmarkablePageLink<Void>("view", BlobPage.class, WicketUtils.newPathParameter(repositoryName, entry.commitId, entry.path)));\r
                                                links.add(new BookmarkablePageLink<Void>("raw", RawPage.class, WicketUtils.newPathParameter(repositoryName, entry.commitId, entry.path)));\r
+                                               links.add(new BookmarkablePageLink<Void>("blame", BlobPage.class).setEnabled(false));\r
                                                links.add(new BookmarkablePageLink<Void>("history", BlobPage.class).setEnabled(false));\r
                                                item.add(links);\r
                                        }\r
index 78774f2d4d6940b39037edd128022fee3ae72817..76c3e09f23a43ac487a4d8de3d941952f9654b61 100644 (file)
@@ -17,9 +17,9 @@
                        <td><span wicket:id="branchName">[branch name]</span></td>\r
                        <td><span wicket:id="branchType">[branch type]</span></td>\r
                        <td class="rightAlign">\r
-                               <div class="link">\r
+                               <span class="link">\r
                                                <a wicket:id="log"><wicket:message key="gb.log"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>\r
-                                       </div>  \r
+                                       </span> \r
                                </td>\r
                        </tr>\r
        </tbody>\r
index e12d1b8f2d421889f712ec83d1bb5ebd68ced578..0a746ba9ee7229e313db3414a427e557c3bb04e1 100644 (file)
                        <td class="author"><span wicket:id="commitAuthor">[commit author]</span></td>\r
                        <td><div wicket:id="commitShortMessage">[commit short message]</div></td>\r
                        <td class="rightAlign"><div wicket:id="commitRefs">[commit refs]</div></td>                     \r
-                       <td class="rightAlign"><div class="link">\r
-                                       <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>\r
-                                       </div>\r
+                       <td class="rightAlign">\r
+                               <span class="link">\r
+                                               <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>\r
+                                       </span>\r
                                </td>\r
                        </tr>\r
        </tbody>\r
index 8b90655099cfd4ba601465308a61996c9790a87d..0255a7249bd3b34466685ff02dba4eafb032bc99 100644 (file)
@@ -16,9 +16,9 @@
                        <td><b><span wicket:id="tagName">[tag name]</span></b></td>\r
                        <td><span wicket:id="tagDescription">[tag description]</span></td>\r
                        <td class="rightAlign">\r
-                               <div class="link">\r
+                               <span class="link">\r
                                                <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="commit"><wicket:message key="gb.commit"></wicket:message></a> | <a wicket:id="log"><wicket:message key="gb.log"></wicket:message></a>\r
-                                       </div>\r
+                                       </span>\r
                                </td>\r
                </tr>\r
        </tbody>\r
index da0c317ecbda526f21152e857e06842d612a32eb..bb993508c297bd2ddf22f6fa95a8e86372624611 100644 (file)
@@ -87,26 +87,15 @@ div.pager {
        padding: 0px 0px 15px 5px;\r
 }\r
 \r
-div.link {\r
-       padding: 2px 5px;\r
+span.link, span.link a {\r
        font-family: sans-serif;\r
        font-size: 11px;\r
 }\r
 \r
-div.link span {\r
-       font-family: inherit;\r
-       font-size: inherit;\r
-}\r
-\r
-div.link a {\r
-       font-family: inherit;\r
-       font-size: inherit;\r
-}\r
-\r
-div.link em, div.link span em {\r
+span.link em, div.link span em {\r
        font-style: normal;\r
-       font-family: inherit;\r
-       font-size: inherit;\r
+       font-family: sans-serif;\r
+       font-size: 11px;\r
 }\r
 \r
 div.page_header {\r
@@ -311,6 +300,10 @@ table.pretty, table.repositories {
        border-right: 1px solid #bbb;   \r
 }\r
 \r
+table.pretty td {\r
+       padding: 2px 4px;\r
+}\r
+\r
 table.repositories {\r
        width:100%;     \r
 }\r
@@ -388,7 +381,7 @@ td.date {
        font-style: italic;     \r
 }\r
 \r
-td.sha1, td.sha1 span {\r
+span.sha1, span.sha1 a, span.sha1 a span {\r
        font-family: monospace;\r
        font-size: 13px;\r
 }\r