
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
... | ... | @@ -218,3 +218,18 @@ |
218 | 218 |
.font-blue { |
219 | 219 |
color: #0088cc; |
220 | 220 |
} |
221 |
+ |
|
222 |
+.notification-badge { |
|
223 |
+ font-size:12px; |
|
224 |
+ border:2px solid #FFF; |
|
225 |
+ line-height:20px; |
|
226 |
+ padding:0 5px; |
|
227 |
+ background-color:@yobi-primary; |
|
228 |
+ color:#ECF0F1; |
|
229 |
+ .border-radius(10px); |
|
230 |
+ |
|
231 |
+ -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0 1px 1px rgba(0,0,0,0.1); |
|
232 |
+ -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0 1px 1px rgba(0,0,0,0.1); |
|
233 |
+ -o-box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0 1px 1px rgba(0,0,0,0.1); |
|
234 |
+ box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0 1px 1px rgba(0,0,0,0.1); |
|
235 |
+} |
--- app/views/site/siteMngLayout.scala.html
+++ app/views/site/siteMngLayout.scala.html
... | ... | @@ -61,6 +61,7 @@ |
61 | 61 |
</li> |
62 | 62 |
<li class="@isActiveMenu(routes.SiteApp.update())"> |
63 | 63 |
<a href="@routes.SiteApp.update()">@Messages("site.sidebar.update") |
64 |
+ @if(YobiUpdate.versionToUpdate != null) { <span class="notification-badge">1</span> } |
|
64 | 65 |
</a> |
65 | 66 |
</li> |
66 | 67 |
</ul> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?