base_editing_bootstrap 0.11.0 → 0.12.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd1a40db07e52860bd82ebe871ab561cda1054d92fdede68dd8faa9a6f8daa82
4
- data.tar.gz: 372073cf6b6f99c9697dc836dc19c3045d74d0c5594f6c05c7cf83c822907b26
3
+ metadata.gz: 2ebd5f42f60f886ca0e8c5ecff7d5be53531bf015ea7c44f763f6d07127f69ec
4
+ data.tar.gz: 007b28d61ec3058efdc94488578cc2fdae37d1477296511db5e5653f77b94bee
5
5
  SHA512:
6
- metadata.gz: 746487a0bf779295a741a85074eaca9eb0413bc8696890f7d25ab83fe59d30ec9c2dab83f0c5a231241ee76b88e4b942beabffee281297b54bbc587e7e864be6
7
- data.tar.gz: 4a18b6485ae5befd52a3319087cc976756a67458c7e24cb3086c5ffe941dbbc08d363b6a4cb5113d9ca07ea542b610d9d128d7f77c8bbffe52097e7dbcf8dc8d
6
+ metadata.gz: 530342bff9cac4c81404c568d89faf99293f1992e3c2aedea0042ec4ed9a3f30bf72f9a9da75036bef84eb29c8b7e8299baa4b5c548d5ef7ca2e9497732a3478
7
+ data.tar.gz: 4b9e115f5ee49c9857bb243091e4ca58c70f0e02d16e241dbb93c09337728fee62455c673818fb963810d0dec36462ce332194217d590c3848bd013213126c55
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
  All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
3
3
 
4
4
  - - -
5
+ ## 0.12.0 - 2024-10-01
6
+ #### Documentation
7
+ - Update documentation - (e49af20) - Marino Bonetti
8
+ #### Features
9
+ - Add Rendering of HelpText - (35ceb69) - Marino Bonetti
10
+ #### Miscellaneous Chores
11
+ - Fix Ask for otp - (0f4e66b) - Marino Bonetti
12
+
13
+ - - -
14
+
5
15
  ## 0.11.0 - 2024-09-05
6
16
  #### Features
7
17
  - Add clear search button - (f989c17) - Marino Bonetti
data/README.md CHANGED
@@ -117,10 +117,17 @@ Utilizzo per modello base, in questo esempio prendiamo come modello Post come es
117
117
  end
118
118
 
119
119
  ```
120
- - [OPTIONAL] nel caso si volesse fare override dei campi della form chiamare il generatore:
121
- ```shell
122
- rails g base_editing_bootstrap:field_override ModelName field1 field2:type
123
- ```
120
+ - [OPTIONAL] FORM overrides:
121
+ - nel caso si volesse fare override dei campi della form chiamare il generatore:
122
+ ```shell
123
+ rails g base_editing_bootstrap:field_override ModelName field1 field2:type
124
+ ```
125
+ - è possibile customizzare
126
+ - un text help per ogni campo andando ad aggiungere nelle traduzioni la relativa
127
+ traduzione nella posizione: `it.activerecord.attributes.MODEL.FIELD/help_text`
128
+ - un blocco per l'unità di misura accanto al campo aggiungendo alle traduzioni:
129
+ `it.activerecord.attributes.MODEL.FIELD/unit`
130
+
124
131
  - [OPTIONAL] la medesima cosa è possibile fare con il rendering dei campi
125
132
  delle celle della tabella
126
133
  ```shell
@@ -0,0 +1,16 @@
1
+ <%
2
+ # LOCALS disponibili per rendering del testo dell'help del campo se presente
3
+ # nelle traduzioni in field/help_text
4
+ # object: classe active_model che mi serve per cercare l'help text
5
+ # field: campo per cui stampare l'help
6
+ %>
7
+ <%# locals: (object:,field:) -%>
8
+ <%
9
+ help_text = object.class.human_attribute_name("#{field}/help_text", default: "")
10
+ unless help_text.blank?
11
+ %>
12
+ <div class="form-text"><%= help_text %></div>
13
+ <%
14
+ end
15
+ %>
16
+
@@ -4,3 +4,4 @@
4
4
  <%= form_print_field(form, form_field) %>
5
5
  <%= error_messages_for(form.object, form_field) %>
6
6
  </div>
7
+ <%= render partial: "editing_form_help_text", locals: {object: form.object, field: form_field} %>
@@ -1 +1 @@
1
- 0.11.0
1
+ 0.12.0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base_editing_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marino Bonetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-05 00:00:00.000000000 Z
11
+ date: 2024-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -312,6 +312,7 @@ files:
312
312
  - app/policies/base_model_policy.rb
313
313
  - app/views/.keep
314
314
  - app/views/base_editing/_edit_page_title_header.html.erb
315
+ - app/views/base_editing/_editing_form_help_text.html.erb
315
316
  - app/views/base_editing/_editing_form_measure_unit.html.erb
316
317
  - app/views/base_editing/_form.html.erb
317
318
  - app/views/base_editing/_form_field.html.erb