lato_core 2.1.3 → 2.1.4

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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +13 -0
  4. data/app/assets/javascripts/lato_core/modules/CoreFlash.js +1 -1
  5. data/app/assets/javascripts/lato_core/modules/CoreModal.js +1 -1
  6. data/app/assets/javascripts/lato_core/vendors/jquery.floatThead.js +1 -1
  7. data/app/assets/stylesheets/lato_core/base/_button.scss +1 -1
  8. data/app/assets/stylesheets/lato_core/cells/elements/_button.scss +23 -14
  9. data/app/assets/stylesheets/lato_core/cells/elements/_buttongroup.scss +2 -10
  10. data/app/assets/stylesheets/lato_core/cells/elements/_flash.scss +14 -15
  11. data/app/assets/stylesheets/lato_core/cells/elements/_modal.scss +11 -10
  12. data/app/assets/stylesheets/lato_core/cells/elements/_pagination.scss +0 -2
  13. data/app/assets/stylesheets/lato_core/layouts/_admin.scss +40 -12
  14. data/app/assets/stylesheets/lato_core/pages/_dashboard.scss +1 -1
  15. data/app/assets/stylesheets/lato_core/theme.scss.erb +5 -4
  16. data/app/assets/stylesheets/lato_core/widgets/_systeminfo.scss +1 -1
  17. data/app/cells/lato_core/elements/block/cell.rb +1 -1
  18. data/app/cells/lato_core/elements/button/views/link.html.erb +25 -23
  19. data/app/cells/lato_core/inputs/form/cell.rb +2 -1
  20. data/app/cells/lato_core/inputs/form/views/open.html.erb +3 -0
  21. data/app/cells/lato_core/widgets/index/cell.rb +14 -2
  22. data/app/controllers/lato_core/doc/cells_widgets_controller.rb +5 -1
  23. data/app/views/lato_core/doc/cells_elements/block.html.erb +3 -3
  24. data/app/views/lato_core/doc/cells_widgets/index.html.erb +42 -0
  25. data/app/views/lato_core/doc/cells_widgets/index_v2.html.erb +0 -0
  26. data/app/views/lato_core/doc/doc/index.html.erb +1 -0
  27. data/app/views/layouts/lato_core/partials/_menu.html.erb +5 -3
  28. data/config/routes/doc.rb +1 -0
  29. data/lib/generators/lato_core/templates/crud_views/app/views/lato/crud/edit.html.erb +1 -1
  30. data/lib/generators/lato_core/templates/crud_views/app/views/lato/crud/new.html.erb +1 -1
  31. data/lib/generators/lato_core/templates/crud_views/app/views/lato/crud/show.html.erb +1 -1
  32. data/lib/lato_core/version.rb +1 -1
  33. data/lib/screen.png +0 -0
  34. metadata +7 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d03404575f2dc3428326581b02cddb3a8d247aa1
4
- data.tar.gz: b12942916abaec0b8d60bedaf36a1867e1a0c05e
3
+ metadata.gz: e84e1a3c8a28df9316934c3a161ceb2a93c54b9e
4
+ data.tar.gz: 2e457afe921ef846994250eac55c70c855965704
5
5
  SHA512:
6
- metadata.gz: ad94e466f6c6dc74c390ab21ae482b9f032dcb4091be16a56ef8e2ae8199e14fe369f28c91a8c04a991b4de2c9e796f48e94e3c7befc0da76f01157bd20236c3
7
- data.tar.gz: dffaebee14da1902f0447ff94a65d6d3e7fd8b1b5fdabd10e0e9b6aa26989b7cc72f7387c06dcb9dd8a48cb52fe932f9d4271d404909787908ea9dba2b3aede0
6
+ metadata.gz: 8f1d70c9e6f0f67352c2dda7047e296810efd91338cfe071d99093c43c24c4956a773afc79b20d09fb3d66efbb22fa6f5f45b7b8c4b1031064dcd3c29ed50be0
7
+ data.tar.gz: a5b5e36c574d5f8c822460b82322b161f0f7853a5bbb585d6d73890a91f07f630c4c3d19abbd74df69f480567db835342e518eeee670f0c2cf9f6198504d9a0b
@@ -1,4 +1,4 @@
1
- Copyright 2017 Gregorio
1
+ Copyright 2017 Ideo SRL
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Lato Core
2
2
 
