James Moger
2012-09-10 4e1cc8c91b0b0f03c28ad1a38d98689fab467e83
Redirect to summary page from empty page for a repo with commits (issue-129)
6 files modified
123 ■■■■■ changed files
docs/04_releases.mkd 1 ●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/pages/EmptyRepositoryPage.html 35 ●●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/pages/EmptyRepositoryPage.java 7 ●●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/pages/EmptyRepositoryPage_es.html 27 ●●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/pages/EmptyRepositoryPage_ko.html 26 ●●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/pages/EmptyRepositoryPage_pl.html 27 ●●●●● patch | view | raw | blame | history
docs/04_releases.mkd
@@ -19,6 +19,7 @@
#### changes
- Redirect to summary page when refreshing the empty repository page on a repository that is not empty (issue 129)
- Emit a warning in the log file if running on a Tomcat-based servlet container which is unfriendly to %2F forward-slash url encoding AND Gitblit is configured to mount parameters with %2F forward-slash url encoding (Github/jpyeron, issue 126)
- LDAP admin attribute setting is now consistent with LDAP teams setting and admin teams list.  
If *realm.ldap.maintainTeams==true* **AND** *realm.ldap.admins* is not empty, then User.canAdmin() is controlled by LDAP administrative team membership.  Otherwise, User.canAdmin() is controlled by Gitblit.
src/com/gitblit/wicket/pages/EmptyRepositoryPage.html
@@ -7,22 +7,29 @@
<body>
<wicket:extend>
    <!-- markdown message -->
    <div class="markdown">
        <h2>Empty Repository</h2>
        <p></p>
        <span wicket:id="repository" style="font-weight: bold;">[repository]</span> is an empty repository and can not be viewed by Gitblit.
        <p></p>
        Please push some commits to <span wicket:id="pushurl"></span>
        <p></p>
    <h2>Empty Repository</h2>
    <p></p>
        <div class="row">
            <div class="span10">
                <div class="alert alert-success">
                    <span wicket:id="repository" style="font-weight: bold;">[repository]</span> is an empty repository and can not be viewed by Gitblit.
                    <p></p>
                    Please push some commits to <span wicket:id="pushurl"></span>
                    <p></p>
                    <hr/>
                    After you have pushed commits you may <b>refresh</b> this page to view your repository.
                </div>
            </div>
        </div>
        <h3>Git Command-Line Syntax</h3>
        <span style="padding-bottom:5px;">If you do not have a local Git repository, then you should clone this repository, commit some files, and then push your commits back to Gitblit.</span>
        <p></p>
        <pre style="padding-top:5px;" wicket:id="cloneSyntax"></pre>
        <pre style="padding: 5px 30px;" wicket:id="cloneSyntax"></pre>
        <p></p>
        <span style="padding-bottom:5px;">If you already have a local Git repository with commits, then you may add this repository as a remote and push to it.</span>
        <p></p>
        <pre wicket:id="remoteSyntax"></pre>
        <pre wicket:id="remoteSyntax" style="padding: 5px 30px;"></pre>
        <p></p>
        <h3>Learn Git</h3>
        If you are unsure how to use this information, consider reviewing the <a href="http://book.git-scm.com">Git Community Book</a> or <a href="http://progit.org/book" target="_blank">Pro Git</a> for a better understanding on how to use Git.
@@ -32,13 +39,15 @@
            <li><a href="http://git-scm.com">Git</a> - the official, command-line Git</li>
            <li><a href="http://tortoisegit.googlecode.com">TortoiseGit</a> - Windows file explorer integration (requires official, command-line Git)</li>
            <li><a href="http://eclipse.org/egit">Eclipse/EGit</a> - Git for the Eclipse IDE (based on JGit, like Gitblit)</li>
            <li><a href="https://code.google.com/p/gitextensions/">Git Extensions</a> - C# frontend for Git that features Windows Explorer and Visual Studio integration</li>
            <li><a href="http://gitx.laullon.com/">GitX (L)</a> - a Mac OS X Git client</li>
        </ul>
        <p></p>
        <h4>Commercial Git Clients</h4>
        <h4>Commercial/Closed-Source Git Clients</h4>
        <ul>
            <li><a href="http://www.syntevo.com/smartgit">SmartGit</a> - Java application (requires official, command-line Git)</li>
            <li><a href="http://www.syntevo.com/smartgit">SmartGit</a> - A Java Git, Mercurial, and SVN client application (requires official, command-line Git)</li>
            <li><a href="http://www.sourcetreeapp.com/">SourceTree</a> - A free Mac Client for Git, Mercurial, and SVN</li>
        </ul>
    </div>
