]> source.dussan.org Git - gitblit.git/commitdiff
Fixed tablet/phone scaling on dashboards. Improved digests title.
authorJames Moger <james.moger@gitblit.com>
Wed, 19 Jun 2013 20:24:55 +0000 (16:24 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 19 Jun 2013 20:24:55 +0000 (16:24 -0400)
src/main/java/com/gitblit/wicket/GitBlitWebApp.properties
src/main/java/com/gitblit/wicket/pages/DashboardPage.java
src/main/java/com/gitblit/wicket/pages/MyDashboardPage.html
src/main/java/com/gitblit/wicket/pages/MyDashboardPage.java
src/main/java/com/gitblit/wicket/pages/ProjectPage.html
src/main/java/com/gitblit/wicket/pages/ProjectPage.java

index f7e72ca99275ee4f84da1d4496d308567cc7a931..f3c6d71da45d66a732ecb67451f21a71e63a5dbc 100644 (file)
@@ -495,4 +495,5 @@ gb.failedToFindAccount = failed to find user account ''{0}''
 gb.reflog = reflog
 gb.active = active
 gb.starred = starred
-gb.owned = owned
\ No newline at end of file
+gb.owned = owned
+gb.starredAndOwned = starred & owned
\ No newline at end of file
index 1c45b64a4238489c898c4e823926cbeae7d617ba..3c2828b7292e5df1e4d1bc3334515cfd61d715e4 100644 (file)
@@ -52,7 +52,6 @@ import com.gitblit.wicket.GitBlitWebApp;
 import com.gitblit.wicket.PageRegistration;\r
 import com.gitblit.wicket.PageRegistration.DropDownMenuItem;\r
 import com.gitblit.wicket.PageRegistration.DropDownMenuRegistration;\r
-import com.gitblit.wicket.WicketUtils;\r
 import com.gitblit.wicket.charting.GoogleChart;\r
 import com.gitblit.wicket.charting.GoogleCharts;\r
 import com.gitblit.wicket.charting.GooglePieChart;\r
@@ -75,7 +74,7 @@ public abstract class DashboardPage extends RootPage {
                return true;\r
        }\r
 \r
-       protected void addActivity(UserModel user, Collection<RepositoryModel> repositories, int daysBack) {\r
+       protected void addActivity(UserModel user, Collection<RepositoryModel> repositories, boolean isStarred, int daysBack) {\r
                Calendar c = Calendar.getInstance();\r
                c.add(Calendar.DATE, -1*daysBack);\r
                Date minimumDate = c.getTime();\r
@@ -92,6 +91,7 @@ public abstract class DashboardPage extends RootPage {
                \r
                Fragment activityFragment = new Fragment("activity", "activityFragment", this);\r
                add(activityFragment);\r
+               activityFragment.add(new Label("feedTitle", getString( isStarred ?  "gb.starredAndOwned" : "gb.recentActivity")));\r
                if (digests.size() == 0) {\r
                        // quiet or no starred repositories\r
                        if (repositories.size() == 0) {\r
@@ -107,7 +107,6 @@ public abstract class DashboardPage extends RootPage {
                        // show daily commit digest feed\r
                        Collections.sort(digests);\r
                        DigestsPanel digestsPanel = new DigestsPanel("digests", digests);\r
-                       WicketUtils.setCssStyle(digestsPanel,  "margin-top:-20px");\r
                        activityFragment.add(digestsPanel);\r
                }\r
                \r
index 6b78b1404577324f64b2e864c832b99aa401efa2..a9fd1bae6540a4f830147be909f0c51fd9f40e64 100644 (file)
@@ -10,7 +10,7 @@
 \r
        <div class="row" style="padding-top:5px;">\r
                <div class="span7">\r
-                       <div class="hidden-phone markdown" style="padding-bottom: 30px;" wicket:id="repositoriesMessage">[repositories message]</div>\r
+                       <div class="hidden-phone hidden-tablet markdown" style="padding-bottom: 30px;" wicket:id="repositoriesMessage">[repositories message]</div>\r
                        <div wicket:id="activity"></div>\r
                </div>\r
                <div class="span5">\r
@@ -58,7 +58,7 @@
 </wicket:fragment>\r
 \r
 <wicket:fragment wicket:id="activityFragment">\r
-       <div class="dashboardTitle"><wicket:message key="gb.recentActivity"></wicket:message> <small><span wicket:id="feedheader"></span></small></div>\r
+       <div class="dashboardTitle"><span class="hidden-phone hidden-tablet" wicket:id="feedTitle"></span> <small><span wicket:id="feedheader"></span></small></div>\r
        <div class="hidden-phone hidden-tablet"  style="text-align:center;">\r
                <div wicket:id="charts"></div>\r
        </div>\r
index b0c89b72f93bd493acf87ba631df4f6d8f1ecd44..858821d46bea5e504e6df12676ad37b7e3c3ed83 100644 (file)
@@ -141,7 +141,7 @@ public class MyDashboardPage extends DashboardPage {
                        feed.addAll(active);\r
                }\r
                \r
-               addActivity(user, feed, daysBack);\r
+               addActivity(user, feed, starred.size() > 0 || owned.size() > 0, daysBack);\r
                \r
                Fragment repositoryTabs;\r
                if (UserModel.ANONYMOUS.equals(user)) {\r
index 9fbe1b2d69069ad6f8f6fb5d8913e2c064532012..102a49e606837318a9e159192bd0b1114f3eeb95 100644 (file)
                        \r
                        <div class="row">\r
                                <div class="span7">                                     \r
-                                       <div class="markdown" style="padding-bottom: 30px;" wicket:id="projectMessage">[project message]</div>\r
+                                       <div class="hidden-phone hidden-tablet markdown" style="padding-bottom: 30px;" wicket:id="projectMessage">[project message]</div>\r
                                        <div wicket:id="activity">[activity panel]</div>\r
                                </div>\r
                                <div class="span5">\r
-                                       <div class="markdown" wicket:id="repositoriesMessage">[repositories message]</div>\r
+                                       <div class="hidden-phone hidden-tablet markdown" wicket:id="repositoriesMessage">[repositories message]</div>\r
                                        <div wicket:id="repositoryList">[repository list]</div>\r
                                </div>\r
                        </div>\r
                </div>\r
 \r
 <wicket:fragment wicket:id="activityFragment">\r
-       <div class="dashboardTitle"><wicket:message key="gb.recentActivity"></wicket:message> <small><span wicket:id="feedheader"></span></small></div>\r
+       <div class="dashboardTitle"><span class="hidden-phone hidden-tablet" wicket:id="feedTitle"></span> <small><span wicket:id="feedheader"></span></small></div>\r
        <div class="hidden-phone hidden-tablet"  style="text-align:center;">\r
                <div wicket:id="charts"></div>\r
        </div>\r
index c64e900a54ea459f64f8e46168b1eadecfb4ccea..b101b4005c442a0c3a1eb85083a198397c44196e 100644 (file)
@@ -123,7 +123,7 @@ public class ProjectPage extends DashboardPage {
                });\r
 \r
                \r
-               addActivity(user, repositories, daysBack);\r
+               addActivity(user, repositories, false, daysBack);\r
                \r
                if (repositories.isEmpty()) {\r
                        add(new Label("repositoryList").setVisible(false));\r