phcmembers 61.0.0 → 61.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +2 -2
- data/app/assets/javascripts/phcmembers/application.js +1 -1
- data/app/assets/stylesheets/phcmembers/application.scss +1 -1
- data/app/controllers/phcmembers/api/v1/categories_controller.rb +15 -0
- data/app/controllers/phcmembers/api/v1/listings_controller.rb +16 -0
- data/app/controllers/phcmembers/application_controller.rb +18 -16
- data/app/controllers/phcmembers/directory/categories_controller.rb +14 -13
- data/app/controllers/phcmembers/member/addresses_controller.rb +21 -21
- data/app/controllers/phcmembers/member/dashboards_controller.rb +17 -0
- data/app/controllers/phcmembers/member/listings_controller.rb +17 -18
- data/app/controllers/phcmembers/member/profiles_controller.rb +15 -16
- data/app/helpers/phcmembers/application_helper.rb +2 -12
- data/app/jobs/phcmembers/application_job.rb +2 -2
- data/app/mailers/phcmembers/application_mailer.rb +4 -6
- data/app/models/phcmembers/application_record.rb +3 -3
- data/app/models/phcmembers/category_versions.rb +3 -3
- data/app/models/phcmembers/directory.rb +5 -5
- data/app/models/phcmembers/directory/category.rb +3 -6
- data/app/models/phcmembers/listing_versions.rb +3 -3
- data/app/models/phcmembers/member/address.rb +28 -28
- data/app/models/phcmembers/member/listing.rb +48 -49
- data/app/models/phcmembers/member/profile.rb +36 -36
- data/app/models/phcmembers/profile_versions.rb +3 -3
- data/app/views/layouts/phcmembers/application.html.erb +16 -18
- data/app/views/layouts/phcmembers/application_full_width.html.erb +80 -82
- data/app/views/layouts/phcmembers/components/backend/footer/_footer.html.erb +1 -1
- data/app/views/layouts/phcmembers/components/backend/navigation/_top_menu.html.erb +79 -143
- data/app/views/layouts/phcmembers/components/backend/sidebars/_side_menu.html.erb +154 -116
- data/app/views/layouts/phcmembers/components/frontend/footer/_footer.html.erb +14 -0
- data/app/views/layouts/phcmembers/components/frontend/footer/_footer_copyright.html.erb +19 -0
- data/app/views/layouts/phcmembers/components/frontend/header/_slideout.html.erb +24 -0
- data/app/views/layouts/phcmembers/components/frontend/header/_topbar.html.erb +17 -0
- data/app/views/layouts/phcmembers/components/frontend/navigation/_navigation.html.erb +27 -0
- data/app/views/layouts/phcmembers/components/frontend/pages/_titlebars.html.erb +14 -0
- data/app/views/layouts/phcmembers/components/frontend/seo/_seo_main.html.erb +5 -0
- data/app/views/layouts/phcmembers/mailer.html.erb +12 -0
- data/app/views/layouts/phcmembers/mailer.text.erb +1 -0
- data/app/views/phcmembers/api/v1/categories/index.json.rabl +2 -0
- data/app/views/phcmembers/api/v1/listings/index.json.rabl +2 -0
- data/app/views/phcmembers/directory/categories/_form.html.erb +12 -6
- data/app/views/phcmembers/directory/categories/components/_category_audits.html.erb +24 -10
- data/app/views/phcmembers/directory/categories/components/_category_list.html.erb +15 -7
- data/app/views/phcmembers/directory/categories/components/_category_main.html.erb +26 -20
- data/app/views/phcmembers/directory/categories/components/_category_sidebar.html.erb +16 -0
- data/app/views/phcmembers/directory/categories/edit.html.erb +25 -28
- data/app/views/phcmembers/directory/categories/index.html.erb +33 -38
- data/app/views/phcmembers/directory/categories/new.html.erb +25 -28
- data/app/views/phcmembers/directory/categories/show.html.erb +24 -17
- data/app/views/phcmembers/member/addresses/_form.html.erb +1 -1
- data/app/views/phcmembers/member/addresses/edit.html.erb +15 -3
- data/app/views/phcmembers/member/addresses/index.html.erb +16 -3
- data/app/views/phcmembers/member/addresses/new.html.erb +14 -2
- data/app/views/phcmembers/member/addresses/show.html.erb +14 -2
- data/app/views/phcmembers/member/dashboards/index.html.erb +62 -0
- data/app/views/phcmembers/member/listings/_form.html.erb +25 -25
- data/app/views/phcmembers/member/listings/edit.html.erb +14 -2
- data/app/views/phcmembers/member/listings/index.html.erb +16 -3
- data/app/views/phcmembers/member/listings/new.html.erb +14 -2
- data/app/views/phcmembers/member/listings/show.html.erb +15 -3
- data/app/views/phcmembers/member/profiles/components/_profile_header.html.erb +29 -29
- data/app/views/phcmembers/member/profiles/edit.html.erb +15 -2
- data/app/views/phcmembers/member/profiles/index.html.erb +12 -1
- data/app/views/phcmembers/member/profiles/new.html.erb +15 -2
- data/app/views/phcmembers/member/profiles/show.html.erb +1 -1
- data/config/routes.rb +12 -15
- data/db/migrate/20160728231036_create_phcmembers_member_profiles.rb +5 -2
- data/lib/phcmembers/engine.rb +67 -61
- data/lib/phcmembers/version.rb +1 -1
- metadata +101 -113
- data/app/controllers/phcmembers/api/directories_controller.rb +0 -18
- data/app/controllers/phcmembers/directory/categorylistings_controller.rb +0 -30
- data/app/controllers/phcmembers/modules/dashboards_controller.rb +0 -17
- data/app/models/phcmembers/category_listing_versions.rb +0 -5
- data/app/models/phcmembers/connections.rb +0 -7
- data/app/models/phcmembers/directory/categorylisting.rb +0 -12
- data/app/views/layouts/phcmembers/directory/directory_all.html.erb +0 -56
- data/app/views/layouts/phcmembers/members/members_all.html.erb +0 -56
- data/app/views/phcmembers/directory/categorylistings/components/_category_listing_audits.html.erb +0 -11
- data/app/views/phcmembers/directory/categorylistings/components/_category_listing_list.html.erb +0 -7
- data/app/views/phcmembers/directory/categorylistings/components/_category_listing_main.html.erb +0 -22
- data/app/views/phcmembers/directory/categorylistings/index.html.erb +0 -62
- data/app/views/phcmembers/directory/categorylistings/show.html.erb +0 -25
- data/app/views/phcmembers/modules/dashboards/index.html.erb +0 -66
@@ -1,14 +1,4 @@
|
|
1
1
|
module Phcmembers
|
2
|
-
|
3
|
-
|
4
|
-
# Add Active to Menu
|
5
|
-
def is_active_controller(controller_name)
|
6
|
-
params[:controller] == controller_name ? "active open selected" : nil
|
7
|
-
end
|
8
|
-
|
9
|
-
def is_active_action(action_name)
|
10
|
-
params[:action] == action_name ? "active" : nil
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
2
|
+
module ApplicationHelper
|
3
|
+
end
|
14
4
|
end
|
@@ -8,20 +8,17 @@ module Phcmembers
|
|
8
8
|
has_paper_trail :class_name => 'Phcmembers::CategoryVersions'
|
9
9
|
|
10
10
|
# Relationships
|
11
|
-
|
12
|
-
has_many :listings, class_name: 'Phcmembers::Member::Listing', :through => :categorylistings
|
11
|
+
has_and_belongs_to_many :listings, class_name: 'Phcmembers::Member::Listing', :join_table => 'categories_listings'
|
13
12
|
|
14
13
|
validates :catname,
|
15
|
-
|
14
|
+
length: { minimum: 3 }
|
16
15
|
|
17
16
|
# Clean URL Define
|
18
17
|
friendly_id :phcmembers_category_slug, use: [:slugged, :finders]
|
19
18
|
|
20
19
|
# Define for Multiple Records
|
21
20
|
def phcmembers_category_slug
|
22
|
-
[
|
23
|
-
:catname
|
24
|
-
]
|
21
|
+
[:catname]
|
25
22
|
end
|
26
23
|
|
27
24
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Phcmembers
|
2
|
-
|
3
|
-
|
2
|
+
class Member::Address < ApplicationRecord
|
3
|
+
|
4
4
|
# Clean URL Initialize
|
5
5
|
extend FriendlyId
|
6
6
|
|
@@ -8,33 +8,33 @@ module Phcmembers
|
|
8
8
|
has_paper_trail :class_name => 'Phcmembers::AddressVersions'
|
9
9
|
|
10
10
|
# Model Relationships
|
11
|
-
|
11
|
+
belongs_to :profile, class_name: 'Phcmembers::Member::Profile'
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
# Validation for Form Fields
|
14
|
+
validates :mcaddressl1,
|
15
|
+
presence: true,
|
16
|
+
length: { minimum: 2 }
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
validates :mccity,
|
19
|
+
length: { minimum: 3 }
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
validates :mcprovince,
|
22
|
+
presence: true,
|
23
|
+
length: { minimum: 2 }
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
validates :mccountry,
|
26
|
+
presence: true,
|
27
|
+
length: { minimum: 2 }
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
validates :mcpostalcode,
|
30
|
+
presence: true,
|
31
|
+
length: { minimum: 3 }
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
validates :mctype,
|
34
|
+
presence: true,
|
35
|
+
length: { minimum: 2 }
|
36
36
|
|
37
|
-
|
37
|
+
# Clean URL Define
|
38
38
|
friendly_id :phcmembers_address_slug, use: [:slugged, :finders]
|
39
39
|
|
40
40
|
# Define for Multiple Records
|
@@ -44,10 +44,10 @@ module Phcmembers
|
|
44
44
|
]
|
45
45
|
end
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
def country_name
|
48
|
+
country = ISO3166::Country[country_code]
|
49
|
+
country.translations[I18n.locale.to_s] || country.mccountry
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
53
|
end
|
@@ -1,67 +1,66 @@
|
|
1
1
|
module Phcmembers
|
2
|
-
|
2
|
+
class Member::Listing < ApplicationRecord
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
# Clean URL Initialize
|
5
|
+
extend FriendlyId
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
# Add Paper Trail
|
8
|
+
has_paper_trail :class_name => 'Phcmembers::ListingVersions'
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
has_many :categories, class_name: 'Phcmembers::Directory::Category', :through => :categorylistings
|
10
|
+
# Model Relationships
|
11
|
+
belongs_to :profile, class_name: 'Phcmembers::Member::Profile'
|
12
|
+
has_and_belongs_to_many :categories, class_name: 'Phcmembers::Directory::Category', :join_table => 'categories_listings'
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
# Validation for Form Fields
|
15
|
+
validates :mbcompanyname,
|
16
|
+
presence: true,
|
17
|
+
length: { minimum: 2 }
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
validates :mbcontactname,
|
20
|
+
presence: true,
|
21
|
+
length: { minimum: 2 }
|
23
22
|
|
24
|
-
|
25
|
-
|
23
|
+
validates :mbaddressl1,
|
24
|
+
length: { minimum: 3 }
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
validates :mbcity,
|
27
|
+
presence: true,
|
28
|
+
length: { minimum: 3 }
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
validates :mbcountry,
|
31
|
+
presence: true,
|
32
|
+
length: { minimum: 2 }
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
validates :mbprovince,
|
35
|
+
presence: true,
|
36
|
+
length: { minimum: 2 }
|
38
37
|
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
validates :mbpostalcode,
|
39
|
+
presence: true,
|
40
|
+
length: { minimum: 3 }
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
validates :mbcontactemail,
|
43
|
+
presence: true,
|
44
|
+
length: { minimum: 3 },
|
45
|
+
format: { with: /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/, message: "Please follow this Email format: *****@********.***" }
|
47
46
|
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
validates :mbwebsite,
|
48
|
+
presence: true,
|
49
|
+
length: { minimum: 6 }
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
validates :mbphone,
|
52
|
+
presence: true,
|
53
|
+
format: { with: /\A(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}\z/, message: "Please Follow this Phone Number Format: ***-***-****" }
|
55
54
|
|
56
|
-
|
57
|
-
|
55
|
+
# Clean URL Define
|
56
|
+
friendly_id :phcmembers_listings_slug, use: [:slugged, :finders]
|
58
57
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
58
|
+
# Define for Multiple Records
|
59
|
+
def phcmembers_listings_slug
|
60
|
+
[
|
61
|
+
[:mbcompanyname, :mbcontactname]
|
62
|
+
]
|
63
|
+
end
|
65
64
|
|
66
|
-
|
65
|
+
end
|
67
66
|
end
|
@@ -1,50 +1,50 @@
|
|
1
1
|
module Phcmembers
|
2
|
-
|
2
|
+
class Member::Profile < ApplicationRecord
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
# Clean URL Initialize
|
5
|
+
extend FriendlyId
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
# Add Paper Trail
|
8
|
+
has_paper_trail :class_name => 'Phcmembers::ProfileVersions'
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
# Gravatar
|
11
|
+
include Gravtastic
|
12
|
+
gravtastic :memail
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
# Model Relationships
|
15
|
+
has_many :addresses, class_name: 'Phcmembers::Member::Address'
|
16
|
+
has_many :listings, class_name: 'Phcmembers::Member::Listing'
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
# Validation for Form Fields
|
19
|
+
validates :mfirstname,
|
20
|
+
presence: true,
|
21
|
+
length: { minimum: 1 }
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
validates :mlastname,
|
24
|
+
presence: true,
|
25
|
+
length: { minimum: 1 }
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
validates :mtitle,
|
28
|
+
length: { minimum: 2 }
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
validates :memail,
|
31
|
+
presence: true,
|
32
|
+
length: { minimum: 6 },
|
33
|
+
format: { with: /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/, message: "Please follow this Email format: *****@********.***" }
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
validates :mphone,
|
36
|
+
presence: true,
|
37
|
+
format: { with: /\A(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}\z/, message: "Please Follow this Phone Number Format: ***-***-****" }
|
38
38
|
|
39
|
-
|
40
|
-
|
39
|
+
# Clean URL Define
|
40
|
+
friendly_id :phcmembers_profiles_slug, use: [:slugged, :finders]
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
# Define for Multiple Records
|
43
|
+
def phcmembers_profiles_slug
|
44
|
+
[
|
45
|
+
[:mfirstname, :mlastname]
|
46
|
+
]
|
47
|
+
end
|
48
48
|
|
49
|
-
|
49
|
+
end
|
50
50
|
end
|
@@ -2,24 +2,29 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
|
5
|
-
<% phc_seo_title "PHCMembers" %>
|
6
|
-
<% phc_seo_description "
|
5
|
+
<% phc_seo_title "PHCMembers DMS" %>
|
6
|
+
<% phc_seo_description "Membership & Directory Management System by PHCDevworks" %>
|
7
7
|
|
8
|
+
<!-- -PHC- SEO and Site Description -->
|
8
9
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
9
10
|
<title><%= yield(:phc_seo_title) %></title>
|
10
11
|
<meta name="description" content="<%= yield(:phc_seo_description) %>">
|
11
|
-
|
12
12
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
|
13
13
|
<link rel="canonical" href="http://phcmembers.com">
|
14
|
+
<!-- -PHC- SEO and Site Description -->
|
15
|
+
|
16
|
+
<!-- -PHC- Security -->
|
17
|
+
<%= csrf_meta_tags %>
|
18
|
+
<%= csp_meta_tag %>
|
19
|
+
<!-- -PHC- Security -->
|
20
|
+
|
21
|
+
<!-- -PHC- CSS -->
|
22
|
+
<%= stylesheet_link_tag 'phcmembers/application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
23
|
+
<!-- -PHC- CSS -->
|
14
24
|
|
15
25
|
<!-- Font -->
|
16
26
|
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400%7CRaleway:300,400,500,600,700%7CLato:300,400,400italic,600,700"/>
|
17
|
-
|
18
|
-
<!-- Requried Style Sheets -->
|
19
|
-
<%= stylesheet_link_tag "phcmembers/application", media: "all", 'data-turbolinks-track': 'reload' %>
|
20
|
-
|
21
|
-
<!-- Security -->
|
22
|
-
<%= csrf_meta_tags %>
|
27
|
+
<!-- Font -->
|
23
28
|
|
24
29
|
</head>
|
25
30
|
<body>
|
@@ -62,14 +67,7 @@
|
|
62
67
|
|
63
68
|
<!-- Requried JavaScripts -->
|
64
69
|
<%= javascript_include_tag "phcmembers/application", 'data-turbolinks-track': 'reload' %>
|
65
|
-
|
66
|
-
<!-- WTF Slowing Down my Site. Nothing Nice to Say. Keep Bad Comments to Myself -->
|
67
|
-
<!--[if lt IE 9]>
|
68
|
-
<script src="https://frmwrks.phcnetworks.net/coloradmin/version-latest/admin/template/assets/crossbrowserjs/html5shiv.js"></script>
|
69
|
-
<script src="https://frmwrks.phcnetworks.net/coloradmin/version-latest/admin/template/assets/crossbrowserjs/respond.min.js"></script>
|
70
|
-
<script src="https://frmwrks.phcnetworks.net/coloradmin/version-latest/admin/template/assets/crossbrowserjs/excanvas.min.js"></script>
|
71
|
-
<![endif]-->
|
72
|
-
<!-- WTF Slowing Down my Site. Nothing Nice to Say. Keep Bad Comments to Myself -->
|
70
|
+
<script src="https://cdn.ckeditor.com/4.10.0/full/ckeditor.js"></script>
|
73
71
|
|
74
72
|
<script>
|
75
73
|
$(document).ready(function() {
|
@@ -79,4 +77,4 @@
|
|
79
77
|
<!-- Requried JavaScripts -->
|
80
78
|
|
81
79
|
</body>
|
82
|
-
</html>
|
80
|
+
</html>
|