kono_utils_bootstrap_view4 0.1.0.pre.rc.3 → 0.1.0.pre.rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/app/concepts/kono_utils/object/cell/base.rb +99 -97
  3. data/app/concepts/kono_utils/object/cell/buttons/base.rb +55 -54
  4. data/app/concepts/kono_utils/object/cell/buttons/collapse_search.rb +29 -23
  5. data/app/concepts/kono_utils/object/cell/buttons/create.rb +20 -15
  6. data/app/concepts/kono_utils/object/cell/buttons/delete.rb +29 -24
  7. data/app/concepts/kono_utils/object/cell/buttons/download.rb +22 -16
  8. data/app/concepts/kono_utils/object/cell/buttons/edit.rb +17 -12
  9. data/app/concepts/kono_utils/object/cell/buttons/list.rb +17 -11
  10. data/app/concepts/kono_utils/object/cell/buttons/reset_search.rb +21 -15
  11. data/app/concepts/kono_utils/object/cell/create/base.rb +6 -5
  12. data/app/concepts/kono_utils/object/cell/create/page_title.rb +11 -6
  13. data/app/concepts/kono_utils/object/cell/create/side_title.rb +8 -2
  14. data/app/concepts/kono_utils/object/cell/edits/base.rb +6 -5
  15. data/app/concepts/kono_utils/object/cell/edits/page_title.rb +11 -6
  16. data/app/concepts/kono_utils/object/cell/edits/side_title.rb +9 -3
  17. data/app/concepts/kono_utils/object/cell/form.rb +51 -48
  18. data/app/concepts/kono_utils/object/cell/forms/base.rb +12 -10
  19. data/app/concepts/kono_utils/object/cell/forms/container.rb +22 -18
  20. data/app/concepts/kono_utils/object/cell/forms/containers/layout.rb +14 -10
  21. data/app/concepts/kono_utils/object/cell/forms/containers/modal_layout.rb +10 -4
  22. data/app/concepts/kono_utils/object/cell/forms/containers/search_layout.rb +10 -4
  23. data/app/concepts/kono_utils/object/cell/forms/containers/table_layout.rb +11 -5
  24. data/app/concepts/kono_utils/object/cell/forms/field_selector.rb +68 -64
  25. data/app/concepts/kono_utils/object/cell/forms/field_selectors/layout.rb +9 -4
  26. data/app/concepts/kono_utils/object/cell/forms/field_selectors/modal_layout.rb +10 -4
  27. data/app/concepts/kono_utils/object/cell/forms/field_selectors/table_layout.rb +11 -5
  28. data/app/concepts/kono_utils/object/cell/forms/fields/association.rb +11 -4
  29. data/app/concepts/kono_utils/object/cell/forms/fields/base.rb +21 -16
  30. data/app/concepts/kono_utils/object/cell/forms/fields/bases/layout.rb +24 -17
  31. data/app/concepts/kono_utils/object/cell/forms/fields/bases/modal_layout.rb +14 -4
  32. data/app/concepts/kono_utils/object/cell/forms/fields/bases/table_layout.rb +17 -7
  33. data/app/concepts/kono_utils/object/cell/forms/fields/check_box.rb +14 -6
  34. data/app/concepts/kono_utils/object/cell/forms/fields/collection.rb +20 -12
  35. data/app/concepts/kono_utils/object/cell/forms/fields/date_field.rb +18 -10
  36. data/app/concepts/kono_utils/object/cell/forms/fields/date_time_field.rb +34 -30
  37. data/app/concepts/kono_utils/object/cell/forms/fields/enum.rb +23 -15
  38. data/app/concepts/kono_utils/object/cell/forms/fields/file_field.rb +29 -21
  39. data/app/concepts/kono_utils/object/cell/forms/fields/nested_modal_wrapper.rb +10 -3
  40. data/app/concepts/kono_utils/object/cell/forms/fields/nested_modal_wrappers/forms_container.rb +13 -5
  41. data/app/concepts/kono_utils/object/cell/forms/fields/nested_modal_wrappers/show.rb +19 -10
  42. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrapper.rb +54 -49
  43. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/form.rb +41 -35
  44. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms/layout.rb +17 -8
  45. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms/modal_layout.rb +14 -4
  46. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms/table_layout.rb +14 -4
  47. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms_container.rb +44 -36
  48. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms_containers/layout.rb +17 -10
  49. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms_containers/modal_layout.rb +17 -6
  50. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/forms_containers/table_layout.rb +20 -11
  51. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/header.rb +31 -23
  52. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/remove_button.rb +46 -40
  53. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/remove_buttons/layout.rb +14 -7
  54. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/remove_buttons/modal_layout.rb +14 -4
  55. data/app/concepts/kono_utils/object/cell/forms/fields/nested_wrappers/remove_buttons/table_layout.rb +14 -4
  56. data/app/concepts/kono_utils/object/cell/forms/fields/read_only.rb +16 -9
  57. data/app/concepts/kono_utils/object/cell/forms/fields/time_field.rb +14 -7
  58. data/app/concepts/kono_utils/object/cell/forms/layout.rb +8 -4
  59. data/app/concepts/kono_utils/object/cell/forms/submit.rb +21 -16
  60. data/app/concepts/kono_utils/object/cell/index/base.rb +9 -7
  61. data/app/concepts/kono_utils/object/cell/index/page_title.rb +11 -6
  62. data/app/concepts/kono_utils/object/cell/index/row.rb +38 -36
  63. data/app/concepts/kono_utils/object/cell/index/row_buttons.rb +8 -4
  64. data/app/concepts/kono_utils/object/cell/index/row_footer.rb +8 -3
  65. data/app/concepts/kono_utils/object/cell/index/row_header.rb +13 -7
  66. data/app/concepts/kono_utils/object/cell/index/side_title.rb +8 -2
  67. data/app/concepts/kono_utils/object/cell/index/table.rb +12 -9
  68. data/app/concepts/kono_utils/object/cell/inject.rb +103 -102
  69. data/app/concepts/kono_utils/object/cell/modals/base.rb +7 -3
  70. data/app/concepts/kono_utils/object/cell/modals/bodies/layout.rb +9 -4
  71. data/app/concepts/kono_utils/object/cell/modals/body.rb +7 -3
  72. data/app/concepts/kono_utils/object/cell/modals/container.rb +5 -1
  73. data/app/concepts/kono_utils/object/cell/modals/containers/layout.rb +12 -6
  74. data/app/concepts/kono_utils/object/cell/modals/footer.rb +5 -2
  75. data/app/concepts/kono_utils/object/cell/modals/footers/layout.rb +9 -4
  76. data/app/concepts/kono_utils/object/cell/modals/header.rb +6 -3
  77. data/app/concepts/kono_utils/object/cell/modals/headers/layout.rb +9 -4
  78. data/app/concepts/kono_utils/object/cell/search.rb +22 -19
  79. data/app/concepts/kono_utils/object/cell/searches/form.rb +12 -9
  80. data/app/concepts/kono_utils/object/cell/show.rb +25 -20
  81. data/app/concepts/kono_utils/object/cell/shows/base.rb +6 -5
  82. data/app/concepts/kono_utils/object/cell/shows/page_title.rb +11 -6
  83. data/app/concepts/kono_utils/object/cell/shows/side_title.rb +8 -2
  84. data/lib/kono_utils_bootstrap_view4/version.rb +1 -1
  85. metadata +1 -1
@@ -1,6 +1,10 @@
1
- module KonoUtils::Object::Cell # namespace
2
- # Cella Base per i componenti della modal
3
- class Modals::Base < Base
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ # Cella Base per i componenti della modal
5
+ class Modals::Base < Base
4
6
 
7
+ end
8
+ end
5
9
  end
6
10
  end
@@ -1,7 +1,12 @@
1
- module KonoUtils::Object::Cell::Modals # namespace
2
- # Layout Standard del contenitore della modal
3
- class Bodies::Layout < Base
4
-
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ module Modals # namespace
5
+ # Layout Standard del contenitore della modal
6
+ class Bodies::Layout < Base
5
7
 
8
+ end
9
+ end
10
+ end
6
11
  end
7
12
  end
@@ -1,6 +1,10 @@
1
- module KonoUtils::Object::Cell # namespace
2
- # Cella Base per i componenti della modal
3
- class Modals::Body < Base
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ # Cella Base per i componenti della modal
5
+ class Modals::Body < Base
4
6
 
7
+ end
8
+ end
5
9
  end
6
10
  end
@@ -1,4 +1,6 @@
1
- module KonoUtils::Object::Cell # namespace
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
2
4
  ##
3
5
  # Contenitore principale modal, come Model riceve un oggetto che rappresente il body da renderizzare che deve rispondere
4
6
  # a to_s per restituire il contenuto del body e metodi to_footer e to_header per il contenuto degli altri componenti
@@ -21,4 +23,6 @@ module KonoUtils::Object::Cell # namespace
21
23
  end
22
24
 
23
25
  end
26
+ end
27
+ end
24
28
  end
@@ -1,10 +1,16 @@
1
- module KonoUtils::Object::Cell::Modals # namespace
2
- # Layout Standard del contenitore della modal
3
- class Containers::Layout < Base
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ module Modals # namespace
5
+ # Layout Standard del contenitore della modal
6
+ class Containers::Layout < Base
4
7
 
5
- def modal_container_id
6
- context[:modal_container_id]
7
- end
8
+ def modal_container_id
9
+ context[:modal_container_id]
10
+ end
8
11
 
12
+ end
13
+ end
14
+ end
9
15
  end
10
16
  end
@@ -1,6 +1,9 @@
1
- module KonoUtils::Object::Cell # namespace
2
- # Cella Base per i componenti della modal
1
+ module KonoUtils
2
+ module Object
3
+ module Cell # Cella Base per i componenti della modal
3
4
  class Modals::Footer < Base
4
5
 
5
6
  end
7
+ end
8
+ end
6
9
  end
@@ -1,7 +1,12 @@
1
- module KonoUtils::Object::Cell::Modals # namespace
2
- # Layout Standard del contenitore della modal
3
- class Footers::Layout < Base
4
-
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ module Modals # namespace
5
+ # Layout Standard del contenitore della modal
6
+ class Footers::Layout < Base
5
7
 
8
+ end
9
+ end
10
+ end
6
11
  end
7
12
  end
@@ -1,6 +1,9 @@
1
- module KonoUtils::Object::Cell # namespace
2
- # Cella Base per i componenti della modal
3
- class Modals::Header < Base
1
+ module KonoUtils
2
+ module Object
3
+ module Cell # Cella Base per i componenti della modal
4
+ class Modals::Header < Base
4
5
 
6
+ end
7
+ end
5
8
  end
6
9
  end
@@ -1,7 +1,12 @@
1
- module KonoUtils::Object::Cell::Modals # namespace
2
- # Layout Standard del contenitore della modal
3
- class Headers::Layout < Base
4
-
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ module Modals # namespace
5
+ # Layout Standard del contenitore della modal
6
+ class Headers::Layout < Base
5
7
 
8
+ end
9
+ end
10
+ end
6
11
  end
7
12
  end
@@ -1,27 +1,30 @@
1
- module KonoUtils::Object::Cell # namespace
2
- class Search < Base
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ class Search < Base
3
5
 
6
+ def collapse_container_id
7
+ dom_id(model, "search_form")
8
+ end
4
9
 
5
- def collapse_container_id
6
- dom_id(model, "search_form")
7
- end
10
+ def data_loaded?
11
+ model.data_loaded?
12
+ end
8
13
 
9
- def data_loaded?
10
- model.data_loaded?
11
- end
14
+ ##
15
+ # Identifica il contenitore dei bottoni, sia a livello di id DOM che per quanto riguarda la destinazione dei bottoni
16
+ # durante il renderig della form
17
+ def buttons_container
18
+ dom_id(model, 'buttons_container')
19
+ end
12
20
 
13
- ##
14
- # Identifica il contenitore dei bottoni, sia a livello di id DOM che per quanto riguarda la destinazione dei bottoni
15
- # durante il renderig della form
16
- def buttons_container
17
- dom_id(model, 'buttons_container')
18
- end
21
+ ##
22
+ # Andiamo a restituire il layout da utilizzare nel form
23
+ def form_layout
24
+ layout_ns("cell/forms/containers/search_layout")
25
+ end
19
26
 
