phcmembers 61.0.0 → 61.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +2 -2
  4. data/app/assets/javascripts/phcmembers/application.js +1 -1
  5. data/app/assets/stylesheets/phcmembers/application.scss +1 -1
  6. data/app/controllers/phcmembers/api/v1/categories_controller.rb +15 -0
  7. data/app/controllers/phcmembers/api/v1/listings_controller.rb +16 -0
  8. data/app/controllers/phcmembers/application_controller.rb +18 -16
  9. data/app/controllers/phcmembers/directory/categories_controller.rb +14 -13
  10. data/app/controllers/phcmembers/member/addresses_controller.rb +21 -21
  11. data/app/controllers/phcmembers/member/dashboards_controller.rb +17 -0
  12. data/app/controllers/phcmembers/member/listings_controller.rb +17 -18
  13. data/app/controllers/phcmembers/member/profiles_controller.rb +15 -16
  14. data/app/helpers/phcmembers/application_helper.rb +2 -12
  15. data/app/jobs/phcmembers/application_job.rb +2 -2
  16. data/app/mailers/phcmembers/application_mailer.rb +4 -6
  17. data/app/models/phcmembers/application_record.rb +3 -3
  18. data/app/models/phcmembers/category_versions.rb +3 -3
  19. data/app/models/phcmembers/directory.rb +5 -5
  20. data/app/models/phcmembers/directory/category.rb +3 -6
  21. data/app/models/phcmembers/listing_versions.rb +3 -3
  22. data/app/models/phcmembers/member/address.rb +28 -28
  23. data/app/models/phcmembers/member/listing.rb +48 -49
  24. data/app/models/phcmembers/member/profile.rb +36 -36
  25. data/app/models/phcmembers/profile_versions.rb +3 -3
  26. data/app/views/layouts/phcmembers/application.html.erb +16 -18
  27. data/app/views/layouts/phcmembers/application_full_width.html.erb +80 -82
  28. data/app/views/layouts/phcmembers/components/backend/footer/_footer.html.erb +1 -1
  29. data/app/views/layouts/phcmembers/components/backend/navigation/_top_menu.html.erb +79 -143
  30. data/app/views/layouts/phcmembers/components/backend/sidebars/_side_menu.html.erb +154 -116
  31. data/app/views/layouts/phcmembers/components/frontend/footer/_footer.html.erb +14 -0
  32. data/app/views/layouts/phcmembers/components/frontend/footer/_footer_copyright.html.erb +19 -0
  33. data/app/views/layouts/phcmembers/components/frontend/header/_slideout.html.erb +24 -0
  34. data/app/views/layouts/phcmembers/components/frontend/header/_topbar.html.erb +17 -0
  35. data/app/views/layouts/phcmembers/components/frontend/navigation/_navigation.html.erb +27 -0
  36. data/app/views/layouts/phcmembers/components/frontend/pages/_titlebars.html.erb +14 -0
  37. data/app/views/layouts/phcmembers/components/frontend/seo/_seo_main.html.erb +5 -0
  38. data/app/views/layouts/phcmembers/mailer.html.erb +12 -0
  39. data/app/views/layouts/phcmembers/mailer.text.erb +1 -0
  40. data/app/views/phcmembers/api/v1/categories/index.json.rabl +2 -0
  41. data/app/views/phcmembers/api/v1/listings/index.json.rabl +2 -0
  42. data/app/views/phcmembers/directory/categories/_form.html.erb +12 -6
  43. data/app/views/phcmembers/directory/categories/components/_category_audits.html.erb +24 -10
  44. data/app/views/phcmembers/directory/categories/components/_category_list.html.erb +15 -7
  45. data/app/views/phcmembers/directory/categories/components/_category_main.html.erb +26 -20
  46. data/app/views/phcmembers/directory/categories/components/_category_sidebar.html.erb +16 -0
  47. data/app/views/phcmembers/directory/categories/edit.html.erb +25 -28
  48. data/app/views/phcmembers/directory/categories/index.html.erb +33 -38
  49. data/app/views/phcmembers/directory/categories/new.html.erb +25 -28
  50. data/app/views/phcmembers/directory/categories/show.html.erb +24 -17
  51. data/app/views/phcmembers/member/addresses/_form.html.erb +1 -1
  52. data/app/views/phcmembers/member/addresses/edit.html.erb +15 -3
  53. data/app/views/phcmembers/member/addresses/index.html.erb +16 -3
  54. data/app/views/phcmembers/member/addresses/new.html.erb +14 -2
  55. data/app/views/phcmembers/member/addresses/show.html.erb +14 -2
  56. data/app/views/phcmembers/member/dashboards/index.html.erb +62 -0
  57. data/app/views/phcmembers/member/listings/_form.html.erb +25 -25
  58. data/app/views/phcmembers/member/listings/edit.html.erb +14 -2
  59. data/app/views/phcmembers/member/listings/index.html.erb +16 -3
  60. data/app/views/phcmembers/member/listings/new.html.erb +14 -2
  61. data/app/views/phcmembers/member/listings/show.html.erb +15 -3
  62. data/app/views/phcmembers/member/profiles/components/_profile_header.html.erb +29 -29
  63. data/app/views/phcmembers/member/profiles/edit.html.erb +15 -2
  64. data/app/views/phcmembers/member/profiles/index.html.erb +12 -1
  65. data/app/views/phcmembers/member/profiles/new.html.erb +15 -2
  66. data/app/views/phcmembers/member/profiles/show.html.erb +1 -1
  67. data/config/routes.rb +12 -15
  68. data/db/migrate/20160728231036_create_phcmembers_member_profiles.rb +5 -2
  69. data/lib/phcmembers/engine.rb +67 -61
  70. data/lib/phcmembers/version.rb +1 -1
  71. metadata +101 -113
  72. data/app/controllers/phcmembers/api/directories_controller.rb +0 -18
  73. data/app/controllers/phcmembers/directory/categorylistings_controller.rb +0 -30
  74. data/app/controllers/phcmembers/modules/dashboards_controller.rb +0 -17
  75. data/app/models/phcmembers/category_listing_versions.rb +0 -5
  76. data/app/models/phcmembers/connections.rb +0 -7
  77. data/app/models/phcmembers/directory/categorylisting.rb +0 -12
  78. data/app/views/layouts/phcmembers/directory/directory_all.html.erb +0 -56
  79. data/app/views/layouts/phcmembers/members/members_all.html.erb +0 -56
  80. data/app/views/phcmembers/directory/categorylistings/components/_category_listing_audits.html.erb +0 -11
  81. data/app/views/phcmembers/directory/categorylistings/components/_category_listing_list.html.erb +0 -7
  82. data/app/views/phcmembers/directory/categorylistings/components/_category_listing_main.html.erb +0 -22
  83. data/app/views/phcmembers/directory/categorylistings/index.html.erb +0 -62
  84. data/app/views/phcmembers/directory/categorylistings/show.html.erb +0 -25
  85. data/app/views/phcmembers/modules/dashboards/index.html.erb +0 -66