3
+ Lato is a Rails engine used to develop modular admin panels. This is the module used to initialize the admin panel.
4
+ The complete documentation is inside the application panel, so you must [install](#installation) it before.
5
+
6
+ You can always try a demo here: https://lato-server.herokuapp.com
7
+
8
+ ![Alt text](lib/screen.png "Title")
9
+
10
+ ## Ecosystem
11
+
12
+ - [Lato core](https://github.com/ideonetwork/lato-core): The core module used to initialize the panel.
13
+ - [Lato media](https://github.com/ideonetwork/lato-media): A module used to manage attachments and media files.
14
+ - [Lato blog](https://github.com/ideonetwork/lato-blog): A module used to manage a blog.
15
+
3
16
  ## Installation
4
17
 
5
18
  Add the lato_core gem on your Gemfile
@@ -4,7 +4,7 @@ var CoreFlash = (function () {
4
4
  var closeButton = $(flash).find('.elements-flash__close-button')
5
5
  $(closeButton).click(function (e) {
6
6
  e.preventDefault()
7
- flash.addClass('elements-flash--hidden')
7
+ $(flash).addClass('elements-flash--hidden')
8
8
  })
9
9
  }
10
10
 
@@ -4,7 +4,7 @@ var CoreModal = (function () {
4
4
  $('#' + modalId + '.elements-modal').addClass('elements-modal--active')
5
5
  setTimeout(function () {
6
6
  $('#' + modalId + '.elements-modal').find('.elements-modal__modal').addClass('elements-modal__modal--active')
7
- }, 500)
7
+ }, 250)
8
8
  $('body').addClass('stop-scrolling')
9
9
  if (event) {
10
10
  event.preventDefault()
@@ -20,7 +20,7 @@
20
20
  $.floatThead = $.floatThead || {};
21
21
  $.floatThead.defaults = {
22
22
  headerCellSelector: 'tr:visible:first>*:visible', //thead cells are this.
23
- zIndex: 1001, //zindex of the floating thead (actually a container div)
23
+ zIndex: 89, //zindex of the floating thead (actually a container div)
24
24
  position: 'auto', // 'fixed', 'absolute', 'auto'. auto picks the best for your table scrolling type.
25
25
  top: 0, //String or function($table) - offset from top of window where the header should not pass above
26
26
  bottom: 0, //String or function($table) - offset from the bottom of the table where the header should stop scrolling
@@ -7,7 +7,7 @@
7
7
  color: $color_white;
8
8
  font-weight: 500;
9
9
  padding: 8px 12px;
10
- border-radius: 10px;
10
+ border-radius: 0;
11
11
  margin: 2.5px;
12
12
  outline: 0;
13
13
  border: none;
@@ -88,29 +88,26 @@
88
88
  }
89
89
 
90
90
  .elements-button__confirmation {
91
- @include centerElement(xy);
91
+ width: 100%;
92
+ height: 100%;
93
+ background-color: rgba($color_black, 0.5);
92
94
  z-index: 99;
93
- background-color: $color_white;
94
- min-width: 200px;
95
- border-radius: 10px;
96
- text-align: center;
97
- box-shadow: 0px 11px 20px rgba(41,59,90,0.08);
98
- min-height: 50px;
99
- padding: 15px;
100
- border: solid 1px darken($color_white, 3);
101
-
95
+ position: fixed;
96
+ top: 0;
97
+ left: 0;
98
+ z-index: 100;
102
99
  opacity: 0;
103
- transform: scale(0) translateX(-50%) translateY(-50%);
100
+ transform: scale(0);
104
101
  transition: opacity 0.25s;
105
102
 
106
103
  .message {
107
104
  display: block;
108
105
  margin-bottom: 10px;
109
- font-size: 0.8em;
106
+ font-size: 1em;
110
107
  }
111
108
 
112
109
  .popup {
113
- font-size: 0.8em;
110
+ font-size: 1em;
114
111
  padding: 4px 10px;
115
112
  margin: 2.5px;
116
113
  }
@@ -128,5 +125,17 @@
128
125
 
129
126
  .elements-button__confirmation--active {
130
127
  opacity: 1;
131
- transform: scale(1) translateX(-50%) translateY(-50%);
128
+ transform: scale(1);
129
+ }
130
+
131
+ .elements-button__confirmation-content {
132
+ background-color: $color_white;
133
+ min-width: 300px;
134
+ border-radius: 10px;
135
+ text-align: center;
136
+ box-shadow: 0px 11px 20px rgba(41,59,90,0.08);
137
+ min-height: 50px;
138
+ padding: 15px;
139
+ border: solid 1px darken($color_white, 3);
140
+ @include centerElement(xy);
132
141
  }
@@ -4,20 +4,12 @@
4
4
 
5
5
  .elements-button__element {
6
6
  border-radius: 0;
7
- margin: 0 1px;
7
+ margin: 0;
8
+ margin-right: 1px;
8
9
  }
9
10
 
10
- &:first-child {
11
- .elements-button__element {
12
- border-top-left-radius: 10px;
13
- border-bottom-left-radius: 10px;
14
- margin-left: 0;
15
- }
16
- }
17
11
  &:last-child {
18
12
  .elements-button__element {
19
- border-top-right-radius: 10px;
20
- border-bottom-right-radius: 10px;
21
13
  margin-right: 0;
22
14
  }
23
15
  }
@@ -1,58 +1,57 @@
1
1
  .elements-flash {
2
2
  display: block;
3
3
  width: 100%;
4
- padding: 10px 12px;
4
+ padding: 15px 10px;
5
5
  box-sizing: border-box;
6
- border-radius: 10px;
7
6
  margin: 10px 0;
8
7
  position: relative;
9
- background-color: rgba($flash_color_background, 0.8);
10
- border-color: $flash_color_background;
8
+ background-color: rgba($flash_color_background, 0.75);
9
+ border-color: $color_main;
10
+ border-left-width: 5px;
11
+ border-left-style: solid;
11
12
  color: $flash_color_text;
12
13
  max-height: 999px;
13
14
  transition: all 0.25s;
14
15
  box-shadow: 0px 11px 20px rgba(41,59,90,0.08);
15
- border-width: 2px;
16
- border-style: solid;
17
16
  }
18
17
 
19
18
  .elements-flash--info {
20
- background-color: rgba($flash_info_background, 0.7);
19
+ background-color: rgba($flash_info_background, 0.75);
21
20
  border-color: $flash_info_background;
22
21
  color: $flash_info_color_text;
23
22
 
24
23
  .elements-flash__close-button {
25
- color: $flash_info_color_text;
24
+ color: $flash_close_button_color;
26
25
  }
27
26
  }
28
27
 
29
28
  .elements-flash--success {
30
- background-color: rgba($flash_success_background, 0.7);
29
+ background-color: rgba($flash_success_background, 0.75);
31
30
  border-color: $flash_success_background;
32
31
  color: $flash_success_color_text;
33
32
 
34
33
  .elements-flash__close-button {
35
- color: $flash_success_color_text;
34
+ color: $flash_close_button_color;
36
35
  }
37
36
  }
38
37
 
39
38
  .elements-flash--danger {
40
- background-color: rgba($flash_danger_background, 0.7);
39
+ background-color: rgba($flash_danger_background, 0.75);
41
40
  border-color: $flash_danger_background;
42
41
  color: $flash_danger_color_text;
43
42
 
44
43
  .elements-flash__close-button {
45
- color: $flash_danger_color_text;
44
+ color: $flash_close_button_color;
46
45
  }
47
46
  }
48
47
 
49
48
  .elements-flash--warning {
50
- background-color: rgba($flash_warning_background, 0.7);
49
+ background-color: rgba($flash_warning_background, 0.75);
51
50
  border-color: $flash_warning_background;
52
51
  color: $flash_warning_color_text;
53
52
 
54
53
  .elements-flash__close-button {
55
- color: $flash_warning_color_text;
54
+ color: $flash_close_button_color;
56
55
  }
57
56
  }
58
57
 
@@ -65,7 +64,7 @@
65
64
  }
66
65
 
67
66
  .elements-flash__close-button {
68
- color: $flash_info_color_text;
67
+ color: $flash_close_button_color;
69
68
  position: absolute;
70
69
  top: 3px;
71
70
  right: 5px;
@@ -1,20 +1,20 @@
1
1
  .elements-modal {
2
+ width: 100%;
3
+ height: 100%;
4
+ background-color: rgba($color_black, 0.5);
5
+ z-index: 99;
2
6
  position: fixed;
3
7
  top: 0;
4
8
  left: 0;
5
- width: 100%;
6
- height: 100%;
7
- display: block;
8
- background-color: transparent;
9
9
  z-index: 100;
10
+ opacity: 0;
10
11
  transform: scale(0);
11
- transition: transform 0.5s;
12
+ transition: opacity 0.25s;
12
13
  }
13
14
 
14
15
  .elements-modal--active {
16
+ opacity: 1;
15
17
  transform: scale(1);
16
- background-color: rgba($modal_color_transparent_background, 0.5);
17
- transition: transform 0.25s, background-color 1s;
18
18
  }
19
19
 
20
20
  .elements-modal__modal {
@@ -22,16 +22,17 @@
22
22
  width: 80%;
23
23
  height: 80%;
24
24
  background: $modal_color_background;
25
- border-radius: 15px;
25
+ border-radius: 0;
26
26
  box-shadow: 0px 11px 20px rgba(41,59,90,0.08);
27
27
  overflow: hidden;
28
28
  opacity: 0;
29
- transition: none;
29
+ transform: translate(-50%, -60%);
30
+ transition: all 0.5s;
30
31
  }
31
32
 
32
33
  .elements-modal__modal--active {
33
34
  opacity: 1;
34
- transition: all 0.25s;
35
+ transform: translate(-50%, -50%);
35
36
  }
36
37
 
37
38
  .elements-modal__close-button {
@@ -14,7 +14,6 @@
14
14
  width: 22px;
15
15
  text-align: center;
16
16
  color: $pagination_color_text;
17
- border-radius: 50%;
18
17
  transition: all 0.25s;
19
18
  cursor: pointer;
20
19
 
@@ -53,7 +52,6 @@
53
52
  padding: 2px 6px;
54
53
  color: $pagination_color_text;
55
54
  text-decoration: none;
56
- border-radius: 50%;
57
55
  transition: all 0.25s;
58
56
  cursor: pointer;
59
57
 
@@ -58,6 +58,31 @@
58
58
  }
59
59
  }
60
60
 
61
+ .layout-admin__menu-item--active {
62
+
63
+ &:after {
64
+ content: '';
65
+ position: absolute;
66
+ top: 0;
67
+ left: 0;
68
+ height: 100%;
69
+ width: 2px;
70
+ background-color: $layout_admin_sidebar_color_text;
71
+ }
72
+
73
+ .layout-admin__menu-sublist {
74
+ position: static;
75
+ display: block;
76
+ width: 160px;
77
+
78
+ a {
79
+ padding: 8px;
80
+ padding-left: 14px;
81
+ font-size: 0.9em;
82
+ }
83
+ }
84
+ }
85
+
61
86
  .layout-admin__menu-item-link {
62
87
  display: block;
63
88
  padding: 10px 10px;
@@ -83,16 +108,6 @@
83
108
  .layout-admin__menu-item-link--active {
84
109
  position: relative;
85
110
  background: darken($layout_admin_sidebar_background, 3);
86
-
87
- &:before {
88
- content: '';
89
- position: absolute;
90
- top: 0;
91
- left: 0;
92
- height: 100%;
93
- width: 2px;
94
- background-color: $layout_admin_sidebar_color_text;
95
- }
96
111
  }
97
112
 
98
113
  .layout-admin__menu-sublist {
@@ -297,8 +312,8 @@
297
312
  width: 400px;
298
313
  min-height: 50px;
299
314
  box-shadow: 0px 11px 20px rgba(41,59,90,0.08);
300
- border: solid 2px darken($color_white, 3);
301
- border-radius: 15px;
315
+ border: solid 2px darken($color_white, 5);
316
+ border-radius: 0;
302
317
  z-index: 99;
303
318
  font-size: 0.8em;
304
319
  }
@@ -341,6 +356,19 @@
341
356
  width: 60px;
342
357
  }
343
358
 
359
+ .layout-admin__menu-item--active {
360
+
361
+ .layout-admin__menu-sublist {
362
+ position: absolute;
363
+ display: none;
364
+
365
+ a {
366
+ padding: 10px 10px;
367
+ font-size: 1em;
368
+ }
369
+ }
370
+ }
371
+
344
372
  .layout-admin__menu-item-link {
345
373
  text-align: center;
346
374
 
@@ -4,7 +4,7 @@
4
4
  text-align: center;
5
5
  text-decoration: none;
6
6
  padding: 10px;
7
- border-radius: 10px;
7
+ border-radius: 0;
8
8
 
9
9
  .icon {
10
10
  font-size: 40px;
@@ -33,9 +33,9 @@ $layout_admin_header_background: $color_white;
33
33
  $layout_admin_header_color_title: darken($color_grey, 20);
34
34
  $layout_admin_header_color_text: $color_black;
35
35
 
36
- $layout_admin_header_color_back_background: $color_main;
37
- $layout_admin_header_color_back_background_hover: darken($color_main, 10);
38
- $layout_admin_header_color_back_text: $color_white;
36
+ $layout_admin_header_color_back_background: $color_grey;
37
+ $layout_admin_header_color_back_background_hover: darken($color_white, 10);
38
+ $layout_admin_header_color_back_text: $color_main;
39
39
 
40
40
  $layout_admin_header_color_widget_icon_background: $color_main;
41
41
  $layout_admin_header_color_widget_icon: $color_white;
@@ -79,6 +79,8 @@ $button_warning_color_text: $color_white;
79
79
 
80
80
  // Flash configurations:
81
81
 
82
+ $flash_close_button_color: $color_white;
83
+
82
84
  $flash_color_background: $color_main;
83
85
  $flash_color_text: $color_white;
84
86
 
@@ -120,7 +122,6 @@ $pagination_color_background_hover: $color_grey;
120
122
 
121
123
  // Modal configurations:
122
124
 
123
- $modal_color_transparent_background: $color_black;
124
125
  $modal_color_background: $color_white;
125
126
  $modal_color_title: $color_black;
126
127
  $modal_color_header_border: $color_grey;
@@ -8,7 +8,7 @@
8
8
  padding: 5px;
9
9
  margin: 2px;
10
10
  color: $color_white;
11
- border-radius: 5px;
11
+ border-radius: 0;
12
12
  font-size: 1em;
13
13
  }
14
14
 
@@ -6,7 +6,7 @@ module LatoCore
6
6
 
7
7
  @@default_args = {
8
8
  class: 'md-12',
9
- round: true
9
+ round: false
10
10
  }
11
11
 
12
12
  def initialize(args = {})
@@ -34,30 +34,32 @@
34
34
  <% if @show_confirmation %>
35
35
 
36
36
  <div class="elements-button__confirmation">
37
- <span class="message"><%= @args[:confirmation][:message] %></span>
37
+ <div class="elements-button__confirmation-content">
38
+ <span class="message"><%= @args[:confirmation][:message] %></span>
38
39
 
39
- <a
40
- class="button popup true"
41
- href="<%= @args[:url] %>"
42
- title="<%= @args[:confirmation][:positive_response] %>"
43
- <% if @show_method %>
44
- data-method="<%= @args[:method] %>"
45
- <% end %>
46
- <% if @args[:remote] %>
47
- data-remote="true"
48
- <% end %>
49
- <% if @args[:onclick] %>
50
- onclick="<%= @args[:onclick] %>"
51
- <% end %>
52
- >
53
- <i class="fa fa-check" aria-hidden="true"></i> <%= @args[:confirmation][:positive_response] %>
54
- </a>
55
- <button
56
- class="button popup false"
57
- title="<%= @args[:confirmation][:negative_response] %>"
58
- >
59
- <i class="fa fa-ban" aria-hidden="true"></i> <%= @args[:confirmation][:negative_response] %>
60
- </button>
40
+ <a
41
+ class="button popup true"
42
+ href="<%= @args[:url] %>"
43
+ title="<%= @args[:confirmation][:positive_response] %>"
44
+ <% if @show_method %>
45
+ data-method="<%= @args[:method] %>"
46
+ <% end %>
47
+ <% if @args[:remote] %>
48
+ data-remote="true"
49
+ <% end %>
50
+ <% if @args[:onclick] %>
51
+ onclick="<%= @args[:onclick] %>"
52
+ <% end %>
53
+ >
54
+ <i class="fa fa-check" aria-hidden="true"></i> <%= @args[:confirmation][:positive_response] %>
55
+ </a>
56
+ <button
57
+ class="button popup false"
58
+ title="<%= @args[:confirmation][:negative_response] %>"
59
+ >
60
+ <i class="fa fa-ban" aria-hidden="true"></i> <%= @args[:confirmation][:negative_response] %>
61
+ </button>
62
+ </div>
61
63
  </div>
62
64
 
63
65
  <% end %>
@@ -7,7 +7,8 @@ module LatoCore
7
7
  @@default_args = {
8
8
  method: 'post',
9
9
  remote: false,
10
- class: ''
10
+ class: '',
11
+ multipart: false
11
12
  }
12
13
 
13
14
  def initialize(args = {})
@@ -5,6 +5,9 @@
5
5
  <% if @args[:remote] %>
6
6
  data-remote="true"
7
7
  <% end %>
8
+ <% if @args[:multipart] %>
9
+ enctype="multipart/form-data"
10
+ <% end %>
8
11
  >
9
12
 
10
13
  <input type="hidden" name="utf8" value="✓">
@@ -17,6 +17,13 @@ module LatoCore
17
17
  edit: false,
18
18
  delete: false,
19
19
  new: false
20
+ },
21
+ table: {
22
+ fixed: false,
23
+ height: nil
24
+ },
25
+ table_body: {
26
+ hover: false
20
27
  }
21
28
  }
22
29
 
@@ -65,7 +72,10 @@ module LatoCore
65
72
 
66
73
  # This function generate the table.
67
74
  def generate_table
68
- return LatoCore::Elements::Table::Container::Cell.new
75
+ return LatoCore::Elements::Table::Container::Cell.new(
76
+ fixed: @args[:table][:fixed],
77
+ height: @args[:table][:height]
78
+ )
69
79
  end
70
80
 
71
81
  # This function generate the head for the table.
@@ -88,7 +98,9 @@ module LatoCore
88
98
 
89
99
  # This function generate the table body.
90
100
  def generate_table_body
91
- return LatoCore::Elements::Table::Body::Cell.new
101
+ return LatoCore::Elements::Table::Body::Cell.new(
102
+ hover: @args[:table_body][:hover]
103
+ )
92
104
  end
93
105
 
94
106
  # This function generate the rows fr the table.
@@ -6,5 +6,9 @@ module LatoCore
6
6
  @widget_index_superusers = core__widgets_index(@superusers, search: 'surname', pagination: 10)
7
7
  end
8
8
 
9
+ def index_v2
10
+ @superusers = LatoCore::Superuser.all
11
+ end
12
+
9
13
  end
10
- end
14
+ end
@@ -121,11 +121,11 @@
121
121
  <!-- / CODE SECTION -->
122
122
 
123
123
  <hr>
124
- <%=raw cell(:elements, :title).new(label: 'Blocks without rounded borders', size: 3) %>
124
+ <%=raw cell(:elements, :title).new(label: 'Blocks with rounded borders', size: 3) %>
125
125
 
126
126
  <%=raw row.open %>
127
127
 
128
- <% example_block = cell(:elements, :block).new(class: 'md-6', round: false) %>
128
+ <% example_block = cell(:elements, :block).new(class: 'md-6', round: true) %>
129
129
 
130
130
  <%=raw example_block.open %>
131
131
 
@@ -150,7 +150,7 @@
150
150
 
151
151
  <%=raw code.open %>
152
152
 
153
- <%= erb_open_tag %> example_block = cell(:elements, :block).new(class: 'md-6', round: false) <%= erb_close_tag %>
153
+ <%= erb_open_tag %> example_block = cell(:elements, :block).new(class: 'md-6', round: true) <%= erb_close_tag %>
154
154
 
155
155
  <%= erb_open_tag %>=raw example_block.open <%= erb_close_tag %>
156
156
 
@@ -159,5 +159,47 @@ actions: {show: true, edit: true, delete: true, new: true}, search: true, pagina
159
159
 
160
160
  <%=raw block.close %>
161
161
 
162
+ <%=raw row.close %>
163
+ <!-- / CODE SECTION -->
164
+
165
+ <hr>
166
+ <%=raw cell(:elements, :title).new(label: 'Override table options', size: 3) %>
167
+
168
+ <%=raw row.open %>
169
+
170
+ <%=raw block.open %>
171
+
172
+ <%=raw cell(:widgets, :index).new(records: @widget_index_superusers, head: ['Name', 'Surname', 'Email', 'Username'],
173
+ columns: ['name', 'surname', 'email', 'username'], index_url: lato_core.superusers_path,
174
+ actions: {show: true, edit: true, delete: true, new: true}, search: true, pagination: true,
175
+ table: { fixed: true, height: 150 }, table_body: { hover: true }) %>
176
+
177
+ <%=raw block.close %>
178
+
179
+ <%=raw row.close %>
180
+
181
+ <!-- CODE SECTION -->
182
+ <%=raw row.open %>
183
+
184
+ <%=raw block.open %>
185
+
186
+ <%=raw cell(:elements, :title).new(label: 'Info', size: 6) %>
187
+
188
+ <p>The index component is created with the table elements. You can ovveride the table settings with the <i>table</i> and <i>table_body</i>
189
+ options</p>
190
+
191
+ <%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>
192
+
193
+ <%=raw code.open %>
194
+
195
+ <%= erb_open_tag %>=raw cell(:widgets, :index).new(records: @widget_index_superusers, head: ['Name', 'Surname', 'Email', 'Username'],
196
+ columns: ['name', 'surname', 'email', 'username'], index_url: lato_core.superusers_path,
197
+ actions: {show: true, edit: true, delete: true, new: true}, search: true, pagination: true,
198
+ table: { fixed: true, height: 150 }, table_body: { hover: true }) <%= erb_close_tag %>
199
+
200
+ <%=raw code.close %>
201
+
202
+ <%=raw block.close %>
203
+
162
204
  <%=raw row.close %>
163
205
  <!-- / CODE SECTION -->
@@ -91,6 +91,7 @@
91
91
  <%=raw cell(:elements, :title).new(label: 'Widgets', size: 4) %>
92
92
 
93
93
  <%=raw cell(:elements, :button).new(label: 'Index', url: lato_core.doc_cells_widgets_index_path) %>
94
+ <%=raw cell(:elements, :button).new(label: 'Index V2', url: lato_core.doc_cells_widgets_index_v2_path) %>
94
95
 
95
96
  <%=raw block.close %>
96
97
 
@@ -7,11 +7,13 @@
7
7
  next if (@core__current_superuser.permission > menu_item[:permission_max])
8
8
 
9
9
  active = ''
10
- active = 'layout-admin__menu-item-link--active' if @core__menu_active_item && @core__menu_active_item === menu_item[:key]
10
+ active = 'layout-admin__menu-item--active' if @core__menu_active_item && @core__menu_active_item === menu_item[:key]
11
+ active_link = ''
12
+ active_link = 'layout-admin__menu-item-link--active' if @core__menu_active_item && @core__menu_active_item === menu_item[:key]
11
13
  %>
12
- <li class="layout-admin__menu-item">
14
+ <li class="layout-admin__menu-item <%= active %>">
13
15
  <a
14
- class="layout-admin__menu-item-link <%= active %>"
16
+ class="layout-admin__menu-item-link <%= active_link %>"
15
17
  href="<%= menu_item[:url] %>"
16
18
  title="<%= menu_item[:title] %>"
17
19
  >
@@ -52,5 +52,6 @@ namespace :doc do
52
52
 
53
53
  # cells widgets
54
54
  get 'cells_widgets_index', to: 'cells_widgets#index', as: 'cells_widgets_index'
55
+ get 'cells_widgets_index_v2', to: 'cells_widgets#index_v2', as: 'cells_widgets_index_v2'
55
56
 
56
57
  end
@@ -6,7 +6,7 @@
6
6
  block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
7
7
 
8
8
  # initialize title
9
- title = cell(:elements, :title).new(label: 'Edit <%= @singular_name.humanize %>', size: 2)
9
+ title = cell(:elements, :title).new(label: 'Edit <%= @singular_name.humanize %>', size: 4)
10
10
  %>
11
11
 
12
12
  <!-- MAIN CONTAINER -->
@@ -6,7 +6,7 @@
6
6
  block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
7
7
 
8
8
  # initialize title
9
- title = cell(:elements, :title).new(label: 'New <%= @singular_name.humanize %>', size: 2)
9
+ title = cell(:elements, :title).new(label: 'New <%= @singular_name.humanize %>', size: 4)
10
10
  %>
11
11
 
12
12
  <!-- MAIN CONTAINER -->
@@ -6,7 +6,7 @@
6
6
  block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
7
7
 
8
8
  # initialize title
9
- title = cell(:elements, :title).new(label: @<%= @singular_name %>.name, size: 2)
9
+ title = cell(:elements, :title).new(label: @<%= @singular_name %>.name, size: 4)
10
10
  %>
11
11
 
12
12
  <!-- MAIN CONTAINER -->
@@ -1,3 +1,3 @@
1
1
  module LatoCore
2
- VERSION = '2.1.3'
2
+ VERSION = '2.1.4'
3
3
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ideonetwork
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-26 00:00:00.000000000 Z
11
+ date: 2017-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 1.5.4
117
+ version: 2.0.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 1.5.4
124
+ version: 2.0.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: sqlite3
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -383,6 +383,7 @@ files:
383
383
  - app/views/lato_core/doc/cells_inputs/textarea.html.erb
384
384
  - app/views/lato_core/doc/cells_inputs/youtube.html.erb
385
385
  - app/views/lato_core/doc/cells_widgets/index.html.erb
386
+ - app/views/lato_core/doc/cells_widgets/index_v2.html.erb
386
387
  - app/views/lato_core/doc/doc/index.html.erb
387
388
  - app/views/lato_core/doc/general/generators.html.erb
388
389
  - app/views/lato_core/doc/general/installation.html.erb
@@ -447,6 +448,7 @@ files:
447
448
  - lib/lato_core/interfaces/modules.rb
448
449
  - lib/lato_core/interfaces/token.rb
449
450
  - lib/lato_core/version.rb
451
+ - lib/screen.png
450
452
  - lib/tasks/lato_core_tasks.rake
451
453
  - lib/tasks/lato_tasks.rake
452
454
  homepage: http://ideonetwork.it/
@@ -469,7 +471,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
469
471
  version: '0'
470
472
  requirements: []
471
473
  rubyforge_project:
472
- rubygems_version: 2.6.12
474
+ rubygems_version: 2.6.14
473
475
  signing_key:
474
476
  specification_version: 4
475
477
  summary: Lato core module