kirgudu_refs 0.0.8 → 0.0.9
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 +4 -4
- data/app/controllers/kirgudu_refs/base_controller.rb +14 -0
- data/app/controllers/kirgudu_refs/finances/banks_controller.rb +358 -0
- data/app/controllers/kirgudu_refs/globe/cities_controller.rb +374 -0
- data/app/controllers/kirgudu_refs/globe/continents_controller.rb +100 -0
- data/app/controllers/kirgudu_refs/globe/countries_controller.rb +228 -0
- data/app/controllers/kirgudu_refs/globe/regions_controller.rb +321 -0
- data/app/controllers/kirgudu_refs/globe/states_controller.rb +217 -0
- data/app/controllers/kirgudu_refs/globe/subway_lines_controller.rb +58 -0
- data/app/controllers/kirgudu_refs/globe/subway_stations_controller.rb +117 -0
- data/app/controllers/kirgudu_refs/globe/timezones_controller.rb +102 -0
- data/app/controllers/kirgudu_refs/it/encodings_controller.rb +75 -0
- data/app/controllers/kirgudu_refs/it/hosting_types_controller.rb +64 -0
- data/app/controllers/kirgudu_refs/it/operating_system_families_controller.rb +112 -0
- data/app/controllers/kirgudu_refs/it/operating_systems_controller.rb +145 -0
- data/app/controllers/kirgudu_refs/it/processor_architectures_controller.rb +78 -0
- data/app/controllers/kirgudu_refs/it/top_level_domains_controller.rb +65 -0
- data/app/controllers/kirgudu_refs/it/website_types_controller.rb +63 -0
- data/app/controllers/kirgudu_refs/national/currencies_controller.rb +190 -0
- data/app/controllers/kirgudu_refs/national/languages_controller.rb +109 -0
- data/app/controllers/kirgudu_refs/shops/manufacturers_controller.rb +128 -0
- data/app/models/kirgudu_refs/concerns/models/bank_id.rb +48 -0
- data/app/models/kirgudu_refs/concerns/models/capital_id.rb +36 -0
- data/app/models/kirgudu_refs/concerns/models/city_id.rb +35 -0
- data/app/models/kirgudu_refs/concerns/models/continent_id.rb +37 -0
- data/app/models/kirgudu_refs/concerns/models/country_id.rb +37 -0
- data/app/models/kirgudu_refs/concerns/models/currency_id.rb +51 -0
- data/app/models/kirgudu_refs/concerns/models/encoding_id.rb +26 -0
- data/app/models/kirgudu_refs/concerns/models/language_id.rb +31 -0
- data/app/models/kirgudu_refs/concerns/models/manufacturer_id.rb +23 -0
- data/app/models/kirgudu_refs/concerns/models/operating_system_family_id.rb +23 -0
- data/app/models/kirgudu_refs/concerns/models/operating_system_id.rb +22 -0
- data/app/models/kirgudu_refs/concerns/models/processor_architecture_id.rb +24 -0
- data/app/models/kirgudu_refs/concerns/models/region_id.rb +34 -0
- data/app/models/kirgudu_refs/concerns/models/state_id.rb +33 -0
- data/app/models/kirgudu_refs/concerns/models/territory_area.rb +30 -0
- data/app/models/kirgudu_refs/concerns/models/territory_population.rb +30 -0
- data/app/models/kirgudu_refs/finances/bank.rb +8 -12
- data/app/models/kirgudu_refs/globe/city.rb +13 -29
- data/app/models/kirgudu_refs/globe/continent.rb +6 -15
- data/app/models/kirgudu_refs/globe/country.rb +20 -26
- data/app/models/kirgudu_refs/globe/region.rb +13 -26
- data/app/models/kirgudu_refs/globe/state.rb +12 -21
- data/app/models/kirgudu_refs/globe/subway_line.rb +4 -4
- data/app/models/kirgudu_refs/globe/subway_station.rb +4 -5
- data/app/models/kirgudu_refs/globe/timezone.rb +7 -8
- data/app/models/kirgudu_refs/it/encoding.rb +3 -4
- data/app/models/kirgudu_refs/it/hosting_type.rb +5 -11
- data/app/models/kirgudu_refs/it/operating_system.rb +8 -14
- data/app/models/kirgudu_refs/it/operating_system_family.rb +6 -18
- data/app/models/kirgudu_refs/it/processor_architecture.rb +5 -11
- data/app/models/kirgudu_refs/it/top_level_domain.rb +3 -3
- data/app/models/kirgudu_refs/it/website_type.rb +5 -12
- data/app/models/kirgudu_refs/national/currency.rb +7 -10
- data/app/models/kirgudu_refs/national/language.rb +7 -11
- data/app/models/kirgudu_refs/shops/manufacturer.rb +7 -13
- data/config/locales/kirgudu_refs.en.yml +321 -0
- data/config/locales/kirgudu_refs.ru.yml +321 -0
- metadata +44 -8
- data/app/helpers/kirgudu_refs/application_helper.rb +0 -4
- data/app/helpers/kirgudu_refs/model_basic_properties.rb +0 -261
@@ -0,0 +1,100 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
module KirguduRefs
|
3
|
+
class Globe::ContinentsController < ::KirguduRefs::BaseController
|
4
|
+
|
5
|
+
kb_entry_class ::KirguduRefs::Globe::Continent
|
6
|
+
|
7
|
+
kb_page :index do
|
8
|
+
list :entries_list do
|
9
|
+
filters do
|
10
|
+
filter :name do
|
11
|
+
label "#{::KirguduRefs::Globe::ContinentsController.to_i18n}.filters.labels.keyword"
|
12
|
+
end
|
13
|
+
|
14
|
+
filter :name do
|
15
|
+
label "activerecord.attributes.#{::KirguduRefs::Globe::Continent.to_i18n}.name"
|
16
|
+
end
|
17
|
+
|
18
|
+
filter :slug do
|
19
|
+
label "activerecord.attributes.#{::KirguduRefs::Globe::Continent.to_i18n}.slug"
|
20
|
+
end
|
21
|
+
|
22
|
+
filter :code do
|
23
|
+
label "activerecord.attributes.#{::KirguduRefs::Globe::Continent.to_i18n}.code"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
properties do
|
28
|
+
#property :image_id
|
29
|
+
property :name
|
30
|
+
property :slug
|
31
|
+
property :code
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
kb_page :new do
|
37
|
+
form :changes do
|
38
|
+
http_method :post
|
39
|
+
properties do
|
40
|
+
|
41
|
+
property :name
|
42
|
+
property :slug
|
43
|
+
property :code
|
44
|
+
|
45
|
+
property :meta_keywords do
|
46
|
+
input_type :text_area
|
47
|
+
end
|
48
|
+
property :meta_description do
|
49
|
+
input_type :text_area
|
50
|
+
end
|
51
|
+
property :description do
|
52
|
+
input_type :text_area
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
kb_page :edit do
|
60
|
+
form :changes do
|
61
|
+
http_method :patch
|
62
|
+
properties do
|
63
|
+
|
64
|
+
property :name
|
65
|
+
property :slug
|
66
|
+
property :code
|
67
|
+
|
68
|
+
property :meta_keywords do
|
69
|
+
input_type :text_area
|
70
|
+
end
|
71
|
+
property :meta_description do
|
72
|
+
input_type :text_area
|
73
|
+
end
|
74
|
+
property :description do
|
75
|
+
input_type :text_area
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
kb_page :show do
|
83
|
+
entry :show do
|
84
|
+
properties do
|
85
|
+
|
86
|
+
property :name
|
87
|
+
property :slug
|
88
|
+
property :code
|
89
|
+
property :meta_keywords
|
90
|
+
property :meta_description
|
91
|
+
property :description
|
92
|
+
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
@@ -0,0 +1,228 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
module KirguduRefs
|
3
|
+
class Globe::CountriesController < ::KirguduRefs::BaseController
|
4
|
+
|
5
|
+
|
6
|
+
kb_entry_class ::KirguduRefs::Globe::Country
|
7
|
+
|
8
|
+
kb_page :index do
|
9
|
+
list :entries_list do
|
10
|
+
filters do
|
11
|
+
|
12
|
+
filter :continent_id do
|
13
|
+
label "activerecord.attributes.#{::KirguduRefs::Globe::Country.to_i18n}.continent_id"
|
14
|
+
placeholder "#{::KirguduRefs::Globe::CountriesController.to_i18n}.filters.placeholders.choose_continent"
|
15
|
+
input_type :select
|
16
|
+
text_value_property :continent_name
|
17
|
+
data_source do
|
18
|
+
type :db
|
19
|
+
model ::KirguduRefs::Globe::Continent
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
filter :name do
|
25
|
+
label "activerecord.attributes.#{::KirguduRefs::Globe::Country.to_i18n}.name"
|
26
|
+
end
|
27
|
+
filter :iso2 do
|
28
|
+
label "activerecord.attributes.#{::KirguduRefs::Globe::Country.to_i18n}.iso2"
|
29
|
+
end
|
30
|
+
|
31
|
+
filter :slug do
|
32
|
+
label "activerecord.attributes.#{::KirguduRefs::Globe::Country.to_i18n}.slug"
|
33
|
+
end
|
34
|
+
|
35
|
+
filter :currency_id do
|
36
|
+
label "activerecord.attributes.#{::KirguduRefs::Globe::Country.to_i18n}.currency_id"
|
37
|
+
placeholder "#{::KirguduRefs::Globe::CountriesController.to_i18n}.filters.placeholders.choose_currency"
|
38
|
+
text_value_property :currency_name
|
39
|
+
input_type :chosen_select
|
40
|
+
data_source do
|
41
|
+
type :db
|
42
|
+
model ::KirguduRefs::National::Currency
|
43
|
+
end
|
44
|
+
end
|
45
|
+
#filter :capital_id do
|
46
|
+
# label "#{::KirguduRefs::Globe::CountriesController.to_i18n}.filters.labels.capital_id"
|
47
|
+
# placeholder "#{::KirguduRefs::Globe::CountriesController.to_i18n}.filters.placeholders.choose_capital"
|
48
|
+
# input_type :autocomplete_with_id
|
49
|
+
# text_value_property :capital_name
|
50
|
+
# data_source do
|
51
|
+
# http_method :get
|
52
|
+
# type :jquery
|
53
|
+
# model ::KirguduRefs::Globe::City
|
54
|
+
# url_path ::KirguduRefs::Globe::CitiesController, :index
|
55
|
+
# end
|
56
|
+
#end
|
57
|
+
|
58
|
+
filter :area_min do
|
59
|
+
label "#{::KirguduRefs::Globe::CountriesController.to_i18n}.filters.labels.area_min"
|
60
|
+
end
|
61
|
+
filter :area_max do
|
62
|
+
label "#{::KirguduRefs::Globe::CountriesController.to_i18n}.filters.labels.area_max"
|
63
|
+
end
|
64
|
+
filter :population_min do
|
65
|
+
label "#{::KirguduRefs::Globe::CountriesController.to_i18n}.filters.labels.population_min"
|
66
|
+
end
|
67
|
+
filter :population_max do
|
68
|
+
label "#{::KirguduRefs::Globe::CountriesController.to_i18n}.filters.labels.population_max"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
properties do
|
73
|
+
#property :image_id
|
74
|
+
property :continent_id do
|
75
|
+
text_value_property :continent_name
|
76
|
+
end
|
77
|
+
property :name
|
78
|
+
property :slug
|
79
|
+
property :iso2
|
80
|
+
property :iso3
|
81
|
+
property :area
|
82
|
+
property :population
|
83
|
+
property :currency_id do
|
84
|
+
text_value_property :currency_name
|
85
|
+
end
|
86
|
+
property :is_active do
|
87
|
+
text_value_property :is_active_label
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
kb_page :new do
|
94
|
+
form :changes do
|
95
|
+
http_method :post
|
96
|
+
properties do
|
97
|
+
|
98
|
+
property :name
|
99
|
+
property :slug
|
100
|
+
property :iso2
|
101
|
+
property :iso3
|
102
|
+
|
103
|
+
property :continent_id do
|
104
|
+
placeholder "#{::KirguduRefs::Globe::CountriesController.to_i18n}.labels.choose_continent"
|
105
|
+
text_value_property :continent_name
|
106
|
+
text_value_property :continent_name
|
107
|
+
input_type :chosen_select
|
108
|
+
data_source do
|
109
|
+
type :db
|
110
|
+
model ::KirguduRefs::Globe::Continent
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
property :currency_id do
|
115
|
+
placeholder "#{::KirguduRefs::Globe::CountriesController.to_i18n}.labels.choose_currency"
|
116
|
+
text_value_property :currency_name
|
117
|
+
input_type :chosen_select
|
118
|
+
data_source do
|
119
|
+
type :db
|
120
|
+
model ::KirguduRefs::National::Currency
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
property :area
|
125
|
+
property :population
|
126
|
+
property :phone_code
|
127
|
+
property :meta_keywords do
|
128
|
+
input_type :text_area
|
129
|
+
end
|
130
|
+
property :meta_description do
|
131
|
+
input_type :text_area
|
132
|
+
end
|
133
|
+
property :image_id do
|
134
|
+
input_type :image_selector
|
135
|
+
end
|
136
|
+
property :description do
|
137
|
+
input_type :text_area
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
kb_page :edit do
|
145
|
+
form :changes do
|
146
|
+
http_method :patch
|
147
|
+
properties do
|
148
|
+
|
149
|
+
property :name
|
150
|
+
property :slug
|
151
|
+
property :iso2
|
152
|
+
property :iso3
|
153
|
+
|
154
|
+
property :currency_id do
|
155
|
+
placeholder "#{::KirguduRefs::Globe::CountriesController.to_i18n}.labels.choose_currency"
|
156
|
+
text_value_property :currency_name
|
157
|
+
input_type :chosen_select
|
158
|
+
data_source do
|
159
|
+
type :db
|
160
|
+
model ::KirguduRefs::National::Currency
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
property :capital_id do
|
165
|
+
parent :country_id
|
166
|
+
placeholder "#{::KirguduRefs::Globe::CountriesController.to_i18n}.labels.choose_capital"
|
167
|
+
text_value_property :capital_name
|
168
|
+
input_type :autocomplete_with_id
|
169
|
+
data_source do
|
170
|
+
http_method :get
|
171
|
+
type :jquery
|
172
|
+
url_path ::KirguduRefs::Globe::CitiesController, :index
|
173
|
+
model ::KirguduRefs::Globe::City
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
property :area
|
178
|
+
property :population
|
179
|
+
property :phone_code
|
180
|
+
property :meta_keywords do
|
181
|
+
input_type :text_area
|
182
|
+
end
|
183
|
+
property :meta_description do
|
184
|
+
input_type :text_area
|
185
|
+
end
|
186
|
+
property :image_id do
|
187
|
+
input_type :image_selector
|
188
|
+
end
|
189
|
+
property :description do
|
190
|
+
input_type :text_area
|
191
|
+
end
|
192
|
+
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
kb_page :show do
|
198
|
+
entry :show do
|
199
|
+
properties do
|
200
|
+
|
201
|
+
property :name
|
202
|
+
property :slug
|
203
|
+
property :iso2
|
204
|
+
property :iso3
|
205
|
+
|
206
|
+
property :currency_id do
|
207
|
+
text_value_property :currency_name
|
208
|
+
end
|
209
|
+
property :capital_id do
|
210
|
+
text_value_property :capital_name
|
211
|
+
end
|
212
|
+
|
213
|
+
property :area
|
214
|
+
property :population
|
215
|
+
property :phone_code
|
216
|
+
property :meta_keywords
|
217
|
+
property :meta_description
|
218
|
+
property :image_id
|
219
|
+
property :description
|
220
|
+
property :is_active do
|
221
|
+
text_value_property :is_active_label
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
@@ -0,0 +1,321 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
module KirguduRefs
|
3
|
+
class Globe::RegionsController < ::KirguduRefs::BaseController
|
4
|
+
|
5
|
+
kb_entry_class ::KirguduRefs::Globe::Region
|
6
|
+
|
7
|
+
kb_page :index do
|
8
|
+
list :entries_list do
|
9
|
+
filters do
|
10
|
+
filter :country_id do
|
11
|
+
label "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.labels.country_id"
|
12
|
+
placeholder "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.placeholders.choose_country"
|
13
|
+
input_type :chosen_select
|
14
|
+
text_value_property :country_name
|
15
|
+
data_source do
|
16
|
+
type :db
|
17
|
+
model ::KirguduRefs::Globe::Country
|
18
|
+
end
|
19
|
+
end
|
20
|
+
filter :state_id do
|
21
|
+
parent :country_id
|
22
|
+
label "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.labels.country_id"
|
23
|
+
placeholder "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.placeholders.choose_state"
|
24
|
+
input_type :chosen_select
|
25
|
+
text_value_property :state_name
|
26
|
+
data_source do
|
27
|
+
http_method :get
|
28
|
+
type :jquery_db
|
29
|
+
model ::KirguduRefs::Globe::State
|
30
|
+
url_path ::KirguduRefs::Globe::StatesController, :index
|
31
|
+
end
|
32
|
+
end
|
33
|
+
filter :name do
|
34
|
+
label "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.labels.name"
|
35
|
+
end
|
36
|
+
filter :slug do
|
37
|
+
label "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.labels.slug"
|
38
|
+
end
|
39
|
+
filter :area_min do
|
40
|
+
label "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.labels.area_min"
|
41
|
+
end
|
42
|
+
filter :area_max do
|
43
|
+
label "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.labels.area_max"
|
44
|
+
end
|
45
|
+
filter :population_min do
|
46
|
+
label "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.labels.population_min"
|
47
|
+
end
|
48
|
+
filter :population_max do
|
49
|
+
label "#{::KirguduRefs::Globe::RegionsController.to_i18n}.filters.labels.population_max"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
properties do
|
53
|
+
property :country_id do
|
54
|
+
text_value_property :country_name
|
55
|
+
end
|
56
|
+
property :state_id do
|
57
|
+
text_value_property :state_name
|
58
|
+
end
|
59
|
+
property :name
|
60
|
+
property :slug
|
61
|
+
property :capital_id do
|
62
|
+
text_value_property :capital_name
|
63
|
+
end
|
64
|
+
property :area
|
65
|
+
property :population
|
66
|
+
property :is_active do
|
67
|
+
text_value_property :is_active_label
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
|
74
|
+
kb_page :new do
|
75
|
+
form :changes do
|
76
|
+
http_method :post
|
77
|
+
properties do
|
78
|
+
property :country_id do
|
79
|
+
placeholder "#{::KirguduRefs::Globe::RegionsController.to_i18n}.labels.choose_country"
|
80
|
+
input_type :chosen_select
|
81
|
+
text_value_property :country_name
|
82
|
+
data_source do
|
83
|
+
type :db
|
84
|
+
model ::KirguduRefs::Globe::Country
|
85
|
+
end
|
86
|
+
|
87
|
+
events do
|
88
|
+
event :change do
|
89
|
+
kb_if :more, 0 do
|
90
|
+
action :enable do
|
91
|
+
target :state_id
|
92
|
+
end
|
93
|
+
action :disable do
|
94
|
+
target :region_id
|
95
|
+
end
|
96
|
+
|
97
|
+
action :retrieve do
|
98
|
+
target :state_id
|
99
|
+
end
|
100
|
+
end
|
101
|
+
kb_if :is, "" do
|
102
|
+
action :disable do
|
103
|
+
target :state_id
|
104
|
+
end
|
105
|
+
action :disable do
|
106
|
+
target :region_id
|
107
|
+
end
|
108
|
+
action :nullify do
|
109
|
+
:state_id
|
110
|
+
end
|
111
|
+
action :nullify do
|
112
|
+
:region_id
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
property :state_id do
|
120
|
+
parent :country_id
|
121
|
+
placeholder "#{::KirguduRefs::Globe::RegionsController.to_i18n}.labels.choose_state"
|
122
|
+
input_type :chosen_select
|
123
|
+
text_value_property :state_name
|
124
|
+
data_source do
|
125
|
+
http_method :get
|
126
|
+
type :jquery_db
|
127
|
+
data_format :json
|
128
|
+
model ::KirguduRefs::Globe::State
|
129
|
+
url_path ::KirguduRefs::Globe::StatesController, :index
|
130
|
+
end
|
131
|
+
events do
|
132
|
+
event :change do
|
133
|
+
kb_if :more, 0 do
|
134
|
+
action :enable do
|
135
|
+
target :region_id
|
136
|
+
end
|
137
|
+
action :retrieve do
|
138
|
+
target :region_id
|
139
|
+
end
|
140
|
+
end
|
141
|
+
kb_if :is, "" do
|
142
|
+
action :disable do
|
143
|
+
target :region_id
|
144
|
+
end
|
145
|
+
action :nullify do
|
146
|
+
:region_id
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
property :name
|
154
|
+
property :slug
|
155
|
+
|
156
|
+
property :area
|
157
|
+
property :population
|
158
|
+
property :phone_code
|
159
|
+
|
160
|
+
property :coordinates do
|
161
|
+
input_type :text_area
|
162
|
+
end
|
163
|
+
|
164
|
+
property :meta_keywords do
|
165
|
+
input_type :text_area
|
166
|
+
end
|
167
|
+
|
168
|
+
property :meta_description do
|
169
|
+
input_type :text_area
|
170
|
+
end
|
171
|
+
|
172
|
+
property :image_id do
|
173
|
+
input_type :image_selector
|
174
|
+
end
|
175
|
+
|
176
|
+
property :description do
|
177
|
+
input_type :text_area
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
|
184
|
+
kb_page :edit do
|
185
|
+
form :changes do
|
186
|
+
http_method :patch
|
187
|
+
properties do
|
188
|
+
property :country_id do
|
189
|
+
placeholder "#{::KirguduRefs::Globe::RegionsController.to_i18n}.labels.choose_country"
|
190
|
+
input_type :chosen_select
|
191
|
+
text_value_property :country_name
|
192
|
+
data_source do
|
193
|
+
type :db
|
194
|
+
model ::KirguduRefs::Globe::Country
|
195
|
+
end
|
196
|
+
|
197
|
+
events do
|
198
|
+
event :change do
|
199
|
+
kb_if :more, 0 do
|
200
|
+
action :enable do
|
201
|
+
target :state_id
|
202
|
+
end
|
203
|
+
action :disable do
|
204
|
+
target :region_id
|
205
|
+
end
|
206
|
+
|
207
|
+
action :retrieve do
|
208
|
+
target :state_id
|
209
|
+
end
|
210
|
+
end
|
211
|
+
kb_if :is, "" do
|
212
|
+
action :disable do
|
213
|
+
target :state_id
|
214
|
+
end
|
215
|
+
action :disable do
|
216
|
+
target :region_id
|
217
|
+
end
|
218
|
+
action :nullify do
|
219
|
+
:state_id
|
220
|
+
end
|
221
|
+
action :nullify do
|
222
|
+
:region_id
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
property :state_id do
|
230
|
+
parent :country_id
|
231
|
+
placeholder "#{::KirguduRefs::Globe::RegionsController.to_i18n}.labels.choose_state"
|
232
|
+
input_type :chosen_select
|
233
|
+
text_value_property :state_name
|
234
|
+
data_source do
|
235
|
+
http_method :get
|
236
|
+
type :jquery_db
|
237
|
+
data_format :json
|
238
|
+
model ::KirguduRefs::Globe::State
|
239
|
+
url_path ::KirguduRefs::Globe::StatesController, :index
|
240
|
+
end
|
241
|
+
events do
|
242
|
+
event :change do
|
243
|
+
kb_if :more, 0 do
|
244
|
+
action :enable do
|
245
|
+
target :region_id
|
246
|
+
end
|
247
|
+
action :retrieve do
|
248
|
+
target :region_id
|
249
|
+
end
|
250
|
+
end
|
251
|
+
kb_if :is, "" do
|
252
|
+
action :disable do
|
253
|
+
target :region_id
|
254
|
+
end
|
255
|
+
action :nullify do
|
256
|
+
:region_id
|
257
|
+
end
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
|
264
|
+
property :name
|
265
|
+
property :slug
|
266
|
+
|
267
|
+
property :area
|
268
|
+
property :population
|
269
|
+
property :phone_code
|
270
|
+
|
271
|
+
property :coordinates do
|
272
|
+
input_type :text_area
|
273
|
+
end
|
274
|
+
|
275
|
+
property :meta_keywords do
|
276
|
+
input_type :text_area
|
277
|
+
end
|
278
|
+
|
279
|
+
property :meta_description do
|
280
|
+
input_type :text_area
|
281
|
+
end
|
282
|
+
|
283
|
+
property :image_id do
|
284
|
+
input_type :image_selector
|
285
|
+
end
|
286
|
+
|
287
|
+
property :description do
|
288
|
+
input_type :text_area
|
289
|
+
end
|
290
|
+
end
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
|
295
|
+
kb_page :show do
|
296
|
+
entry :show do
|
297
|
+
properties do
|
298
|
+
property :country_id do
|
299
|
+
text_value_property :country_name
|
300
|
+
end
|
301
|
+
property :state_id do
|
302
|
+
text_value_property :state_name
|
303
|
+
end
|
304
|
+
property :name
|
305
|
+
property :slug
|
306
|
+
property :area
|
307
|
+
property :population
|
308
|
+
property :phone_code
|
309
|
+
property :coordinates
|
310
|
+
property :meta_keywords
|
311
|
+
property :meta_description
|
312
|
+
property :image_id
|
313
|
+
property :description
|
314
|
+
property :is_active do
|
315
|
+
text_value_property :is_active_label
|
316
|
+
end
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end
|
321
|
+
end
|