@@ -1,14 +1,4 @@
1
1
  module Phcmembers
2
- module ApplicationHelper
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
@@ -1,4 +1,4 @@
1
1
  module Phcmembers
2
- class ApplicationJob < ActiveJob::Base
3
- end
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
4
  end
@@ -1,8 +1,6 @@
1
1
  module Phcmembers
2
-
3
- class ApplicationMailer < ActionMailer::Base
4
- default from: 'info@example.com'
5
- layout 'mailer'
6
- end
7
-
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: ENV['PHC_MEMBERS_EMAIL_ADDRESS']
4
+ layout 'mailer'
5
+ end
8
6
  end
@@ -1,5 +1,5 @@
1
1
  module Phcmembers
2
- class ApplicationRecord < ActiveRecord::Base
3
- self.abstract_class = true
4
- end
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  module Phcmembers
2
- class CategoryVersions < PaperTrail::Version
3
- self.table_name = :phcmembers_category_versions
4
- end
2
+ class CategoryVersions < PaperTrail::Version
3
+ self.table_name = :phcmembers_category_versions
4
+ end
5
5
  end
@@ -1,7 +1,7 @@
1
1
  module Phcmembers
2
- module Directory
3
- def self.table_name_prefix
4
- 'phcmembers_directory_'
5
- end
6
- end
2
+ module Directory
3
+ def self.table_name_prefix
4
+ 'phcmembers_directory_'
5
+ end
6
+ end
7
7
  end
@@ -8,20 +8,17 @@ module Phcmembers
8
8
  has_paper_trail :class_name => 'Phcmembers::CategoryVersions'
9
9
 
10
10
  # Relationships
11
- has_many :categorylistings, class_name: 'Phcmembers::Directory::Categorylisting', dependent: :destroy
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
- length: { minimum: 3 }
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,5 +1,5 @@
1
1
  module Phcmembers
2
- class ListingVersions < PaperTrail::Version
3
- self.table_name = :phcmembers_listing_versions
4
- end
2
+ class ListingVersions < PaperTrail::Version
3
+ self.table_name = :phcmembers_listing_versions
4
+ end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  module Phcmembers
2
- class Member::Address < ApplicationRecord
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
- belongs_to :profile, class_name: 'Phcmembers::Member::Profile'
11
+ belongs_to :profile, class_name: 'Phcmembers::Member::Profile'
12
12
 
13
- # Validation for Form Fields
14
- validates :mcaddressl1,
15
- presence: true,
16
- length: { minimum: 2 }
13
+ # Validation for Form Fields
14
+ validates :mcaddressl1,
15
+ presence: true,
16
+ length: { minimum: 2 }
17
17
 
18
- validates :mccity,
19
- length: { minimum: 3 }
18
+ validates :mccity,
19
+ length: { minimum: 3 }
20
20
 
21
- validates :mcprovince,
22
- presence: true,
23
- length: { minimum: 2 }
21
+ validates :mcprovince,
22
+ presence: true,
23
+ length: { minimum: 2 }
24
24
 
25
- validates :mccountry,
26
- presence: true,
27
- length: { minimum: 2 }
25
+ validates :mccountry,
26
+ presence: true,
27
+ length: { minimum: 2 }
28
28
 
29
- validates :mcpostalcode,
30
- presence: true,
31
- length: { minimum: 3 }
29
+ validates :mcpostalcode,
30
+ presence: true,
31
+ length: { minimum: 3 }
32
32
 
33
- validates :mctype,
34
- presence: true,
35
- length: { minimum: 2 }
33
+ validates :mctype,
34
+ presence: true,
35
+ length: { minimum: 2 }
36
36
 
37
- # Clean URL Define
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
- def country_name
48
- country = ISO3166::Country[country_code]
49
- country.translations[I18n.locale.to_s] || country.mccountry
50
- end
51
-
52
- end
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
- class Member::Listing < ApplicationRecord
2
+ class Member::Listing < ApplicationRecord
3
3
 
4
- # Clean URL Initialize
5
- extend FriendlyId
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
6
 
7
- # Add Paper Trail
8
- has_paper_trail :class_name => 'Phcmembers::ListingVersions'
7
+ # Add Paper Trail
8
+ has_paper_trail :class_name => 'Phcmembers::ListingVersions'
9
9
 
10
- # Model Relationships
11
- belongs_to :profile, class_name: 'Phcmembers::Member::Profile'
12
- has_many :categorylistings, class_name: 'Phcmembers::Directory::Categorylisting', dependent: :destroy
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
- # Validation for Form Fields
16
- validates :mbcompanyname,
17
- presence: true,
18
- length: { minimum: 2 }
14
+ # Validation for Form Fields
15
+ validates :mbcompanyname,
16
+ presence: true,
17
+ length: { minimum: 2 }
19
18
 
20
- validates :mbcontactname,
21
- presence: true,
22
- length: { minimum: 2 }
19
+ validates :mbcontactname,
20
+ presence: true,
21
+ length: { minimum: 2 }
23
22
 
24
- validates :mbaddressl1,
25
- length: { minimum: 3 }
23
+ validates :mbaddressl1,
24
+ length: { minimum: 3 }
26
25
 
27
- validates :mbcity,
28
- presence: true,
29
- length: { minimum: 3 }
26
+ validates :mbcity,
27
+ presence: true,
28
+ length: { minimum: 3 }
30
29
 
31
- validates :mbcountry,
32
- presence: true,
33
- length: { minimum: 2 }
30
+ validates :mbcountry,
31
+ presence: true,
32
+ length: { minimum: 2 }
34
33
 
35
- validates :mbprovince,
36
- presence: true,
37
- length: { minimum: 2 }
34
+ validates :mbprovince,
35
+ presence: true,
36
+ length: { minimum: 2 }
38
37
 
39
- validates :mbpostalcode,
40
- presence: true,
41
- length: { minimum: 3 }
38
+ validates :mbpostalcode,
39
+ presence: true,
40
+ length: { minimum: 3 }
42
41
 
