Skip to content

The Unified and Autonomous Development Platform

Remove page foot and show product information via head info icon

Robin Shene6ca7404f0c4
diff --git a/web/src/main/java/com/turbodev/server/web/component/sidebar/sidebar.css b/web/src/main/java/com/turbodev/server/web/component/sidebar/sidebar.css
index 5561309a0a..add778ef8b 100644
--- a/web/src/main/java/com/turbodev/server/web/component/sidebar/sidebar.css
+++ b/web/src/main/java/com/turbodev/server/web/component/sidebar/sidebar.css
@@ -49,7 +49,7 @@
.minimizable.sidebar>a.mini-toggle {
display: block;
border-top: 2px solid #E0E0E0;
- height: 36px;
+ height: 40px;
text-decoration: none;
font-size: 24px;
text-align: center;
@@ -62,10 +62,6 @@
margin-right: 1px;
background: #FAFAFA;
}
-.minimizable.sidebar>a.mini-toggle .text {
- margin-left: 8px;
- font-size: 20px;
-}
.minimizable.sidebar>a.mini-toggle:before {
font-family: "FontAwesome";
content: "\f100";
diff --git a/web/src/main/java/com/turbodev/server/web/page/layout/LayoutPage.html b/web/src/main/java/com/turbodev/server/web/page/layout/LayoutPage.html
index 4b22764a0c..865307e1db 100644
--- a/web/src/main/java/com/turbodev/server/web/page/layout/LayoutPage.html
+++ b/web/src/main/java/com/turbodev/server/web/page/layout/LayoutPage.html
@@ -23,8 +23,8 @@
</div>
</wicket:enclosure>
</div>
- <div class="help pull-right">
- <a wicket:id="docLink" title="Help"><i class="fa fa-question"></i></a>
+ <div class="info pull-right">
+ <a wicket:id="info" title="Information"><i class="fa fa-info"></i></a>
</div>
<wicket:enclosure child="pushDisabled">
<div class="push-disabled pull-right">
@@ -35,14 +35,6 @@
<div class="body">
<wicket:child></wicket:child>
</div>
- <div wicket:id="foot" class="foot clearfix">
- <div class="pull-left">
- <a href="https://www.turbodev.com">TurboDev</a>, <span wicket:id="productVersion"></span>, <span wicket:id="releaseDate"></span>
- </div>
- <div class="pull-right">
- <a href="mailto:[email protected]">Support &amp; Bug Report</a>
- </div>
- </div>
</div>
<wicket:fragment wicket:id="userMenuFrag">
<div class="user">
@@ -50,4 +42,14 @@
<a wicket:id="logout"><i class="fa fa-fw fa-sign-out"></i> Logout</a>
</div>
</wicket:fragment>
+ <wicket:fragment wicket:id="infoFrag">
+ <div class="turbodev-info">
+ <div>TurboDev <span wicket:id="productVersion"></span></div>
+ <ul>
+ <li><a href="https://www.turbodev.com">Product Home</a></li>
+ <li><a wicket:id="docLink">Document</a></li>
+ <li><a href="mailto:[email protected]">Support &amp; Bug Report</a></li>
+ </ul>
+ </div>
+ </wicket:fragment>
</wicket:extend>
\ No newline at end of file
diff --git a/web/src/main/java/com/turbodev/server/web/page/layout/LayoutPage.java b/web/src/main/java/com/turbodev/server/web/page/layout/LayoutPage.java
index 0f6b135f7d..f451ce2365 100644
--- a/web/src/main/java/com/turbodev/server/web/page/layout/LayoutPage.java
+++ b/web/src/main/java/com/turbodev/server/web/page/layout/LayoutPage.java
@@ -1,12 +1,12 @@
package com.turbodev.server.web.page.layout;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.apache.wicket.Component;
import org.apache.wicket.RestartResponseAtInterceptPageException;
+import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.event.IEvent;
import org.apache.wicket.markup.head.CssHeaderItem;
import org.apache.wicket.markup.head.IHeaderResponse;
@@ -57,8 +57,6 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.components.TooltipConfig
@SuppressWarnings("serial")
public abstract class LayoutPage extends BasePage {
-
- private static final String RELEASE_DATE_FORMAT = "yyyy-MM-dd";
public LayoutPage() {
}
@@ -169,7 +167,25 @@ public abstract class LayoutPage extends BasePage {
} else {
head.add(new WebMarkupContainer("pushDisabled").setVisible(false));
}
- head.add(new ExternalLink("docLink", TurboDev.getInstance().getDocLink() + "/readme.md"));
+
+ head.add(new DropdownLink("info") {
+
+ @Override
+ protected void onInitialize(FloatingPanel dropdown) {
+ super.onInitialize(dropdown);
+ dropdown.add(AttributeAppender.append("class", " menu"));
+ }
+
+ @Override
+ protected Component newContent(String id, FloatingPanel dropdown) {
+ Fragment fragment = new Fragment(id, "infoFrag", LayoutPage.this);
+ Plugin product = AppLoader.getProduct();
+ fragment.add(new Label("productVersion", product.getVersion()));
+ fragment.add(new ExternalLink("docLink", TurboDev.getInstance().getDocLink() + "/readme.md"));
+ return fragment;
+ }
+
+ });
User user = getLoginUser();
boolean signedIn = user != null;
@@ -231,11 +247,6 @@ public abstract class LayoutPage extends BasePage {
head.add(new WebMarkupContainer("userMenu").setVisible(false));
}
- WebMarkupContainer foot = new WebMarkupContainer("foot");
- Plugin product = AppLoader.getProduct();
- foot.add(new Label("productVersion", product.getVersion()));
- foot.add(new Label("releaseDate", new SimpleDateFormat(RELEASE_DATE_FORMAT).format(product.getDate())));
- add(foot);
}
protected List<ComponentRenderer> getBreadcrumbs() {
diff --git a/web/src/main/java/com/turbodev/server/web/page/layout/layout.css b/web/src/main/java/com/turbodev/server/web/page/layout/layout.css
index d14fead61e..9bbc08511c 100644
--- a/web/src/main/java/com/turbodev/server/web/page/layout/layout.css
+++ b/web/src/main/java/com/turbodev/server/web/page/layout/layout.css
@@ -61,11 +61,11 @@
max-width: 400px;
}
}
-#layout>.head>.help {
+#layout>.head>.info {
padding-top: 7px;
}
-#layout>.head>.help .fa {
- font-size: 18px;
+#layout>.head>.info .fa {
+ font-size: 20px;
}
#layout>.head>.user {
margin-right: 0;
@@ -95,24 +95,9 @@
height: 32px;
}
#layout>.body {
- padding: 68px 20px 56px 20px;
+ padding: 68px 20px 20px 20px;
width: 100%;
}
-#layout>.foot {
- border-top: 2px solid #E0E0E0;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- height: 36px;
- background: #F5F5F5;
- font-size: 11px;
- padding: 8px;
- z-index: 210;
-}
-#layout>.foot>div {
- white-space: nowrap;
-}
#project-add {
padding: 20px;
@@ -133,5 +118,10 @@
#layout .sidebar {
top: 48px;
- bottom: 36px;
+}
+
+.turbodev-info>div {
+ padding: 8px 16px;
+ font-weight: bold;
+ font-size: 16px;
}