From f762b160efd5cafd919a6fd7f9587f578eceb454 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Sun, 02 Oct 2011 16:59:44 -0400 Subject: [PATCH] Merge branch 'master' into rpc --- docs/gitblit_logo_white.xcf | 0 src/com/gitblit/wicket/panels/TagsPanel.html | 2 src/com/gitblit/wicket/panels/FederationTokensPanel.html | 2 src/com/gitblit/wicket/panels/RepositoriesPanel.java | 16 src/com/gitblit/wicket/pages/RepositoryPage.java | 38 src/com/gitblit/wicket/pages/ReviewProposalPage.java | 13 src/com/gitblit/wicket/pages/SendProposalPage.java | 8 src/com/gitblit/wicket/pages/RootPage.html | 38 docs/doc_footer.html | 12 src/com/gitblit/wicket/pages/EditUserPage.html | 9 src/com/gitblit/wicket/GitBlitWebApp.properties | 6 src/com/gitblit/wicket/WicketUtils.java | 10 resources/bootstrap.130.css | 330 ++++++++ resources/gitblt2_white.png | 0 docs/site_footer.html | 12 src/com/gitblit/wicket/pages/RootPage.java | 156 ++++ src/com/gitblit/wicket/panels/UsersPanel.html | 4 src/com/gitblit/wicket/pages/RepositoryPage.html | 46 src/com/gitblit/wicket/pages/ReviewProposalPage.html | 7 src/com/gitblit/wicket/panels/RepositoriesPanel.html | 8 docs/04_design.mkd | 1 resources/bootstrap.gb.css | 758 +++++++++++++++++++ src/com/gitblit/wicket/pages/EditRepositoryPage.html | 24 resources/markdown.css | 9 src/com/gitblit/wicket/pages/EditRepositoryPage.java | 9 src/com/gitblit/wicket/pages/FederationPage.html | 17 src/com/gitblit/wicket/panels/LogPanel.html | 2 src/com/gitblit/wicket/pages/TicketPage.java | 2 src/com/gitblit/wicket/pages/FederationPage.java | 52 + src/com/gitblit/wicket/pages/BasePage.java | 20 src/com/gitblit/models/FederationModel.java | 17 src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html | 8 src/com/gitblit/wicket/pages/BasePage.html | 22 src/com/gitblit/wicket/pages/TicketPage.html | 2 src/com/gitblit/utils/StringUtils.java | 42 + src/com/gitblit/wicket/pages/ChangePasswordPage.html | 19 NOTICE | 8 src/com/gitblit/wicket/pages/RepositoriesPage.java | 114 +- docs/site_header.html | 33 src/com/gitblit/wicket/pages/RootSubPage.html | 18 docs/04_releases.mkd | 2 src/com/gitblit/wicket/pages/ChangePasswordPage.java | 12 resources/gitblt_25_white.png | 0 src/com/gitblit/wicket/pages/RepositoriesPage.html | 16 src/com/gitblit/wicket/panels/FederationProposalsPanel.html | 2 docs/00_index.mkd | 2 src/com/gitblit/wicket/pages/RootSubPage.java | 48 + src/com/gitblit/utils/JGitUtils.java | 2 src/com/gitblit/wicket/pages/FederationRegistrationPage.html | 5 resources/login.mkd | 3 src/com/gitblit/wicket/pages/BlamePage.html | 4 src/com/gitblit/wicket/AuthorizationStrategy.java | 14 src/com/gitblit/wicket/pages/UsersPage.html | 11 src/com/gitblit/build/BuildSite.java | 2 src/com/gitblit/wicket/pages/EditUserPage.java | 13 src/com/gitblit/wicket/pages/FederationRegistrationPage.java | 17 distrib/gitblit.properties | 9 src/com/gitblit/wicket/pages/MetricsPage.java | 4 /dev/null | 118 --- src/com/gitblit/wicket/panels/FederationRegistrationsPanel.html | 2 docs/02_federation.mkd | 2 src/com/gitblit/models/RepositoryModel.java | 3 src/com/gitblit/wicket/pages/SendProposalPage.html | 16 build.xml | 12 docs/doc_header.html | 26 src/com/gitblit/wicket/GitBlitWebApp.java | 10 src/com/gitblit/wicket/pages/UsersPage.java | 30 src/com/gitblit/wicket/panels/BranchesPanel.html | 2 68 files changed, 1,820 insertions(+), 461 deletions(-) diff --git a/NOTICE b/NOTICE index 41b61f1..5e49803 100644 --- a/NOTICE +++ b/NOTICE @@ -8,6 +8,14 @@ in this distribution or linked to by this distribution. --------------------------------------------------------------------------- +Bootstrap +--------------------------------------------------------------------------- + Bootstrap, released under the + Apache Software License, Version 2.0. + + http://twitter.github.com/bootstrap + +--------------------------------------------------------------------------- google-code-prettify --------------------------------------------------------------------------- google-code-prettify, released under the diff --git a/build.xml b/build.xml index e803d11..9a58971 100644 --- a/build.xml +++ b/build.xml @@ -196,10 +196,10 @@ <copy todir="${docs.output.dir}"> <!-- Copy selected Gitblit resources --> <fileset dir="${project.resources.dir}"> - <include name="background.png" /> - <include name="gitblit.css" /> + <include name="bootstrap.130.css" /> + <include name="bootstrap.gb.css" /> <include name="markdown.css" /> - <include name="gitblt_25.png" /> + <include name="gitblt_25_white.png" /> <include name="gitblt-favicon.png" /> <include name="lock_go_16x16.png" /> <include name="lock_pull_16x16.png" /> @@ -425,10 +425,10 @@ <copy todir="${project.site.dir}"> <!-- Copy selected Gitblit resources --> <fileset dir="${project.resources.dir}"> - <include name="background.png" /> - <include name="gitblit.css" /> + <include name="bootstrap.130.css" /> + <include name="bootstrap.gb.css" /> <include name="markdown.css" /> - <include name="gitblt_25.png" /> + <include name="gitblt_25_white.png" /> <include name="gitblt-favicon.png" /> <include name="lock_go_16x16.png" /> <include name="lock_pull_16x16.png" /> diff --git a/distrib/gitblit.properties b/distrib/gitblit.properties index 2876382..3de1475 100644 --- a/distrib/gitblit.properties +++ b/distrib/gitblit.properties @@ -116,7 +116,14 @@ # SINCE 0.6.0 web.showFederationRegistrations = false -# This is the message display above the repositories table. +# This is the message displayed when *web.authenticateViewPages=true*. +# This can point to a file with Markdown content. +# Specifying "gitblit" uses the internal login message. +# +# SINCE 0.6.1 +web.loginMessage = gitblit + +# This is the message displayed above the repositories table. # This can point to a file with Markdown content. # Specifying "gitblit" uses the internal welcome message. # diff --git a/docs/00_index.mkd b/docs/00_index.mkd index 2c40e1e..fde2d34 100644 --- a/docs/00_index.mkd +++ b/docs/00_index.mkd @@ -28,6 +28,8 @@ **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)) based on [%JGIT%][jgit] *released %BUILDDATE%* +- improved: updated ui with Twitter's Bootstrap CSS toolkit +<br/>**New:** *web.loginMessage = gitblit* - fixed: Null pointer exception if did not set federation strategy (issue 20) - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later - added: IUserService.setup(IStoredSettings) for custom user service implementations diff --git a/docs/02_federation.mkd b/docs/02_federation.mkd index f77d703..abf171e 100644 --- a/docs/02_federation.mkd +++ b/docs/02_federation.mkd @@ -175,7 +175,7 @@ ## Federation Pull Registration Keys -<table class="text"> +<table> <tr><th>federation.N.url</th> <td>string</td> <td>the url of the origin Gitblit instance *(required)*</td> diff --git a/docs/04_design.mkd b/docs/04_design.mkd index 523d31b..fe22674 100644 --- a/docs/04_design.mkd +++ b/docs/04_design.mkd @@ -10,6 +10,7 @@ ### Bundled Dependencies The following dependencies are bundled with Gitblit. +- [Bootstrap](http://twitter.github.com/bootstrap) (Apache 2.0) - [google-code-prettify](http://code.google.com/p/google-code-prettify) (Apache 2.0) - [Commons Daemon](http://commons.apache.org/daemon) (Apache 2.0) - magnifying glass search icon courtesy of [Gnome](http://gnome.org) (Creative Commons CC-BY) diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd index 667e5f2..cb1f898 100644 --- a/docs/04_releases.mkd +++ b/docs/04_releases.mkd @@ -3,6 +3,8 @@ ### Current Release **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)) based on [%JGIT%][jgit] *released %BUILDDATE%* +- improved: updated ui with Twitter's Bootstrap CSS toolkit +<br/>**New:** *web.loginMessage = gitblit* - fixed: Null pointer exception if did not set federation strategy (issue 20) - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later - added: IUserService.setup(IStoredSettings) for custom user service implementations diff --git a/docs/doc_footer.html b/docs/doc_footer.html index e1a5738..ab2d7ee 100644 --- a/docs/doc_footer.html +++ b/docs/doc_footer.html @@ -1,7 +1,9 @@ - </div> - <div style="margin-top:10px" class="page_footer"> - <div style="float:right;">{0}</div> - The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>. - </div> + </div> <!-- markdown --> + <div style="margin-top:10px" class="page_footer"> + <div style="float:right;">{0}</div> + The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>. + </div> + </div> <!-- content --> + </div> <!-- container --> </body> </html> \ No newline at end of file diff --git a/docs/doc_header.html b/docs/doc_header.html index 71ba841..802f950 100644 --- a/docs/doc_header.html +++ b/docs/doc_header.html @@ -2,7 +2,8 @@ <html> <head> <title>Gitblit</title> - <link rel="stylesheet" type="text/css" href="./gitblit.css"/> + <link rel="stylesheet" type="text/css" href="./bootstrap.130.css"/> + <link rel="stylesheet" type="text/css" href="./bootstrap.gb.css"/> <link rel="stylesheet" type="text/css" href="./markdown.css"/> <link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" /> <meta name="ROBOTS" content="INDEX, NOFOLLOW"> @@ -28,12 +29,19 @@ <script type="text/javascript" src="prettify/prettify.js"></script> <link href="prettify/prettify.css" type="text/css" rel="stylesheet" /> </head> - <body style="width:900px" onload="prettyPrint()"> - <div class="page_header"> - <a title="gitblit homepage" href="http://gitblit.com/"> - <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/> - </a> - <span style="color:black;">{0}</span> + <body style="padding-top:40px;" onload="prettyPrint()"> + <div class="topbar"> + <div class="fill"> + <div class="container"> + <a class="brand" href="http://gitblit.com" title="gitblit homepage"> + <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/> + </a> + <ul class="nav"> + {1} + </ul> + </div> + </div> </div> - <div class="page_nav">{1}</div> - <div class="markdown"> \ No newline at end of file + <div class="container"> + <div class="content"> + <div class="markdown"> \ No newline at end of file diff --git a/docs/gitblit_logo_white.xcf b/docs/gitblit_logo_white.xcf new file mode 100644 index 0000000..d0d397c --- /dev/null +++ b/docs/gitblit_logo_white.xcf Binary files differ diff --git a/docs/site_footer.html b/docs/site_footer.html index e1a5738..ab2d7ee 100644 --- a/docs/site_footer.html +++ b/docs/site_footer.html @@ -1,7 +1,9 @@ - </div> - <div style="margin-top:10px" class="page_footer"> - <div style="float:right;">{0}</div> - The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>. - </div> + </div> <!-- markdown --> + <div style="margin-top:10px" class="page_footer"> + <div style="float:right;">{0}</div> + The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>. + </div> + </div> <!-- content --> + </div> <!-- container --> </body> </html> \ No newline at end of file diff --git a/docs/site_header.html b/docs/site_header.html index 6365117..86aae41 100644 --- a/docs/site_header.html +++ b/docs/site_header.html @@ -2,7 +2,8 @@ <html> <head> <title>Gitblit</title> - <link rel="stylesheet" type="text/css" href="./gitblit.css"/> + <link rel="stylesheet" type="text/css" href="./bootstrap.130.css"/> + <link rel="stylesheet" type="text/css" href="./bootstrap.gb.css"/> <link rel="stylesheet" type="text/css" href="./markdown.css"/> <link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" /> <meta name="ROBOTS" content="INDEX"> @@ -33,15 +34,23 @@ <!-- ANALYTICS --> </head> - <body style="width:900px" onload="prettyPrint()"> - <a href="http://github.com/gitblit"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/30f550e0d38ceb6ef5b81500c64d970b7fb0f028/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub"></a> - <div class="page_header"> - <a title="gitblit homepage" href="http://gitblit.com/"> - <img src="./gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/> - </a> - <span style="color:black;">{0}</span> - <!-- Google Plus One --> - <g:plusone></g:plusone> + <body style="padding-top:40px;" onload="prettyPrint()"> + <div class="topbar"> + <div class="fill"> + <div class="container"> + <a class="brand" href="http://gitblit.com" title="gitblit homepage"> + <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/> + </a> + + <!-- Google Plus One --> + <g:plusone></g:plusone> + + <ul class="nav"> + {1} + </ul> + </div> + </div> </div> - <div class="page_nav">{1}</div> - <div class="markdown"> \ No newline at end of file + <div class="container"> + <div class="content"> + <div class="markdown"> \ No newline at end of file diff --git a/resources/bootstrap.130.css b/resources/bootstrap.130.css new file mode 100644 index 0000000..613ed75 --- /dev/null +++ b/resources/bootstrap.130.css @@ -0,0 +1,330 @@ +html,body{margin:0;padding:0;} +h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;} +table{border-collapse:collapse;border-spacing:0;} +ol,ul{list-style:none;} +q:before,q:after,blockquote:before,blockquote:after{content:"";} +html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} +a:focus{outline:thin dotted;} +a:hover,a:active{outline:0;} +article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} +audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} +audio:not([controls]){display:none;} +sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;} +sup{top:-0.5em;} +sub{bottom:-0.25em;} +img{border:0;-ms-interpolation-mode:bicubic;} +button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;} +button,input{line-height:normal;*overflow:visible;} +button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;} +button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} +input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;} +input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;} +textarea{overflow:auto;vertical-align:top;} +html,body{background-color:#ffffff;} +body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;} +.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;*display:inline;} +.container:after{clear:both;} +.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;*display:inline;} +.container-fluid:after{clear:both;} +.container-fluid>.sidebar{float:left;width:220px;} +.container-fluid>.content{margin-left:240px;} +a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;} +.pull-right{float:right;} +.pull-left{float:left;} +.hide{display:none;} +.show{display:block;} +.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;*display:inline;} +.row:after{clear:both;} +[class*="span"]{display:inline;float:left;margin-left:20px;} +.span1{width:40px;} +.span2{width:100px;} +.span3{width:160px;} +.span4{width:220px;} +.span5{width:280px;} +.span6{width:340px;} +.span7{width:400px;} +.span8{width:460px;} +.span9{width:520px;} +.span10{width:580px;} +.span11{width:640px;} +.span12{width:700px;} +.span13{width:760px;} +.span14{width:820px;} +.span15{width:880px;} +.span16{width:940px;} +.span17{width:1000px;} +.span18{width:1060px;} +.span19{width:1120px;} +.span20{width:1180px;} +.span21{width:1240px;} +.span22{width:1300px;} +.span23{width:1360px;} +.span24{width:1420px;} +.offset1{margin-left:80px;} +.offset2{margin-left:140px;} +.offset3{margin-left:200px;} +.offset4{margin-left:260px;} +.offset5{margin-left:320px;} +.offset6{margin-left:380px;} +.offset7{margin-left:440px;} +.offset8{margin-left:500px;} +.offset9{margin-left:560px;} +.offset10{margin-left:620px;} +.offset11{margin-left:680px;} +.offset12{margin-left:740px;} +.span-one-third{width:300px;} +.span-two-thirds{width:620px;} +.offset-one-third{margin-left:340px;} +.offset-two-thirds{margin-left:660px;} +p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;} +h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;} +h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;} +h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;} +h3,h4,h5,h6{line-height:36px;} +h3{font-size:18px;}h3 small{font-size:14px;} +h4{font-size:16px;}h4 small{font-size:12px;} +h5{font-size:14px;} +h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;} +ul,ol{margin:0 0 18px 25px;} +ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} +ul{list-style:disc;} +ol{list-style:decimal;} +li{line-height:18px;color:#808080;} +ul.unstyled{list-style:none;margin-left:0;} +dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;} +dl dt{font-weight:bold;} +dl dd{margin-left:9px;} +hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;} +strong{font-style:inherit;font-weight:bold;} +em{font-style:italic;font-weight:inherit;line-height:inherit;} +.muted{color:#bfbfbf;} +blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;} +blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';} +address{display:block;line-height:18px;margin-bottom:18px;} +code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +code{background-color:#fee9cc;color:rgba(0, 0, 0, 0.75);padding:1px 3px;} +pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word;} +form{margin-bottom:18px;} +fieldset{margin-bottom:18px;padding-top:18px;}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5;} +form .clearfix{margin-bottom:18px;zoom:1;}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1;*display:inline;} +form .clearfix:after{clear:both;} +label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;} +label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;} +form .input{margin-left:150px;} +input[type=checkbox],input[type=radio]{cursor:pointer;} +input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none;} +input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;} +select,input[type=file]{height:27px;line-height:27px;*margin-top:4px;} +select[multiple]{height:inherit;} +textarea{height:auto;} +.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;} +:-moz-placeholder{color:#bfbfbf;} +::-webkit-input-placeholder{color:#bfbfbf;} +input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);} +input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);} +input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;} +form div.clearfix.error{background:#fae5e3;padding:10px 0;margin:-10px 0 10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}form div.clearfix.error>label,form div.clearfix.error span.help-inline,form div.clearfix.error span.help-block{color:#9d261d;} +form div.clearfix.error input,form div.clearfix.error textarea{border-color:#c87872;-webkit-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);-moz-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);box-shadow:0 0 3px rgba(171, 41, 32, 0.25);}form div.clearfix.error input:focus,form div.clearfix.error textarea:focus{border-color:#b9554d;-webkit-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);-moz-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);box-shadow:0 0 6px rgba(171, 41, 32, 0.5);} +form div.clearfix.error .input-prepend span.add-on,form div.clearfix.error .input-append span.add-on{background:#f4c8c5;border-color:#c87872;color:#b9554d;} +.input-mini,input.mini,textarea.mini,select.mini{width:60px;} +.input-small,input.small,textarea.small,select.small{width:90px;} +.input-medium,input.medium,textarea.medium,select.medium{width:150px;} +.input-large,input.large,textarea.large,select.large{width:210px;} +.input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;} +.input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;} +textarea.xxlarge{overflow-y:auto;} +input.span1,textarea.span1,select.span1{display:inline-block;float:none;width:30px;margin-left:0;} +input.span2,textarea.span2,select.span2{display:inline-block;float:none;width:90px;margin-left:0;} +input.span3,textarea.span3,select.span3{display:inline-block;float:none;width:150px;margin-left:0;} +input.span4,textarea.span4,select.span4{display:inline-block;float:none;width:210px;margin-left:0;} +input.span5,textarea.span5,select.span5{display:inline-block;float:none;width:270px;margin-left:0;} +input.span6,textarea.span6,select.span6{display:inline-block;float:none;width:330px;margin-left:0;} +input.span7,textarea.span7,select.span7{display:inline-block;float:none;width:390px;margin-left:0;} +input.span8,textarea.span8,select.span8{display:inline-block;float:none;width:450px;margin-left:0;} +input.span9,textarea.span9,select.span9{display:inline-block;float:none;width:510px;margin-left:0;} +input.span10,textarea.span10,select.span10{display:inline-block;float:none;width:570px;margin-left:0;} +input.span11,textarea.span11,select.span11{display:inline-block;float:none;width:630px;margin-left:0;} +input.span12,textarea.span12,select.span12{display:inline-block;float:none;width:690px;margin-left:0;} +input.span13,textarea.span13,select.span13{display:inline-block;float:none;width:750px;margin-left:0;} +input.span14,textarea.span14,select.span14{display:inline-block;float:none;width:810px;margin-left:0;} +input.span15,textarea.span15,select.span15{display:inline-block;float:none;width:870px;margin-left:0;} +input.span16,textarea.span16,select.span16{display:inline-block;float:none;width:930px;margin-left:0;} +input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;} +.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;} +.help-inline,.help-block{font-size:11px;line-height:18px;color:#bfbfbf;} +.help-inline{padding-left:5px;*position:relative;*top:-5px;} +.help-block{display:block;max-width:600px;} +.inline-inputs{color:#808080;}.inline-inputs span,.inline-inputs input{display:inline-block;} +.inline-inputs input.mini{width:60px;} +.inline-inputs input.small{width:90px;} +.inline-inputs span{padding:0 2px 0 1px;} +.input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} +.input-prepend .add-on,.input-append .add-on{position:relative;background:#f5f5f5;border:1px solid #ccc;z-index:2;float:left;display:block;width:auto;min-width:16px;height:18px;padding:4px 4px 4px 5px;margin-right:-1px;font-weight:normal;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0 #ffffff;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.input-prepend .active,.input-append .active{background:#a9dba9;border-color:#46a546;} +.input-prepend .add-on{*margin-top:1px;} +.input-append input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.input-append .add-on{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:0;margin-left:-1px;} +.inputs-list{margin:0 0 5px;width:100%;}.inputs-list li{display:block;padding:0;width:100%;} +.inputs-list label{display:block;float:none;width:auto;padding:0;line-height:18px;text-align:left;white-space:normal;}.inputs-list label strong{color:#808080;} +.inputs-list label small{font-size:11px;font-weight:normal;} +.inputs-list .inputs-list{margin-left:25px;margin-bottom:10px;padding-top:0;} +.inputs-list:first-child{padding-top:6px;} +.inputs-list li+li{padding-top:2px;} +.inputs-list input[type=radio],.inputs-list input[type=checkbox]{margin-bottom:0;} +.form-stacked{padding-left:20px;}.form-stacked fieldset{padding-top:9px;} +.form-stacked legend{padding-left:0;} +.form-stacked label{display:block;float:none;width:auto;font-weight:bold;text-align:left;line-height:20px;padding-top:0;} +.form-stacked .clearfix{margin-bottom:9px;}.form-stacked .clearfix div.input{margin-left:0;} +.form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;} +.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;} +.form-stacked .actions{margin-left:-20px;padding-left:20px;} +table{width:100%;margin-bottom:18px;padding:0;border-collapse:separate;*border-collapse:collapse;font-size:13px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;} +table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;} +table td{vertical-align:top;} +table th+th,table td+td{border-left:1px solid #ddd;} +table tr+tr td{border-top:1px solid #ddd;} +table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;} +table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;} +table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;} +table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;} +.zebra-striped tbody tr:nth-child(odd) td{background-color:#f9f9f9;} +.zebra-striped tbody tr:hover td{background-color:#f5f5f5;} +table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;} +table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);} +table .header:hover:after{visibility:visible;} +table .headerSortDown:after,table .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} +table .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} +table .blue{color:#049cdb;border-bottom-color:#049cdb;} +table .headerSortUp.blue,table .headerSortDown.blue{background-color:#ade6fe;} +table .green{color:#46a546;border-bottom-color:#46a546;} +table .headerSortUp.green,table .headerSortDown.green{background-color:#cdeacd;} +table .red{color:#9d261d;border-bottom-color:#9d261d;} +table .headerSortUp.red,table .headerSortDown.red{background-color:#f4c8c5;} +table .yellow{color:#ffc40d;border-bottom-color:#ffc40d;} +table .headerSortUp.yellow,table .headerSortDown.yellow{background-color:#fff6d9;} +table .orange{color:#f89406;border-bottom-color:#f89406;} +table .headerSortUp.orange,table .headerSortDown.orange{background-color:#fee9cc;} +table .purple{color:#7a43b6;border-bottom-color:#7a43b6;} +table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0;} +.topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} +.topbar h3 a:hover,.topbar .brand a:hover,.topbar ul .active>a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;} +.topbar h3{position:relative;} +.topbar h3 a,.topbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;} +.topbar p{margin:0;line-height:40px;}.topbar p a:hover{background-color:transparent;color:#ffffff;} +.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;} +.topbar form.pull-right{float:right;} +.topbar input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#ffffff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.topbar input:-moz-placeholder{color:#e6e6e6;} +.topbar input::-webkit-input-placeholder{color:#e6e6e6;} +.topbar input:hover{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.5);color:#ffffff;} +.topbar input:focus,.topbar input.focused{outline:0;background-color:#ffffff;color:#404040;text-shadow:0 1px 0 #ffffff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);} +.topbar-inner,.topbar .fill{background-color:#222;background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);} +.topbar div>ul,.nav{display:block;float:left;margin:0 10px 0 0;position:relative;left:0;}.topbar div>ul>li,.nav>li{display:block;float:left;} +.topbar div>ul a,.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}.topbar div>ul a:hover,.nav a:hover{color:#ffffff;text-decoration:none;} +.topbar div>ul .active>a,.nav .active>a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);} +.topbar div>ul.secondary-nav,.nav.secondary-nav{float:right;margin-left:10px;margin-right:0;}.topbar div>ul.secondary-nav .menu-dropdown,.nav.secondary-nav .menu-dropdown,.topbar div>ul.secondary-nav .dropdown-menu,.nav.secondary-nav .dropdown-menu{right:0;border:0;} +.topbar div>ul a.menu:hover,.nav a.menu:hover,.topbar div>ul li.open .menu,.nav li.open .menu,.topbar div>ul .dropdown-toggle:hover,.nav .dropdown-toggle:hover,.topbar div>ul .dropdown.open .dropdown-toggle,.nav .dropdown.open .dropdown-toggle{background:#444;background:rgba(255, 255, 255, 0.05);} +.topbar div>ul .menu-dropdown,.nav .menu-dropdown,.topbar div>ul .dropdown-menu,.nav .dropdown-menu{background-color:#333;}.topbar div>ul .menu-dropdown a.menu,.nav .menu-dropdown a.menu,.topbar div>ul .dropdown-menu a.menu,.nav .dropdown-menu a.menu,.topbar div>ul .menu-dropdown .dropdown-toggle,.nav .menu-dropdown .dropdown-toggle,.topbar div>ul .dropdown-menu .dropdown-toggle,.nav .dropdown-menu .dropdown-toggle{color:#ffffff;}.topbar div>ul .menu-dropdown a.menu.open,.nav .menu-dropdown a.menu.open,.topbar div>ul .dropdown-menu a.menu.open,.nav .dropdown-menu a.menu.open,.topbar div>ul .menu-dropdown .dropdown-toggle.open,.nav .menu-dropdown .dropdown-toggle.open,.topbar div>ul .dropdown-menu .dropdown-toggle.open,.nav .dropdown-menu .dropdown-toggle.open{background:#444;background:rgba(255, 255, 255, 0.05);} +.topbar div>ul .menu-dropdown li a,.nav .menu-dropdown li a,.topbar div>ul .dropdown-menu li a,.nav .dropdown-menu li a{color:#999;text-shadow:0 1px 0 rgba(0, 0, 0, 0.5);}.topbar div>ul .menu-dropdown li a:hover,.nav .menu-dropdown li a:hover,.topbar div>ul .dropdown-menu li a:hover,.nav .dropdown-menu li a:hover{background-color:#191919;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));background-image:-moz-linear-gradient(top, #292929, #191919);background-image:-ms-linear-gradient(top, #292929, #191919);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));background-image:-webkit-linear-gradient(top, #292929, #191919);background-image:-o-linear-gradient(top, #292929, #191919);background-image:linear-gradient(top, #292929, #191919);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);color:#ffffff;} +.topbar div>ul .menu-dropdown .active a,.nav .menu-dropdown .active a,.topbar div>ul .dropdown-menu .active a,.nav .dropdown-menu .active a{color:#ffffff;} +.topbar div>ul .menu-dropdown .divider,.nav .menu-dropdown .divider,.topbar div>ul .dropdown-menu .divider,.nav .dropdown-menu .divider{background-color:#222;border-color:#444;} +.topbar ul .menu-dropdown li a,.topbar ul .dropdown-menu li a{padding:4px 15px;} +li.menu,.dropdown{position:relative;} +a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;content:"↓";text-indent:-99999px;vertical-align:top;margin-top:8px;margin-left:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ffffff;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;} +.menu-dropdown,.dropdown-menu{background-color:#ffffff;float:left;display:none;position:absolute;top:40px;z-index:900;min-width:160px;max-width:220px;_width:160px;margin-left:0;margin-right:0;padding:6px 0;zoom:1;border-color:#999;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:0 1px 1px;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.menu-dropdown li,.dropdown-menu li{float:none;display:block;background-color:none;} +.menu-dropdown .divider,.dropdown-menu .divider{height:1px;margin:5px 0;overflow:hidden;background-color:#eee;border-bottom:1px solid #ffffff;} +.topbar .dropdown-menu a,.dropdown-menu a{display:block;padding:4px 15px;clear:both;font-weight:normal;line-height:18px;color:#808080;text-shadow:0 1px 0 #ffffff;}.topbar .dropdown-menu a:hover,.dropdown-menu a:hover{background-color:#dddddd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));background-image:-moz-linear-gradient(top, #eeeeee, #dddddd);background-image:-ms-linear-gradient(top, #eeeeee, #dddddd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));background-image:-webkit-linear-gradient(top, #eeeeee, #dddddd);background-image:-o-linear-gradient(top, #eeeeee, #dddddd);background-image:linear-gradient(top, #eeeeee, #dddddd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);color:#404040;text-decoration:none;-webkit-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);} +.open .menu,.dropdown.open .menu,.open .dropdown-toggle,.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);} +.open .menu-dropdown,.dropdown.open .menu-dropdown,.open .dropdown-menu,.dropdown.open .dropdown-menu{display:block;} +.tabs,.pills{margin:0 0 20px;padding:0;list-style:none;zoom:1;}.tabs:before,.pills:before,.tabs:after,.pills:after{display:table;content:"";zoom:1;*display:inline;} +.tabs:after,.pills:after{clear:both;} +.tabs>li,.pills>li{float:left;}.tabs>li>a,.pills>li>a{display:block;} +.tabs{float:left;width:100%;border-bottom:1px solid #ddd;}.tabs>li{position:relative;top:1px;}.tabs>li>a{padding:0 15px;margin-right:2px;line-height:36px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.tabs>li>a:hover{text-decoration:none;background-color:#eee;border-color:#eee #eee #ddd;} +.tabs>li.active>a{color:#808080;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;} +.tabs .menu-dropdown,.tabs .dropdown-menu{top:35px;border-width:1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;} +.tabs a.menu:after,.tabs .dropdown-toggle:after{border-top-color:#999;margin-top:15px;margin-left:5px;} +.tabs li.open.menu .menu,.tabs .open.dropdown .dropdown-toggle{border-color:#999;} +.tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555;} +.tab-content{clear:both;} +.pills a{margin:5px 3px 5px 0;padding:0 15px;text-shadow:0 1px 1px #ffffff;line-height:30px;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.pills a:hover{background:#00438a;color:#ffffff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);} +.pills .active a{background:#0069d6;color:#ffffff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);} +.tab-content>*,.pill-content>*{display:none;} +.tab-content>.active,.pill-content>.active{display:block;} +.breadcrumb{margin:0 0 18px;padding:7px 14px;background-color:#f5f5f5;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;} +.breadcrumb .divider{padding:0 5px;color:#bfbfbf;} +.breadcrumb .active a{color:#404040;} +.hero-unit{background-color:#f5f5f5;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;} +.hero-unit p{font-size:18px;font-weight:200;line-height:27px;} +footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;} +.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;} +.btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#ffffff;} +.btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} +.btn.success,.alert-message.success{background-color:#57a957;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#57a957 #57a957 #3d773d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} +.btn.info,.alert-message.info{background-color:#339bb9;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#339bb9 #339bb9 #22697d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} +.btn{cursor:pointer;display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);padding:5px 14px 6px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333;font-size:13px;line-height:normal;border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;-ms-transition:0.1s linear all;-o-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333;text-decoration:none;} +.btn:focus{outline:1px dotted #666;} +.btn.primary{color:#ffffff;background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(top, #049cdb, #0064cd);background-image:-ms-linear-gradient(top, #049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(top, #049cdb, #0064cd);background-image:-o-linear-gradient(top, #049cdb, #0064cd);background-image:linear-gradient(top, #049cdb, #0064cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#0064cd #0064cd #003f81;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} +.btn:active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);} +.btn.disabled{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.btn[disabled]{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.btn.large{font-size:15px;line-height:normal;padding:9px 14px 9px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} +.btn.small{padding:7px 9px 7px;font-size:11px;} +:root .alert-message,:root .btn{border-radius:0 \0;} +button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0;} +.close{float:right;color:#000000;font-size:20px;font-weight:bold;line-height:13.5px;text-shadow:0 1px 0 #ffffff;filter:alpha(opacity=20);-khtml-opacity:0.2;-moz-opacity:0.2;opacity:0.2;}.close:hover{color:#000000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:0.4;-moz-opacity:0.4;opacity:0.4;} +.alert-message{position:relative;padding:7px 15px;margin-bottom:18px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));background-image:-moz-linear-gradient(top, #fceec1, #eedc94);background-image:-ms-linear-gradient(top, #fceec1, #eedc94);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));background-image:-webkit-linear-gradient(top, #fceec1, #eedc94);background-image:-o-linear-gradient(top, #fceec1, #eedc94);background-image:linear-gradient(top, #fceec1, #eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);}.alert-message .close{*margin-top:3px;} +.alert-message h5{line-height:18px;} +.alert-message p{margin-bottom:0;} +.alert-message div{margin-top:5px;margin-bottom:2px;line-height:28px;} +.alert-message .btn{-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);} +.alert-message.block-message{background-image:none;background-color:#fdf5d9;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);padding:14px;border-color:#fceec1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}.alert-message.block-message ul,.alert-message.block-message p{margin-right:30px;} +.alert-message.block-message ul{margin-bottom:0;} +.alert-message.block-message li{color:#404040;} +.alert-message.block-message .alert-actions{margin-top:5px;} +.alert-message.block-message.error,.alert-message.block-message.success,.alert-message.block-message.info{color:#404040;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);} +.alert-message.block-message.error{background-color:#fddfde;border-color:#fbc7c6;} +.alert-message.block-message.success{background-color:#d1eed1;border-color:#bfe7bf;} +.alert-message.block-message.info{background-color:#ddf4fb;border-color:#c6edf9;} +.pagination{height:36px;margin:18px 0;}.pagination ul{float:left;margin:0;border:1px solid #ddd;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} +.pagination li{display:inline;} +.pagination a{float:left;padding:0 14px;line-height:34px;border-right:1px solid;border-right-color:#ddd;border-right-color:rgba(0, 0, 0, 0.15);*border-right-color:#ddd;text-decoration:none;} +.pagination a:hover,.pagination .active a{background-color:#c7eefe;} +.pagination .disabled a,.pagination .disabled a:hover{background-color:transparent;color:#bfbfbf;} +.pagination .next a{border:0;} +.well{background-color:#f5f5f5;margin-bottom:20px;padding:19px;min-height:20px;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} +.modal-backdrop{background-color:#000000;position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;}.modal-backdrop.fade{opacity:0;} +.modal-backdrop,.modal-backdrop.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;} +.modal{position:fixed;top:50%;left:50%;z-index:11000;width:560px;margin:-250px 0 0 -250px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal .close{margin-top:7px;} +.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;} +.modal.fade.in{top:50%;} +.modal-header{border-bottom:1px solid #eee;padding:5px 15px;} +.modal-body{padding:15px;} +.modal-footer{background-color:#f5f5f5;padding:14px 15px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;margin-bottom:0;}.modal-footer:before,.modal-footer:after{display:table;content:"";zoom:1;*display:inline;} +.modal-footer:after{clear:both;} +.modal-footer .btn{float:right;margin-left:5px;} +.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}.twipsy.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;} +.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} +.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} +.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} +.twipsy-inner{padding:3px 8px;background-color:#000000;color:white;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.twipsy-arrow{position:absolute;width:0;height:0;} +.popover{position:absolute;top:0;left:0;z-index:1000;padding:5px;display:none;}.popover.above .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} +.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} +.popover.below .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} +.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +.popover .arrow{position:absolute;width:0;height:0;} +.popover .inner{background-color:#000000;background-color:rgba(0, 0, 0, 0.8);padding:3px;overflow:hidden;width:280px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);} +.popover .title{background-color:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee;} +.popover .content{background-color:#ffffff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0;} +.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;} +.label{padding:1px 3px 2px;background-color:#bfbfbf;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label.important{background-color:#c43c35;} +.label.warning{background-color:#f89406;} +.label.success{background-color:#46a546;} +.label.notice{background-color:#62cffc;} +.media-grid{margin-left:-20px;margin-bottom:0;zoom:1;}.media-grid:before,.media-grid:after{display:table;content:"";zoom:1;*display:inline;} +.media-grid:after{clear:both;} +.media-grid li{display:inline;} +.media-grid a{float:left;padding:4px;margin:0 0 20px 20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}.media-grid a img{display:block;} +.media-grid a:hover{border-color:#0069d6;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} diff --git a/resources/bootstrap.gb.css b/resources/bootstrap.gb.css new file mode 100644 index 0000000..cf82c87 --- /dev/null +++ b/resources/bootstrap.gb.css @@ -0,0 +1,758 @@ +body, input, select { + color: #202020; +} + +ul, ol { + margin-bottom: 10px !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; + background-repeat:repeat-x; + background-image:-khtml-gradient(linear, left top, left bottom, from(#000060), to(#000040)); + background-image:-moz-linear-gradient(top, #000060, #000040); + background-image:-ms-linear-gradient(top, #000060, #000040); + background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #000060), color-stop(100%, #000040)); + background-image:-webkit-linear-gradient(top, #000060, #000040); + background-image:-o-linear-gradient(top, #000060, #000040); + background-image:linear-gradient(top, #000060, #000040); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#000060', endColorstr='#000040', GradientType=0); + -webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1); + -moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1); + box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1); + border-bottom: 2px solid #ff9900 !important; +} + +.breadcrumb { + margin-top: 5px !important; + margin-bottom: 5px !important; +} + +.page-header { + margin-bottom: 5px; +} + +.page-header h2 small { + font-size: 80%; + font-weight: bold; +} + +div.page_footer { + clear: both; + height: 17px; + color: black; + background-color: #ffffff; + padding: 5px; + border-top: 1px solid #bbb; + font-style: italic; +} + +pre, code, pre.prettyprint, pre.plainprint { + background-color: #ffffff; + color: black; + font-family: monospace; + font-size:12px; + border:0px; + padding: 0; + line-height: 1.35em; +} + +table { + margin-bottom:5px !important; +} + +pre.prettyprint ol { + padding-left:25px; +} + +.age0, .age1, .age2 { + font-size: 12px; +} + +/* age0: age < 60*60*2 */ +.age0 { + color: #008000; + font-style: italic; + font-weight: bold; +} + +/* age1: 60*60*2 <= age < 60*60*24*2 */ +.age1 { + color: #008000; + font-style: italic; +} + +/* age2: 60*60*24*2 <= age */ +.age2 { + font-style: italic; +} + +a.list { + text-decoration: none; + color: inherit; +} + +a.list.subject { + font-weight: bold; +} + +a.list.name { + font-weight: bold; +} + +a.list:hover { + text-decoration: underline; + color: #880000; +} + +span.empty { + font-size: 0.9em; + font-style: italic; + padding-left:10px; + color: #008000; +} + +span.link { + color: #888; +} + +span.link, span.link a { + font-family: sans-serif; + font-size: 11px; +} + +span.link em, div.link span em { + font-style: normal; + font-family: sans-serif; + font-size: 11px; +} + +img.inlineIcon { + padding-left: 1px; + padding-right: 1px; +} + +img.overview { + float:right; + border:1px solid #CCCCCC; +} + +div.header, div.commitHeader, table.repositories th { + background-color:#e0e0e0; + background-repeat:repeat-x; + background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#e0e0e0)); + background-image:-moz-linear-gradient(top, #ffffff, #e0e0e0); + background-image:-ms-linear-gradient(top, #ffffff, #e0e0e0); + background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #e0e0e0)); + background-image:-webkit-linear-gradient(top, #ffffff, #e0e0e0); + background-image:-o-linear-gradient(top, #ffffff, #e0e0e0); + background-image:linear-gradient(top, #ffffff, #e0e0e0); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e0e0e0', GradientType=0); + -webkit-box-shadow:inset 0 1px 0 #ffffff; + -moz-box-shadow:inset 0 1px 0 #ffffff; + box-shadow:inset 0 1px 0 #ffffff; +} + +div.header { + padding: 3px; + border: 1px solid #ddd; + border-bottom: 0; + border-radius: 3px 3px 0 0; +} + +div.commitHeader { + margin:0 0 2px; + padding:7px 14px; + border:1px solid #ddd; + border-radius: 3px; + -webkit-border-radius:3px; + -moz-border-radius:3px;border-radius:3px; +} + +div.header a, div.commitHeader a { + color: black; + text-decoration: none; + font-weight: bold; +} + +div.header a:hover, div.commitHeader a:hover { + text-decoration: underline; +} + +div.page_nav2 { + padding: 2px 5px 7px 5px; +} + +div.admin_nav { + border-bottom: 0px; + text-align: right; + padding: 5px 5px 5px 2px; +} + +div.admin_nav a { + text-decoration: none; +} + +div.admin_nav a:hover { + text-decoration: underline; +} + +div.search { + height: 40px; + padding-top:2px; +} + +div.search input { + -webkit-border-radius:0;-moz-border-radius:0x;border-radius:0; + vertical-align: top; + background: url(search-icon.png) no-repeat 4px center; + background-color: transparent; + border: 1px solid transparent; + outline: none; + padding: 2px 2px 2px 22px; + text-shadow: none; + margin: 0px; + + color: #ddd; +} + +div.search input:hover, div.search input:focus { + background-color: transparent; + border: 1px solid transparent; + padding: 2px 2px 2px 22px; + text-shadow: none; + + color: #ddd; + border-bottom: 1px solid #ff9900; +} + +div.search input:focus { + color: white; +} + +/* div.search input:focused { */ +/* background-color: transparent; */ +/* border: 1px solid transparent; */ +/* padding: 2px 2px 2px 22px; */ +/* text-shadow: none; */ +/* } */ + +div.login input:focus { + background-color: rgba(255, 255, 255, 0.6); + text-shadow: none; + color: white; +} + +div.commit_message { + font-family: monospace; + padding: 8px; + border: solid #ccc; + border-width: 1px 0px 0px; +} + +div.commit_message a { + font-family: monospace; +} + +div.bug_open, span.bug_open { + padding: 2px; + background-color: #803333; + color: white; + text-align: center; +} + +div.bug_resolved, span.bug_resolved { + padding: 2px; + background-color: #408040; + color: white; + text-align: center; +} + +div.bug_invalid, span.bug_invalid { + padding: 2px; + background-color: gray; + text-align: center; +} + +div.bug_hold, span.bug_hold { + padding: 2px; + background-color: orange; + text-align: center; +} + +div.diff { + font-family: monospace; + overflow: auto; +} + +div.diff.header { + -moz-border-bottom-colors: none; + -moz-border-image: none; + -moz-border-left-colors: none; + -moz-border-right-colors: none; + -moz-border-top-colors: none; + background-color: #EDECE6; + border-color: #D9D8D1; + border-style: solid; + border-width: 1px; + font-weight: bold; + margin-top: 10px; + padding: 4px 0 2px; +} + +div.diff.extended_header { + background-color: #F6F5EE; + padding: 2px 0; + font-family: inherit; +} + +span.diff.add { + color: #008800; + font-family: inherit; +} + +span.diff.remove { + color: #FFDDDD; + font-family: inherit; +} + +span.diff.unchanged { + color: inherit; + font-family: inherit; +} + +div.diff.hunk_header { + -moz-border-bottom-colors: none; + -moz-border-image: none; + -moz-border-left-colors: none; + -moz-border-right-colors: none; + -moz-border-top-colors: none; + border-color: #FFE0FF; + border-style: dotted; + border-width: 1px 0 0; + margin-top: 2px; + font-family: inherit; +} + +span.diff.hunk_info { + background-color: #FFEEFF; + color: #990099; + font-family: inherit; +} + +span.diff.hunk_section { + color: #AA22AA; + font-family: inherit; +} + +div.diff.add2 { + background-color: #DDFFDD; + font-family: inherit; +} + +div.diff.remove2 { + background-color: #FFDDDD; + font-family: inherit; +} + +div.diff table { + border-radius: 0; + border-right: 1px solid #bbb; + border-bottom: 1px solid #bbb; + width: 100%; +} + +div.diff table th, div.diff table td { + margin: 0px; + padding: 0px; + font-family: monospace; + border: 0; +} + +div.diff table th { + background-color: #f0f0f0; + text-align: center; + color: #999; + padding-left: 5px; + padding-right: 5px; + width: 30px; +} + +div.diff table th.header { + background-color: #D2C3AF; + border-right: 0px; + border-bottom: 1px solid #808080; + font-family: inherit; + font-size:0.9em; + color: black; + padding: 2px; + text-align: left; +} + +div.diff table td.hunk_header { + background-color: #dAe2e5 !important; + border-top: 1px solid #bac2c5; + border-bottom: 1px solid #bac2c5; + color: #555; +} + +div.diff table td { + border-left: 1px solid #bbb; + background-color: #f5f5f5; +} + +td.changeType { + width: 15px; +} + +span.addition, span.modification, span.deletion, span.rename { + border: 1px solid #888; + float: left; + height: 0.8em; + margin: 0.2em 0.5em 0 0; + overflow: hidden; + width: 0.8em; +} + +span.addition { + background-color: #ccffcc; +} + +span.modification { + background-color: #ffdd88; +} + +span.deletion { + background-color: #f8bbbb; +} + +span.rename { + background-color: #cAc2f5; +} + +div.commitLegend { + float: right; + padding: 0.4em 0.4em 0.2em 0.4em; + vertical-align:top; + margin: 0px; +} + +div.commitLegend span { + font-size: 0.9em; + vertical-align: top; +} + +div.references { + float: right; + text-align: right; +} + +table.plain { + width: 0 !important; + border: 0; +} + +table.plain th, table.plain td { + white-space: nowrap; + padding: 1px 6px; + border: 0; +} + +table.pretty { + border-radius: 0 0 3px 3px; +} + +table.pretty td.icon { + padding: 0px 0px 0px 2px; + width: 18px; + vertical-align: middle; +} + +table.pretty td.icon img { + vertical-align: top; +} + +table.pretty td { + padding: 2px 4px; + border-left: 0; +} + +table.comments td { + padding: 4px; + line-height: 17px; +} + +table.repositories { + border-spacing: 0px; +} + +table.repositories th { + padding: 4px; + border:0; +} + +table.repositories td { + padding: 2px; + border-left: 0; +} + +table.repositories td.rightAlign { + text-align: right; +} + +table.repositories td.icon img { + vertical-align: top; +} + +table.repositories tr.group { + background-color: #ccc; +} + +table.repositories tr.group td { + font-weight: bold; + color: black; + background-color: #ddd; + padding-left: 5px; + border-top: 1px solid #aaa; + border-bottom: 1px solid #aaa; +} + +table.palette { border:0; width: 0 !important; } +table.palette td.header { + font-weight: bold; + background-color: #ffffff !important; + padding-top: 0px !important; + margin-bottom: 0 !imporant; + border: 0 !important; + border-radius: 0 !important; + line-height: 1em; +} +table.palette td.pane { + padding: 0px; +} + +table.gitnotes { + border: 0; +} +table.gitnotes td { + border-top: 1px solid #ccc; + padding-top: 3px; + vertical-align:top; +} + +table.gitnotes table { + border: none; +} + +table.gitnotes td table td { + border: none; + padding: 0px; +} + +table.gitnotes td.info { +} + +table.gitnotes td.message { + width: 65%; + border-left: 1px solid #ccc; +} + +table.annotated { +} + +table.annotated tr.even { + background-color: white; +} + +table.annotated tr.odd { + background-color: #f5f5f5; +} + +table.annotated td { + padding: 0px; + 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; +} + +tr.dark { + background-color: #f5f5f5; +} + +/* currently both use the same, but it can change */ +tr.light:hover, +tr.dark:hover { + background-color: #000070; + color: white; +} + +tr.light:hover a, +tr.dark:hover a { + color: white; +} + +td.author { + font-style: italic !important; +} + +td.date { + font-style: italic !important; +} + +span.sha1, span.sha1 a, span.sha1 a span { + font-family: monospace; + font-size: 13px; +} + +td.mode { + text-align: right; + font-family: monospace; + width: 8em; + padding-right:15px; +} + +td.size { + text-align: right; + width: 8em; + padding-right:15px; +} + +td.rightAlign { + text-align: right; +} + +td.treeLinks { + text-align: right; + width: 13em; +} + +span.metricsTitle { + font-size: 2em; +} + +span .tagRef, span .headRef, span .localBranch, span .remoteBranch, span .otherRef { + padding: 0px 3px; + margin-right:2px; + font-family: sans-serif; + font-size: 9px; + font-weight: normal; + border: 1px solid; + color: black; +} + +span .tagRef a span, span .headRef a span, span .localBranch a span, span .remoteBranch a span, span .otherRef a span { + font-size: 9px; +} + +span .tagRef a, span .headRef a, span .localBranch a, span .remoteBranch a, span .otherRef a { + text-decoration: none; + color: black !important; +} + +span .tagRef a:hover, span .headRef a:hover, span .localBranch a:hover, span .remoteBranch a:hover, span .otherRef a:hover { + color: black !important; + text-decoration: underline; +} + +span .otherRef { + background-color: #b0e0f0; + border-color: #80aaaa; +} + +span .remoteBranch { + background-color: #cAc2f5; + border-color: #6c6cbf; +} + +span .tagRef { + background-color: #ffffaa; + border-color: #ffcc00; +} + +span .headRef { + background-color: #ffaaff; + border-color: #ff00ee; +} + +span .localBranch { + background-color: #ccffcc; + border-color: #00cc33; +} + +table .palette td.buttons button { + -webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px; + border: 1px solid #ccc !important; + padding: 10px; + margin-bottom: 10px; +} + +table .palette td.buttons button:hover { + border: 1px solid #0069D6 !important; +} + +table .palette td.buttons button:active { + border: 1px solid orange !important; +} + +.feedbackPanelERROR, .feedbackPanelINFO { + list-style: none; + line-height: 35px; +} + +.feedbackPanelINFO span, .feedbackPanelERROR span { + position:relative;padding:7px 15px;margin-top:5px;margin-bottom:5px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));background-image:-moz-linear-gradient(top, #fceec1, #eedc94);background-image:-ms-linear-gradient(top, #fceec1, #eedc94);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));background-image:-webkit-linear-gradient(top, #fceec1, #eedc94);background-image:-o-linear-gradient(top, #fceec1, #eedc94);background-image:linear-gradient(top, #fceec1, #eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25); +} + +.feedbackPanelERROR span { + color: #ffffff; + background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); +} + +/* 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; } diff --git a/resources/gitblt2_white.png b/resources/gitblt2_white.png new file mode 100644 index 0000000..f4c5463 --- /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 0000000..eeea021 --- /dev/null +++ b/resources/gitblt_25_white.png Binary files differ diff --git a/resources/login.mkd b/resources/login.mkd new file mode 100644 index 0000000..5b8e89d --- /dev/null +++ b/resources/login.mkd @@ -0,0 +1,3 @@ +## Please Login + +Pleaes enter your credentials to access this Gitblit site. diff --git a/resources/markdown.css b/resources/markdown.css index 075971c..e0bfe38 100644 --- a/resources/markdown.css +++ b/resources/markdown.css @@ -4,6 +4,11 @@ div.markdown { line-height: 1.4em; + color: black; +} + +div.markdown li { + color: black; } div.markdown h1, @@ -16,16 +21,14 @@ } div.markdown h1 { - margin-top: 1em; + margin-top: 0.5em; margin-bottom: 0.5em; - padding-bottom: 0.5em; border-bottom: 2px solid #000080 !important; } div.markdown h2 { margin-top: 1em; margin-bottom: 0.5em; - padding-bottom: 0.5em; border-bottom: 2px solid #000080 !important; } diff --git a/src/com/gitblit/build/BuildSite.java b/src/com/gitblit/build/BuildSite.java index de4f071..0746a6b 100644 --- a/src/com/gitblit/build/BuildSite.java +++ b/src/com/gitblit/build/BuildSite.java @@ -91,7 +91,7 @@ System.out.println(MessageFormat.format("Generating site from {0} Markdown Docs in {1} ", markdownFiles.length, sourceFolder.getAbsolutePath())); - String linkPattern = "<a href=''{0}''>{1}</a>"; + String linkPattern = "<li><a href=''{0}''>{1}</a></li>"; StringBuilder sb = new StringBuilder(); for (File file : markdownFiles) { String documentName = getDocumentName(file); diff --git a/src/com/gitblit/models/FederationModel.java b/src/com/gitblit/models/FederationModel.java index d67ae56..61c8576 100644 --- a/src/com/gitblit/models/FederationModel.java +++ b/src/com/gitblit/models/FederationModel.java @@ -198,22 +198,7 @@ @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 e85fd6a..d70866f 100644 --- a/src/com/gitblit/models/RepositoryModel.java +++ b/src/com/gitblit/models/RepositoryModel.java @@ -22,6 +22,7 @@ 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 @@ @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 bfbc624..80147d4 100644 --- a/src/com/gitblit/utils/JGitUtils.java +++ b/src/com/gitblit/utils/JGitUtils.java @@ -299,7 +299,7 @@ } 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 77d3cbb..f4e9256 100644 --- a/src/com/gitblit/utils/StringUtils.java +++ b/src/com/gitblit/utils/StringUtils.java @@ -19,6 +19,8 @@ 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 @@ } 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/AuthorizationStrategy.java b/src/com/gitblit/wicket/AuthorizationStrategy.java index b6b745b..452215a 100644 --- a/src/com/gitblit/wicket/AuthorizationStrategy.java +++ b/src/com/gitblit/wicket/AuthorizationStrategy.java @@ -24,7 +24,6 @@ import com.gitblit.Keys; import com.gitblit.models.UserModel; import com.gitblit.wicket.pages.BasePage; -import com.gitblit.wicket.pages.LoginPage; import com.gitblit.wicket.pages.RepositoriesPage; public class AuthorizationStrategy extends AbstractPageAuthorizationStrategy implements @@ -36,6 +35,12 @@ @SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected boolean isPageAuthorized(Class pageClass) { + if (RepositoriesPage.class.equals(pageClass)) { + // allow all requests to get to the RepositoriesPage with its inline + // authentication form + return true; + } + if (BasePage.class.isAssignableFrom(pageClass)) { boolean authenticateView = GitBlit.getBoolean(Keys.web.authenticateViewPages, true); boolean authenticateAdmin = GitBlit.getBoolean(Keys.web.authenticateAdminPages, true); @@ -73,12 +78,7 @@ @Override public void onUnauthorizedInstantiation(Component component) { if (component instanceof BasePage) { - GitBlitWebSession session = GitBlitWebSession.get(); - if (!session.isLoggedIn()) { - throw new RestartResponseAtInterceptPageException(LoginPage.class); - } else { - throw new RestartResponseAtInterceptPageException(RepositoriesPage.class); - } + throw new RestartResponseAtInterceptPageException(RepositoriesPage.class); } } } diff --git a/src/com/gitblit/wicket/GitBlitWebApp.java b/src/com/gitblit/wicket/GitBlitWebApp.java index 8c41df0..3edcf6a 100644 --- a/src/com/gitblit/wicket/GitBlitWebApp.java +++ b/src/com/gitblit/wicket/GitBlitWebApp.java @@ -32,17 +32,15 @@ import com.gitblit.wicket.pages.CommitDiffPage; import com.gitblit.wicket.pages.CommitPage; import com.gitblit.wicket.pages.DocsPage; -import com.gitblit.wicket.pages.ReviewProposalPage; import com.gitblit.wicket.pages.FederationRegistrationPage; import com.gitblit.wicket.pages.HistoryPage; import com.gitblit.wicket.pages.LogPage; -import com.gitblit.wicket.pages.LoginPage; -import com.gitblit.wicket.pages.LogoutPage; import com.gitblit.wicket.pages.MarkdownPage; import com.gitblit.wicket.pages.MetricsPage; import com.gitblit.wicket.pages.PatchPage; import com.gitblit.wicket.pages.RawPage; import com.gitblit.wicket.pages.RepositoriesPage; +import com.gitblit.wicket.pages.ReviewProposalPage; import com.gitblit.wicket.pages.SearchPage; import com.gitblit.wicket.pages.SummaryPage; import com.gitblit.wicket.pages.TagPage; @@ -100,12 +98,6 @@ // federation urls mount("/proposal", ReviewProposalPage.class, "t"); mount("/registration", FederationRegistrationPage.class, "u", "n"); - - // setup login/logout urls, if we are using authentication - if (useAuthentication) { - mount("/login", LoginPage.class); - mount("/logout", LogoutPage.class); - } } private void mount(String location, Class<? extends WebPage> clazz, String... parameters) { diff --git a/src/com/gitblit/wicket/GitBlitWebApp.properties b/src/com/gitblit/wicket/GitBlitWebApp.properties index f279612..2aa5107 100644 --- a/src/com/gitblit/wicket/GitBlitWebApp.properties +++ b/src/com/gitblit/wicket/GitBlitWebApp.properties @@ -66,7 +66,7 @@ gb.missingUsername = Missing Username gb.edit = edit gb.searchTypeTooltip = Select Search Type -gb.searchTooltip = Search Gitblit +gb.searchTooltip = Search {0} gb.delete = delete gb.docs = docs gb.accessRestriction = access restriction @@ -138,4 +138,6 @@ gb.message = message gb.myUrlDescription = the publicly accessible url for your Gitblit instance gb.destinationUrl = send to -gb.destinationUrlDescription = the url of the Gitblit instance to send your proposal \ No newline at end of file +gb.destinationUrlDescription = the url of the Gitblit instance to send your proposal +gb.users = users +gb.federation = federation \ No newline at end of file diff --git a/src/com/gitblit/wicket/WicketUtils.java b/src/com/gitblit/wicket/WicketUtils.java index 36f74a1..e5b7f69 100644 --- a/src/com/gitblit/wicket/WicketUtils.java +++ b/src/com/gitblit/wicket/WicketUtils.java @@ -88,13 +88,13 @@ public static void setTicketCssClass(Component container, String state) { String css = null; if (state.equals("open")) { - css = "bug_open"; + css = "label important"; } else if (state.equals("hold")) { - css = "bug_hold"; + css = "label warning"; } else if (state.equals("resolved")) { - css = "bug_resolved"; + css = "label success"; } else if (state.equals("invalid")) { - css = "bug_invalid"; + css = "label"; } if (css != null) { setCssClass(container, css); @@ -102,7 +102,7 @@ } 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 aaf3a35..a089e2a 100644 --- a/src/com/gitblit/wicket/pages/BasePage.html +++ b/src/com/gitblit/wicket/pages/BasePage.html @@ -7,20 +7,14 @@ <!-- Head --> <wicket:head> <title wicket:id="title">[page title]</title> - <link rel="stylesheet" type="text/css" href="gitblit.css"/> + <link rel="stylesheet" href="bootstrap.130.css"/> + <link rel="stylesheet" type="text/css" href="bootstrap.gb.css"/> <link rel="icon" href="gitblt-favicon.png" type="image/png" /> </wicket:head> - <body> - <!-- page header --> - <div class="page_header"> - <a title="gitblit homepage" href="http://gitblit.com/"> - <img src="gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/> - </a> - <span> - <span wicket:id="siteName">[site name]</span> / <span wicket:id="repositoryName">[repository name]</span> <span wicket:id="pageName">[page name]</span> - </span> - </div> + <body style="padding-top: 40px;"> + <div class="container"> + <div class="content"> <!-- page content --> <wicket:child /> @@ -28,10 +22,14 @@ <!-- 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> + </div> + </div> </body> <!-- user fragment --> diff --git a/src/com/gitblit/wicket/pages/BasePage.java b/src/com/gitblit/wicket/pages/BasePage.java index 0169c8e..d31979d 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.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; @@ -87,21 +88,15 @@ } protected void setupPage(String repositoryName, String pageName) { - if (repositoryName != null && repositoryName.trim().length() > 0) { add(new Label("title", getServerName() + " - " + repositoryName)); } else { add(new Label("title", getServerName())); } - // header - String siteName = GitBlit.getString(Keys.web.siteName, Constants.NAME); - if (siteName == null || siteName.trim().length() == 0) { - siteName = Constants.NAME; - } - add(new LinkPanel("siteName", null, siteName, RepositoriesPage.class, null)); - add(new LinkPanel("repositoryName", null, repositoryName, SummaryPage.class, - WicketUtils.newRepositoryParameter(repositoryName))); - add(new Label("pageName", pageName)); + + 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")); @@ -200,7 +195,7 @@ if (GitBlitWebSession.get().isLoggedIn()) { error(message, true); } else { - throw new RestartResponseAtInterceptPageException(LoginPage.class); + throw new RestartResponseAtInterceptPageException(RepositoriesPage.class); } } @@ -226,8 +221,7 @@ } else { // login add(new Label("username").setVisible(false)); - add(new LinkPanel("loginLink", null, markupProvider.getString("gb.login"), - LoginPage.class)); + add(new Label("loginLink").setVisible(false)); add(new Label("separator").setVisible(false)); add(new Label("changePasswordLink").setVisible(false)); } diff --git a/src/com/gitblit/wicket/pages/BlamePage.html b/src/com/gitblit/wicket/pages/BlamePage.html index 2e20c18..ccbfcec 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 031352e..938e0ec 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 054b343..fec2414 100644 --- a/src/com/gitblit/wicket/pages/ChangePasswordPage.java +++ b/src/com/gitblit/wicket/pages/ChangePasswordPage.java @@ -18,17 +18,13 @@ 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.utils.StringUtils; import com.gitblit.wicket.GitBlitWebSession; -public class ChangePasswordPage extends WebPage { +public class ChangePasswordPage extends RootSubPage { IModel<String> password = new Model<String>(""); IModel<String> confirmPassword = new Model<String>(""); @@ -54,10 +50,7 @@ // 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 @@ 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 c33184d..7f09f75 100644 --- a/src/com/gitblit/wicket/pages/EditRepositoryPage.html +++ b/src/com/gitblit/wicket/pages/EditRepositoryPage.html @@ -6,35 +6,29 @@ <wicket:extend> <body onload="document.getElementById('name').focus();"> - <!-- Push content down to preserve header image --> - <div style="padding-top:20px"></div> - - <div style="text-align:center;" wicket:id="feedback">[Feedback Panel]</div> - <!-- Repository Table --> <form wicket:id="editForm"> <table class="plain"> <tbody> - <tr><th><wicket:message key="gb.name"></wicket:message></th><td class="edit"><input type="text" wicket:id="name" id="name" size="40" tabindex="1" /> <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 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 type="text" wicket:id="origin" size="80" tabindex="3" /></td></tr> + <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" /> <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="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" /> <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" /> <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" /> <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" /> <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" /> <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" /> <i><wicket:message key="gb.isFrozenDescription"></wicket:message></i></td></tr> - <tr><td style="padding-top:10px;" colspan="2"><hr></hr></td></tr> - <tr><th><wicket:message key="gb.accessRestriction"></wicket:message></th><td class="edit"><select wicket:id="accessRestriction" tabindex="10" /></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><th><wicket:message key="gb.federationStrategy"></wicket:message></th><td class="edit"><select 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></th><td class="editButton"><input type="submit" value="Save" wicket:message="value:gb.save" wicket:id="save" tabindex="12" /> <input type="submit" value="Cancel" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="13" /></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></th><td class="editButton"><input class="btn" type="submit" value="Cancel" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="12" /> <input class="btn primary" type="submit" value="Save" wicket:message="value:gb.save" wicket:id="save" tabindex="13" /> </td></tr> </tbody> </table> </form> - </body> </wicket:extend> </html> \ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/com/gitblit/wicket/pages/EditRepositoryPage.java index 7349ca5..2afe014 100644 --- a/src/com/gitblit/wicket/pages/EditRepositoryPage.java +++ b/src/com/gitblit/wicket/pages/EditRepositoryPage.java @@ -47,7 +47,7 @@ import com.gitblit.wicket.GitBlitWebSession; import com.gitblit.wicket.WicketUtils; -public class EditRepositoryPage extends BasePage { +public class EditRepositoryPage extends RootSubPage { private final boolean isCreate; @@ -76,15 +76,16 @@ List<String> federationSets = new ArrayList<String>(); List<String> repositoryUsers = new ArrayList<String>(); if (isCreate) { - super.setupPage("", getString("gb.newRepository")); + super.setupPage(getString("gb.newRepository"), ""); } else { - super.setupPage("", getString("gb.edit")); + super.setupPage(getString("gb.edit"), repositoryModel.name); if (repositoryModel.accessRestriction.exceeds(AccessRestrictionType.NONE)) { repositoryUsers.addAll(GitBlit.self().getRepositoryUsers(repositoryModel)); Collections.sort(repositoryUsers); } federationSets.addAll(repositoryModel.federationSets); - } + } + final String oldName = repositoryModel.name; // users palette diff --git a/src/com/gitblit/wicket/pages/EditUserPage.html b/src/com/gitblit/wicket/pages/EditUserPage.html index d36bf5a..ceda3cb 100644 --- a/src/com/gitblit/wicket/pages/EditUserPage.html +++ b/src/com/gitblit/wicket/pages/EditUserPage.html @@ -6,12 +6,7 @@ <wicket:extend> <body onload="document.getElementById('username').focus();"> - <!-- Push content down to preserve header image --> - <div style="padding-top:20px"></div> - - <div style="text-align:center;" wicket:id="feedback">[Feedback Panel]</div> - - <!-- Repository Table --> + <!-- User Table --> <form wicket:id="editForm"> <table class="plain"> <tbody> @@ -21,7 +16,7 @@ <tr><th><wicket:message key="gb.canAdmin"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="canAdmin" tabindex="6" /> <i><wicket:message key="gb.canAdminDescription"></wicket:message></i></td></tr> <tr><th><wicket:message key="gb.excludeFromFederation"></wicket:message></th><td class="edit"><input type="checkbox" wicket:id="excludeFromFederation" tabindex="7" /> <i><wicket:message key="gb.excludeFromFederationDescription"></wicket:message></i></td></tr> <tr><th style="vertical-align: top;"><wicket:message key="gb.restrictedRepositories"></wicket:message></th><td style="padding:2px;"><span wicket:id="repositories"></span></td></tr> - <tr><th></th><td class="editButton"><input type="submit" value="Save" wicket:message="value:gb.save" wicket:id="save" tabindex="8" /> <input type="submit" value="Cancel" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="9" /></td></tr> + <tr><th></th><td class="editButton"><input class="btn" type="submit" value="Cancel" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="8" /> <input class="btn primary" type="submit" value="Save" wicket:message="value:gb.save" wicket:id="save" tabindex="9" /></td></tr> </tbody> </table> </form> diff --git a/src/com/gitblit/wicket/pages/EditUserPage.java b/src/com/gitblit/wicket/pages/EditUserPage.java index a358911..78e9461 100644 --- a/src/com/gitblit/wicket/pages/EditUserPage.java +++ b/src/com/gitblit/wicket/pages/EditUserPage.java @@ -44,7 +44,7 @@ import com.gitblit.wicket.WicketUtils; @RequiresAdminRole -public class EditUserPage extends BasePage { +public class EditUserPage extends RootSubPage { private final boolean isCreate; @@ -66,10 +66,11 @@ protected void setupPage(final UserModel userModel) { if (isCreate) { - super.setupPage("", getString("gb.newUser")); + super.setupPage(getString("gb.newUser"), ""); } else { - super.setupPage("", getString("gb.edit")); + super.setupPage(getString("gb.edit"), userModel.username); } + final Model<String> confirmPassword = new Model<String>( StringUtils.isEmpty(userModel.password) ? "" : userModel.password); CompoundPropertyModel<UserModel> model = new CompoundPropertyModel<UserModel>(userModel); @@ -156,8 +157,8 @@ userModel.username)); setResponsePage(EditUserPage.class); } else { - // back to home - setResponsePage(RepositoriesPage.class); + // back to users page + setResponsePage(UsersPage.class); } } }; @@ -181,7 +182,7 @@ @Override public void onSubmit() { - setResponsePage(RepositoriesPage.class); + setResponsePage(UsersPage.class); } }; cancel.setDefaultFormProcessing(false); diff --git a/src/com/gitblit/wicket/pages/FederationPage.html b/src/com/gitblit/wicket/pages/FederationPage.html new file mode 100644 index 0000000..bb39d34 --- /dev/null +++ b/src/com/gitblit/wicket/pages/FederationPage.html @@ -0,0 +1,17 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" + xml:lang="en" + lang="en"> +<body> +<wicket:extend> + + <div wicket:id="federationTokensPanel">[federation tokens panel]</div> + + <div style="padding-top: 10px;" wicket:id="federationProposalsPanel">[federation proposals panel]</div> + + <div style="padding-top: 10px;" wicket:id="federationRegistrationsPanel">[federation registrations panel]</div> + +</wicket:extend> +</body> +</html> \ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/FederationPage.java b/src/com/gitblit/wicket/pages/FederationPage.java new file mode 100644 index 0000000..1f98c17 --- /dev/null +++ b/src/com/gitblit/wicket/pages/FederationPage.java @@ -0,0 +1,52 @@ +/* + * Copyright 2011 gitblit.com. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gitblit.wicket.pages; + +import com.gitblit.GitBlit; +import com.gitblit.Keys; +import com.gitblit.wicket.panels.FederationProposalsPanel; +import com.gitblit.wicket.panels.FederationRegistrationsPanel; +import com.gitblit.wicket.panels.FederationTokensPanel; + +public class FederationPage extends RootPage { + + public FederationPage() { + super(); + setupPage("", ""); + + boolean showFederation = showAdmin && GitBlit.canFederate(); + add(new FederationTokensPanel("federationTokensPanel", showFederation) + .setVisible(showFederation)); + FederationProposalsPanel proposalsPanel = new FederationProposalsPanel( + "federationProposalsPanel"); + if (showFederation) { + proposalsPanel.hideIfEmpty(); + } else { + proposalsPanel.setVisible(false); + } + + boolean showRegistrations = GitBlit.getBoolean(Keys.web.showFederationRegistrations, false); + FederationRegistrationsPanel registrationsPanel = new FederationRegistrationsPanel( + "federationRegistrationsPanel"); + if (showAdmin || showRegistrations) { + registrationsPanel.hideIfEmpty(); + } else { + registrationsPanel.setVisible(false); + } + add(proposalsPanel); + add(registrationsPanel); + } +} diff --git a/src/com/gitblit/wicket/pages/FederationRegistrationPage.html b/src/com/gitblit/wicket/pages/FederationRegistrationPage.html index c7c5bde..de30cf3 100644 --- a/src/com/gitblit/wicket/pages/FederationRegistrationPage.html +++ b/src/com/gitblit/wicket/pages/FederationRegistrationPage.html @@ -6,11 +6,6 @@ <body> <wicket:extend> - - <div style="padding-top:20px"></div> - - <div style="text-align:center;" wicket:id="feedback">[Feedback Panel]</div> - <!-- registration info --> <table class="plain"> <tr><th><wicket:message key="gb.url">url</wicket:message></th><td><img style="border:0px;vertical-align:middle;" wicket:id="typeIcon" /> <span wicket:id="url">[url]</span></td></tr> diff --git a/src/com/gitblit/wicket/pages/FederationRegistrationPage.java b/src/com/gitblit/wicket/pages/FederationRegistrationPage.java index 00cc2eb..e480eb7 100644 --- a/src/com/gitblit/wicket/pages/FederationRegistrationPage.java +++ b/src/com/gitblit/wicket/pages/FederationRegistrationPage.java @@ -25,24 +25,15 @@ import org.apache.wicket.markup.repeater.data.ListDataProvider; import com.gitblit.GitBlit; -import com.gitblit.Keys; import com.gitblit.models.FederationModel; import com.gitblit.models.FederationModel.RepositoryStatus; -import com.gitblit.wicket.GitBlitWebSession; import com.gitblit.wicket.WicketUtils; -public class FederationRegistrationPage extends BasePage { +public class FederationRegistrationPage extends RootSubPage { public FederationRegistrationPage(PageParameters params) { super(params); - - final boolean showAdmin; - if (GitBlit.getBoolean(Keys.web.authenticateAdminPages, true)) { - boolean allowAdmin = GitBlit.getBoolean(Keys.web.allowAdministration, false); - showAdmin = allowAdmin && GitBlitWebSession.get().canAdmin(); - } else { - showAdmin = false; - } + setStatelessHint(true); String url = WicketUtils.getUrlParameter(params); @@ -53,8 +44,8 @@ error("Could not find federation registration!", true); } - setupPage("", registration.isResultData() ? getString("gb.federationResults") - : getString("gb.federationRegistration")); + setupPage(registration.isResultData() ? getString("gb.federationResults") + : getString("gb.federationRegistration"), registration.url); add(new Label("url", registration.url)); add(WicketUtils.getRegistrationImage("typeIcon", registration, this)); diff --git a/src/com/gitblit/wicket/pages/LoginPage.html b/src/com/gitblit/wicket/pages/LoginPage.html deleted file mode 100644 index 5f9b779..0000000 --- a/src/com/gitblit/wicket/pages/LoginPage.html +++ /dev/null @@ -1,36 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" - 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> - - <body onload="document.getElementById('username').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">[name]</div> - </div> - - <form style="text-align:center;" wicket:id="loginForm"> - <div> - <p/> - <wicket:message key="gb.username"></wicket:message> - <input type="text" id="username" wicket:id="username" value=""/> - <p/> - <wicket:message key="gb.password"></wicket:message> - <input type="password" wicket:id="password" value=""/> - <p/> - <input type="submit" value="Login" wicket:message="value:gb.login" /> - <div style="padding-top:10px;" wicket:id="feedback"></div> - </div> - </form> - </div> - </body> -</html> \ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/LoginPage.java b/src/com/gitblit/wicket/pages/LoginPage.java deleted file mode 100644 index 45e1e2d..0000000 --- a/src/com/gitblit/wicket/pages/LoginPage.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2011 gitblit.com. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.gitblit.wicket.pages; - -import javax.servlet.http.Cookie; - -import org.apache.wicket.PageParameters; -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.PasswordTextField; -import org.apache.wicket.markup.html.form.StatelessForm; -import org.apache.wicket.markup.html.form.TextField; -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.WebRequest; -import org.apache.wicket.protocol.http.WebResponse; - -import com.gitblit.Constants; -import com.gitblit.GitBlit; -import com.gitblit.Keys; -import com.gitblit.models.UserModel; -import com.gitblit.wicket.GitBlitWebSession; - -public class LoginPage extends WebPage { - - IModel<String> username = new Model<String>(""); - IModel<String> password = new Model<String>(""); - - public LoginPage(PageParameters params) { - super(params); - - // If we are already logged in because user directly accessed - // the login url, redirect to the home page - if (GitBlitWebSession.get().isLoggedIn()) { - throw new RestartResponseException(getApplication().getHomePage()); - } - - if (GitBlit.getBoolean(Keys.web.allowCookieAuthentication, false)) { - loginByCookie(); - } - - add(new Label("title", GitBlit.getString(Keys.web.siteName, Constants.NAME))); - add(new Label("name", GitBlit.getString(Keys.web.siteName, Constants.NAME))); - - StatelessForm<Void> loginForm = new StatelessForm<Void>("loginForm") { - - private static final long serialVersionUID = 1L; - - @Override - public void onSubmit() { - String username = LoginPage.this.username.getObject(); - char[] password = LoginPage.this.password.getObject().toCharArray(); - - UserModel user = GitBlit.self().authenticate(username, password); - if (user == null) { - error("Invalid username or password!"); - } else if (user.username.equals(Constants.FEDERATION_USER)) { - // disallow the federation user from logging in via the - // web ui - error("Invalid username or password!"); - user = null; - } else { - loginUser(user); - } - } - }; - loginForm.add(new TextField<String>("username", username)); - loginForm.add(new PasswordTextField("password", password)); - loginForm.add(new FeedbackPanel("feedback")); - add(loginForm); - } - - private void loginByCookie() { - UserModel user = null; - - // Grab cookie from Browser Session - Cookie[] cookies = ((WebRequest) getRequestCycle().getRequest()).getCookies(); - if (cookies != null && cookies.length > 0) { - user = GitBlit.self().authenticate(cookies); - } - - // Login the user - loginUser(user); - } - - private void loginUser(UserModel user) { - if (user != null) { - // Set the user into the session - GitBlitWebSession.get().setUser(user); - - // Set Cookie - if (GitBlit.getBoolean(Keys.web.allowCookieAuthentication, false)) { - WebResponse response = (WebResponse) getRequestCycle().getResponse(); - GitBlit.self().setCookie(response, user); - } - - if (!continueToOriginalDestination()) { - // Redirect to home page - setResponsePage(getApplication().getHomePage()); - } - } - } -} diff --git a/src/com/gitblit/wicket/pages/MetricsPage.java b/src/com/gitblit/wicket/pages/MetricsPage.java index 23dcd8a..41c605c 100644 --- a/src/com/gitblit/wicket/pages/MetricsPage.java +++ b/src/com/gitblit/wicket/pages/MetricsPage.java @@ -68,7 +68,7 @@ if ((metrics != null) && (metrics.size() > 0)) { IChartData data = WicketUtils.getChartData(metrics); - ChartProvider provider = new ChartProvider(new Dimension(500, 100), ChartType.LINE, + ChartProvider provider = new ChartProvider(new Dimension(400, 100), ChartType.LINE, data); ChartAxis dateAxis = new ChartAxis(ChartAxisType.BOTTOM); dateAxis.setLabels(new String[] { metrics.get(0).name, @@ -93,7 +93,7 @@ if ((metrics != null) && (metrics.size() > 0)) { IChartData data = WicketUtils.getChartData(metrics); - ChartProvider provider = new ChartProvider(new Dimension(500, 100), + ChartProvider provider = new ChartProvider(new Dimension(400, 100), ChartType.BAR_VERTICAL_SET, data); ChartAxis dateAxis = new ChartAxis(ChartAxisType.BOTTOM); List<String> labels = new ArrayList<String>(); diff --git a/src/com/gitblit/wicket/pages/RepositoriesPage.html b/src/com/gitblit/wicket/pages/RepositoriesPage.html index a0c58c9..c883099 100644 --- a/src/com/gitblit/wicket/pages/RepositoriesPage.html +++ b/src/com/gitblit/wicket/pages/RepositoriesPage.html @@ -9,23 +9,9 @@ <body> <wicket:extend> - <!-- Filler div --> - <div style="padding-top:18px;"></div> - - <div style="text-align:center;padding-bottom:5px;" wicket:id="feedback">[Feedback Panel]</div> - - <div class="markdown" style="margin-top:-0.5em;padding-bottom:5px;" wicket:id="repositoriesMessage">[repositories message]</div> + <div class="markdown" style="margin-top:-1em;padding-bottom:5px;" wicket:id="repositoriesMessage">[repositories message]</div> <div wicket:id="repositoriesPanel">[repositories panel]</div> - - <div style="padding-top: 10px;"wicket:id="usersPanel">[users panel]</div> - - <div style="padding-top: 10px;"wicket:id="federationTokensPanel">[federation tokens panel]</div> - - <div style="padding-top: 10px;"wicket:id="federationProposalsPanel">[federation proposals panel]</div> - - <div style="padding-top: 10px;"wicket:id="federationRegistrationsPanel">[federation registrations panel]</div> - </wicket:extend> </body> </html> \ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/RepositoriesPage.java b/src/com/gitblit/wicket/pages/RepositoriesPage.java index 619d42e..d5a21a7 100644 --- a/src/com/gitblit/wicket/pages/RepositoriesPage.java +++ b/src/com/gitblit/wicket/pages/RepositoriesPage.java @@ -31,66 +31,48 @@ import com.gitblit.utils.StringUtils; import com.gitblit.wicket.GitBlitWebSession; import com.gitblit.wicket.WicketUtils; -import com.gitblit.wicket.panels.FederationProposalsPanel; -import com.gitblit.wicket.panels.FederationRegistrationsPanel; -import com.gitblit.wicket.panels.FederationTokensPanel; import com.gitblit.wicket.panels.RepositoriesPanel; -import com.gitblit.wicket.panels.UsersPanel; -public class RepositoriesPage extends BasePage { +public class RepositoriesPage extends RootPage { public RepositoriesPage() { super(); setupPage("", ""); - final boolean showAdmin; - if (GitBlit.getBoolean(Keys.web.authenticateAdminPages, true)) { - boolean allowAdmin = GitBlit.getBoolean(Keys.web.allowAdministration, false); - showAdmin = allowAdmin && GitBlitWebSession.get().canAdmin(); - // authentication requires state and session - setStatelessHint(false); - } else { - showAdmin = GitBlit.getBoolean(Keys.web.allowAdministration, false); - if (GitBlit.getBoolean(Keys.web.authenticateViewPages, false)) { - // authentication requires state and session - setStatelessHint(false); - } else { - // no authentication required, no state and no session required - setStatelessHint(true); - } - } - - // display an error message cached from a redirect - String cachedMessage = GitBlitWebSession.get().clearErrorMessage(); - if (!StringUtils.isEmpty(cachedMessage)) { - error(cachedMessage); - } else if (showAdmin) { - int pendingProposals = GitBlit.self().getPendingFederationProposals().size(); - if (pendingProposals == 1) { - info("There is 1 federation proposal awaiting review."); - } else if (pendingProposals > 1) { - info(MessageFormat.format("There are {0} federation proposals awaiting review.", - pendingProposals)); - } + // check to see if we should display a login message + boolean authenticateView = GitBlit.getBoolean(Keys.web.authenticateViewPages, true); + if (authenticateView && !GitBlitWebSession.get().isLoggedIn()) { + String messageSource = GitBlit.getString(Keys.web.loginMessage, "gitblit"); + String message = readMarkdown(messageSource, "login.mkd"); + Component repositoriesMessage = new Label("repositoriesMessage", message); + add(repositoriesMessage.setEscapeModelStrings(false)); + add(new Label("repositoriesPanel")); + return; } // Load the markdown welcome message String messageSource = GitBlit.getString(Keys.web.repositoriesMessage, "gitblit"); - String message = "<br/>"; + String message = readMarkdown(messageSource, "welcome.mkd"); + Component repositoriesMessage = new Label("repositoriesMessage", message) + .setEscapeModelStrings(false).setVisible(message.length() > 0); + add(repositoriesMessage); + 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); + } + + private String readMarkdown(String messageSource, String resource) { + String message = ""; if (messageSource.equalsIgnoreCase("gitblit")) { - // Read default welcome message - try { - ContextRelativeResource res = WicketUtils.getResource("welcome.mkd"); - InputStream is = res.getResourceStream().getInputStream(); - InputStreamReader reader = new InputStreamReader(is); - message = MarkdownUtils.transformMarkdown(reader); - reader.close(); - } catch (Throwable t) { - message = "Failed to read default welcome message!"; - error(message, t, false); - } + // Read default message + message = readDefaultMarkdown(resource); } else { - // Read user-supplied welcome message + // Read user-supplied message if (!StringUtils.isEmpty(messageSource)) { File file = new File(messageSource); if (file.exists()) { @@ -106,31 +88,21 @@ } } } - Component repositoriesMessage = new Label("repositoriesMessage", message) - .setEscapeModelStrings(false); - add(repositoriesMessage); - add(new RepositoriesPanel("repositoriesPanel", showAdmin, null, getAccessRestrictions())); - add(new UsersPanel("usersPanel", showAdmin).setVisible(showAdmin)); - boolean showFederation = showAdmin && GitBlit.canFederate(); - add(new FederationTokensPanel("federationTokensPanel", showFederation) - .setVisible(showFederation)); - FederationProposalsPanel proposalsPanel = new FederationProposalsPanel( - "federationProposalsPanel"); - if (showFederation) { - proposalsPanel.hideIfEmpty(); - } else { - proposalsPanel.setVisible(false); - } + return message; + } - boolean showRegistrations = GitBlit.getBoolean(Keys.web.showFederationRegistrations, false); - FederationRegistrationsPanel registrationsPanel = new FederationRegistrationsPanel( - "federationRegistrationsPanel"); - if (showAdmin || showRegistrations) { - registrationsPanel.hideIfEmpty(); - } else { - registrationsPanel.setVisible(false); + private String readDefaultMarkdown(String file) { + String message; + try { + ContextRelativeResource res = WicketUtils.getResource(file); + InputStream is = res.getResourceStream().getInputStream(); + InputStreamReader reader = new InputStreamReader(is); + message = MarkdownUtils.transformMarkdown(reader); + reader.close(); + } catch (Throwable t) { + message = MessageFormat.format("Failed to read default message from {0}!", file); + error(message, t, false); } - add(proposalsPanel); - add(registrationsPanel); + return message; } } diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.html b/src/com/gitblit/wicket/pages/RepositoryPage.html index e793a1e..100016f 100644 --- a/src/com/gitblit/wicket/pages/RepositoryPage.html +++ b/src/com/gitblit/wicket/pages/RepositoryPage.html @@ -8,24 +8,42 @@ <wicket:extend> <!-- page header bar --> <div> - <!-- floating search form on right --> - <div class="search"> - <form wicket:id="searchForm"> - <select wicket:id="searchType"/> - <input type="text" id="searchBox" wicket:id="searchBox" size="25" value=""/> - </form> - </div> - <!-- page nav links --> - <div class="page_nav"> - <a style="text-decoration: none;" wicket:id="syndication"> - <img style="border:0px;vertical-align:middle;" src="feed_16x16.png"></img> - </a> - <a wicket:id="summary"><wicket:message key="gb.summary"></wicket:message></a> | <a wicket:id="log"><wicket:message key="gb.log"></wicket:message></a> | <a wicket:id="branches"><wicket:message key="gb.branches"></wicket:message></a> | <a wicket:id="tags"><wicket:message key="gb.tags"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a> <span wicket:id="extra"><span wicket:id="extraSeparator"></span><span wicket:id="extraLink"></span></span> + <div class="topbar"> + <div class="fill"> + <div class="container"> + <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> + <li><a wicket:id="summary"><wicket:message key="gb.summary"></wicket:message></a></li> + <li><a wicket:id="log"><wicket:message key="gb.log"></wicket:message></a></li> + <li><a wicket:id="branches"><wicket:message key="gb.branches"></wicket:message></a></li> + <li><a wicket:id="tags"><wicket:message key="gb.tags"></wicket:message></a></li> + <li><a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a></li> + <li wicket:id="extra"><span wicket:id="extraLink"></span></li> + <li><a style="text-decoration: none;" wicket:id="syndication"> + <img style="border:0px;vertical-align:middle;" src="feed_16x16.png"></img></a> + </li> + </ul> + <form class="pull-right" wicket:id="searchForm"> + <div class="search"> + <select class="small" wicket:id="searchType"/> + <input type="text" id="searchBox" wicket:id="searchBox" value=""/> + </div> + </form> + </div> + </div> </div> </div> - <div style="text-align:center;" wicket:id="feedback">[Feedback Panel]</div> + <div style="text-align:center;padding-top:5px;" wicket:id="feedback">[Feedback Panel]</div> + + <!-- page header --> + <div class="page-header"> + <h2><span wicket:id="repositoryName">[repository name]</span> <small><span wicket:id="pageName">[page name]</span></small></h2> + </div> <!-- page content --> <wicket:child /> diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.java b/src/com/gitblit/wicket/pages/RepositoryPage.java index 7062e3b..1b6ae08 100644 --- a/src/com/gitblit/wicket/pages/RepositoryPage.java +++ b/src/com/gitblit/wicket/pages/RepositoryPage.java @@ -69,6 +69,7 @@ private static final long serialVersionUID = 1L; { + put("repositories", new PageRegistration("gb.repositories", RepositoriesPage.class, false)); put("summary", new PageRegistration("gb.summary", SummaryPage.class)); put("log", new PageRegistration("gb.log", LogPage.class)); put("branches", new PageRegistration("gb.branches", BranchesPage.class)); @@ -93,6 +94,7 @@ RepositoryModel model = getRepositoryModel(); // standard page links + addRegisteredPageLink("repositories"); addRegisteredPageLink("summary"); addRegisteredPageLink("log"); addRegisteredPageLink("branches"); @@ -133,10 +135,8 @@ public void populateItem(final Item<String> item) { String extra = item.getModelObject(); PageRegistration pageReg = registeredPages.get(extra); - item.add(new Label("extraSeparator", " | ")); item.add(new LinkPanel("extraLink", null, getString(pageReg.translationKey), - pageReg.pageClass, WicketUtils.newRepositoryParameter(repositoryName)) - .setEnabled(!extra.equals(pageWicketId))); + pageReg.pageClass, WicketUtils.newRepositoryParameter(repositoryName))); } }; add(extrasView); @@ -155,6 +155,15 @@ // set stateless page preference setStatelessHint(true); } + + @Override + protected void setupPage(String repositoryName, String pageName) { + add(new LinkPanel("repositoryName", null, repositoryName, SummaryPage.class, + WicketUtils.newRepositoryParameter(repositoryName))); + add(new Label("pageName", pageName)); + + super.setupPage(repositoryName, pageName); + } public String getLinkWicketId(String pageName) { for (String wicketId : registeredPages.keySet()) { @@ -172,15 +181,20 @@ if (!StringUtils.isEmpty(wicketId)) { Component c = get(wicketId); if (c != null) { - c.setEnabled(false); +// c.setEnabled(false); +// WicketUtils.setCssClass(c, "selected"); } } } private void addRegisteredPageLink(String key) { PageRegistration pageReg = registeredPages.get(key); - add(new BookmarkablePageLink<Void>(key, pageReg.pageClass, - WicketUtils.newRepositoryParameter(repositoryName))); + if (pageReg.repositoryLink) { + add(new BookmarkablePageLink<Void>(key, pageReg.pageClass, + WicketUtils.newRepositoryParameter(repositoryName))); + } else { + add(new BookmarkablePageLink<Void>(key, pageReg.pageClass)); + } } protected void addSyndicationDiscoveryLink() { @@ -335,10 +349,16 @@ final String translationKey; final Class<? extends BasePage> pageClass; + final boolean repositoryLink; PageRegistration(String translationKey, Class<? extends BasePage> pageClass) { + this(translationKey, pageClass, true); + } + + PageRegistration(String translationKey, Class<? extends BasePage> pageClass, boolean repositoryLink) { this.translationKey = translationKey; this.pageClass = pageClass; + this.repositoryLink = repositoryLink; } } @@ -364,7 +384,7 @@ void setTranslatedAttributes() { WicketUtils.setHtmlTooltip(get("searchType"), getString("gb.searchTypeTooltip")); - WicketUtils.setHtmlTooltip(get("searchBox"), getString("gb.searchTooltip")); + WicketUtils.setHtmlTooltip(get("searchBox"), MessageFormat.format(getString("gb.searchTooltip"), repositoryName)); WicketUtils.setInputPlaceholder(get("searchBox"), getString("gb.search")); } @@ -372,6 +392,10 @@ public void onSubmit() { SearchType searchType = searchTypeModel.getObject(); String searchString = searchBoxModel.getObject(); + if (searchString == null) { + // FIXME IE intermittently has no searchString. Wicket bug? + return; + } for (SearchType type : SearchType.values()) { if (searchString.toLowerCase().startsWith(type.name().toLowerCase() + ":")) { searchType = type; diff --git a/src/com/gitblit/wicket/pages/ReviewProposalPage.html b/src/com/gitblit/wicket/pages/ReviewProposalPage.html index d4244ea..6487a0a 100644 --- a/src/com/gitblit/wicket/pages/ReviewProposalPage.html +++ b/src/com/gitblit/wicket/pages/ReviewProposalPage.html @@ -6,11 +6,6 @@ <body> <wicket:extend> - - <div style="padding-top:20px"></div> - - <div style="text-align:center;" wicket:id="feedback">[Feedback Panel]</div> - <!-- proposal info --> <table class="plain"> <tr><th><wicket:message key="gb.received">received</wicket:message></th><td><span wicket:id="received">[received]</span></td></tr> @@ -21,7 +16,7 @@ <tr><th valign="top"><wicket:message key="gb.proposal">proposal</wicket:message></th><td><span class="sha1" wicket:id="definition">[definition]</span></td></tr> </table> - <div wicket:id="repositories"></div> + <div wicket:id="repositoriesPanel"></div> </wicket:extend> </body> diff --git a/src/com/gitblit/wicket/pages/ReviewProposalPage.java b/src/com/gitblit/wicket/pages/ReviewProposalPage.java index b006d80..1d9092a 100644 --- a/src/com/gitblit/wicket/pages/ReviewProposalPage.java +++ b/src/com/gitblit/wicket/pages/ReviewProposalPage.java @@ -33,7 +33,7 @@ import com.gitblit.wicket.panels.RepositoriesPanel; @RequiresAdminRole -public class ReviewProposalPage extends BasePage { +public class ReviewProposalPage extends RootSubPage { private final String PROPS_PATTERN = "{0} = {1}\n"; @@ -42,9 +42,6 @@ public ReviewProposalPage(PageParameters params) { super(params); - setupPage("", getString("gb.proposals")); - setStatelessHint(true); - final String token = WicketUtils.getToken(params); FederationProposal proposal = GitBlit.self().getPendingFederationProposal(token); @@ -52,13 +49,15 @@ error("Could not find federation proposal!", true); } + setupPage(getString("gb.proposals"), proposal.url); + + add(new Label("url", proposal.url)); add(new Label("message", proposal.message)); add(WicketUtils.createTimestampLabel("received", proposal.received, getTimeZone())); add(new Label("token", proposal.token)); add(new Label("tokenType", proposal.tokenType.name())); - - boolean go = true; + String p; if (GitBlit.isGO()) { // gitblit.properties definition @@ -92,7 +91,7 @@ List<RepositoryModel> repositories = new ArrayList<RepositoryModel>( proposal.repositories.values()); - RepositoriesPanel repositoriesPanel = new RepositoriesPanel("repositories", false, + RepositoriesPanel repositoriesPanel = new RepositoriesPanel("repositoriesPanel", false, repositories, getAccessRestrictions()); add(repositoriesPanel); } diff --git a/src/com/gitblit/wicket/pages/RootPage.html b/src/com/gitblit/wicket/pages/RootPage.html new file mode 100644 index 0000000..c947092 --- /dev/null +++ b/src/com/gitblit/wicket/pages/RootPage.html @@ -0,0 +1,38 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" + xml:lang="en" + lang="en"> +<body> +<wicket:extend> + <div class="topbar"> + <div class="fill"> + <div class="container"> + <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> + <li><a wicket:id="users"><wicket:message key="gb.users"></wicket:message></a></li> + <li><a wicket:id="federation"><wicket:message key="gb.federation"></wicket:message></a></li> + </ul> + + <form class="pull-right" wicket:id="loginForm"> + <div class="login"> + <input wicket:id="username" class="input-small" type="text" /> + <input wicket:id="password" class="input-small" type="password" /> + <button class="btn primary" type="submit"><wicket:message key="gb.login"></wicket:message></button> + </div> + </form> + </div> + </div> + </div> + + <div style="text-align:center;padding-top:5px;" wicket:id="feedback">[Feedback Panel]</div> + + <!-- subclass content --> + <wicket:child/> +</wicket:extend> +</body> +</html> \ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/RootPage.java b/src/com/gitblit/wicket/pages/RootPage.java new file mode 100644 index 0000000..69ac25d --- /dev/null +++ b/src/com/gitblit/wicket/pages/RootPage.java @@ -0,0 +1,156 @@ +/* + * Copyright 2011 gitblit.com. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gitblit.wicket.pages; + +import java.text.MessageFormat; + +import org.apache.wicket.PageParameters; +import org.apache.wicket.markup.html.form.PasswordTextField; +import org.apache.wicket.markup.html.form.StatelessForm; +import org.apache.wicket.markup.html.form.TextField; +import org.apache.wicket.markup.html.link.BookmarkablePageLink; +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.Keys; +import com.gitblit.models.UserModel; +import com.gitblit.utils.StringUtils; +import com.gitblit.wicket.GitBlitWebSession; +import com.gitblit.wicket.WicketUtils; + +/** + * Root page is a topbar, navigable page like Repositories, Users, or + * Federation. + * + * @author James Moger + * + */ +public abstract class RootPage extends BasePage { + + boolean showAdmin; + + IModel<String> username = new Model<String>(""); + IModel<String> password = new Model<String>(""); + + public RootPage() { + super(); + } + + public RootPage(PageParameters params) { + super(params); + } + + @Override + protected void setupPage(String repositoryName, String pageName) { + if (GitBlit.getBoolean(Keys.web.authenticateAdminPages, true)) { + boolean allowAdmin = GitBlit.getBoolean(Keys.web.allowAdministration, false); + showAdmin = allowAdmin && GitBlitWebSession.get().canAdmin(); + // authentication requires state and session + setStatelessHint(false); + } else { + showAdmin = GitBlit.getBoolean(Keys.web.allowAdministration, false); + if (GitBlit.getBoolean(Keys.web.authenticateViewPages, false)) { + // authentication requires state and session + setStatelessHint(false); + } else { + // no authentication required, no state and no session required + setStatelessHint(true); + } + } + boolean showRegistrations = GitBlit.canFederate() + && GitBlit.getBoolean(Keys.web.showFederationRegistrations, false); + + // navigation links + add(new BookmarkablePageLink<Void>("repositories", RepositoriesPage.class)); + add(new BookmarkablePageLink<Void>("users", UsersPage.class).setVisible(showAdmin)); + add(new BookmarkablePageLink<Void>("federation", FederationPage.class).setVisible(showAdmin + || showRegistrations)); + + // login form + StatelessForm<Void> loginForm = new StatelessForm<Void>("loginForm") { + + private static final long serialVersionUID = 1L; + + @Override + public void onSubmit() { + String username = RootPage.this.username.getObject(); + char[] password = RootPage.this.password.getObject().toCharArray(); + + UserModel user = GitBlit.self().authenticate(username, password); + if (user == null) { + error("Invalid username or password!"); + } else if (user.username.equals(Constants.FEDERATION_USER)) { + // disallow the federation user from logging in via the + // web ui + error("Invalid username or password!"); + user = null; + } else { + loginUser(user); + } + } + }; + TextField<String> unameField = new TextField<String>("username", username); + WicketUtils.setInputPlaceholder(unameField, getString("gb.username")); + loginForm.add(unameField); + PasswordTextField pwField = new PasswordTextField("password", password); + WicketUtils.setInputPlaceholder(pwField, getString("gb.password")); + loginForm.add(pwField); + add(loginForm); + if (GitBlit.getBoolean(Keys.web.authenticateViewPages, true) + || GitBlit.getBoolean(Keys.web.authenticateAdminPages, true)) { + loginForm.setVisible(!GitBlitWebSession.get().isLoggedIn()); + } else { + loginForm.setVisible(false); + } + + // display an error message cached from a redirect + String cachedMessage = GitBlitWebSession.get().clearErrorMessage(); + if (!StringUtils.isEmpty(cachedMessage)) { + error(cachedMessage); + } else if (showAdmin) { + int pendingProposals = GitBlit.self().getPendingFederationProposals().size(); + if (pendingProposals == 1) { + info("There is 1 federation proposal awaiting review."); + } else if (pendingProposals > 1) { + info(MessageFormat.format("There are {0} federation proposals awaiting review.", + pendingProposals)); + } + } + + super.setupPage(repositoryName, pageName); + } + + private void loginUser(UserModel user) { + if (user != null) { + // Set the user into the session + GitBlitWebSession.get().setUser(user); + + // Set Cookie + if (GitBlit.getBoolean(Keys.web.allowCookieAuthentication, false)) { + WebResponse response = (WebResponse) getRequestCycle().getResponse(); + GitBlit.self().setCookie(response, user); + } + + if (!continueToOriginalDestination()) { + // Redirect to home page + setResponsePage(getApplication().getHomePage()); + } + } + } +} diff --git a/src/com/gitblit/wicket/pages/RootSubPage.html b/src/com/gitblit/wicket/pages/RootSubPage.html new file mode 100644 index 0000000..554da11 --- /dev/null +++ b/src/com/gitblit/wicket/pages/RootSubPage.html @@ -0,0 +1,18 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" + xml:lang="en" + lang="en"> + +<body> +<wicket:extend> + <!-- page header --> + <div class="page-header"> + <h2><span wicket:id="pageName">[page name]</span> <small><span wicket:id="pageSubName">[sub name]</span></small></h2> + </div> + + <!-- Subclass Content --> + <wicket:child/> +</wicket:extend> +</body> +</html> \ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/RootSubPage.java b/src/com/gitblit/wicket/pages/RootSubPage.java new file mode 100644 index 0000000..f7572b1 --- /dev/null +++ b/src/com/gitblit/wicket/pages/RootSubPage.java @@ -0,0 +1,48 @@ +/* + * Copyright 2011 gitblit.com. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gitblit.wicket.pages; + +import org.apache.wicket.PageParameters; +import org.apache.wicket.markup.html.basic.Label; + +import com.gitblit.utils.StringUtils; + +/** + * RootSubPage is a non-topbar navigable RootPage. It also has a page header. + * + * @author James Moger + * + */ +public abstract class RootSubPage extends RootPage { + + public RootSubPage() { + super(); + } + + public RootSubPage(PageParameters params) { + super(params); + } + + @Override + protected void setupPage(String pageName, String subName) { + add(new Label("pageName", pageName)); + if (!StringUtils.isEmpty(subName)) { + subName = "/ " + subName; + } + add(new Label("pageSubName", subName)); + super.setupPage("", pageName); + } +} diff --git a/src/com/gitblit/wicket/pages/SendProposalPage.html b/src/com/gitblit/wicket/pages/SendProposalPage.html index 90fe0a2..8a28906 100644 --- a/src/com/gitblit/wicket/pages/SendProposalPage.html +++ b/src/com/gitblit/wicket/pages/SendProposalPage.html @@ -6,25 +6,19 @@ <wicket:extend> <body onload="document.getElementById('myUrl').focus();"> - - - <div style="padding-top:20px"></div> - - <div style="text-align:center;" wicket:id="feedback">[Feedback Panel]</div> - <!-- proposal info --> <form wicket:id="editForm"> <table class="plain"> - <tr><th><wicket:message key="gb.url">url</wicket:message></th><td class="edit"><input type="text" wicket:id="myUrl" id="myUrl" size="60" /> <i><wicket:message key="gb.myUrlDescription"></wicket:message></i></td></tr> - <tr><th><wicket:message key="gb.destinationUrl">destination url</wicket:message></th><td class="edit"><input type="text" wicket:id="destinationUrl" size="60" /> <i><wicket:message key="gb.destinationUrlDescription"></wicket:message></i></td></tr> - <tr><th valign="top"><wicket:message key="gb.message">message</wicket:message></th><td class="edit"><input type="text" wicket:id="message" size="80" /></td></tr> + <tr><th><wicket:message key="gb.url">url</wicket:message></th><td class="edit"><input class="span6" type="text" wicket:id="myUrl" id="myUrl" size="60" /> <i><wicket:message key="gb.myUrlDescription"></wicket:message></i></td></tr> + <tr><th><wicket:message key="gb.destinationUrl">destination url</wicket:message></th><td class="edit"><input class="span6" type="text" wicket:id="destinationUrl" size="60" /> <i><wicket:message key="gb.destinationUrlDescription"></wicket:message></i></td></tr> + <tr><th valign="top"><wicket:message key="gb.message">message</wicket:message></th><td class="edit"><input class="span8" type="text" wicket:id="message" size="80" /></td></tr> <tr><th><wicket:message key="gb.type">type</wicket:message></th><td><span wicket:id="tokenType">[token type]</span></td></tr> <tr><th><wicket:message key="gb.token">token</wicket:message></th><td><span class="sha1" wicket:id="token">[token]</span></td></tr> - <tr><th></th><td class="editButton"><input type="submit" value="propose" wicket:message="value:gb.sendProposal" wicket:id="save" /> <input type="submit" value="Cancel" wicket:message="value:gb.cancel" wicket:id="cancel" /></td></tr> + <tr><th></th><td class="editButton"><input class="btn" type="submit" value="Cancel" wicket:message="value:gb.cancel" wicket:id="cancel" /> <input class="btn primary" type="submit" value="propose" wicket:message="value:gb.sendProposal" wicket:id="save" /> </td></tr> </table> </form> - <div style="padding-top:10px;" wicket:id="repositories"></div> + <div style="padding-top:10px;" wicket:id="repositoriesPanel"></div> </body> </wicket:extend> </html> \ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/SendProposalPage.java b/src/com/gitblit/wicket/pages/SendProposalPage.java index 635b432..ed20049 100644 --- a/src/com/gitblit/wicket/pages/SendProposalPage.java +++ b/src/com/gitblit/wicket/pages/SendProposalPage.java @@ -37,7 +37,7 @@ import com.gitblit.wicket.panels.RepositoriesPanel; @RequiresAdminRole -public class SendProposalPage extends BasePage { +public class SendProposalPage extends RootSubPage { public String myUrl; @@ -48,7 +48,7 @@ public SendProposalPage(PageParameters params) { super(params); - setupPage("", getString("gb.sendProposal")); + setupPage(getString("gb.sendProposal"), ""); setStatelessHint(true); final String token = WicketUtils.getToken(params); @@ -139,7 +139,7 @@ @Override public void onSubmit() { - setResponsePage(RepositoriesPage.class); + setResponsePage(FederationPage.class); } }; cancel.setDefaultFormProcessing(false); @@ -148,7 +148,7 @@ List<RepositoryModel> repositories = new ArrayList<RepositoryModel>( proposal.repositories.values()); - RepositoriesPanel repositoriesPanel = new RepositoriesPanel("repositories", false, + RepositoriesPanel repositoriesPanel = new RepositoriesPanel("repositoriesPanel", false, repositories, getAccessRestrictions()); add(repositoriesPanel); } diff --git a/src/com/gitblit/wicket/pages/TicketPage.html b/src/com/gitblit/wicket/pages/TicketPage.html index 160bc0c..ed3eb22 100644 --- a/src/com/gitblit/wicket/pages/TicketPage.html +++ b/src/com/gitblit/wicket/pages/TicketPage.html @@ -8,7 +8,7 @@ <wicket:extend> <!-- ticket title --> - <div style="font-size:150%;padding-top:5px;" wicket:id="ticketTitle">[ticket title]</div> + <div style="font-size:150%;padding-top:5px;padding-bottom:5px;" wicket:id="ticketTitle">[ticket title]</div> <!-- ticket info --> <table class="plain"> diff --git a/src/com/gitblit/wicket/pages/TicketPage.java b/src/com/gitblit/wicket/pages/TicketPage.java index 48db1ce..d250a45 100644 --- a/src/com/gitblit/wicket/pages/TicketPage.java +++ b/src/com/gitblit/wicket/pages/TicketPage.java @@ -34,7 +34,7 @@ public TicketPage(PageParameters params) { super(params); - final String ticketFolder = WicketUtils.getPath(params); + final String ticketFolder = WicketUtils.getObject(params); Repository r = getRepository(); TicketModel t = TicgitUtils.getTicket(r, ticketFolder); diff --git a/src/com/gitblit/wicket/pages/UsersPage.html b/src/com/gitblit/wicket/pages/UsersPage.html new file mode 100644 index 0000000..4d14496 --- /dev/null +++ b/src/com/gitblit/wicket/pages/UsersPage.html @@ -0,0 +1,11 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" + xml:lang="en" + lang="en"> +<body> +<wicket:extend> + <div wicket:id="usersPanel">[users panel]</div> +</wicket:extend> +</body> +</html> \ No newline at end of file diff --git a/src/com/gitblit/wicket/pages/UsersPage.java b/src/com/gitblit/wicket/pages/UsersPage.java new file mode 100644 index 0000000..b54b968 --- /dev/null +++ b/src/com/gitblit/wicket/pages/UsersPage.java @@ -0,0 +1,30 @@ +/* + * Copyright 2011 gitblit.com. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gitblit.wicket.pages; + +import com.gitblit.wicket.RequiresAdminRole; +import com.gitblit.wicket.panels.UsersPanel; + +@RequiresAdminRole +public class UsersPage extends RootPage { + + public UsersPage() { + super(); + setupPage("", ""); + + add(new UsersPanel("usersPanel", showAdmin).setVisible(showAdmin)); + } +} diff --git a/src/com/gitblit/wicket/panels/BranchesPanel.html b/src/com/gitblit/wicket/panels/BranchesPanel.html index c58f42e..01fb8ba 100644 --- a/src/com/gitblit/wicket/panels/BranchesPanel.html +++ b/src/com/gitblit/wicket/panels/BranchesPanel.html @@ -8,7 +8,7 @@ <wicket:panel> <!-- header --> - <div class="header"><img style="vertical-align: top;" src="commit_branch_16x16.png"></img><span wicket:id="branches">[branches header]</span></div> + <div class="header"><img style="vertical-align: middle;" src="commit_branch_16x16.png"></img><span wicket:id="branches">[branches header]</span></div> <table class="pretty"> <tbody> diff --git a/src/com/gitblit/wicket/panels/FederationProposalsPanel.html b/src/com/gitblit/wicket/panels/FederationProposalsPanel.html index e451b7c..89324d5 100644 --- a/src/com/gitblit/wicket/panels/FederationProposalsPanel.html +++ b/src/com/gitblit/wicket/panels/FederationProposalsPanel.html @@ -10,7 +10,7 @@ <table class="repositories"> <tr> <th class="left"> - <img style="vertical-align: top; border: 1px solid #888; background-color: white;" src="federated_16x16.png"/> + <img style="vertical-align: middle; border: 1px solid #888; background-color: white;" src="federated_16x16.png"/> <wicket:message key="gb.proposals">[proposals]</wicket:message> </th> <th><wicket:message key="gb.received">[received]</wicket:message></th> diff --git a/src/com/gitblit/wicket/panels/FederationRegistrationsPanel.html b/src/com/gitblit/wicket/panels/FederationRegistrationsPanel.html index 6fab778..fbc6f6c 100644 --- a/src/com/gitblit/wicket/panels/FederationRegistrationsPanel.html +++ b/src/com/gitblit/wicket/panels/FederationRegistrationsPanel.html @@ -10,7 +10,7 @@ <table class="repositories"> <tr> <th class="left"> - <img style="vertical-align: top; border: 1px solid #888; background-color: white;" src="federated_16x16.png"/> + <img style="vertical-align: middle; border: 1px solid #888; background-color: white;" src="federated_16x16.png"/> <wicket:message key="gb.registrations">[registrations]</wicket:message> </th> <th><wicket:message key="gb.name">[name]</wicket:message></th> diff --git a/src/com/gitblit/wicket/panels/FederationTokensPanel.html b/src/com/gitblit/wicket/panels/FederationTokensPanel.html index 06c1869..dc5307b 100644 --- a/src/com/gitblit/wicket/panels/FederationTokensPanel.html +++ b/src/com/gitblit/wicket/panels/FederationTokensPanel.html @@ -15,7 +15,7 @@ <table class="repositories"> <tr> <th class="left"> - <img style="vertical-align: top; border: 1px solid #888; background-color: white;" src="federated_16x16.png"/> + <img style="vertical-align: middle; border: 1px solid #888; background-color: white;" src="federated_16x16.png"/> <wicket:message key="gb.tokens">[tokens]</wicket:message> </th> <th></th> diff --git a/src/com/gitblit/wicket/panels/LogPanel.html b/src/com/gitblit/wicket/panels/LogPanel.html index 712a662..700f66a 100644 --- a/src/com/gitblit/wicket/panels/LogPanel.html +++ b/src/com/gitblit/wicket/panels/LogPanel.html @@ -8,7 +8,7 @@ <wicket:panel> <!-- header --> - <div class="header"><img style="vertical-align: top;" src="commit_changes_16x16.png"></img><span wicket:id="header">[log header]</span></div> + <div class="header"><img style="vertical-align: middle;" src="commit_changes_16x16.png"></img><span wicket:id="header">[log header]</span></div> <table class="pretty"> <tbody> <tr wicket:id="commit"> diff --git a/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html b/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html index bd4b792..c51ceac 100644 --- a/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html +++ b/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html @@ -7,9 +7,11 @@ <wicket:panel> <!-- page path links --> <div class="page_path"> - <span wicket:id="path"> - <span wicket:id="pathLink"></span> <span wicket:id="pathSeparator"></span> - </span> + <ul class="breadcrumb"> + <li wicket:id="path"> + <span wicket:id="pathLink"></span> <span class="divider" wicket:id="pathSeparator"></span> + </li> + </ul> </div> </wicket:panel> </html> \ No newline at end of file diff --git a/src/com/gitblit/wicket/panels/RepositoriesPanel.html b/src/com/gitblit/wicket/panels/RepositoriesPanel.html index 8d64f54..41741e8 100644 --- a/src/com/gitblit/wicket/panels/RepositoriesPanel.html +++ b/src/com/gitblit/wicket/panels/RepositoriesPanel.html @@ -21,7 +21,7 @@ <wicket:fragment wicket:id="adminLinks"> <!-- page nav links --> <div class="admin_nav"> - <img style="vertical-align: top;" src="add_16x16.png"/> + <img style="vertical-align: middle;" src="add_16x16.png"/> <a wicket:id="newRepository"> <wicket:message key="gb.newRepository"></wicket:message> </a> @@ -39,7 +39,7 @@ <wicket:fragment wicket:id="flatRepositoryHeader"> <tr> <th class="left" wicket:id="orderByRepository"> - <img style="vertical-align: top; border: 1px solid #888;" src="gitweb-favicon.png"/> + <img style="vertical-align: middle; border: 1px solid #888;" src="gitweb-favicon.png"/> <wicket:message key="gb.repository">Repository</wicket:message> </th> <th wicket:id="orderByDescription"><wicket:message key="gb.description">Description</wicket:message></th> @@ -54,7 +54,7 @@ <wicket:fragment wicket:id="groupRepositoryHeader"> <tr> <th class="left"> - <img style="vertical-align: top; border: 1px solid #888;" src="gitweb-favicon.png"/> + <img style="vertical-align: middle; border: 1px solid #888;" src="gitweb-favicon.png"/> <wicket:message key="gb.repository">Repository</wicket:message> </th> <th><wicket:message key="gb.description">Description</wicket:message></th> @@ -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 709ad82..d18d5bb 100644 --- a/src/com/gitblit/wicket/panels/RepositoriesPanel.java +++ b/src/com/gitblit/wicket/panels/RepositoriesPanel.java @@ -124,6 +124,7 @@ DataView<RepositoryModel> dataView = new DataView<RepositoryModel>("row", dp) { private static final long serialVersionUID = 1L; int counter; + String currGroupName; @Override protected void onBeforeRender() { @@ -134,23 +135,32 @@ 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)); } diff --git a/src/com/gitblit/wicket/panels/TagsPanel.html b/src/com/gitblit/wicket/panels/TagsPanel.html index 86eedd6..c9c19a3 100644 --- a/src/com/gitblit/wicket/panels/TagsPanel.html +++ b/src/com/gitblit/wicket/panels/TagsPanel.html @@ -8,7 +8,7 @@ <wicket:panel> <!-- tags --> - <div class="header"><img style="vertical-align: top;" src="tag_16x16.png"></img><span wicket:id="header">[tags header]</span></div> + <div class="header"><img style="vertical-align: middle;" src="tag_16x16.png"></img><span wicket:id="header">[tags header]</span></div> <table class="pretty"> <tbody> <tr wicket:id="tag"> diff --git a/src/com/gitblit/wicket/panels/UsersPanel.html b/src/com/gitblit/wicket/panels/UsersPanel.html index eed2a88..c81a3fd 100644 --- a/src/com/gitblit/wicket/panels/UsersPanel.html +++ b/src/com/gitblit/wicket/panels/UsersPanel.html @@ -12,7 +12,7 @@ <table class="repositories"> <tr> <th class="left"> - <img style="vertical-align: top; border: 1px solid #888; background-color: white;" src="user_16x16.png"/> + <img style="vertical-align: middle; border: 1px solid #888; background-color: white;" src="user_16x16.png"/> <wicket:message key="gb.username">[username]</wicket:message> </th> <th class="right"></th> @@ -28,7 +28,7 @@ <wicket:fragment wicket:id="adminLinks"> <!-- page nav links --> <div class="admin_nav"> - <img style="vertical-align: top;" src="add_16x16.png"/> + <img style="vertical-align: middle;" src="add_16x16.png"/> <a wicket:id="newUser"> <wicket:message key="gb.newUser"></wicket:message> </a> -- Gitblit v1.9.1