brick 1.0.215 → 1.0.216
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/brick/config.rb +14 -0
- data/lib/brick/extensions.rb +22 -4
- data/lib/brick/frameworks/rails/engine.rb +3 -240
- data/lib/brick/frameworks/rails/form_tags.rb +18 -1
- data/lib/brick/frameworks/rails.rb +241 -0
- data/lib/brick/version_number.rb +1 -1
- data/lib/generators/brick/seeds_generator.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c66f132749fbac21c0ec10df25e6c3a4bc044e4b5990b5ae41708d9d884ae269
|
4
|
+
data.tar.gz: 7eb332f769beefade3f1cb6a3daa872f03027e9e58f4cc2f1e76ba9c91b082b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8313ef56879fa1b91959753ed1dc851769b94d8394e38b2f12289daedae53254d1aedcce3b5274fc0b3bbbd8ed52f04dbf43d17714c62eb95431b8081c021d7
|
7
|
+
data.tar.gz: 73f4bd4ecf5e31164c3417c28d993f956518bef9c169a1a9e97cf82db216d7085b1546801ec2c9b546943052fcddd29d017d2fac1e364e0a3ae713875797a6d1
|
data/lib/brick/config.rb
CHANGED
@@ -243,6 +243,7 @@ module Brick
|
|
243
243
|
tables.each_with_object({}) do |v, s|
|
244
244
|
# If it's :constellation, or anything else in a hash, we'll take its value
|
245
245
|
# (and hopefully in this case that would be either a string or nil)
|
246
|
+
# binding.pry
|
246
247
|
dsl = ((v.last.is_a?(Symbol) && v.last) || v.last&.values&.last)
|
247
248
|
unless (dsl ||= '').is_a?(String) || dsl.is_a?(Symbol)
|
248
249
|
puts "Was really expecting #{v.first} / #{v.last.first&.first} / #{dsl} to be a string, " +
|
@@ -429,6 +430,19 @@ module Brick
|
|
429
430
|
end
|
430
431
|
end
|
431
432
|
|
433
|
+
def acts_as_list_cols
|
434
|
+
@mutex.synchronize { @acts_as_list || {} }
|
435
|
+
end
|
436
|
+
|
437
|
+
# Get something like:
|
438
|
+
# { 'on_call_list' => { _brick_default: [:last_name, :first_name] } }
|
439
|
+
# { 'on_call_list' => { _brick_default: :sequence } }
|
440
|
+
def acts_as_list_cols=(position_cols)
|
441
|
+
@mutex.synchronize do
|
442
|
+
@acts_as_list ||= position_cols
|
443
|
+
end
|
444
|
+
end
|
445
|
+
|
432
446
|
def metadata_columns
|
433
447
|
@mutex.synchronize { @metadata_columns ||= ['created_at', 'updated_at', 'deleted_at'] }
|
434
448
|
end
|
data/lib/brick/extensions.rb
CHANGED
@@ -867,6 +867,15 @@ module ActiveRecord
|
|
867
867
|
end
|
868
868
|
v1 << id_for_tables[v.first].compact
|
869
869
|
end
|
870
|
+
if k1.name == 'ActiveStorage::Attachment'
|
871
|
+
binding.pry
|
872
|
+
(@_brick_includes ||= {})[v1.first.first.to_s] = [v1.first[1..-1], 'blob']
|
873
|
+
# x = 5
|
874
|
+
# elsif k1.name == 'ActiveStorage::Blob'
|
875
|
+
# binding.pry
|
876
|
+
# (@_brick_includes ||= {})[v1.first.first.to_s] = v1[0..1]
|
877
|
+
# # x = 5
|
878
|
+
end
|
870
879
|
end
|
871
880
|
end
|
872
881
|
join_array.each do |assoc_name|
|
@@ -908,7 +917,12 @@ module ActiveRecord
|
|
908
917
|
through_sources.push(src_ref) unless src_ref.belongs_to?
|
909
918
|
from_clause = +"#{_br_quoted_name(through_sources.first.table_name)} br_t0"
|
910
919
|
# ActiveStorage will not get the correct count unless we do some extra filtering later
|
911
|
-
|
920
|
+
if Object.const_defined?('ActiveStorage') && through_sources.first.klass <= ::ActiveStorage::Attachment
|
921
|
+
# binding.pry
|
922
|
+
tbl_nm = 'br_t0'
|
923
|
+
# Need to somehow have this kind of an include in order to avoid an N+1 problem:
|
924
|
+
# .include(images_attachments: [blob: { variant_records: :blob }])
|
925
|
+
end
|
912
926
|
fk_col = through_sources.shift.foreign_key
|
913
927
|
|
914
928
|
idx = 0
|
@@ -1111,8 +1125,12 @@ JOIN (SELECT #{hm_selects.map { |s| _br_quoted_name("#{'br_t0.' if from_clause}#
|
|
1111
1125
|
end
|
1112
1126
|
|
1113
1127
|
# ActiveStorage compatibility
|
1114
|
-
|
1115
|
-
|
1128
|
+
if klass.name == 'ActiveStorage::Blob' && ::ActiveStorage::Blob.columns_hash.key?('service_name')
|
1129
|
+
selects << 'service_name'
|
1130
|
+
end
|
1131
|
+
if klass.name == 'ActiveStorage::Attachment' && ::ActiveStorage::Attachment.columns_hash.key?('blob_id')
|
1132
|
+
selects << 'blob_id'
|
1133
|
+
end
|
1116
1134
|
# Pay gem compatibility
|
1117
1135
|
selects << 'processor' if klass.name == 'Pay::Customer' && Pay::Customer.columns_hash.key?('processor')
|
1118
1136
|
selects << 'customer_id' if klass.name == 'Pay::Subscription' && Pay::Subscription.columns_hash.key?('customer_id')
|
@@ -2349,7 +2367,7 @@ class Object
|
|
2349
2367
|
|
2350
2368
|
# %%% Allow params to define which columns to use for order_by
|
2351
2369
|
# Overriding the default by providing a querystring param?
|
2352
|
-
order_by = params['_brick_order']&.split(',')&.map(&:
|
2370
|
+
order_by = params['_brick_order']&.split(',')&.map(&:to_sym) || Object.send(:default_ordering, table_name, pk)
|
2353
2371
|
|
2354
2372
|
ar_relation = ActiveRecord.version < Gem::Version.new('4') ? real_model.preload : real_model.all
|
2355
2373
|
params['_brick_is_api'] = true if (is_api = request.format == :js || current_api_root)
|
@@ -779,246 +779,9 @@ window.addEventListener(\"popstate\", linkSchemas);
|
|
779
779
|
table_options << "<option value=\"#{prefix}brick_status\">(Status)</option>".html_safe if ::Brick.config.add_status
|
780
780
|
table_options << "<option value=\"#{prefix}brick_orphans\">(Orphans)</option>".html_safe if is_orphans
|
781
781
|
table_options << "<option value=\"#{prefix}brick_crosstab\">(Crosstab)</option>".html_safe if is_crosstab
|
782
|
-
css = +
|
783
|
-
|
784
|
-
|
785
|
-
display: inline-block;
|
786
|
-
left: 0;
|
787
|
-
z-index: 2;
|
788
|
-
}
|
789
|
-
|
790
|
-
.flashNotice {
|
791
|
-
color: green;
|
792
|
-
}
|
793
|
-
.flashAlert {
|
794
|
-
color: red;
|
795
|
-
}
|
796
|
-
|
797
|
-
h1, h3 {
|
798
|
-
margin-bottom: 0;
|
799
|
-
}
|
800
|
-
#rowCount {
|
801
|
-
display: table-cell;
|
802
|
-
height: 32px;
|
803
|
-
vertical-align: middle;
|
804
|
-
font-size: 0.9em;
|
805
|
-
font-family: sans-serif;
|
806
|
-
}
|
807
|
-
#imgErd {
|
808
|
-
display: table-cell;
|
809
|
-
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABNCAMAAADU1xmCAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAARxaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyPC90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UxylldpekeRuGtrajhztIuLizV3qc3DvThDVEyFs31+fiRViVRNViVWjwsvWxIzXxZEekeL1FZIVVRdeEZrk359fj52ppubm3l6e4qbqJOTlBlGfM3k3Nzc3K6lnk9RWaenp0FjikGDyJGRkWJiYk2L0Li4uJubnH5+flFbeNPT02tpac3NzVBGJkCCyMvLy9LS0oxETk2U3tLS0tXV1cPDw+Xl5amDftbX19na2uLj4+jo6dzd3OXl511dXd/g31paWlZXV9TU1HBwcOvr687OzdDQ0u/u7fTx79PSzcrJx6KiooWFhujn5NvW05WUk7S1t3R1d7y9vcLCv37J68vMzVJTVOLY1gMiSpmamnt7e7K6zHq+43LQ9Vyez+Pf3LGyscXGybzD1sXDw46v02vI8I+Pj7vEtNvIx7q4ubnZ54a3it3f5s+8vGS/6L6trK+6qICs1H+33cXc6KiuwAOr48fN20ee0Fao0lyz4W6s1qyrrKKlt3XdkoqnyyFoqzuTy6ixosuVeobA4YHNl8TOv3/Ck9bc4I3P7Uqq3tDIxz2FwzN/vF+VxdDe59mIfU+OxJmovxl+wX7S9WjbhovW9jihyKGalIq31uNyY36exJCatJONhTm36nKj0B2q4Mqxsae2zc/U3tvf1cqKa7zAyJS4npqyyTh2tUhMT1drj5ixtN98cEfC8U2Y5vf39355cSN0s4mDfKaomlrG8b2cmcFvaGx/m2CeZge68HG64YCNntSgoVHUdJzKnIHIh6c+BalVVaPM5qrG2CZZkyaHH3WRtYrdn5nH2rxoP22+gN1VQTyxW1aXl0iO2GaxtFuzaCCAQyXSWDOKlDZwkxIINVZPP52Io3uldtIoC1uGVxmzRP6PHn8AAADVdFJOUwAmEf6t/v4EAQVR/oT+Hl4U/v1bR/7+Kf7+a/76Q4Y2Wf1b4j71sXm0y2hF/bBwbtXN/fyGl8Sxiu382Preqfzia9iIkdP51/Povnineu+9n6H7ov5ksLfYy/7////////+/////////////////////v/////////////////////////////////////////////////////////////////////////////+/////////////////////////////////////////////////////r5xM8kAAA0qSURBVFjDpZh3WFNnG8YDMZOiLE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EwTG4xPyusWWLwwG56fCKiFwyfSyLR3FPVKR9kMK69EnKC0CcN26OdYlTdydBQLP3azvFhtE1Hm2w8fzl2Yf6g6hLp3y1K2QwjkTGYP/hiZpz2U/BASs/HDsCPHc09l26Du8oa8uSIHOnihpsJj/B7mvTj/M63GzAAAAAElFTkSuQmCC);
|
810
|
-
background-repeat: no-repeat;
|
811
|
-
background-size: 100% 100%;
|
812
|
-
width: 28px;
|
813
|
-
height: 32px;
|
814
|
-
cursor: pointer;
|
815
|
-
}
|
816
|
-
#mermaidErd {
|
817
|
-
display: none;
|
818
|
-
}
|
819
|
-
#mermaidErd .exclude {
|
820
|
-
position: absolute;
|
821
|
-
color: red;
|
822
|
-
top: 0;
|
823
|
-
right: 0;
|
824
|
-
cursor: pointer;
|
825
|
-
}
|
826
|
-
.relatedModel {
|
827
|
-
cursor: pointer;
|
828
|
-
}
|
829
|
-
|
830
|
-
#dropper {
|
831
|
-
background-color: #eee;
|
832
|
-
}
|
833
|
-
#btnImport {
|
834
|
-
display: none;
|
835
|
-
}
|
836
|
-
|
837
|
-
#headerTopContainer {
|
838
|
-
position: sticky;
|
839
|
-
display: inline-block;
|
840
|
-
top: 0px;
|
841
|
-
background-color: white;
|
842
|
-
z-index: 1;
|
843
|
-
}
|
844
|
-
#headerTopAddNew {
|
845
|
-
position: absolute;
|
846
|
-
width: 100%;
|
847
|
-
top: -33px;
|
848
|
-
}
|
849
|
-
#headerButtonBox {
|
850
|
-
display: inline-block;
|
851
|
-
position: sticky;
|
852
|
-
right: 0px;
|
853
|
-
float: right;
|
854
|
-
}
|
855
|
-
#headerButtonBox a, #headerButtonBox svg {
|
856
|
-
display: table-cell;
|
857
|
-
height: 24px;
|
858
|
-
width: 24px;
|
859
|
-
padding: 2px;
|
860
|
-
}
|
861
|
-
#addNew {
|
862
|
-
background-color: #008061;
|
863
|
-
}
|
864
|
-
|
865
|
-
table {
|
866
|
-
border-collapse: collapse;
|
867
|
-
font-size: 0.9em;
|
868
|
-
font-family: sans-serif;
|
869
|
-
}
|
870
|
-
table.shadow {
|
871
|
-
min-width: 400px;
|
872
|
-
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
|
873
|
-
}
|
874
|
-
|
875
|
-
tr th {
|
876
|
-
background-color: #009879;
|
877
|
-
color: #fff;
|
878
|
-
text-align: left;
|
879
|
-
}
|
880
|
-
.col-sticky {
|
881
|
-
position: sticky;
|
882
|
-
left: 0;
|
883
|
-
}
|
884
|
-
#headerTop tr th {
|
885
|
-
position: relative;
|
886
|
-
}
|
887
|
-
#headerTop tr th .exclude {
|
888
|
-
position: absolute;
|
889
|
-
display: none;
|
890
|
-
top: 0;
|
891
|
-
right: 0;
|
892
|
-
cursor: pointer;
|
893
|
-
}
|
894
|
-
#headerTop tr th:hover, #headerTop tr th.highlight {
|
895
|
-
background-color: #28B898;
|
896
|
-
}
|
897
|
-
#exclusions {
|
898
|
-
font-size: 0.7em;
|
899
|
-
}
|
900
|
-
#exclusions div {
|
901
|
-
border: 1px solid blue;
|
902
|
-
display: inline-block;
|
903
|
-
cursor: copy;
|
904
|
-
}
|
905
|
-
#headerTop tr th:hover .exclude {
|
906
|
-
display: inline;
|
907
|
-
cursor: pointer;
|
908
|
-
color: red;
|
909
|
-
}
|
910
|
-
tr th a {
|
911
|
-
color: #80FFB8;
|
912
|
-
}
|
913
|
-
.add-hm-related {
|
914
|
-
float: right;
|
915
|
-
}
|
916
|
-
#tblAddCol {
|
917
|
-
position: relative;
|
918
|
-
z-index: 2;
|
919
|
-
border: 2px solid blue;
|
920
|
-
}
|
921
|
-
tr th, tr td {
|
922
|
-
padding: 0.2em 0.5em;
|
923
|
-
}
|
924
|
-
|
925
|
-
tr td.highlight {
|
926
|
-
background-color: #B0B0FF;
|
927
|
-
}
|
928
|
-
|
929
|
-
table tr .col-sticky {
|
930
|
-
background-color: #28B898;
|
931
|
-
}
|
932
|
-
|
933
|
-
.show-field {
|
934
|
-
background-color: #004998;
|
935
|
-
}
|
936
|
-
.show-field a {
|
937
|
-
color: #80B8D2;
|
938
|
-
}
|
939
|
-
|
940
|
-
table.shadow > tbody > tr {
|
941
|
-
border-bottom: thin solid #dddddd;
|
942
|
-
}
|
943
|
-
|
944
|
-
table tbody tr:nth-of-type(even) {
|
945
|
-
background-color: #f3f3f3;
|
946
|
-
}
|
947
|
-
table tbody tr:nth-of-type(even) .alternating-gray {
|
948
|
-
background-color: #fff;
|
949
|
-
}
|
950
|
-
table tbody tr:nth-of-type(odd) .alternating-gray {
|
951
|
-
background-color: #f3f3f3;
|
952
|
-
}
|
953
|
-
|
954
|
-
table.shadow > tbody > tr:last-of-type {
|
955
|
-
border-bottom: 2px solid #009879;
|
956
|
-
}
|
957
|
-
|
958
|
-
table tbody tr.active-row {
|
959
|
-
font-weight: bold;
|
960
|
-
color: #009879;
|
961
|
-
}
|
962
|
-
|
963
|
-
a.show-arrow {
|
964
|
-
font-size: 1.5em;
|
965
|
-
text-decoration: none;
|
966
|
-
}
|
967
|
-
a.big-arrow {
|
968
|
-
font-size: 2.5em;
|
969
|
-
text-decoration: none;
|
970
|
-
}
|
971
|
-
.dimmed {
|
972
|
-
background-color: #C0C0C0;
|
973
|
-
text-align: center;
|
974
|
-
}
|
975
|
-
.right {
|
976
|
-
text-align: right;
|
977
|
-
}
|
978
|
-
.paddingBottomZero {
|
979
|
-
padding-bottom: 0px;
|
980
|
-
}
|
981
|
-
.paddingTopZero {
|
982
|
-
padding-top: 0px;
|
983
|
-
}
|
984
|
-
.orphan {
|
985
|
-
color: red;
|
986
|
-
white-space: nowrap;
|
987
|
-
}
|
988
|
-
.thumbImg {
|
989
|
-
max-width: 96px;
|
990
|
-
max-height: 96px;
|
991
|
-
}
|
992
|
-
.danger {
|
993
|
-
background-color: red;
|
994
|
-
color: white;
|
995
|
-
}
|
996
|
-
.brick-note {
|
997
|
-
font-size: 0.7em;
|
998
|
-
color: #A0FFA0;
|
999
|
-
max-width: 0;
|
1000
|
-
}
|
1001
|
-
|
1002
|
-
#revertTemplate {
|
1003
|
-
display: none;
|
1004
|
-
}
|
1005
|
-
svg.revert {
|
1006
|
-
display: none;
|
1007
|
-
margin-left: 0.25em;
|
1008
|
-
}
|
1009
|
-
input+svg.revert {
|
1010
|
-
top: 0.5em;
|
1011
|
-
}
|
1012
|
-
|
1013
|
-
.update {
|
1014
|
-
position: sticky;
|
1015
|
-
right: 1em;
|
1016
|
-
float: right;
|
1017
|
-
background-color: #004998;
|
1018
|
-
color: #FFF;
|
1019
|
-
}
|
1020
|
-
</style>
|
1021
|
-
<script>
|
782
|
+
css = +''
|
783
|
+
css << ::Brick::Rails::BRICK_CSS
|
784
|
+
css << "<script>
|
1022
785
|
if (window.history.state && window.history.state.turbo)
|
1023
786
|
window.addEventListener(\"popstate\", function () { location.reload(true); });
|
1024
787
|
</script>
|
@@ -93,10 +93,21 @@ module Brick::Rails::FormTags
|
|
93
93
|
# TinyTds::Error: Adaptive Server connection timed out
|
94
94
|
# (After restarting the server it worked fine again.)
|
95
95
|
row_count = 0
|
96
|
+
# binding.pry
|
97
|
+
# if @_brick_join_array&.include?()
|
98
|
+
enumerator = relation.each # Runs the SQL query
|
99
|
+
# Add proxied info for @_brick_includes
|
100
|
+
# proxy = relation.instance_variable_get(:@proxy) || relation.instance_variable_set(:@proxy, {})
|
101
|
+
bi = relation.instance_variable_get(:@_brick_includes)
|
96
102
|
relation.each do |obj|
|
97
103
|
out << "<tr>\n"
|
98
104
|
out << "<td class=\"col-sticky alternating-gray\">#{link_to('⇛', send("#{klass._brick_index(:singular)}_path".to_sym,
|
99
105
|
pk.map { |pk_part| obj.send(pk_part.to_sym) }), { class: 'big-arrow' })}</td>\n" if pk.present?
|
106
|
+
ac = obj.instance_variable_get(:@association_cache) || obj.instance_variable_set(:@association_cache, {})
|
107
|
+
# included =
|
108
|
+
bi&.each do |bi_key|
|
109
|
+
(ac[col_name.to_sym] ||= []) << val if bi&.key?(col_name) # Add to any proxy things
|
110
|
+
end
|
100
111
|
sequence.each_with_index do |col_name, idx|
|
101
112
|
val = obj.attributes[col_name]
|
102
113
|
bt = bts[col_name] || composite_bt_names[col_name]
|
@@ -107,6 +118,7 @@ module Brick::Rails::FormTags
|
|
107
118
|
(classes ||= []) << 'right' if val.is_a?(Numeric) && !bt
|
108
119
|
out << " class=\"#{classes.join(' ')}\"" if classes&.present?
|
109
120
|
out << '>'
|
121
|
+
binding.pry if col_name == 'event_image_attachment' && obj.id == 6
|
110
122
|
if bt
|
111
123
|
if bt[2] && obj.respond_to?(poly_id_col = "#{bt.first}_id") # Polymorphic?
|
112
124
|
if (poly_id = obj.send(poly_id_col))
|
@@ -350,7 +362,7 @@ module Brick::Rails::FormTags
|
|
350
362
|
<thead><tr><td class=\"brick-note\">Checkbox changes are saved immediately</td>"
|
351
363
|
# Header row with X axis values
|
352
364
|
# (In order for grid highlighting to function, these TH elements must have no whitespace between them.
|
353
|
-
# In this way the Javascript headerCols array will be set properly.
|
365
|
+
# In this way the Javascript headerCols array will be set properly.)
|
354
366
|
x_list.each do |x_item|
|
355
367
|
out << "<th>#{x_item.first}</th>"
|
356
368
|
end
|
@@ -502,6 +514,11 @@ module Brick::Rails::FormTags
|
|
502
514
|
out
|
503
515
|
end # brick_header
|
504
516
|
|
517
|
+
# All the standard CSS with teal colouration for use with Brick
|
518
|
+
def brick_css(theme = nil)
|
519
|
+
::Brick::Rails::BRICK_CSS.html_safe
|
520
|
+
end
|
521
|
+
|
505
522
|
# -----------------------------------------------------------------------------------------------
|
506
523
|
def set_grid_javascript(klass, pk, show_new_button = nil, row_count = nil, total_row_count = nil)
|
507
524
|
table_name = klass.table_name.split('.').last
|
@@ -288,6 +288,247 @@ erDiagram
|
|
288
288
|
|
289
289
|
# CONSTANTS
|
290
290
|
|
291
|
+
BRICK_CSS = "<style>
|
292
|
+
#titleSticky {
|
293
|
+
position: sticky;
|
294
|
+
display: inline-block;
|
295
|
+
left: 0;
|
296
|
+
z-index: 2;
|
297
|
+
}
|
298
|
+
|
299
|
+
.flashNotice {
|
300
|
+
color: green;
|
301
|
+
}
|
302
|
+
.flashAlert {
|
303
|
+
color: red;
|
304
|
+
}
|
305
|
+
|
306
|
+
h1, h3 {
|
307
|
+
margin-bottom: 0;
|
308
|
+
}
|
309
|
+
#rowCount {
|
310
|
+
display: table-cell;
|
311
|
+
height: 32px;
|
312
|
+
vertical-align: middle;
|
313
|
+
font-size: 0.9em;
|
314
|
+
font-family: sans-serif;
|
315
|
+
}
|
316
|
+
#imgErd {
|
317
|
+
display: table-cell;
|
318
|
+
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABNCAMAAADU1xmCAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAARxaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICA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OTlBlGfM3k3Nzc3K6lnk9RWaenp0FjikGDyJGRkWJiYk2L0Li4uJubnH5+flFbeNPT02tpac3NzVBGJkCCyMvLy9LS0oxETk2U3tLS0tXV1cPDw+Xl5amDftbX19na2uLj4+jo6dzd3OXl511dXd/g31paWlZXV9TU1HBwcOvr687OzdDQ0u/u7fTx79PSzcrJx6KiooWFhujn5NvW05WUk7S1t3R1d7y9vcLCv37J68vMzVJTVOLY1gMiSpmamnt7e7K6zHq+43LQ9Vyez+Pf3LGyscXGybzD1sXDw46v02vI8I+Pj7vEtNvIx7q4ubnZ54a3it3f5s+8vGS/6L6trK+6qICs1H+33cXc6KiuwAOr48fN20ee0Fao0lyz4W6s1qyrrKKlt3XdkoqnyyFoqzuTy6ixosuVeobA4YHNl8TOv3/Ck9bc4I3P7Uqq3tDIxz2FwzN/vF+VxdDe59mIfU+OxJmovxl+wX7S9WjbhovW9jihyKGalIq31uNyY36exJCatJONhTm36nKj0B2q4Mqxsae2zc/U3tvf1cqKa7zAyJS4npqyyTh2tUhMT1drj5ixtN98cEfC8U2Y5vf39355cSN0s4mDfKaomlrG8b2cmcFvaGx/m2CeZge68HG64YCNntSgoVHUdJzKnIHIh6c+BalVVaPM5qrG2CZZkyaHH3WRtYrdn5nH2rxoP22+gN1VQTyxW1aXl0iO2GaxtFuzaCCAQyXSWDOKlDZwkxIINVZPP52Io3uldtIoC1uGVxmzRP6PHn8AAADVdFJOUwAmEf6t/v4EAQVR/oT+Hl4U/v1bR/7+Kf7+a/76Q4Y2Wf1b4j71sXm0y2hF/bBwbtXN/fyGl8Sxiu382Preqfzia9iIkdP51/Povnineu+9n6H7ov5ksLfYy/7////////+/////////////////////v/////////////////////////////////////////////////////////////////////////////+/////////////////////////////////////////////////////r5xM8kAAA0qSURBVFjDpZh3WFNnG8YDMZOiLEFEsVhn1Vq1Vq1abWv3br+dc5IQsklCSEiIyAoJyAhb9h4ishVQcCAIOLC4UBFxr7bu0X6dX6/vec8JikIptecPVrh+576f5z3v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2QwjkTGYP/hiZpz2U/BASs/HDsCPHc09l26Du8oa8uSIHOnihpsJj/B7mvTj/M63GzAAAAAElFTkSuQmCC);
|
319
|
+
background-repeat: no-repeat;
|
320
|
+
background-size: 100% 100%;
|
321
|
+
width: 28px;
|
322
|
+
height: 32px;
|
323
|
+
cursor: pointer;
|
324
|
+
}
|
325
|
+
#mermaidErd {
|
326
|
+
display: none;
|
327
|
+
}
|
328
|
+
#mermaidErd .exclude {
|
329
|
+
position: absolute;
|
330
|
+
color: red;
|
331
|
+
top: 0;
|
332
|
+
right: 0;
|
333
|
+
cursor: pointer;
|
334
|
+
}
|
335
|
+
.relatedModel {
|
336
|
+
cursor: pointer;
|
337
|
+
}
|
338
|
+
|
339
|
+
#dropper {
|
340
|
+
background-color: #eee;
|
341
|
+
}
|
342
|
+
#btnImport {
|
343
|
+
display: none;
|
344
|
+
}
|
345
|
+
|
346
|
+
#headerTopContainer {
|
347
|
+
position: sticky;
|
348
|
+
display: inline-block;
|
349
|
+
top: 0px;
|
350
|
+
background-color: white;
|
351
|
+
z-index: 1;
|
352
|
+
}
|
353
|
+
#headerTopAddNew {
|
354
|
+
position: absolute;
|
355
|
+
width: 100%;
|
356
|
+
top: -33px;
|
357
|
+
}
|
358
|
+
#headerButtonBox {
|
359
|
+
display: inline-block;
|
360
|
+
position: sticky;
|
361
|
+
right: 0px;
|
362
|
+
float: right;
|
363
|
+
}
|
364
|
+
#headerButtonBox a, #headerButtonBox svg {
|
365
|
+
display: table-cell;
|
366
|
+
height: 24px;
|
367
|
+
width: 24px;
|
368
|
+
padding: 2px;
|
369
|
+
}
|
370
|
+
#addNew {
|
371
|
+
background-color: #008061;
|
372
|
+
}
|
373
|
+
|
374
|
+
table {
|
375
|
+
border-collapse: collapse;
|
376
|
+
font-size: 0.9em;
|
377
|
+
font-family: sans-serif;
|
378
|
+
}
|
379
|
+
table.shadow {
|
380
|
+
min-width: 400px;
|
381
|
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
|
382
|
+
}
|
383
|
+
|
384
|
+
tr th {
|
385
|
+
background-color: #009879;
|
386
|
+
color: #fff;
|
387
|
+
text-align: left;
|
388
|
+
}
|
389
|
+
.col-sticky {
|
390
|
+
position: sticky;
|
391
|
+
left: 0;
|
392
|
+
}
|
393
|
+
#headerTop tr th {
|
394
|
+
position: relative;
|
395
|
+
}
|
396
|
+
#headerTop tr th .exclude {
|
397
|
+
position: absolute;
|
398
|
+
display: none;
|
399
|
+
top: 0;
|
400
|
+
right: 0;
|
401
|
+
cursor: pointer;
|
402
|
+
}
|
403
|
+
#headerTop tr th:hover, #headerTop tr th.highlight {
|
404
|
+
background-color: #28B898;
|
405
|
+
}
|
406
|
+
#exclusions {
|
407
|
+
font-size: 0.7em;
|
408
|
+
}
|
409
|
+
#exclusions div {
|
410
|
+
border: 1px solid blue;
|
411
|
+
display: inline-block;
|
412
|
+
cursor: copy;
|
413
|
+
}
|
414
|
+
#headerTop tr th:hover .exclude {
|
415
|
+
display: inline;
|
416
|
+
cursor: pointer;
|
417
|
+
color: red;
|
418
|
+
}
|
419
|
+
tr th a {
|
420
|
+
color: #80FFB8;
|
421
|
+
}
|
422
|
+
.add-hm-related {
|
423
|
+
float: right;
|
424
|
+
}
|
425
|
+
#tblAddCol {
|
426
|
+
position: relative;
|
427
|
+
z-index: 2;
|
428
|
+
border: 2px solid blue;
|
429
|
+
}
|
430
|
+
tr th, tr td {
|
431
|
+
padding: 0.2em 0.5em;
|
432
|
+
}
|
433
|
+
|
434
|
+
tr td.highlight {
|
435
|
+
background-color: #B0B0FF;
|
436
|
+
}
|
437
|
+
|
438
|
+
table tr .col-sticky {
|
439
|
+
background-color: #28B898;
|
440
|
+
}
|
441
|
+
|
442
|
+
.show-field {
|
443
|
+
background-color: #004998;
|
444
|
+
}
|
445
|
+
.show-field a {
|
446
|
+
color: #80B8D2;
|
447
|
+
}
|
448
|
+
|
449
|
+
table.shadow > tbody > tr {
|
450
|
+
border-bottom: thin solid #dddddd;
|
451
|
+
}
|
452
|
+
|
453
|
+
table tbody tr:nth-of-type(even) {
|
454
|
+
background-color: #f3f3f3;
|
455
|
+
}
|
456
|
+
table tbody tr:nth-of-type(even) .alternating-gray {
|
457
|
+
background-color: #fff;
|
458
|
+
}
|
459
|
+
table tbody tr:nth-of-type(odd) .alternating-gray {
|
460
|
+
background-color: #f3f3f3;
|
461
|
+
}
|
462
|
+
|
463
|
+
table.shadow > tbody > tr:last-of-type {
|
464
|
+
border-bottom: 2px solid #009879;
|
465
|
+
}
|
466
|
+
|
467
|
+
table tbody tr.active-row {
|
468
|
+
font-weight: bold;
|
469
|
+
color: #009879;
|
470
|
+
}
|
471
|
+
|
472
|
+
a.show-arrow {
|
473
|
+
font-size: 1.5em;
|
474
|
+
text-decoration: none;
|
475
|
+
}
|
476
|
+
a.big-arrow {
|
477
|
+
font-size: 2.5em;
|
478
|
+
text-decoration: none;
|
479
|
+
}
|
480
|
+
.dimmed {
|
481
|
+
background-color: #C0C0C0;
|
482
|
+
text-align: center;
|
483
|
+
}
|
484
|
+
.right {
|
485
|
+
text-align: right;
|
486
|
+
}
|
487
|
+
.paddingBottomZero {
|
488
|
+
padding-bottom: 0px;
|
489
|
+
}
|
490
|
+
.paddingTopZero {
|
491
|
+
padding-top: 0px;
|
492
|
+
}
|
493
|
+
.orphan {
|
494
|
+
color: red;
|
495
|
+
white-space: nowrap;
|
496
|
+
}
|
497
|
+
.thumbImg {
|
498
|
+
max-width: 96px;
|
499
|
+
max-height: 96px;
|
500
|
+
}
|
501
|
+
.danger {
|
502
|
+
background-color: red;
|
503
|
+
color: white;
|
504
|
+
}
|
505
|
+
.brick-note {
|
506
|
+
font-size: 0.7em;
|
507
|
+
color: #A0FFA0;
|
508
|
+
max-width: 0;
|
509
|
+
}
|
510
|
+
|
511
|
+
#revertTemplate {
|
512
|
+
display: none;
|
513
|
+
}
|
514
|
+
svg.revert {
|
515
|
+
display: none;
|
516
|
+
margin-left: 0.25em;
|
517
|
+
}
|
518
|
+
input+svg.revert {
|
519
|
+
top: 0.5em;
|
520
|
+
}
|
521
|
+
|
522
|
+
.update {
|
523
|
+
position: sticky;
|
524
|
+
right: 1em;
|
525
|
+
float: right;
|
526
|
+
background-color: #004998;
|
527
|
+
color: #FFF;
|
528
|
+
}
|
529
|
+
</style>
|
530
|
+
"
|
531
|
+
|
291
532
|
AVO_SVG = "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 84 90\" height=\"30\" fill=\"#3096F7\">
|
292
533
|
<path d=\"M83.8304 81.0201C83.8343 82.9343 83.2216 84.7996 82.0822 86.3423C80.9427 87.8851 79.3363 89.0244 77.4984 89.5931C75.6606 90.1618 73.6878 90.1302 71.8694 89.5027C70.0509 88.8753 68.4823 87.6851 67.3935 86.1065L67.0796 85.6029C66.9412 85.378 66.8146 85.1463 66.6998 84.9079L66.8821 85.3007C64.1347 81.223 60.419 77.8817 56.0639 75.5723C51.7087 73.263 46.8484 72.057 41.9129 72.0609C31.75 72.0609 22.372 77.6459 16.9336 85.336C17.1412 84.7518 17.7185 83.6137 17.9463 83.0446L19.1059 80.5265L19.1414 80.456C25.2533 68.3694 37.7252 59.9541 52.0555 59.9541C53.1949 59.9541 54.3241 60.0095 55.433 60.1102C60.748 60.6134 65.8887 62.2627 70.4974 64.9433C75.1061 67.6238 79.0719 71.2712 82.1188 75.6314C82.1188 75.6314 82.1441 75.6717 82.1593 75.6868C82.1808 75.717 82.1995 75.749 82.215 75.7825C82.2821 75.8717 82.3446 75.9641 82.4024 76.0595C82.4682 76.1653 82.534 76.4221 82.5999 76.5279C82.6657 76.6336 82.772 76.82 82.848 76.9711L83.1822 77.7063C83.6094 78.7595 83.8294 79.8844 83.8304 81.0201V81.0201Z\" fill=\"currentColor\" fill-opacity=\"0.22\"></path>
|
293
534
|
<path opacity=\"0.25\" d=\"M83.8303 81.015C83.8354 82.9297 83.2235 84.7956 82.0844 86.3393C80.9453 87.8829 79.339 89.0229 77.5008 89.5923C75.6627 90.1617 73.6895 90.1304 71.8706 89.5031C70.0516 88.8758 68.4826 87.6854 67.3935 86.1065L67.0796 85.6029C66.9412 85.3746 66.8146 85.1429 66.6998 84.9079L66.8821 85.3007C64.1353 81.222 60.4199 77.8797 56.0647 75.5695C51.7095 73.2593 46.8488 72.0524 41.9129 72.0558C31.75 72.0558 22.372 77.6408 16.9336 85.3309C17.1412 84.7467 17.7185 83.6086 17.9463 83.0395L19.1059 80.5214L19.1414 80.4509C22.1906 74.357 26.8837 69.2264 32.6961 65.6326C38.5086 62.0387 45.2114 60.1232 52.0555 60.1001C53.1949 60.1001 54.3241 60.1555 55.433 60.2562C60.7479 60.7594 65.8887 62.4087 70.4974 65.0893C75.1061 67.7698 79.0719 71.4172 82.1188 75.7775C82.1188 75.7775 82.1441 75.8177 82.1593 75.8328C82.1808 75.863 82.1995 75.895 82.215 75.9285C82.2821 76.0177 82.3446 76.1101 82.4024 76.2055L82.5999 76.5228C82.6859 76.6638 82.772 76.8149 82.848 76.966L83.1822 77.7012C83.6093 78.7544 83.8294 79.8793 83.8303 81.015Z\" fill=\"currentColor\" fill-opacity=\"0.22\"></path>
|
data/lib/brick/version_number.rb
CHANGED
@@ -142,6 +142,7 @@ module Brick
|
|
142
142
|
inv_tbl = fk[:inverse_table].gsub('.', '__')
|
143
143
|
fk_vals << "#{fk[:assoc_name]}: #{inv_tbl}_#{brick_escape(val)}" if val
|
144
144
|
else
|
145
|
+
val = val.to_s if val.is_a?(ActiveStorage::Filename)
|
145
146
|
data << "#{col}: #{val.inspect}"
|
146
147
|
end
|
147
148
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.216
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lorin Thwaits
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|