phcdevworks_real_estate 1.1.0 → 1.1.1
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 +4 -3
- data/app/controllers/phcdevworks_real_estate/property/listings_controller.rb +4 -3
- data/app/models/phcdevworks_real_estate/property/feature.rb +10 -0
- data/app/models/phcdevworks_real_estate/property/listing.rb +10 -0
- data/app/views/phcdevworks_real_estate/property/features/_form.html.erb +1 -1
- data/app/views/phcdevworks_real_estate/property/listings/_form.html.erb +10 -10
- 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: cd94feb0e505233ecf32975573d654d1fa7f4a86d5174822e72615862f80fde5
|
4
|
+
data.tar.gz: 19986a774456fd14cbc0406807215df4ec2eaf218bbf068bcc43c738a5bc1299
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e5b21b8ced91920f10b8fb1227f0e4f3e1e4eb8eff8e0fa23df7e71d391473a7c71736af9780be32429fc8df7f03ca5dd90d86c143fdbfd804dc2a42bb176c2
|
7
|
+
data.tar.gz: 37a555aac903d90a9fda68e0544c8ac7433000c3b86323cd7ab6306368bbe921900f926ed693866d1cdc90920f3221d3404d86c02c9bdd0d58abc4e54d0fc843
|
@@ -16,6 +16,7 @@ module PhcdevworksRealEstate
|
|
16
16
|
|
17
17
|
# GET /property/features/1
|
18
18
|
def show
|
19
|
+
@property_feature = Property::Feature.friendly.find(params[:id])
|
19
20
|
end
|
20
21
|
|
21
22
|
# GET /property/features/new
|
@@ -34,7 +35,7 @@ module PhcdevworksRealEstate
|
|
34
35
|
@property_feature.org_id = current_user.org_id
|
35
36
|
respond_to do |format|
|
36
37
|
if @property_feature.save
|
37
|
-
format.html { redirect_to property_features_path, :flash => { :success => '
|
38
|
+
format.html { redirect_to property_features_path, :flash => { :success => 'Property Feature has been Added.' }}
|
38
39
|
format.json { render :show, status: :created, location: @property_feature }
|
39
40
|
else
|
40
41
|
format.html { render :new }
|
@@ -60,7 +61,7 @@ module PhcdevworksRealEstate
|
|
60
61
|
def destroy
|
61
62
|
@property_feature.destroy
|
62
63
|
respond_to do |format|
|
63
|
-
format.html { redirect_to property_features_path, :flash => { :error => '
|
64
|
+
format.html { redirect_to property_features_path, :flash => { :error => 'Property Feature has been Removed.' }}
|
64
65
|
format.json { head :no_content }
|
65
66
|
end
|
66
67
|
end
|
@@ -69,7 +70,7 @@ module PhcdevworksRealEstate
|
|
69
70
|
|
70
71
|
# Callbacks
|
71
72
|
def set_property_feature
|
72
|
-
@property_feature = Property::Feature.find(params[:id])
|
73
|
+
@property_feature = Property::Feature.friendly.find(params[:id])
|
73
74
|
end
|
74
75
|
|
75
76
|
# Whitelist
|
@@ -16,6 +16,7 @@ module PhcdevworksRealEstate
|
|
16
16
|
|
17
17
|
# GET /property/listings/1
|
18
18
|
def show
|
19
|
+
@property_listing = Property::Listing.friendly.find(params[:id])
|
19
20
|
end
|
20
21
|
|
21
22
|
# GET /property/listings/new
|
@@ -34,7 +35,7 @@ module PhcdevworksRealEstate
|
|
34
35
|
@property_listing.org_id = current_user.org_id
|
35
36
|
respond_to do |format|
|
36
37
|
if @property_listing.save
|
37
|
-
format.html { redirect_to property_listings_path, :flash => { :success => '
|
38
|
+
format.html { redirect_to property_listings_path, :flash => { :success => 'Property Listing has been Added.' }}
|
38
39
|
format.json { render :show, status: :created, location: @property_listing }
|
39
40
|
else
|
40
41
|
format.html { render :new }
|
@@ -60,7 +61,7 @@ module PhcdevworksRealEstate
|
|
60
61
|
def destroy
|
61
62
|
@property_listing.destroy
|
62
63
|
respond_to do |format|
|
63
|
-
format.html { redirect_to property_listings_path, :flash => { :error => '
|
64
|
+
format.html { redirect_to property_listings_path, :flash => { :error => 'Property Listing has been Removed.' }}
|
64
65
|
format.json { head :no_content }
|
65
66
|
end
|
66
67
|
end
|
@@ -69,7 +70,7 @@ module PhcdevworksRealEstate
|
|
69
70
|
|
70
71
|
# Callbacks
|
71
72
|
def set_property_listing
|
72
|
-
@property_listing = Property::Listing.find(params[:id])
|
73
|
+
@property_listing = Property::Listing.friendly.find(params[:id])
|
73
74
|
end
|
74
75
|
|
75
76
|
# Whitelist
|
@@ -1,6 +1,9 @@
|
|
1
1
|
module PhcdevworksRealEstate
|
2
2
|
class Property::Feature < ApplicationRecord
|
3
3
|
|
4
|
+
# Clean URL Initialize
|
5
|
+
extend FriendlyId
|
6
|
+
|
4
7
|
# Relationships
|
5
8
|
has_and_belongs_to_many :listings, class_name: 'Phcreallistingspro::Property::Listing', :join_table => 'features_listings'
|
6
9
|
|
@@ -8,5 +11,12 @@ module PhcdevworksRealEstate
|
|
8
11
|
validates :feature_name,
|
9
12
|
presence: true
|
10
13
|
|
14
|
+
# Clean URL Define
|
15
|
+
friendly_id :phcdev_property_feature_nice_urls, use: [:slugged, :finders]
|
16
|
+
|
17
|
+
def phcdev_property_feature_nice_urls
|
18
|
+
[:feature_name]
|
19
|
+
end
|
20
|
+
|
11
21
|
end
|
12
22
|
end
|
@@ -1,6 +1,9 @@
|
|
1
1
|
module PhcdevworksRealEstate
|
2
2
|
class Property::Listing < ApplicationRecord
|
3
3
|
|
4
|
+
# Clean URL Initialize
|
5
|
+
extend FriendlyId
|
6
|
+
|
4
7
|
# Image Uploading
|
5
8
|
has_one_attached :listing_upload
|
6
9
|
has_many_attached :gallery_upload
|
@@ -21,5 +24,12 @@ module PhcdevworksRealEstate
|
|
21
24
|
validates :listing_price,
|
22
25
|
presence: true
|
23
26
|
|
27
|
+
# Clean URL Define
|
28
|
+
friendly_id :phcdev_property_listing_nice_urls, use: [:slugged, :finders]
|
29
|
+
|
30
|
+
def phcdev_property_listing_nice_urls
|
31
|
+
[:listing_title]
|
32
|
+
end
|
33
|
+
|
24
34
|
end
|
25
35
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= form_with(model: property_feature, local: true) do |phc_pro_property_feature| %>
|
3
3
|
|
4
4
|
<!-- PHCNotifi Render Validation -->
|
5
|
-
<%= render
|
5
|
+
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @property_feature %>
|
6
6
|
<!-- PHCNotifi Render Validation -->
|
7
7
|
|
8
8
|
<div class="form-group">
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= form_with(model: property_listing, local: true, html: {class: "add-listing-form"}) do |phc_pro_property_listing| %>
|
3
3
|
|
4
4
|
<!-- PHCNotifi Render Validation -->
|
5
|
-
<%= render
|
5
|
+
<%= render "phcdevworks_notifications/bootstrap/validations", :object => @property_listing %>
|
6
6
|
<!-- PHCNotifi Render Validation -->
|
7
7
|
|
8
8
|
<div class="form-group">
|
@@ -41,42 +41,42 @@
|
|
41
41
|
|
42
42
|
<div class="form-group">
|
43
43
|
<%= phc_pro_property_listing.label :listing_room %>
|
44
|
-
<%= phc_pro_property_listing.select(:listing_room, [
|
44
|
+
<%= phc_pro_property_listing.select(:listing_room, ["1","2","3","4","5","6","7+"], {}, { :class => "form-control" }) %>
|
45
45
|
</div>
|
46
46
|
<div class="form-group">
|
47
47
|
<%= phc_pro_property_listing.label :listing_bed %>
|
48
|
-
<%= phc_pro_property_listing.select(:listing_bed, [
|
48
|
+
<%= phc_pro_property_listing.select(:listing_bed, ["1","2","3","4","5","6","7+"], {}, { :class => "form-control" }) %>
|
49
49
|
</div>
|
50
50
|
<div class="form-group">
|
51
51
|
<%= phc_pro_property_listing.label :listing_bath %>
|
52
|
-
<%= phc_pro_property_listing.select(:listing_bath, [
|
52
|
+
<%= phc_pro_property_listing.select(:listing_bath, ["1","2","3","4+"], {}, { :class => "form-control" }) %>
|
53
53
|
</div>
|
54
54
|
<div class="form-group">
|
55
55
|
<%= phc_pro_property_listing.label :listing_garage %>
|
56
|
-
<%= phc_pro_property_listing.select(:listing_garage, [
|
56
|
+
<%= phc_pro_property_listing.select(:listing_garage, ["1 Car","2 Cars","3 Cars","4+ Cars"], {}, { :class => "form-control" }) %>
|
57
57
|
</div>
|
58
58
|
|
59
59
|
<hr>
|
60
60
|
|
61
61
|
<div class="form-group">
|
62
62
|
<%= phc_pro_property_listing.label :listing_type %>
|
63
|
-
<%= phc_pro_property_listing.select(:listing_type, [
|
63
|
+
<%= phc_pro_property_listing.select(:listing_type, ["House","Condominium","Cottage","Land"], {}, { :class => "form-control" }) %>
|
64
64
|
</div>
|
65
65
|
<div class="form-group">
|
66
66
|
<%= phc_pro_property_listing.label :listing_status %>
|
67
|
-
<%= phc_pro_property_listing.select(:listing_status, [
|
67
|
+
<%= phc_pro_property_listing.select(:listing_status, ["For Sale","Sold"], {}, { :class => "form-control" }) %>
|
68
68
|
</div>
|
69
69
|
<div class="form-group">
|
70
70
|
<%= phc_pro_property_listing.label :listing_year_built %>
|
71
|
-
<%= phc_pro_property_listing.select(:listing_year_built, [
|
71
|
+
<%= phc_pro_property_listing.select(:listing_year_built, ["1990","2018"], {}, { :class => "form-control" }) %>
|
72
72
|
</div>
|
73
73
|
<div class="form-group">
|
74
74
|
<%= phc_pro_property_listing.label :listing_energy_class %>
|
75
|
-
<%= phc_pro_property_listing.select(:listing_energy_class, [
|
75
|
+
<%= phc_pro_property_listing.select(:listing_energy_class, ["A","B"], {}, { :class => "form-control" }) %>
|
76
76
|
</div>
|
77
77
|
<div class="form-group">
|
78
78
|
<%= phc_pro_property_listing.label :listing_leed_rating %>
|
79
|
-
<%= phc_pro_property_listing.select(:listing_leed_rating, [
|
79
|
+
<%= phc_pro_property_listing.select(:listing_leed_rating, ["Certified","Silver", "Gold", ""], {}, { :class => "form-control" }) %>
|
80
80
|
</div>
|
81
81
|
|
82
82
|
<div class="form-group">
|
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: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|