phcdevworks_real_estate 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcdevworks_real_estate/property/features_controller.rb +1 -1
- data/app/controllers/phcdevworks_real_estate/property/listings_controller.rb +1 -1
- data/app/models/phcdevworks_real_estate/property/feature.rb +4 -4
- data/app/models/phcdevworks_real_estate/property/listing.rb +7 -7
- data/app/views/phcdevworks_real_estate/property/features/_form.html.erb +2 -2
- data/app/views/phcdevworks_real_estate/property/features/index.html.erb +1 -1
- data/app/views/phcdevworks_real_estate/property/features/show.html.erb +1 -1
- data/app/views/phcdevworks_real_estate/property/listings/_form.html.erb +36 -36
- data/app/views/phcdevworks_real_estate/property/listings/index.html.erb +5 -5
- data/db/migrate/20190824010811_create_phcdevworks_real_estate_property_listings.rb +20 -20
- data/db/migrate/20190824011000_create_phcdevworks_real_estate_property_features.rb +1 -1
- data/lib/phcdevworks_real_estate/version.rb +1 -1
- 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: ed98e1216a3c57420d8fa5399098a9aa7ace0b31a93a6bc2e7d3df25ecf6368a
|
4
|
+
data.tar.gz: 726acc600db899e9a6098714ed39e7d5201745013a58bdcddf3f00c5c6af6a80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ab7c355c652ea7763c58db49689017602b9cd659106db56d5a95ea93282c271778bc2816ea10f5bb5a19a38d1ec47e9323cb322e2d4b4fbd1804e8310c824ce
|
7
|
+
data.tar.gz: d0aa061e69ed9a48fa72d553b52b078fac2c5bac3935ec94471a29e259299361b6d00a21664a130641baec88a2a4f216ecbdaaefd8671e04e41aa4699221b400
|
@@ -75,7 +75,7 @@ module PhcdevworksRealEstate
|
|
75
75
|
|
76
76
|
# Whitelist
|
77
77
|
def property_listing_params
|
78
|
-
params.require(:property_listing).permit(:
|
78
|
+
params.require(:property_listing).permit(:property_listing_title, :property_listing_description, :property_listing_street_address, :property_listing_price, :property_listing_area, :property_listing_property_area, :property_listing_garage_area, :property_listing_room, :property_listing_bed, :property_listing_bath, :property_listing_garage, :property_listing_type, :property_listing_status, :property_listing_year_built, :property_listing_energy_class, :property_listing_leed_rating, :optimization_id, :slug, :user_id, :org_id, gallery_upload: [], feature_ids: [])
|
79
79
|
end
|
80
80
|
|
81
81
|
end
|
@@ -8,14 +8,14 @@ module PhcdevworksRealEstate
|
|
8
8
|
has_and_belongs_to_many :listings, class_name: 'Phcreallistingspro::Property::Listing', :join_table => 'phcdevworks_real_estate_property_features_listings', :dependent => :destroy
|
9
9
|
|
10
10
|
# Validation for Form Fields
|
11
|
-
validates :
|
11
|
+
validates :property_feature_name,
|
12
12
|
presence: true
|
13
13
|
|
14
14
|
# Clean URL Define
|
15
|
-
friendly_id :
|
15
|
+
friendly_id :property_feature_nice_urls, use: [:slugged, :finders]
|
16
16
|
|
17
|
-
def
|
18
|
-
[:
|
17
|
+
def property_feature_nice_urls
|
18
|
+
[:property_feature_name]
|
19
19
|
end
|
20
20
|
|
21
21
|
end
|
@@ -12,23 +12,23 @@ module PhcdevworksRealEstate
|
|
12
12
|
has_and_belongs_to_many :features, class_name: 'Phcreallistingspro::Property::Feature', :join_table => 'phcdevworks_real_estate_property_features_listings', :dependent => :destroy
|
13
13
|
|
14
14
|
# Validation for Form Fields
|
15
|
-
validates :
|
15
|
+
validates :property_listing_title,
|
16
16
|
presence: true
|
17
17
|
|
18
|
-
validates :
|
18
|
+
validates :property_listing_description,
|
19
19
|
presence: true
|
20
20
|
|
21
|
-
validates :
|
21
|
+
validates :property_listing_street_address,
|
22
22
|
presence: true
|
23
23
|
|
24
|
-
validates :
|
24
|
+
validates :property_listing_price,
|
25
25
|
presence: true
|
26
26
|
|
27
27
|
# Clean URL Define
|
28
|
-
friendly_id :
|
28
|
+
friendly_id :property_listing_nice_urls, use: [:slugged, :finders]
|
29
29
|
|
30
|
-
def
|
31
|
-
[:
|
30
|
+
def property_listing_nice_urls
|
31
|
+
[:property_listing_title]
|
32
32
|
end
|
33
33
|
|
34
34
|
end
|
@@ -7,8 +7,8 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group">
|
10
|
-
<%= phc_pro_property_feature.label :
|
11
|
-
<%= phc_pro_property_feature.text_field :
|
10
|
+
<%= phc_pro_property_feature.label :property_feature_name, "Feature Name" %>
|
11
|
+
<%= phc_pro_property_feature.text_field :property_feature_name, placeholder: "Feature Name", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
<!-- Form Input Fields -->
|
14
14
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<tbody>
|
49
49
|
<% @property_features.each do |property_feature| %>
|
50
50
|
<tr>
|
51
|
-
<td class="highlight"><%= link_to property_feature.
|
51
|
+
<td class="highlight"><%= link_to property_feature.property_feature_name, property_feature %></td>
|
52
52
|
<td>
|
53
53
|
<div class="btn-group d-flex" role="group" aria-label="Property Listings">
|
54
54
|
<%= link_to "Feature Details", property_feature, class: "btn btn-primary btn-xs" %>
|
@@ -7,99 +7,99 @@
|
|
7
7
|
|
8
8
|
<!-- Form Input Fields -->
|
9
9
|
<div class="form-group">
|
10
|
-
<%= form.label :
|
11
|
-
<%= form.text_field :
|
10
|
+
<%= form.label :property_listing_title, "Listing TItle" %>
|
11
|
+
<%= form.text_field :property_listing_title, placeholder: "Listing Title", class: "form-control" %>
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class="form-group">
|
15
|
-
<%= form.label :
|
16
|
-
<%= form.text_area :
|
15
|
+
<%= form.label :property_listing_description, "Listing Description" %>
|
16
|
+
<%= form.text_area :property_listing_description, placeholder: "Listing Description", class: "form-control" %>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div class="form-group">
|
20
|
-
<%= form.label :
|
21
|
-
<%= form.text_field :
|
20
|
+
<%= form.label :property_listing_street_address, "Listing Street Address" %>
|
21
|
+
<%= form.text_field :property_listing_street_address, placeholder: "Listing Street Address", class: "form-control", id: "phc-gmaps-input-address" %>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class="form-group">
|
25
|
-
<%= form.label :
|
26
|
-
<%= form.text_field :
|
25
|
+
<%= form.label :property_listing_price, "Listing Price" %>
|
26
|
+
<%= form.text_field :property_listing_price, placeholder: "Listing Price", class: "form-control" %>
|
27
27
|
</div>
|
28
28
|
|
29
29
|
<hr>
|
30
30
|
|
31
31
|
<div class="form-group">
|
32
|
-
<%= form.label :
|
33
|
-
<%= form.text_field :
|
32
|
+
<%= form.label :property_listing_area, "Listing Area" %>
|
33
|
+
<%= form.text_field :property_listing_area, placeholder: "Listing Area", class: "form-control" %>
|
34
34
|
</div>
|
35
35
|
|
36
36
|
<div class="form-group">
|
37
|
-
<%= form.label :
|
38
|
-
<%= form.text_field :
|
37
|
+
<%= form.label :property_listing_property_area, "Listing Property Area" %>
|
38
|
+
<%= form.text_field :property_listing_property_area, placeholder: "Listing Property Area", class: "form-control" %>
|
39
39
|
</div>
|
40
40
|
|
41
41
|
<div class="form-group">
|
42
|
-
<%= form.label :
|
43
|
-
<%= form.text_field :
|
42
|
+
<%= form.label :property_listing_garage_area, "Listing Garage Area" %>
|
43
|
+
<%= form.text_field :property_listing_garage_area, placeholder: "Listing Garage Area", class: "form-control" %>
|
44
44
|
</div>
|
45
45
|
|
46
46
|
<hr>
|
47
47
|
|
48
48
|
<div class="form-group">
|
49
|
-
<%= form.label :
|
50
|
-
<%= form.select(:
|
49
|
+
<%= form.label :property_isting_room, "Listing How Many Rooms" %>
|
50
|
+
<%= form.select(:property_listing_room, ["1","2","3","4","5","6","7+"], {}, { :class => "form-control" }) %>
|
51
51
|
</div>
|
52
52
|
|
53
53
|
<div class="form-group">
|
54
|
-
<%= form.label :
|
55
|
-
<%= form.select(:
|
54
|
+
<%= form.label :property_listing_bed, "Listing How Many Bedrooms" %>
|
55
|
+
<%= form.select(:property_listing_bed, ["1","2","3","4","5","6","7+"], {}, { :class => "form-control" }) %>
|
56
56
|
</div>
|
57
57
|
|
58
58
|
<div class="form-group">
|
59
|
-
<%= form.label :
|
60
|
-
<%= form.select(:
|
59
|
+
<%= form.label :property_listing_bath, "Listing How Many Bathrooms" %>
|
60
|
+
<%= form.select(:property_listing_bath, ["1","2","3","4+"], {}, { :class => "form-control" }) %>
|
61
61
|
</div>
|
62
62
|
|
63
63
|
<div class="form-group">
|
64
|
-
<%= form.label :
|
65
|
-
<%= form.select(:
|
64
|
+
<%= form.label :property_listing_garage, "Listing Garage" %>
|
65
|
+
<%= form.select(:property_listing_garage, ["1 Car","2 Cars","3 Cars","4+ Cars"], {}, { :class => "form-control" }) %>
|
66
66
|
</div>
|
67
67
|
|
68
68
|
<hr>
|
69
69
|
|
70
70
|
<div class="form-group">
|
71
|
-
<%= form.label :
|
72
|
-
<%= form.select(:
|
71
|
+
<%= form.label :property_listing_type, "Listing Type" %>
|
72
|
+
<%= form.select(:property_listing_type, ["House","Condominium","Cottage","Land"], {}, { :class => "form-control" }) %>
|
73
73
|
</div>
|
74
74
|
|
75
75
|
<div class="form-group">
|
76
|
-
<%= form.label :
|
77
|
-
<%= form.select(:
|
76
|
+
<%= form.label :property_listing_status, "Listing Status" %>
|
77
|
+
<%= form.select(:property_listing_status, ["For Sale","Sold"], {}, { :class => "form-control" }) %>
|
78
78
|
</div>
|
79
79
|
|
80
80
|
<div class="form-group">
|
81
|
-
<%= form.label :
|
82
|
-
<%= form.select(:
|
81
|
+
<%= form.label :property_listing_year_built, "" %>
|
82
|
+
<%= form.select(:property_listing_year_built, ["1990","2018"], {}, { :class => "form-control" }) %>
|
83
83
|
</div>
|
84
84
|
|
85
85
|
<div class="form-group">
|
86
|
-
<%= form.label :
|
87
|
-
<%= form.select(:
|
86
|
+
<%= form.label :property_listing_energy_class, "Listing Energy Class" %>
|
87
|
+
<%= form.select(:property_listing_energy_class, ["A","B"], {}, { :class => "form-control" }) %>
|
88
88
|
</div>
|
89
89
|
|
90
90
|
<div class="form-group">
|
91
|
-
<%= form.label :
|
92
|
-
<%= form.select(:
|
91
|
+
<%= form.label :property_listing_leed_rating, "Listing LEED Rating" %>
|
92
|
+
<%= form.select(:property_listing_leed_rating, ["Certified","Silver", "Gold", ""], {}, { :class => "form-control" }) %>
|
93
93
|
</div>
|
94
94
|
|
95
95
|
<div class="form-group">
|
96
|
-
<%= form.label :
|
97
|
-
<%= form.file_field :
|
96
|
+
<%= form.label :property_listing_upload, "" %>
|
97
|
+
<%= form.file_field :property_listing_upload, placeholder: "", class: "form-control" %>
|
98
98
|
</div>
|
99
99
|
|
100
100
|
<div class="form-group">
|
101
|
-
<%= form.label :
|
102
|
-
<%= form.file_field :
|
101
|
+
<%= form.label :property_gallery_upload, "" %>
|
102
|
+
<%= form.file_field :property_gallery_upload, multiple: true , placeholder: "", class: "form-control" %>
|
103
103
|
</div>
|
104
104
|
<!-- Form Input Fields -->
|
105
105
|
|
@@ -52,11 +52,11 @@
|
|
52
52
|
<tbody>
|
53
53
|
<% @property_listings.each do |property_listing| %>
|
54
54
|
<tr>
|
55
|
-
<td><%= property_listing.
|
56
|
-
<td><%= property_listing.
|
57
|
-
<td><%= property_listing.
|
58
|
-
<td><%= property_listing.
|
59
|
-
<td><%= property_listing.
|
55
|
+
<td><%= property_listing.property_listing_title %></td>
|
56
|
+
<td><%= property_listing.property_listing_price %></td>
|
57
|
+
<td><%= property_listing.property_listing_year_built %></td>
|
58
|
+
<td><%= property_listing.property_listing_type %></td>
|
59
|
+
<td><%= property_listing.property_listing_status %></td>
|
60
60
|
<td>
|
61
61
|
<div class="btn-group d-flex" role="group" aria-label="Property Listings">
|
62
62
|
<%= link_to "Listing Details", property_listing, class: "btn btn-primary btn-xs" %>
|
@@ -2,26 +2,26 @@ class CreatePhcdevworksRealEstatePropertyListings < ActiveRecord::Migration[6.0]
|
|
2
2
|
def change
|
3
3
|
create_table :phcdevworks_real_estate_property_listings do |t|
|
4
4
|
|
5
|
-
t.string :
|
6
|
-
t.text :
|
7
|
-
t.string :
|
8
|
-
t.string :
|
9
|
-
|
10
|
-
t.string :
|
11
|
-
t.string :
|
12
|
-
t.string :
|
13
|
-
|
14
|
-
t.string :
|
15
|
-
t.string :
|
16
|
-
t.string :
|
17
|
-
t.string :
|
18
|
-
|
19
|
-
t.string :
|
20
|
-
t.string :
|
21
|
-
|
22
|
-
t.string :
|
23
|
-
t.string :
|
24
|
-
t.string :
|
5
|
+
t.string :property_listing_title
|
6
|
+
t.text :property_listing_description
|
7
|
+
t.string :property_listing_street_address
|
8
|
+
t.string :property_listing_price
|
9
|
+
|
10
|
+
t.string :property_listing_area
|
11
|
+
t.string :property_listing_property_area
|
12
|
+
t.string :property_listing_garage_area
|
13
|
+
|
14
|
+
t.string :property_listing_room
|
15
|
+
t.string :property_listing_bed
|
16
|
+
t.string :property_listing_bath
|
17
|
+
t.string :property_listing_garage
|
18
|
+
|
19
|
+
t.string :property_listing_type
|
20
|
+
t.string :property_listing_status
|
21
|
+
|
22
|
+
t.string :property_listing_year_built
|
23
|
+
t.string :property_listing_energy_class
|
24
|
+
t.string :property_listing_leed_rating
|
25
25
|
|
26
26
|
t.string :optimization_id
|
27
27
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_real_estate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|