dashstrap 0.2.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/Gemfile +0 -9
  4. data/Rakefile +0 -5
  5. data/app/assets/javascripts/dashstrap/application.js +5 -1
  6. data/app/assets/javascripts/dashstrap/modules/list-view.js +13 -3
  7. data/app/assets/javascripts/dashstrap/modules/modules.js +2 -2
  8. data/app/assets/stylesheets/dashstrap/dashboard/ltr/application.css +5 -1
  9. data/app/assets/stylesheets/dashstrap/dashboard/rtl/application.css +5 -1
  10. data/app/assets/stylesheets/dashstrap/dashboard/share.scss +1 -1
  11. data/app/assets/stylesheets/dashstrap/ltr/application.css +3 -3
  12. data/app/assets/stylesheets/dashstrap/rtl/application.css +4 -3
  13. data/app/assets/stylesheets/dashstrap/share.scss +39 -1
  14. data/app/assets/stylesheets/dashstrap/variables.scss +5 -0
  15. data/app/views/angular/auth/groups/index.html.slim +1 -3
  16. data/app/views/angular/auth/groups/new.html.slim +12 -0
  17. data/app/views/angular/auth/users/index.html.slim +2 -0
  18. data/app/views/angular/list-view/index.html +12 -11
  19. data/app/views/dashstrap/shared/_content_header.html.slim +14 -0
  20. data/app/views/dashstrap/shared/_header.html.erb +273 -0
  21. data/app/views/dashstrap/shared/_sidebar.html.erb +62 -0
  22. data/app/views/faalis/dashboard/index.html.erb +0 -44
  23. data/app/views/faalis/dashboard/not_found.html.slim +9 -0
  24. data/app/views/faalis/dashboard/not_found.js.erb +1 -0
  25. data/app/views/layouts/faalis/dashboard.html.erb +48 -24
  26. data/config/initializers/assets.rb +1 -0
  27. data/dashstrap.gemspec +4 -5
  28. data/lib/dashstrap/engine.rb +3 -17
  29. data/lib/dashstrap/version.rb +1 -1
  30. data/lib/generators/templates/js/list_view/index.html.erb +1 -1
  31. data/lib/generators/templates/js/list_view/partials/index_controller.js.erb +9 -5
  32. data/vendor/assets/fonts/Lato-Bold.woff +0 -0
  33. data/vendor/assets/fonts/Lato-Bold.woff2 +0 -0
  34. data/vendor/assets/fonts/Lato-Light.woff +0 -0
  35. data/vendor/assets/fonts/Lato-Light.woff2 +0 -0
  36. data/vendor/assets/fonts/Lato-Regular.woff +0 -0
  37. data/vendor/assets/fonts/Lato-Regular.woff2 +0 -0
  38. data/vendor/assets/images/avatar.jpg +0 -0
  39. data/vendor/assets/javascripts/AdminLTE/app.js +929 -593
  40. data/vendor/assets/javascripts/AdminLTE/dashboard.js +11 -12
  41. data/vendor/assets/javascripts/bootstrap-datepicker.js +2286 -0
  42. data/vendor/assets/javascripts/rtl/bootstrap-datepicker.fa.js +245 -0
  43. data/vendor/assets/stylesheets/AdminLTE.css +3 -5
  44. data/vendor/assets/stylesheets/daterangepicker.css +337 -0
  45. data/vendor/assets/stylesheets/fonts.css.erb +20 -0
  46. metadata +33 -30
  47. data/app/views/angular/auth/users/index.html +0 -6
  48. data/vendor/assets/javascripts/ui-bootstrap.js +0 -3799
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9bd360a97a2a796fc4e2b61f66aa320b5d98e545
4
- data.tar.gz: 967bcaaaf0b21cc979d12b268d30f89ac78c452f
3
+ metadata.gz: a892426fc69b92c0e83de6230b923b98460d2288
4
+ data.tar.gz: b396bc3b5fa695dea58ec94bc55d50010cb10964
5
5
  SHA512:
6
- metadata.gz: 447502e6968e6bbac24ece54fdf4e60a4b38bfccf32d30f0cd393a94234b3647b49c7349ccbcf904cf0909165cd10f398b940481a73ce70a3b69f8ef063f0c9e
7
- data.tar.gz: 20346467bbb5a918d1cd46e40945e1e23c7c91582a3d7f0a1e790129a9e0f224e855e43d4aaa4bfdea142dd44a52686351a02ede10bcf09fc7638dfe041fb28e
6
+ metadata.gz: 88beecd69b3379958f70e44b81bf5718233d6486b8ca63665088e893ffcb0c030d40012331a3af77f00d17a169386d60ac2398dc7221b8f7c126daeaa082aa8f
7
+ data.tar.gz: 7243d2b1714e6fd5ab9512e8f5724ef68f7ea48a33e03d4f8bf164979c88e09c036ab6799e38057dc865a45cf9d101bd08270561ecc42f71de662eecf0c06889
data/.gitignore CHANGED
@@ -17,3 +17,5 @@ test/version_tmp
17
17
  tmp
18
18
  **/*/.sass*
19
19
  node_modules/
20
+ *~
21
+ **/*/.tern*
data/Gemfile CHANGED
@@ -2,12 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in dashstrap.gemspec
4
4
  gemspec
5
- Faalis = [File.expand_path(File.dirname(__FILE__)),
6
- '../Faalis/'].join("/")
7
-
8
- group :development, :test do
9
- gem 'coffee-rails-source-maps'
10
- gem 'sass-rails-source-maps'
11
- end
12
-
13
- gem 'faalis', path: Faalis
data/Rakefile CHANGED
@@ -1,13 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "bundler/setup"
3
3
  require "rails/all"
4
- require "faalis"
5
4
 
6
5
  Bundler.require(:defaults)
7
6
  #require_relative "./lib/dashstrap"
8
7
  require File.expand_path('../lib/dashstrap', __FILE__ )
9
8
  Dashstrap::TemplateEngine.load_tasks
10
- Faalis::Engine.load_tasks
11
-
12
-
13
- require 'gettext_i18n_rails/tasks'
@@ -1,5 +1,9 @@
1
- //= require_tree ./modules
2
1
  //= require dashstrap/functions
3
2
  //= require moment
4
3
  //= require moment/fa
5
4
  //= require bootstrap-datetimepicker
5
+ //= require bootstrap-datepicker
6
+ //= require rtl/bootstrap-datepicker.fa
7
+ //= require bootstrap-daterangepicker
8
+ //= require jquery-knob
9
+ //= require jquery-sparkline
@@ -171,7 +171,7 @@ ListView.directive('listView', ["$filter", "gettext", "UserPermissions", functio
171
171
 
172
172
  }
173
173
 
174
- delete_method(objects_to_delete);
174
+ delete_method(objects_to_delete, scope.resource, scope);
175
175
  }
176
176
 
177
177
 
@@ -294,7 +294,6 @@ ListView.directive('listView', ["$filter", "gettext", "UserPermissions", functio
294
294
  scope.get_current_page = function(){
295
295
  var start = (scope.current_page() * _item_per_page) - _item_per_page;
296
296
  var end = (scope.current_page() * _item_per_page);
297
-
298
297
  return filtered_objects().slice(start, end);
299
298
  };
300
299
 
@@ -320,6 +319,12 @@ ListView.directive('listView', ["$filter", "gettext", "UserPermissions", functio
320
319
  }
321
320
  return true;
322
321
  };
322
+
323
+ scope.call_func = function(func, args){
324
+ var star_args = Array.prototype.slice.call (arguments, func.length);
325
+ console.log(star_args);
326
+ func.apply(func, star_args);
327
+ };
323
328
  }
324
329
 
325
330
 
@@ -369,7 +374,12 @@ ListView.directive('listView', ["$filter", "gettext", "UserPermissions", functio
369
374
  delete_title: "=deleteTitle",
370
375
 
371
376
  //Badge operation function
372
- badge_processor: '=badgeProcessor'
377
+ badge_processor: '=badgeProcessor',
378
+
379
+ //Tools operation function
380
+ tools_processor: '=toolsProcessor',
381
+
382
+ resource: '='
373
383
 
374
384
  },
375
385
  link: link
@@ -4,7 +4,7 @@ var Modules = angular.module("Modules", ["ngRoute", "ngAnimate"]);
4
4
  add_dependency("Modules");
5
5
 
6
6
  // This controller is responsible to parse modules and load them
7
- Modules.controller("ModulesController", ["$location", "$scope", "$controller", "UserPermissions", function($location, $scope, $controller, User){
7
+ Modules.controller("ModulesController", ["$location", "$scope", "$controller", "UserPermissions", "gettext", function($location, $scope, $controller, User, gettext){
8
8
 
9
9
  var that = this;
10
10
  this.modules = _.filter(DModules, function(module){
@@ -17,7 +17,7 @@ Modules.controller("ModulesController", ["$location", "$scope", "$controller", "
17
17
  // ```javascript
18
18
  /// <modulename>MenuController
19
19
  ///```
20
- var menu_items = $controller(camelCase(module.resource) + "MenuController", {$scope: $scope}).menu_items;
20
+ var menu_items = $controller(camelCase(module.resource) + "MenuController", {$scope: $scope, gettext: gettext}).menu_items;
21
21
  module.menu_items = [];
22
22
 
23
23
  // Iterate over submenu items
@@ -9,4 +9,8 @@ daterangepicker-bs3
9
9
  bootstrap3-wysihtml5
10
10
  */
11
11
  //= require AdminLTE
12
- //= require dashstrap/dashboard/share
12
+ //= require dashstrap/dashboard/share
13
+ //= require_self
14
+ .fa {
15
+ padding-right: 0.4em;
16
+ }
@@ -10,4 +10,8 @@ daterangepicker-bs3
10
10
  bootstrap3-wysihtml5
11
11
  */
12
12
  //= require rtl/AdminLTE
13
- //= require dashstrap/dashboard/share
13
+ //= require dashstrap/dashboard/share
14
+ //= require_self
15
+ .fa {
16
+ padding-left: 0.4em;
17
+ }
@@ -4,4 +4,4 @@
4
4
 
5
5
  .point {
6
6
  cursor: pointer;
7
- }
7
+ }
@@ -13,7 +13,7 @@ bootstrap3-wysihtml5
13
13
  //= require dashstrap/share
14
14
  //= require dashstrap/main
15
15
  //= require dashstrap/ltr/ltr
16
- //= require select2/select2
17
- //= require select2/select2-bootstrap
16
+ //= require select2
17
+ //= require select2-bootstrap
18
18
  //= require bootstrap-datetimepicker
19
- //= require angular-loading-bar/loading-bar
19
+ //= require bootstrap-daterangepicker
@@ -1,3 +1,4 @@
1
+
1
2
  //= require rtl/bootstrap
2
3
  //= require rtl/bootstrap-rtl
3
4
  //= require font-awesome
@@ -14,7 +15,7 @@ bootstrap3-wysihtml5
14
15
  //= require dashstrap/share
15
16
  //= require dashstrap/main
16
17
  //= require dashstrap/rtl/rtl
17
- //= require select2/select2
18
- //= require select2/select2-bootstrap
18
+ //= require select2
19
+ //= require select2-bootstrap
19
20
  //= require bootstrap-datetimepicker
20
- //= require angular-loading-bar/loading-bar
21
+ //= require bootstrap-daterangepicker
@@ -1,7 +1,45 @@
1
+ @import "variables";
1
2
  .sidebar .sidebar-menu .treeview-menu {
2
3
  display: block;
4
+
3
5
  }
4
6
 
5
7
  .point {
6
8
  cursor: pointer;
7
- }
9
+
10
+ }
11
+
12
+ .box {
13
+ .box-header {
14
+ a.btn-success{
15
+ color: white;
16
+ }
17
+ }
18
+
19
+ .box-body{
20
+ .btn-user{
21
+
22
+ i.btn-remove{
23
+ color: $red-rb;
24
+ }
25
+
26
+ i.btn-remove:hover{
27
+ color: $red-rb-light;
28
+ }
29
+
30
+ i.change-pass{
31
+ color: $green;
32
+
33
+ }
34
+ i.change-pass:hover{
35
+ color: $green-light;
36
+
37
+ }
38
+
39
+ a{
40
+ padding-right: 1em;
41
+ }
42
+ }
43
+
44
+ }
45
+ }
@@ -0,0 +1,5 @@
1
+ $green: #00A65A;
2
+ $green-light: #28D887;
3
+
4
+ $red-rb: #DC1E1E;
5
+ $red-rb-light: #F03232;
@@ -1,4 +1,2 @@
1
- h1
2
- |aaa
3
1
  div[ui-view]
4
- list-view buttons="buttons" objects="groups" title-attribute="'name'" details-template="details_template" item-per-page="10" on_delete="on_delete"
2
+ list-view buttons="buttons" objects="groups" title-attribute="'name'" details-template="details_template" item-per-page="10" on_delete="on_delete" model="'Faalis::Group'" resource="__resource__"
@@ -58,3 +58,15 @@
58
58
  form.form-inline
59
59
  span.col-sm-3 ng-repeat="action in perm"
60
60
  boolean-field field-name="action.humanize()" model="selected_permissions[model][action]" label="{{ action.humanize() | translate }}"
61
+
62
+ .row
63
+ .col-sm-2
64
+ button.btn.btn-primary.btn-block type="submit" ng-click="save()" ng-disabled="form.$invalid"
65
+ i.fa.fa-check
66
+ = _('Save')
67
+
68
+ .col-sm-2
69
+
70
+ button.btn.btn-danger.btn-block type="submit" ng-click="cancel()"
71
+ i.fa.fa-times
72
+ = _('Cancel')
@@ -0,0 +1,2 @@
1
+ div[ui-view]
2
+ list-view buttons="buttons" objects="groups" title-attribute="'name'" details-template="details_template" item-per-page="10" on_delete="on_delete" model="'Faalis::User'" resource="__resource__"
@@ -16,13 +16,8 @@
16
16
  <button data-ng-repeat="button in buttons" class="{{ button.classes }} pull-right btn" type="button" if-user="has_permission(button)"><a object-action object="button"><i class="{{ button.icon }}"></i> {{ button.title | translate }}</a></button>
17
17
  </div>
18
18
 
19
-
20
19
  <div class="box-tools">
21
20
 
22
- <div class="input-group pull-right input-group-sm search-group col-sm-2" ng-if="search !== true">
23
- <input type="search" class="form-control " ng-model="searchterm" placeholder="{{ 'Search' | translate}} ...">
24
- <span class="input-group-addon"><i class="fa fa-search"></i></span>
25
- </div>
26
21
  <span ng-if="!button_on_left">
27
22
  <button data-ng-repeat="button in buttons" class="{{ button.classes }} pull-right btn" type="button" if-user="has_permission(button)"><a object-action object="button"><i class="{{ button.icon }}"></i> {{ button.title | translate }}</a></button>
28
23
  </span>
@@ -43,18 +38,21 @@
43
38
  <th></th>
44
39
  </tr>
45
40
 
46
- <tr ng-repeat-start="object in get_current_page() track by $index" class='title-row'>
41
+ <tr ng-repeat-start="object in get_current_page() track by $index" class='title-row' id="tr-{{ object.id }}">
47
42
 
48
43
  <td>
49
44
  <i ng-click="select_item(object)" ng-class="{fa:true, 'fa-check-square':object.is_selected, 'fa-square':!object.is_selected, pointer:true}"></i>
50
45
  </td>
51
46
 
52
47
  <td>
53
- {{ get_attr(object, title_attr) }}
48
+ <a href="{{ resource.edit_link(object) }}" ng-if="resource != undefined">
49
+ {{ get_attr(object, title_attr) }}
50
+ </a>
51
+ <span ng-if="resource == undefined">{{ get_attr(object, title_attr) }}</span>
54
52
  </td>
55
53
 
56
54
  <td>
57
- <div class="pull-left" ng-init = "badges = badge_processor(object)" >
55
+ <div class="pull-left" ng-init = "badges = badge_processor(object);tools = tools_processor(object)" >
58
56
  <span ng-repeat="badge in badges" class="badge {{badge.color}}" title="{{badge.text}}">
59
57
  <i ng-show="badge.icon !== undefined" class="{{badge.icon}}"></i>{{badge.text}}
60
58
  </span>
@@ -64,15 +62,18 @@
64
62
  <td class="row_buttons">
65
63
  <div class="tools" >
66
64
  <div class="pull-right">
67
-
68
65
  <span ng-repeat="tool in tools">
66
+ <a href="{{ tool.url }}" class="pointer tool" ng-if="tool.url != undefined">
67
+ <i class="{{ tool.icon }} "> </i>
68
+ <span translate>{{ tool.text }}</span>
69
+ </a>
69
70
 
70
- <a href="{{ tool.url(object) }}" class="pointer tool" ng-if="tool.url !== undefined">
71
+ <a href="{{ tool.url_provider(object) }}" class="pointer tool" ng-if="tool.url_provider != undefined">
71
72
  <i class="{{ tool.icon }} "> </i>
72
73
  <span translate>{{ tool.text }}</span>
73
74
  </a>
74
75
 
75
- <span ng-click="tool.callback(object)" class="pointer tool" ng-if="tool.callback !== undefined">
76
+ <span ng-click="call_func(tool.callback, object)" class="pointer tool" ng-if="tool.callback != undefined">
76
77
  <span translate>{{ tool.text }}</span>
77
78
  <i class="{{ tool.icon }}"></i>
78
79
  </span>
@@ -0,0 +1,14 @@
1
+ // Content Header (Page header) -->
2
+ section.content-header
3
+ h1
4
+ span
5
+ = @dashboard_section_title || _('Dashboard')
6
+ small
7
+ = @dashboard_section_slug || Faalis::Engine.try(:slug) || 'SLUG'
8
+
9
+ ol.breadcrumb
10
+ li
11
+ a href="#"
12
+ i.fa.fa-dashboard
13
+ | Home
14
+ li.active
@@ -0,0 +1,273 @@
1
+ <header class="header">
2
+ <!-- header logo: style can be found in header.less -->
3
+ <a href="/" class="logo">
4
+ <!-- Add the class icon to your logo image or logo icon to add the margining -->
5
+ <%= Faalis::Engine.site_title %>
6
+ </a>
7
+ <!-- Header Navbar: style can be found in header.less -->
8
+ <nav class="navbar navbar-static-top" role="navigation">
9
+ <!-- Sidebar toggle button-->
10
+ <div class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
11
+ <span class="sr-only">Toggle navigation</span>
12
+ <span class="icon-bar"></span>
13
+ <span class="icon-bar"></span>
14
+ <span class="icon-bar"></span>
15
+ </div>
16
+ <div class="navbar-right">
17
+ <ul class="nav navbar-nav">
18
+ <!-- Messages: style can be found in dropdown.less-->
19
+ <li class="dropdown messages-menu">
20
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
21
+ <i class="fa fa-envelope"></i>
22
+ <span class="label label-success">4</span>
23
+ </a>
24
+ <ul class="dropdown-menu">
25
+ <li class="header">-You have 4 messages</li>
26
+ <li>
27
+ <!-- inner menu: contains the actual data -->
28
+ <ul class="menu">
29
+ <li><!-- start message -->
30
+ <a href="#">
31
+ <div class="pull-left">
32
+ <img src="<%= asset_path 'avatar.jpg' %>" class="img-circle" alt="User Image"/>
33
+ </div>
34
+ <h4>
35
+ Support Team
36
+ <small><i class="fa fa-clock-o"></i> 5 mins</small>
37
+ </h4>
38
+ <p>Why not buy a new awesome theme?</p>
39
+ </a>
40
+ </li>
41
+
42
+ <!-- end message -->
43
+ <li>
44
+ <a href="#">
45
+ <div class="pull-left">
46
+ <img src="<%= asset_path 'avatar.jpg' %>" class="img-circle" alt="user image"/>
47
+ </div>
48
+ <h4>
49
+ AdminLTE Design Team
50
+ <small><i class="fa fa-clock-o"></i> 2 hours</small>
51
+ </h4>
52
+ <p>Why not buy a new awesome theme?</p>
53
+ </a>
54
+ </li>
55
+ <li>
56
+ <a href="#">
57
+ <div class="pull-left">
58
+ <img src="<%= asset_path 'avatar.jpg' %>" class="img-circle" alt="user image"/>
59
+ </div>
60
+ <h4>
61
+ Developers
62
+ <small><i class="fa fa-clock-o"></i> Today</small>
63
+ </h4>
64
+ <p>Why not buy a new awesome theme?</p>
65
+ </a>
66
+ </li>
67
+ <li>
68
+ <a href="#">
69
+ <div class="pull-left">
70
+ <img src="<%= asset_path 'avatar.jpg' %>" class="img-circle" alt="user image"/>
71
+ </div>
72
+ <h4>
73
+ Sales Department
74
+ <small><i class="fa fa-clock-o"></i> Yesterday</small>
75
+ </h4>
76
+ <p>Why not buy a new awesome theme?</p>
77
+ </a>
78
+ </li>
79
+ <li>
80
+ <a href="#">
81
+ <div class="pull-left">
82
+ <img src="<%= asset_path 'avatar.jpg' %>" class="img-circle" alt="user image"/>
83
+ </div>
84
+ <h4>
85
+ Reviewers
86
+ <small><i class="fa fa-clock-o"></i> 2 days</small>
87
+ </h4>
88
+ <p>Why not buy a new awesome theme?</p>
89
+ </a>
90
+ </li>
91
+ </ul>
92
+ </li>
93
+ <li class="footer"><a href="#">See All Messages</a></li>
94
+ </ul>
95
+ </li>
96
+ <!-- Notifications: style can be found in dropdown.less -->
97
+ <li class="dropdown notifications-menu">
98
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
99
+ <i class="fa fa-warning"></i>
100
+ <span class="label label-warning">10</span>
101
+ </a>
102
+ <ul class="dropdown-menu">
103
+ <li class="header">You have 10 notifications</li>
104
+ <li>
105
+ <!-- inner menu: contains the actual data -->
106
+ <ul class="menu">
107
+ <li>
108
+ <a href="#">
109
+ <i class="ion ion-ios7-people info"></i> 5 new members joined today
110
+ </a>
111
+ </li>
112
+ <li>
113
+ <a href="#">
114
+ <i class="fa fa-warning danger"></i> Very long description here that may not fit into the page and may cause design problems
115
+ </a>
116
+ </li>
117
+ <li>
118
+ <a href="#">
119
+ <i class="fa fa-users warning"></i> 5 new members joined
120
+ </a>
121
+ </li>
122
+
123
+ <li>
124
+ <a href="#">
125
+ <i class="ion ion-ios7-cart success"></i> 25 sales made
126
+ </a>
127
+ </li>
128
+ <li>
129
+ <a href="#">
130
+ <i class="ion ion-ios7-person danger"></i> You changed your username
131
+ </a>
132
+ </li>
133
+ </ul>
134
+ </li>
135
+ <li class="footer"><a href="#">View all</a></li>
136
+ </ul>
137
+ </li>
138
+
139
+ <li class="dropdown messages-menu">
140
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
141
+ <i class="fa fa-flag"></i>
142
+ </a>
143
+ <ul class="dropdown-menu">
144
+ <li class="header" traslate>Select language"</li>
145
+ <li>
146
+ <ul class="menu">
147
+ <% ::I18n.available_locales.each do |locale| %>
148
+ <li><!-- Task item -->
149
+ <a href="<%= "/#{locale.to_s}/#{Faalis::Engine.dashboard_namespace.to_s}/" %>">
150
+ <h4>
151
+ <%= locale.upcase %>
152
+ </h4>
153
+ </a>
154
+ </li><!-- end task item -->
155
+ <% end %>
156
+ </ul>
157
+ </li>
158
+ </ul>
159
+ </li>
160
+ <!-- Tasks: style can be found in dropdown.less -->
161
+ <li class="dropdown tasks-menu">
162
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
163
+ <i class="fa fa-tasks"></i>
164
+ <span class="label label-danger">9</span>
165
+ </a>
166
+ <ul class="dropdown-menu">
167
+ <li class="header">You have 9 tasks</li>
168
+ <li>
169
+ <!-- inner menu: contains the actual data -->
170
+ <ul class="menu">
171
+ <li><!-- Task item -->
172
+ <a href="#">
173
+ <h3>
174
+ Design some buttons
175
+ <small class="pull-right">20%</small>
176
+ </h3>
177
+ <div class="progress xs">
178
+ <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
179
+ <span class="sr-only">20% Complete</span>
180
+ </div>
181
+ </div>
182
+ </a>
183
+ </li><!-- end task item -->
184
+ <li><!-- Task item -->
185
+ <a href="#">
186
+ <h3>
187
+ Create a nice theme
188
+ <small class="pull-right">40%</small>
189
+ </h3>
190
+ <div class="progress xs">
191
+ <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
192
+ <span class="sr-only">40% Complete</span>
193
+ </div>
194
+ </div>
195
+ </a>
196
+ </li><!-- end task item -->
197
+ <li><!-- Task item -->
198
+ <a href="#">
199
+ <h3>
200
+ Some task I need to do
201
+ <small class="pull-right">60%</small>
202
+ </h3>
203
+ <div class="progress xs">
204
+ <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
205
+ <span class="sr-only">60% Complete</span>
206
+ </div>
207
+ </div>
208
+ </a>
209
+ </li><!-- end task item -->
210
+ <li><!-- Task item -->
211
+ <a href="#">
212
+ <h3>
213
+ Make beautiful transitions
214
+ <small class="pull-right">80%</small>
215
+ </h3>
216
+ <div class="progress xs">
217
+ <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
218
+ <span class="sr-only">80% Complete</span>
219
+ </div>
220
+ </div>
221
+ </a>
222
+ </li><!-- end task item -->
223
+ </ul>
224
+ </li>
225
+ <li class="footer">
226
+ <a href="#"><%= _("View all tasks") %></a>
227
+ </li>
228
+ </ul>
229
+ </li>
230
+
231
+ <!-- User Account: style can be found in dropdown.less -->
232
+ <li class="dropdown user user-menu">
233
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
234
+ <i class="glyphicon glyphicon-user"></i>
235
+ <span> <%= current_user.name %> <i class="caret"></i></span>
236
+ </a>
237
+ <ul class="dropdown-menu">
238
+ <!-- User image -->
239
+ <li class="user-header bg-light-blue">
240
+ <img src="<%= asset_path 'avatar.jpg' %>" class="img-circle" alt="User Image" />
241
+ <p>
242
+
243
+ <%= current_user.name %>
244
+ <small>Member since Nov. 2012</small>
245
+ </p>
246
+ </li>
247
+ <!-- Menu Body -->
248
+ <li class="user-body">
249
+ <div class="col-xs-4 text-center">
250
+ <a href="#"><%= _("Followers") %></a>
251
+ </div>
252
+ <div class="col-xs-4 text-center">
253
+ <a href="#"><%= _("Sales") %></a>
254
+ </div>
255
+ <div class="col-xs-4 text-center">
256
+ <a href="#"><%= _("Friends") %></a>
257
+ </div>
258
+ </li>
259
+ <!-- Menu Footer-->
260
+ <li class="user-footer">
261
+ <div class="pull-left">
262
+ <a href="#" class="btn btn-default btn-flat"><%= _("Profile") %></a>
263
+ </div>
264
+ <div class="pull-right">
265
+ <a href="#" class="btn btn-default btn-flat"><%= _("Sign out") %></a>
266
+ </div>
267
+ </li>
268
+ </ul>
269
+ </li>
270
+ </ul>
271
+ </div>
272
+ </nav>
273
+ </header>