20
- ##
21
- # Andiamo a restituire il layout da utilizzare nel form
22
- def form_layout
23
- layout_ns("cell/forms/containers/search_layout")
27
+ end
24
28
  end
25
-
26
29
  end
27
30
  end
@@ -1,14 +1,17 @@
1
- module KonoUtils::Object::Cell # namespace
2
- ##
3
- # Classe variante della ricerca
4
- class Searches::Form < Form
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ ##
5
+ # Classe variante della ricerca
6
+ class Searches::Form < Form
5
7
 
8
+ ##
9
+ # Destinazione bottoni nel layout
10
+ def send_buttons_to
11
+ :search_buttons_container
12
+ end
6
13
 
7
- ##
8
- # Destinazione bottoni nel layout
9
- def send_buttons_to
10
- :search_buttons_container
14
+ end
11
15
  end
12
-
13
16
  end
14
17
  end
@@ -1,26 +1,31 @@
1
- module KonoUtils::Object::Cell # namespace
2
- class Show < Base
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
3
4
 
4
- # @param field [KonoUtilsBootstrapView4::EditableField] campo da cui estrapolare il valore
5
- def get_field(field)
6
- model.send(field.name)
7
- end
5
+ class Show < Base
8
6
 
9
- # @param field [KonoUtilsBootstrapView4::EditableField] campo da cui estrapolare la descrizione
10
- def field_description(field)
11
- model.class.han field.name
12
- end
7
+ # @param field [KonoUtilsBootstrapView4::EditableField] campo da cui estrapolare il valore
8
+ def get_field(field)
9
+ model.send(field.name)
10
+ end
11
+
12
+ # @param field [KonoUtilsBootstrapView4::EditableField] campo da cui estrapolare la descrizione
13
+ def field_description(field)
14
+ model.class.han field.name
15
+ end
16
+
17
+ ##
18
+ # Elenco dei campi da visualizzare, altrimenti estrapolati dalla policy
19
+ # @return [Array<KonoUtilsBootstrapView4::EditableField>]
20
+ def displayable_attributes
21
+ if options[:displayable_attributes]
22
+ KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(options[:displayable_attributes])
23
+ else
24
+ KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(policy(model).displayable_attributes)
25
+ end
26
+ end
13
27
 
14
- ##
15
- # Elenco dei campi da visualizzare, altrimenti estrapolati dalla policy
16
- # @return [Array<KonoUtilsBootstrapView4::EditableField>]
17
- def displayable_attributes
18
- if options[:displayable_attributes]
19
- KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(options[:displayable_attributes])
20
- else
21
- KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(policy(model).displayable_attributes)
22
28
  end
23
29
  end
24
-
25
30
  end
26
- end
31
+ end
@@ -1,8 +1,9 @@
1
- module KonoUtils::Object::Cell # namespace
2
- class Shows::Base < Base
3
-
4
-
5
-
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ class Shows::Base < Base
6
5
 
6
+ end
7
+ end
7
8
  end
8
9
  end
@@ -1,10 +1,15 @@
1
- module KonoUtils::Object::Cell::Shows # namespace
2
- class PageTitle < Base
3
-
4
- def show
5
- title_edit_g
6
- end
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ module Shows # namespace
5
+ class PageTitle < Base
7
6
 
7
+ def show
8
+ title_edit_g
9
+ end
8
10
 
11
+ end
12
+ end
13
+ end
9
14
  end
10
15
  end
@@ -1,5 +1,11 @@
1
- module KonoUtils::Object::Cell::Shows # namespace
2
- class SideTitle < Base
1
+ module KonoUtils
2
+ module Object
3
+ module Cell
4
+ module Shows
5
+ class SideTitle < Base
3
6
 
7
+ end
8
+ end
9
+ end
4
10
  end
5
11
  end
@@ -1,3 +1,3 @@
1
1
  module KonoUtilsBootstrapView4
2
- VERSION = '0.1.0-rc.3'
2
+ VERSION = '0.1.0-rc.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kono_utils_bootstrap_view4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.rc.3
4
+ version: 0.1.0.pre.rc.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marino Bonetti