</wicket:extend>    
</body>
</html>
src/com/gitblit/wicket/pages/EmptyRepositoryPage.java
@@ -20,6 +20,7 @@
import java.util.List;
import org.apache.wicket.PageParameters;
import org.apache.wicket.RedirectException;
import org.apache.wicket.markup.html.basic.Label;
import com.gitblit.GitBlit;
@@ -36,6 +37,12 @@
        String repositoryName = WicketUtils.getRepositoryName(params);
        RepositoryModel repository = GitBlit.self().getRepositoryModel(repositoryName);
        if (repository.hasCommits) {
            // redirect to the summary page if this repository is not empty
            throw new RedirectException(SummaryPage.class, params);
        }
        setupPage(repositoryName, getString("gb.emptyRepository"));
        List<String> repositoryUrls = new ArrayList<String>();
src/com/gitblit/wicket/pages/EmptyRepositoryPage_es.html
@@ -9,22 +9,29 @@
<body>
<wicket:extend>
    <!-- markdown message -->
    <div class="markdown">
        <h2>Repositorio Vac&iacute;o</h2>
        <p></p>
        <span wicket:id="repository" style="font-weight: bold;">[repository]</span> es un repositorio vac&iacute;o y no puede ser visto en Gitblit.
        <p></p>
        Por favor, empuja algunas consignas a <span wicket:id="pushurl"></span>
        <p></p>
        <div class="row">
            <div class="span7">
                <div class="alert alert-success">
                    <span wicket:id="repository" style="font-weight: bold;">[repository]</span> es un repositorio vac&iacute;o y no puede ser visto en Gitblit.
                    <p></p>
                    Por favor, empuja algunas consignas a <span wicket:id="pushurl"></span>
                    <p></p>
                    <hr/>
                    After you have pushed commits you may <b>refresh</b> this page to view your repository.
                </div>
            </div>
        </div>
        <h3>Sintaxis de la L&iacute;nea de Comandos de Git</h3>
        <span style="padding-bottom:5px;">Si no tienes un Repositiorio local Git, puedes clonar &eacute;ste, consignar algunos archivos, y despu&eacute;s empujar las consignas de vuelta a Gitblit.</span>
        <p></p>
        <pre style="padding-top:5px;" wicket:id="cloneSyntax"></pre>
        <pre style="padding: 5px 30px;" wicket:id="cloneSyntax"></pre>
        <p></p>
        <span style="padding-bottom:5px;">Si ya tienes un repositorio local Git con algunas consignas, puedes a&ntilde;adir &eacute;ste como remoto y empujar desde all&iacute;.</span>
        <p></p>
        <pre wicket:id="remoteSyntax"></pre>
        <pre style="padding: 5px 30px;" wicket:id="remoteSyntax"></pre>
        <p></p>
        <h3>Aprender Git</h3>
        Si no est&aacute;s seguro de como usar esta informaci&oacute;n, &eacute;chale un vistazo al <a href="http://book.git-scm.com">Libro de la cominidad Git</a> o <a href="http://progit.org/book" target="_blank">Pro Git</a> para una mejor compresi&oacute;n de como usar Git.
@@ -34,13 +41,15 @@
            <li><a href="http://git-scm.com">Git</a> - El Git oficial en l&iacute;nea de comandos</li>
            <li><a href="http://tortoisegit.googlecode.com">TortoiseGit</a> - Explorador de archivos integrado en Windows (necesita Git oficial en l&iacute;nea de comandos)</li>
            <li><a href="http://eclipse.org/egit">Eclipse/EGit</a> - Git para el IDE de Eclipse (basado en JGit, como Gitblit)</li>
            <li><a href="https://code.google.com/p/gitextensions/">Git Extensions</a> - C# frontend for Git that features Windows Explorer and Visual Studio integration</li>
            <li><a href="http://gitx.laullon.com/">GitX (L)</a> - a Mac OS X Git client</li>
        </ul>
        <p></p>
        <h4>Clientes Git comerciales</h4>
        <ul>
            <li><a href="http://www.syntevo.com/smartgit">SmartGit</a> - aplicaci&oacute;n Java (necesita Git oficial en l&iacute;nea de comandos)</li>
            <li><a href="http://www.sourcetreeapp.com/">SourceTree</a> - A free Mac Client for Git, Mercurial, and SVN</li>
        </ul>
    </div>
</wicket:extend>    
</body>
</html>
src/com/gitblit/wicket/pages/EmptyRepositoryPage_ko.html
@@ -7,22 +7,30 @@
<body>
<wicket:extend>
    <!-- markdown message -->
    <div class="markdown">
        <h2>비어있는 저장소</h2>
        <p></p>
        <span wicket:id="repository" style="font-weight: bold;">[repository]</span> 저장소는 비어 있어서 Gitblit 에서 볼 수 없습니다.
        <p></p>
        이 Git url 에 커밋해 주세요. <span wicket:id="pushurl"></span>
        <div class="row">
            <div class="span10">
                <div class="alert alert-success">
                    <span wicket:id="repository" style="font-weight: bold;">[repository]</span> 저장소는 비어 있어서 Gitblit 에서 볼 수 없습니다.
                    <p></p>
                    이 Git url 에 커밋해 주세요. <span wicket:id="pushurl"></span>
                    <p></p>
                    <hr/>
                    After you have pushed commits you may <b>refresh</b> this page to view your repository.
                </div>
            </div>
        </div>
        <p></p>
        <h3>Git 명령어</h3>
        <span style="padding-bottom:5px;">로컬 Git 저장소가 없다면, 이 저장소를 클론(clone) 한 후, 몇 파일을 커밋하고, 그 커밋을 Gitblit 에 푸시(push) 하세요.</span>
        <p></p>
        <pre style="padding-top:5px;" wicket:id="cloneSyntax"></pre>
        <pre style="padding: 5px 30px;" wicket:id="cloneSyntax"></pre>
        <p></p>
        <span style="padding-bottom:5px;">만약 커밋된 로컬 Git 저장소가 있다면, 다음과 같이 저장소에 리모트를 추가하고 푸시(push)할 수 있습니다.</span>
        <p></p>
        <pre wicket:id="remoteSyntax"></pre>
        <pre style="padding: 5px 30px;" wicket:id="remoteSyntax"></pre>
        <p></p>
        <h3>Git 배우기</h3>
        만약 사용법에 자신이 없다면, Git 사용법을 더 잘 이해하기 위해 
@@ -35,13 +43,15 @@
            <li><a href="http://git-scm.com">Git</a> - 명령어 기반 공식 Git</li>
            <li><a href="http://tortoisegit.googlecode.com">TortoiseGit</a> - 윈도의 파일 탐색기에 통합된 UI 클라이언트 (명령어 기반 공식 Git 필요)</li>
            <li><a href="http://eclipse.org/egit">Eclipse/EGit</a> - 이클립스 IDE 플러그인 (Gitblit 과 같은 JGit 기반)</li>
            <li><a href="https://code.google.com/p/gitextensions/">Git Extensions</a> - C# frontend for Git that features Windows Explorer and Visual Studio integration</li>
            <li><a href="http://gitx.laullon.com/">GitX (L)</a> - a Mac OS X Git client</li>
        </ul>
        <p></p>
        <h4>유료 Git 클라이언트</h4>
        <ul>
            <li><a href="http://www.syntevo.com/smartgit">SmartGit</a> - 자바 어플리케이션 (명령어 기반 공식 Git 필요)</li>
            <li><a href="http://www.sourcetreeapp.com/">SourceTree</a> - A free Mac Client for Git, Mercurial, and SVN</li>
        </ul>
    </div>
