c80_map_floors 0.2.0.8 → 0.2.1
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/.gitignore +1 -0
- data/.rspec +1 -0
- data/Gemfile +10 -0
- data/Guardfile +59 -0
- data/app/assets/javascripts/lib/awesomplete.js +1 -1
- data/app/assets/stylesheets/lib/awesomplete.scss +4 -0
- data/app/controllers/c80_map_floors/ajax_controller.rb +5 -64
- data/app/controllers/c80_map_floors/application_controller.rb +1 -1
- data/app/helpers/c80_map_floors/ajax_helper.rb +138 -0
- data/app/helpers/c80_map_floors/application_helper.rb +19 -0
- data/app/views/c80_map_floors/_map_row_index.html.erb +1 -1
- data/app/views/c80_map_floors/shared/map_row/_search_gui.html.erb +1 -1
- data/bin/rails +12 -0
- data/c80_map_floors.gemspec +8 -0
- data/custom_plan.rb +11 -0
- data/lib/c80_map_floors/version.rb +1 -1
- data/zeus.json +13 -0
- metadata +64 -3
- data/app/helpers/c80_map_floors/search_gui_helper.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6203902100f1bcf658b845977cb33e441d462c79
|
4
|
+
data.tar.gz: b105046880ac029a1c8e7304dcb865a50ff7f646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6e836632b002192d876ffab35015ed9aed1492d0177833963be0d4d2c87866032a1870d1442e53bb5324c2e58b77fb8caa6f27f19b84a9587c6285e6ca1a644
|
7
|
+
data.tar.gz: ec59d93f87393df58149a5d549b52247f5abf19326a4ef7152aba6a2ffe13ea50f8962497c87ac8ed4d3697d4eb1e2a9de4fc443f6ce6aa87f088a4ba7ebf093
|
data/.gitignore
CHANGED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/Gemfile
CHANGED
data/Guardfile
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features) \
|
6
|
+
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
+
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
+
#
|
12
|
+
# $ mkdir config
|
13
|
+
# $ mv Guardfile config/
|
14
|
+
# $ ln -s config/Guardfile .
|
15
|
+
#
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
+
|
18
|
+
guard 'zeus' do
|
19
|
+
require 'ostruct'
|
20
|
+
|
21
|
+
rspec = OpenStruct.new
|
22
|
+
rspec.spec_dir = 'spec'
|
23
|
+
rspec.spec = ->(m) { "#{rspec.spec_dir}/#{m}_spec.rb" }
|
24
|
+
rspec.spec_helper = "#{rspec.spec_dir}/spec_helper.rb"
|
25
|
+
|
26
|
+
# matchers
|
27
|
+
rspec.spec_files = /^#{rspec.spec_dir}\/.+_spec\.rb$/
|
28
|
+
|
29
|
+
# Ruby apps
|
30
|
+
ruby = OpenStruct.new
|
31
|
+
ruby.lib_files = /^(lib\/.+)\.rb$/
|
32
|
+
|
33
|
+
watch(rspec.spec_files)
|
34
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
35
|
+
watch(ruby.lib_files) { |m| rspec.spec.call(m[1]) }
|
36
|
+
|
37
|
+
# Rails example
|
38
|
+
rails = OpenStruct.new
|
39
|
+
rails.app_files = /^app\/(.+)\.rb$/
|
40
|
+
rails.views_n_layouts = /^app\/(.+(?:\.erb|\.haml|\.slim))$/
|
41
|
+
rails.controllers = %r{^app/controllers/(.+)_controller\.rb$}
|
42
|
+
|
43
|
+
watch(rails.app_files) { |m| rspec.spec.call(m[1]) }
|
44
|
+
watch(rails.views_n_layouts) { |m| rspec.spec.call(m[1]) }
|
45
|
+
watch(rails.controllers) do |m|
|
46
|
+
[
|
47
|
+
# rspec.spec.call("routing/#{m[1]}_routing"),
|
48
|
+
rspec.spec.call("controllers/#{m[1]}_controller"),
|
49
|
+
# rspec.spec.call("acceptance/#{m[1]}")
|
50
|
+
]
|
51
|
+
end
|
52
|
+
|
53
|
+
# TestUnit
|
54
|
+
# watch(%r|^test/(.*)_test\.rb$|)
|
55
|
+
# watch(%r|^lib/(.*)([^/]+)\.rb$|) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
56
|
+
# watch(%r|^test/test_helper\.rb$|) { "test" }
|
57
|
+
# watch(%r|^app/controllers/(.*)\.rb$|) { |m| "test/functional/#{m[1]}_test.rb" }
|
58
|
+
# watch(%r|^app/models/(.*)\.rb$|) { |m| "test/unit/#{m[1]}_test.rb" }
|
59
|
+
end
|
@@ -4,6 +4,8 @@ module C80MapFloors
|
|
4
4
|
# noinspection RubyResolve
|
5
5
|
class AjaxController < ApplicationController
|
6
6
|
|
7
|
+
include AjaxHelper
|
8
|
+
|
7
9
|
def map_edit_buttons
|
8
10
|
# puts "<AjaxController.map_edit_buttons> #{params}"
|
9
11
|
end
|
@@ -129,71 +131,10 @@ module C80MapFloors
|
|
129
131
|
|
130
132
|
result = SearchResult.new
|
131
133
|
|
132
|
-
|
133
|
-
|
134
|
-
if cats.count > 0
|
135
|
-
# работаем только с первой попавшейся категорией
|
136
|
-
cat = cats[0]
|
137
|
-
|
138
|
-
# если у категории имеются связанные магазины
|
139
|
-
if cat.leasers.count > 0
|
140
|
-
|
141
|
-
# переберём их
|
142
|
-
cat.leasers.each do |shop|
|
143
|
-
|
144
|
-
# добираемся до Rent::Area каждого магазина
|
145
|
-
if shop.areas.count > 0
|
146
|
-
|
147
|
-
shop.areas.each do |rent_area|
|
148
|
-
|
149
|
-
# если у Rent::Area имеется связанный полигон
|
150
|
-
if rent_area.area.present? # has_one
|
151
|
-
|
152
|
-
map_area = rent_area.area
|
153
|
-
|
154
|
-
# NOTE:: теперь, зная C80MapFloors::Area.id, находим id полигона этажа и id полигона здания
|
155
|
-
|
156
|
-
Rails.logger.debug "[TRACE] <AjaxController.find_shops> add_area: #{map_area.id}"
|
157
|
-
# result[:areas] << rent_area.area.id
|
158
|
-
result.add_area(map_area.id)
|
159
|
-
|
160
|
-
# посмотрим, имеется ли у полигона площади родители
|
161
|
-
if map_area.floor.present?
|
162
|
-
|
163
|
-
map_floor = map_area.floor
|
164
|
-
Rails.logger.debug "[TRACE] <AjaxController.find_shops> add_floor: #{map_floor.id}"
|
165
|
-
result.add_floor(map_floor.id)
|
166
|
-
|
167
|
-
if map_floor.map_building.present?
|
168
|
-
Rails.logger.debug "[TRACE] <AjaxController.find_shops> add_building: #{map_floor.map_building}"
|
169
|
-
result.add_building(map_floor.map_building.id)
|
170
|
-
else
|
171
|
-
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У Rent::Area нет родителей: #{rent_area.name}"
|
172
|
-
end
|
173
|
-
|
174
|
-
else
|
175
|
-
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У полигона площади нет родителей: #{rent_area.name}"
|
176
|
-
end
|
177
|
-
|
178
|
-
|
179
|
-
else
|
180
|
-
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У Rent::Area нет полигона: #{rent_area.name}"
|
181
|
-
end
|
182
|
-
|
183
|
-
end
|
184
|
-
|
185
|
-
else
|
186
|
-
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У магазина нет Rent::Area: #{shop.name}"
|
187
|
-
end
|
188
|
-
|
189
|
-
end
|
190
|
-
|
191
|
-
else
|
192
|
-
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У этой категории нет магазинов: #{params[:stext]}"
|
193
|
-
end
|
194
|
-
|
134
|
+
if params[:stext][' (магазин)']
|
135
|
+
find_areas_by_shop!(result, params[:stext])
|
195
136
|
else
|
196
|
-
|
137
|
+
find_areas_by_category!(result, params[:stext])
|
197
138
|
end
|
198
139
|
|
199
140
|
Rails.logger.debug "[TRACE] <AjaxController.find_shops> Отправляем ответ: result = #{result.data}"
|
@@ -0,0 +1,138 @@
|
|
1
|
+
module C80MapFloors
|
2
|
+
module AjaxHelper
|
3
|
+
|
4
|
+
def find_areas_by_category!(result, stext)
|
5
|
+
# 1. Находим категорию, title которой равен строке.
|
6
|
+
cats = ::Category.where(:name => stext)
|
7
|
+
if cats.count > 0
|
8
|
+
# работаем только с первой попавшейся категорией
|
9
|
+
cat = cats[0]
|
10
|
+
|
11
|
+
# если у категории имеются связанные магазины
|
12
|
+
if cat.leasers.count > 0
|
13
|
+
|
14
|
+
# переберём их
|
15
|
+
cat.leasers.each do |shop|
|
16
|
+
|
17
|
+
# добираемся до Rent::Area каждого магазина
|
18
|
+
if shop.areas.count > 0
|
19
|
+
|
20
|
+
shop.areas.each do |rent_area|
|
21
|
+
|
22
|
+
# если у Rent::Area имеется связанный полигон
|
23
|
+
if rent_area.area.present? # has_one
|
24
|
+
|
25
|
+
map_area = rent_area.area
|
26
|
+
|
27
|
+
# NOTE:: теперь, зная C80MapFloors::Area.id, находим id полигона этажа и id полигона здания
|
28
|
+
|
29
|
+
Rails.logger.debug "[TRACE] <AjaxController.find_shops> add_area: #{map_area.id}"
|
30
|
+
# result[:areas] << rent_area.area.id
|
31
|
+
result.add_area(map_area.id)
|
32
|
+
|
33
|
+
# посмотрим, имеется ли у полигона площади родители
|
34
|
+
if map_area.floor.present?
|
35
|
+
|
36
|
+
map_floor = map_area.floor
|
37
|
+
Rails.logger.debug "[TRACE] <AjaxController.find_shops> add_floor: #{map_floor.id}"
|
38
|
+
result.add_floor(map_floor.id)
|
39
|
+
|
40
|
+
if map_floor.map_building.present?
|
41
|
+
Rails.logger.debug "[TRACE] <AjaxController.find_shops> add_building: #{map_floor.map_building}"
|
42
|
+
result.add_building(map_floor.map_building.id)
|
43
|
+
else
|
44
|
+
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У Rent::Area нет родителей: #{rent_area.name}"
|
45
|
+
end
|
46
|
+
|
47
|
+
else
|
48
|
+
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У полигона площади нет родителей: #{rent_area.name}"
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
else
|
53
|
+
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У Rent::Area нет полигона: #{rent_area.name}"
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
else
|
59
|
+
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У магазина нет Rent::Area: #{shop.name}"
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
else
|
65
|
+
Rails.logger.debug "[TRACE] <AjaxController.find_shops> У этой категории нет магазинов: #{stext}"
|
66
|
+
end
|
67
|
+
|
68
|
+
else
|
69
|
+
Rails.logger.debug "[TRACE] <AjaxController.find_shops> Нет категории с таким именем = #{stext}"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def find_areas_by_shop!(result, stext)
|
74
|
+
shop_name = stext.gsub(' (магазин)','')
|
75
|
+
shops = ::Leaser.where(:name => shop_name)
|
76
|
+
Rails.logger.debug "[TRACE] <AjaxHelper> shops.count = #{shops.count}"
|
77
|
+
|
78
|
+
if shops.count > 0
|
79
|
+
# работаем только с первым попавшимся магазином
|
80
|
+
shop = shops[0]
|
81
|
+
|
82
|
+
_process_shop_areas!(result, shop)
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
private
|
89
|
+
|
90
|
+
def _process_shop_areas!(result, shop)
|
91
|
+
# добираемся до Rent::Area каждого магазина
|
92
|
+
if shop.areas.count > 0
|
93
|
+
|
94
|
+
shop.areas.each do |rent_area|
|
95
|
+
|
96
|
+
# если у Rent::Area имеется связанный полигон
|
97
|
+
if rent_area.area.present? # has_one
|
98
|
+
|
99
|
+
map_area = rent_area.area
|
100
|
+
|
101
|
+
# NOTE:: теперь, зная C80MapFloors::Area.id, находим id полигона этажа и id полигона здания
|
102
|
+
|
103
|
+
Rails.logger.debug "[TRACE] <AjaxHelper._process_shop_areas!> add_area: #{map_area.id}"
|
104
|
+
# result[:areas] << rent_area.area.id
|
105
|
+
result.add_area(map_area.id)
|
106
|
+
|
107
|
+
# посмотрим, имеется ли у полигона площади родители
|
108
|
+
if map_area.floor.present?
|
109
|
+
|
110
|
+
map_floor = map_area.floor
|
111
|
+
Rails.logger.debug "[TRACE] <AjaxHelper._process_shop_areas!> add_floor: #{map_floor.id}"
|
112
|
+
result.add_floor(map_floor.id)
|
113
|
+
|
114
|
+
if map_floor.map_building.present?
|
115
|
+
Rails.logger.debug "[TRACE] <AjaxHelper._process_shop_areas!> add_building: #{map_floor.map_building}"
|
116
|
+
result.add_building(map_floor.map_building.id)
|
117
|
+
else
|
118
|
+
Rails.logger.debug "[TRACE] <AjaxHelper._process_shop_areas!> У Rent::Area нет родителей: #{rent_area.name}"
|
119
|
+
end
|
120
|
+
|
121
|
+
else
|
122
|
+
Rails.logger.debug "[TRACE] <AjaxHelper._process_shop_areas!> У полигона площади нет родителей: #{rent_area.name}"
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
else
|
127
|
+
Rails.logger.debug "[TRACE] <AjaxHelper._process_shop_areas!> У Rent::Area нет полигона: #{rent_area.name}"
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
132
|
+
else
|
133
|
+
Rails.logger.debug "[TRACE] <AjaxHelper._process_shop_areas!> У магазина нет Rent::Area: #{shop.name}"
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
end
|
138
|
+
end
|
@@ -24,5 +24,24 @@ module C80MapFloors
|
|
24
24
|
|
25
25
|
end
|
26
26
|
|
27
|
+
# рендер поисковой формы, которая видна сверху поцентру в слое над картой
|
28
|
+
# noinspection RubyResolve
|
29
|
+
def render_search_input
|
30
|
+
|
31
|
+
# NOTE:: названия всех категорий в алфавитном порядке через запятую в одну строку возьмём из HOST-приложения
|
32
|
+
cl = ::Category.filled_cats.map { |c| c.name }.join(', ')
|
33
|
+
|
34
|
+
# NOTE:: названия всех магазинов, у которых есть площадь, через запятую в одну строку возьмём из HOST-приложения
|
35
|
+
sl = ::Leaser.assigned_to_areas.map { |e| e }.join(' (магазин), ')
|
36
|
+
sl = "#{sl} (магазин)" # про последний элемент не забудем
|
37
|
+
|
38
|
+
render :partial => 'c80_map_floors/shared/map_row/search_gui',
|
39
|
+
:locals => {
|
40
|
+
# categories_list: categories_list
|
41
|
+
categories_list: [cl, sl].join(', ')
|
42
|
+
}
|
43
|
+
|
44
|
+
end
|
45
|
+
|
27
46
|
end
|
28
47
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div id="search_gui">
|
4
4
|
<form class="navbar-form" role="form">
|
5
5
|
<div class="form-group">
|
6
|
-
<input placeholder="Введите название
|
6
|
+
<input placeholder="Введите название товара или магазина, который вас интересует" class="form-control awesomplete" type="text" data-list="<%= categories_list %>">
|
7
7
|
</div>
|
8
8
|
<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i></button>
|
9
9
|
</form>
|
data/bin/rails
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
3
|
+
|
4
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
+
ENGINE_PATH = File.expand_path('../../lib/c80_map_floors/engine', __FILE__)
|
6
|
+
|
7
|
+
# Set up gems listed in the Gemfile.
|
8
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
9
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
10
|
+
|
11
|
+
require 'rails/all'
|
12
|
+
require 'rails/engine/commands'
|
data/c80_map_floors.gemspec
CHANGED
@@ -25,4 +25,12 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'bootstrap-sass', '~> 3.3.4'
|
26
26
|
spec.add_dependency 'bootstrap-select-rails'
|
27
27
|
spec.add_dependency 'historyjs-rails'
|
28
|
+
spec.add_development_dependency 'friendly_id'
|
29
|
+
spec.add_development_dependency 'babosa'
|
30
|
+
spec.add_development_dependency 'mysql2'
|
31
|
+
spec.add_development_dependency 'rails'
|
32
|
+
# spec.add_development_dependency 'rspec-rails'
|
33
|
+
# spec.add_development_dependency 'guard'
|
34
|
+
# spec.add_development_dependency 'guard-rspec'
|
35
|
+
# spec.add_development_dependency 'guard-zeus'
|
28
36
|
end
|
data/custom_plan.rb
ADDED
data/zeus.json
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_map_floors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,62 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: friendly_id
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: babosa
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: mysql2
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rails
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
97
153
|
description: Map + map editor
|
98
154
|
email:
|
99
155
|
- c080609a@gmail.com
|
@@ -102,9 +158,11 @@ extensions: []
|
|
102
158
|
extra_rdoc_files: []
|
103
159
|
files:
|
104
160
|
- ".gitignore"
|
161
|
+
- ".rspec"
|
105
162
|
- ".travis.yml"
|
106
163
|
- CODE_OF_CONDUCT.md
|
107
164
|
- Gemfile
|
165
|
+
- Guardfile
|
108
166
|
- LICENSE.txt
|
109
167
|
- README.md
|
110
168
|
- Rakefile
|
@@ -168,9 +226,9 @@ files:
|
|
168
226
|
- app/controllers/c80_map_floors/ajax_controller.rb
|
169
227
|
- app/controllers/c80_map_floors/application_controller.rb
|
170
228
|
- app/controllers/c80_map_floors/map_ajax_controller.rb
|
229
|
+
- app/helpers/c80_map_floors/ajax_helper.rb
|
171
230
|
- app/helpers/c80_map_floors/application_helper.rb
|
172
231
|
- app/helpers/c80_map_floors/model_floor_helper.rb
|
173
|
-
- app/helpers/c80_map_floors/search_gui_helper.rb
|
174
232
|
- app/models/c80_map_floors/area.rb
|
175
233
|
- app/models/c80_map_floors/area_representator.rb
|
176
234
|
- app/models/c80_map_floors/base_map_object.rb
|
@@ -203,10 +261,12 @@ files:
|
|
203
261
|
- app/views/c80_map_floors/shared/map_row/_building_info_old.html.erb
|
204
262
|
- app/views/c80_map_floors/shared/map_row/_search_gui.html.erb
|
205
263
|
- bin/console
|
264
|
+
- bin/rails
|
206
265
|
- bin/setup
|
207
266
|
- bounding_box.jpg
|
208
267
|
- c80_map_floors.gemspec
|
209
268
|
- config/routes.rb
|
269
|
+
- custom_plan.rb
|
210
270
|
- db/migrate/20161015190000_create_c80_map_floors_settings.rb
|
211
271
|
- db/migrate/20161015190001_create_c80_map_floors_map_buildings.rb
|
212
272
|
- db/migrate/20161015190002_create_c80_map_floors_areas.rb
|
@@ -223,6 +283,7 @@ files:
|
|
223
283
|
- lib/integer.rb
|
224
284
|
- lib/search_result.rb
|
225
285
|
- map_padding_tuning.jpg
|
286
|
+
- zeus.json
|
226
287
|
homepage: http://www.vorsa-park.ru
|
227
288
|
licenses:
|
228
289
|
- MIT
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module C80MapFloors
|
2
|
-
module SearchGuiHelper
|
3
|
-
|
4
|
-
# рендер поисковой формы, которая видна сверху поцентру в слое над картой
|
5
|
-
# noinspection RubyResolve
|
6
|
-
def render_search_gui
|
7
|
-
|
8
|
-
# NOTE:: названия всех категорий в алфавитном порядке через запятую в одну строку возьмём из HOST-приложения
|
9
|
-
categories_list = ::Category.filled_cats.map { |c| c.name }.join(', ')
|
10
|
-
|
11
|
-
render :partial => 'c80_map_floors/shared/map_row/search_gui',
|
12
|
-
:locals => {
|
13
|
-
categories_list: categories_list
|
14
|
-
}
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|