hot-glue 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce580959416e9968343b55064541fe777cef3c213f6124add34aba96f13a194b
4
- data.tar.gz: 902147016f8d3ef1b20a1ce713b84d68b9ff2b5700d2643369d1037d0658bbc2
3
+ metadata.gz: 3fe06433ca491d353bbc997003fdbc3735fd3bdf35692c35a25237fcaedf73db
4
+ data.tar.gz: 42b4b9077a245b75d0878e4bb84e866e8c5b7b61b4f9efd9ea1213678e7def7c
5
5
  SHA512:
6
- metadata.gz: d4625645ea4bd58ee8614965ff26083ef86ca6d07398408bcf01cb72e3aceda62d60480a86fbe4a999e12f726bc74c427f35a3d889cba9e6d0ef7e54c42f1f79
7
- data.tar.gz: 7dd4e7fc8d7a605c54818c60bfdaa38148727f65a13e8e1135002bcc23c6f63649be909787b76b207fd81b3f6a139e0598a526b59c872dc71e512f2983432fe4
6
+ metadata.gz: 657b12337809a015a32567497a6564afa738e2e29ca4cd4aff142a8d9e5718f15237a69b49b708b164f71d9f98f2b7ed7f21cc1130e45f78306dea4e9a93b00a
7
+ data.tar.gz: ac4aed4acb2c70df780f248f024834bf4b055aff18f8438d63415498616a2e8363ff489898f001ee8fbb7885ba99c926d80dbbb659b82f442f6a709bebbaafda
data/.github/FUNDING.yml CHANGED
@@ -1 +1 @@
1
- custom: ["https://jfbcodes.com/p/hot-glue-in-depth-tutorial?utm_source=github.com&utm_campaign=github_hot_glue_repo_funding_link"]
1
+ custom: ["https://heliosdev.shop/p/hot-glue/","https://jfbcodes.com/p/hot-glue-in-depth-tutorial?utm_source=github.com&utm_campaign=github_hot_glue_repo_funding_link"]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hot-glue (0.5.0)
4
+ hot-glue (0.5.1)
5
5
  ffaker (~> 2.16)
6
6
  kaminari (~> 1.2)
7
7
  rails (> 5.1)