</wicket:extend>    
</body>
</html>
src/com/gitblit/wicket/pages/EmptyRepositoryPage_pl.html
@@ -9,22 +9,29 @@
<body>
<wicket:extend>
    <!-- markdown message -->
    <div class="markdown">
        <h2>Puste repozytorium</h2>
        <p></p>
        <span wicket:id="repository" style="font-weight: bold;">[repository]</span> jest pustym repozytorium i nie mo&#380;e by&#263; zaprezentowane przez Gitblit.
        <p></p>
        Wgraj, poprzez push, dowolne zmiany do lokalizacji <span wicket:id="pushurl"></span>
        <p></p>
        <div class="row">
            <div class="span10">
                <div class="alert alert-success">
                    <span wicket:id="repository" style="font-weight: bold;">[repository]</span> jest pustym repozytorium i nie mo&#380;e by&#263; zaprezentowane przez Gitblit.
                    <p></p>
                    Wgraj, poprzez push, dowolne zmiany do lokalizacji <span wicket:id="pushurl"></span>
                    <p></p>
                    <hr/>
                    After you have pushed commits you may <b>refresh</b> this page to view your repository.
                </div>
            </div>
        </div>
        <h3>Sk&#322;adnia linii polece&#324; GITa</h3>
        <span style="padding-bottom:5px;">Je&#347;li nie posiadasz lokalnego repozytorium GITa to sklonuj to repozytorium, wgraj dowolne pliki, a nast&#281;pnie wy&#347;lij poprzez push zmiany na Gitblit.</span>
        <p></p>
        <pre style="padding-top:5px;" wicket:id="cloneSyntax"></pre>
        <pre style="padding: 5px 30px;" wicket:id="cloneSyntax"></pre>
        <p></p>
        <span style="padding-bottom:5px;">Gdy posiadasz lokalne repozytorium GITa z dowolnymi zmianami, to mo&#380;esz doda&#263; to repozytorium jako remote i wys&#322;a&#263; do niego zmiany poprzez push.</span>
        <p></p>
        <pre wicket:id="remoteSyntax"></pre>
        <pre style="padding: 5px 30px;" wicket:id="remoteSyntax"></pre>
        <p></p>
        <h3>Nauka GITa</h3>
        Je&#380;eli powy&#380;sze informacje s&#261; dla Ciebie niezrozumia&#322;e, zapoznaj si&#281; z ksi&#261;&#380;k&#261; <a href="http://git-scm.com/book/pl" target="_blank">Pro Git - Wersja PL</a> dla lepszego zrozumienia, jak poprawnie u&#380;ywa&#263; GITa.
@@ -34,13 +41,15 @@
            <li><a href="http://git-scm.com">Git</a> - Oficjalny klient, dost&#281;pny przez lini&#281; polece&#324;</li>
            <li><a href="http://tortoisegit.googlecode.com">TortoiseGit</a> - Rozszerzenie eksploratora Windows (wymaga oficjalnego, dost&#281;pnego przez lini&#281; polece&#324; klienta)</li>
            <li><a href="http://eclipse.org/egit">Eclipse/EGit</a> - GIT dla edytora Eclipse (oparty o JGit, podobnie jak Gitblit)</li>
            <li><a href="https://code.google.com/p/gitextensions/">Git Extensions</a> - C# frontend for Git that features Windows Explorer and Visual Studio integration</li>
            <li><a href="http://gitx.laullon.com/">GitX (L)</a> - a Mac OS X Git client</li>
        </ul>
        <p></p>
        <h4>Komercyjni klienci GITa</h4>
        <ul>
            <li><a href="http://www.syntevo.com/smartgit">SmartGit</a> - aplikacja napisana w Javie (wymaga oficjalnego, dost&#281;pnego przez lini&#281; polece&#324; klienta)</li>
            <li><a href="http://www.sourcetreeapp.com/">SourceTree</a> - A free Mac Client for Git, Mercurial, and SVN</li>
        </ul>
    </div>
</wicket:extend>    
</body>
</html>