]> source.dussan.org Git - gitblit.git/commitdiff
Indicate WORKING COPY on repository pages (issue 49)
authorJames Moger <james.moger@gitblit.com>
Sat, 4 Feb 2012 05:28:37 +0000 (00:28 -0500)
committerJames Moger <james.moger@gitblit.com>
Sat, 4 Feb 2012 05:28:37 +0000 (00:28 -0500)
docs/04_releases.mkd
src/com/gitblit/wicket/GitBlitWebApp.properties
src/com/gitblit/wicket/pages/RepositoryPage.html
src/com/gitblit/wicket/pages/RepositoryPage.java
src/com/gitblit/wicket/panels/RepositoriesPanel.java

index 32769762cf386c4082883034496a70970e1a4547..e1dcb40025ad5564ebd697a86fa9143df19b3ebd 100644 (file)
@@ -13,6 +13,7 @@
 \r
 - On the Repositories page show a bang *!* character in the color swatch of a repository with a working copy (issue 49)  \r
 Push requests to these repositories will be rejected.\r
+- On all non-bare Repository pages show *WORKING COPY* in the upper right corner (issue 49)\r
 - New setting to prevent display/serving non-bare repositories  \r
     **New:** *git.onlyAccessBareRepositories = false*\r
 - Allow relinking HEAD to a branch or a tag (Github/plm)\r
index 1a8513a5fea6983ca37eee734d8ff070fc5f3637..b5cd51509997aafa103d9aab2960c4571e9ab9bf 100644 (file)
@@ -210,4 +210,6 @@ gb.accessPermissionsForTeamDescription = set team members and grant access to sp
 gb.federationRepositoryDescription = share this repository with other Gitblit servers\r
 gb.hookScriptsDescription = run Groovy scripts on pushes to this Gitblit server\r
 gb.reset = reset\r
-gb.pages = pages
\ No newline at end of file
+gb.pages = pages\r
+gb.workingCopy = WORKING COPY\r
+gb.workingCopyWarning = this repository has a working copy and can not receive pushes
\ No newline at end of file
index c60275ab68b0c98c3ab076ad656c764045bb9588..d69c7f9090a69a243b72033f6adfabc0ce3d0f63 100644 (file)
@@ -37,6 +37,9 @@
        \r
                <!-- page header -->\r
                <div class="page-header">\r
+                       <div style="float:right;padding-top:5px;">\r
+                               <span class="label important" wicket:id="workingCopy">[working copy]</span>\r
+                       </div>\r
                        <h2><span wicket:id="repositoryName">[repository name]</span> <small><span wicket:id="pageName">[page name]</span></small></h2>\r
                </div>\r
        \r
index 5f544012274281e8cbfca096eab8699c93ac9f8b..77918ea48a276621514955ec205df57c26eb4d84 100644 (file)
@@ -153,6 +153,13 @@ public abstract class RepositoryPage extends BasePage {
                add(new LinkPanel("repositoryName", null, StringUtils.stripDotGit(repositoryName),\r
                                SummaryPage.class, WicketUtils.newRepositoryParameter(repositoryName)));\r
                add(new Label("pageName", pageName));\r
+               if (getRepositoryModel().isBare) {\r
+                       add(new Label("workingCopy").setVisible(false));\r
+               } else {\r
+                       Label lbl = new Label("workingCopy", getString("gb.workingCopy"));\r
+                       WicketUtils.setHtmlTooltip(lbl,  getString("gb.workingCopyWarning"));\r
+                       add(lbl);\r
+               }\r
 \r
                super.setupPage(repositoryName, pageName);\r
        }\r
index 4dcdab48b5a942ce1af50996e6c34db17b04ad43..ee6e119138dc571799e9099a7f16d03104c39202 100644 (file)
@@ -155,7 +155,7 @@ public class RepositoriesPanel extends BasePanel {
                                        swatch = new Label("repositorySwatch", "&nbsp;").setEscapeModelStrings(false);\r
                                } else {\r
                                        swatch = new Label("repositorySwatch", "!");\r
-                                       WicketUtils.setHtmlTooltip(swatch, "This repository has a working copy and can not receive pushes");\r
+                                       WicketUtils.setHtmlTooltip(swatch, getString("gb.workingCopyWarning"));\r
                                }\r
                                WicketUtils.setCssBackground(swatch, entry.toString());\r
                                row.add(swatch);\r