data/README.md CHANGED
@@ -37,8 +37,19 @@ Hot Glue generates functionality that is quick and dirty. It lets you be crafty.
37
37
  | ![Teachable-225x225](https://user-images.githubusercontent.com/59002/147857335-a919e095-e6de-4718-8513-736d1f283a0b.png) | Now avaiale on [Teachable](https://jfb.teachable.com/courses/hot-glue-in-depth-tutorial/?utm_source=github.com&utm_campaign=github_hot_glue_readme_page) |
38
38
 
39
39
 
40
+ ---
41
+
42
+
43
+ ## NEW GETTING STARTED VIDEO
44
+ The getting started video is newly updated with an explanation of the options for **`jsbundling-rails`/`cssbudling-rails`** when creating a new Rails 7 app.
40
45
 
46
+ Check it out on Youtube at https://www.youtube.com/watch?v=bKjKHMTvzZc
41
47
 
48
+ While you're over there could you give my Youtube channel a 'Subscribe'? (look for the RED SUBSCRIBE BUTTON) Thanks so much!
49
+
50
+
51
+ ---
52
+
42
53
 
43
54
  ## HOW EASY?
44
55
 
@@ -680,7 +691,7 @@ Omits list action. Only makes sense to use this if want to create a view where y
680
691
 
681
692
  ### `--no-list-label`
682
693
 
683
- Omits list LABEL itself above the list. (Do not confuse with the field labels.)
694
+ Omits list LABEL itself above the list. (Do not confuse with the list heading which contains the field labels.)
684
695
 
685
696
  (Note that on a per model basis, you can also globally omit the label or set a unique label value using
686
697
  `@@table_label_singular` and `@@table_label_plural` on your model objects.)
@@ -694,6 +705,16 @@ Will not apply to dates, times, datetimes, dropdowns (enums + foreign keys), or
694
705
 
695
706
  See also setting `--form-labels-position` to control position or omit normal labels.
696
707
 
708
+ ### `--inline-list-labels` (before, after, omit; default: omit)
709
+
710
+ Determines if field label will appear on the LIST VIEW. NOoe that because Hot Glue has no sparate show route or page,
711
+ this affects the `_show` template which is rendered as a partial from the LIST view.
712
+
713
+ Because the labels are already in the heading, this `omit` by default. (Use with `--no-list-heading` to omit the labels in the list heading.)
714
+
715
+ Use `before` to make the labels come before or `after` to make them come after. See Version 0.5.1 release notes for an example.
716
+
717
+
697
718
  ### `--no-list-heading`
698
719
 
699
720
  Omits the heading of column names that appears above the 1st row of data.
@@ -758,6 +779,28 @@ Child portals have the headings omitted automatically (there is a heading identi
758
779
 
759
780
  # VERSION HISTORY
760
781
 
782
+ #### 2022-03-12 - v0.5.1 - Inline list Labels
783
+
784
+ `--inline-list-labels` (default: `after`; options are **before**, **after**, and **omit**)
785
+
786
+ Determines if field label will appear on the LIST VIEW. Note that because Hot Glue has no separate show route or page, this affects the `_show` template which is rendered as a partial from the LIST view.
787
+
788
+ Because the labels are already in the heading, this `omit` by default. (Use with `--no-list-heading` to omit the labels in the list heading.)
789
+
790
+ Use `before` to make the labels come before or `after` to make them come after. See Version 0.5.1 release notes for an example.
791
+
792
+ #### 2022-03-06 - v0.5.0 - Label options before or after or with placeholder labels
793
+ `--form-labels-position` (default: `after`; options are **before**, **after**, and **omit**)
794
+ By default, form labels appear after the form inputs. To make them appear before or omit them, use this flag.
795
+
796
+ `--form-placeholder-labels` (default: false)
797
+
798
+ When this flag is set, fields, numbers, and text areas will have placeholder labels.
799
+ Will not apply to dates, times, datetimes, dropdowns (enums + foreign keys), or booleans.
800
+
801
+ For example see the [release notes](https://github.com/jasonfb/hot-glue/releases/tag/v0.5.0)
802
+
803
+
761
804
  #### 2022-02-14 - v0.4.9
762
805
  • Fixed issue building models with namespaced class names (e.g. `Fruits::Apple` and `Fruits::Bannana`).
763
806
  You can now build against these kinds of models natively (be sure to pass the full model name, with double-colon syntax).
@@ -213,7 +213,7 @@ module HotGlue
213
213
  @perc_width = args[0][:perc_width]
214
214
  @layout = args[0][:layout]
215
215
  @col_identifier = args[0][:col_identifier] || (layout == "bootstrap" ? "col-md-2" : "scaffold-cell")
216
-
216
+ @inline_list_labels = args[0][:inline_list_labels] || 'omit'
217
217
 
218
218
  columns_count = columns.count + 1
219
219
  perc_width = (@perc_width).floor
@@ -233,7 +233,7 @@ module HotGlue
233
233
  limit = eval("#{singular_class}.columns_hash['#{col}']").limit
234
234
  sql_type = eval("#{singular_class}.columns_hash['#{col}']").sql_type
235
235
 
236
- case type
236
+ field_output = case type
237
237
  when :integer
238
238
  # look for a belongs_to on this object
239
239
  if col.ends_with?("_id")
@@ -302,9 +302,15 @@ module HotGlue
302
302
  <%= #{singular_class}.defined_enums['#{enum_type}'][#{singular}.#{col}] %>
303
303
  <% end %>
304
304
 
305
- "
306
- end #end of switch
307
- }.join("<br />") + "</div>"
305
+ "
306
+ end #end of switch
307
+
308
+
309
+ label = "<br/><label class='small form-text text-muted'>#{col.to_s.humanize}</label>"
310
+
311
+ (inline_list_labels == 'before' ? label : "") + field_output +
312
+ (inline_list_labels == 'after' ? label : "")
313
+ }.join( "<br />") + "</div>"
308
314
  }.join("\n")
309
315
  end
310
316
  end
@@ -136,7 +136,7 @@ module HotGlue
136
136
 
137
137
  # NOT YET IMPLEMENTED
138
138
  # determines if labels appear within the rows of the VIEWABLE list (does NOT affect the list heading)
139
- # class_option :inline_list_labels, default: 'omit' # choices are before, after, omit
139
+ class_option :inline_list_labels, default: 'omit' # choices are before, after, omit
140
140
 
141
141
  def initialize(*meta_args)
142
142
  super
@@ -279,11 +279,14 @@ module HotGlue
279
279
  end
280
280
 
281
281
  @form_placeholder_labels = options['form_placeholder_labels'] # true or false
282
+ @inline_list_labels = options['inline_list_labels'] || 'omit' # 'before','after','omit'
283
+
284
+
285
+ if !['before','after','omit'].include?(@inline_list_labels)
286
+ raise "You passed '#{@inline_list_labels}' as the setting for --inline-list-labels but the only allowed options are before, after, and omit (default)"
287
+ end
282
288
 
283
289
 
284
- # if !['before','after','omit'].include?(@form_placeholder_labels)
285
- # raise "You passed '#{@form_placeholder_labels}' as the setting for --form-placeholder-labels but the only allowed options are before, after, and omit (default)"
286
- # end
287
290
 
288
291
  @display_list_after_update = options['display_list_after_update'] || false
289
292
  @smart_layout = options['smart_layout']
@@ -989,7 +992,9 @@ module HotGlue
989
992
  singular_class: singular_class,
990
993
  singular: singular,
991
994
  layout: @layout,
992
- col_identifier: col_identifier
995
+ col_identifier: col_identifier,
996
+ inline_list_labels: @inline_list_labels
997
+
993
998
  )
994
999
  end
995
1000
 
@@ -1,5 +1,5 @@
1
1
  module HotGlue
2
2
  class Version
3
- CURRENT = '0.5.0'
3
+ CURRENT = '0.5.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot-glue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Fleetwood-Boldt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-06 00:00:00.000000000 Z
11
+ date: 2022-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails