Yi EungJun 2014-07-24
YobiUpdate: Show badge if update is available
Show a badge if update is available on the Software Update menuitem.
@96c5238c5cecc83cbfcd9dbf1ce3062cb071b85b
app/assets/stylesheets/less/_common.less
--- app/assets/stylesheets/less/_common.less
+++ app/assets/stylesheets/less/_common.less
@@ -218,3 +218,18 @@
 .font-blue {
   color: #0088cc;
 }
+
+.notification-badge {
+    font-size:12px;
+    border:2px solid #FFF;
+    line-height:20px;
+    padding:0 5px;
+    background-color:@yobi-primary;
+    color:#ECF0F1;
+    .border-radius(10px);
+
+    -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0 1px 1px rgba(0,0,0,0.1);
+    -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0 1px 1px rgba(0,0,0,0.1);
+    -o-box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0 1px 1px rgba(0,0,0,0.1);
+    box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0 1px 1px rgba(0,0,0,0.1);
+}
app/views/site/siteMngLayout.scala.html
--- app/views/site/siteMngLayout.scala.html
+++ app/views/site/siteMngLayout.scala.html
@@ -61,6 +61,7 @@
                     </li>
                     <li class="@isActiveMenu(routes.SiteApp.update())">
                         <a href="@routes.SiteApp.update()">@Messages("site.sidebar.update")
+                        @if(YobiUpdate.versionToUpdate != null) { <span class="notification-badge">1</span> }
                         </a>
                     </li>
                 </ul>
Add a comment
List