43
- validates :mbcontactemail,
44
- presence: true,
45
- length: { minimum: 3 },
46
- format: { with: /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/, message: "Please follow this Email format: *****@********.***" }
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
- validates :mbwebsite,
49
- presence: true,
50
- length: { minimum: 6 }
47
+ validates :mbwebsite,
48
+ presence: true,
49
+ length: { minimum: 6 }
51
50
 
52
- validates :mbphone,
53
- presence: true,
54
- format: { with: /\A(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}\z/, message: "Please Follow this Phone Number Format: ***-***-****" }
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
- # Clean URL Define
57
- friendly_id :phcmembers_listings_slug, use: [:slugged, :finders]
55
+ # Clean URL Define
56
+ friendly_id :phcmembers_listings_slug, use: [:slugged, :finders]
58
57
 
59
- # Define for Multiple Records
60
- def phcmembers_listings_slug
61
- [
62
- [:mbcompanyname, :mbcontactname]
63
- ]
64
- end
58
+ # Define for Multiple Records
59
+ def phcmembers_listings_slug
60
+ [
61
+ [:mbcompanyname, :mbcontactname]
62
+ ]
63
+ end
65
64
 
66
- end
65
+ end
67
66
  end
@@ -1,50 +1,50 @@
1
1
  module Phcmembers
2
- class Member::Profile < ApplicationRecord
2
+ class Member::Profile < ApplicationRecord
3
3
 
4
- # Clean URL Initialize
5
- extend FriendlyId
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
6
 
7
- # Add Paper Trail
8
- has_paper_trail :class_name => 'Phcmembers::ProfileVersions'
7
+ # Add Paper Trail
8
+ has_paper_trail :class_name => 'Phcmembers::ProfileVersions'
9
9
 
10
- # Gravatar
11
- include Gravtastic
12
- gravtastic :memail
10
+ # Gravatar
11
+ include Gravtastic
12
+ gravtastic :memail
13
13
 
14
- # Model Relationships
15
- has_many :addresses, class_name: 'Phcmembers::Member::Address'
16
- has_many :listings, class_name: 'Phcmembers::Member::Listing'
14
+ # Model Relationships
15
+ has_many :addresses, class_name: 'Phcmembers::Member::Address'
16
+ has_many :listings, class_name: 'Phcmembers::Member::Listing'
17
17
 
18
- # Validation for Form Fields
19
- validates :mfirstname,
20
- presence: true,
21
- length: { minimum: 1 }
18
+ # Validation for Form Fields
19
+ validates :mfirstname,
20
+ presence: true,
21
+ length: { minimum: 1 }
22
22
 
23
- validates :mlastname,
24
- presence: true,
25
- length: { minimum: 1 }
23
+ validates :mlastname,
24
+ presence: true,
25
+ length: { minimum: 1 }
26
26
 
27
- validates :mtitle,
28
- length: { minimum: 2 }
27
+ validates :mtitle,
28
+ length: { minimum: 2 }
29
29
 
30
- validates :memail,
31
- presence: true,
32
- length: { minimum: 6 },
33
- format: { with: /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/, message: "Please follow this Email format: *****@********.***" }
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
- 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: ***-***-****" }
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
- # Clean URL Define
40
- friendly_id :phcmembers_profiles_slug, use: [:slugged, :finders]
39
+ # Clean URL Define
40
+ friendly_id :phcmembers_profiles_slug, use: [:slugged, :finders]
41
41
 
42
- # Define for Multiple Records
43
- def phcmembers_profiles_slug
44
- [
45
- [:mfirstname, :mlastname]
46
- ]
47
- end
42
+ # Define for Multiple Records
43
+ def phcmembers_profiles_slug
44
+ [
45
+ [:mfirstname, :mlastname]
46
+ ]
47
+ end
48
48
 
49
- end
49
+ end
50
50
  end
@@ -1,5 +1,5 @@
1
1
  module Phcmembers
2
- class ProfileVersions < PaperTrail::Version
3
- self.table_name = :phcmembers_profile_versions
4
- end
2
+ class ProfileVersions < PaperTrail::Version
3
+ self.table_name = :phcmembers_profile_versions
4
+ end
5
5
  end
@@ -2,24 +2,29 @@
2
2
  <html>
3
3
  <head>
4
4
 
5
- <% phc_seo_title "PHCMembers" %>
6
- <% phc_seo_description "Secure Membership and Web Directory Management Software" %>
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>