phcmembers 64.1.0 → 65.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/app/assets/stylesheets/phcmembers/application.scss +0 -5
  4. data/app/controllers/phcmembers/api/v1/categories_controller.rb +2 -3
  5. data/app/controllers/phcmembers/api/v1/listings_controller.rb +2 -2
  6. data/app/controllers/phcmembers/application_controller.rb +18 -18
  7. data/app/controllers/phcmembers/directory/categories_controller.rb +10 -10
  8. data/app/controllers/phcmembers/member/addresses_controller.rb +7 -7
  9. data/app/controllers/phcmembers/member/dashboards_controller.rb +1 -0
  10. data/app/controllers/phcmembers/member/listings_controller.rb +9 -9
  11. data/app/controllers/phcmembers/member/profiles_controller.rb +7 -7
  12. data/app/mailers/phcmembers/application_mailer.rb +1 -1
  13. data/app/models/phcmembers/address_versions.rb +3 -3
  14. data/app/models/phcmembers/directory/category.rb +16 -18
  15. data/app/models/phcmembers/member/address.rb +18 -27
  16. data/app/models/phcmembers/member/listing.rb +35 -44
  17. data/app/models/phcmembers/member/profile.rb +9 -13
  18. data/app/views/layouts/phcmembers/application.html.erb +6 -7
  19. data/app/views/layouts/phcmembers/components/backend/footer/_footer.html.erb +5 -5
  20. data/app/views/layouts/phcmembers/components/backend/navigation/_top_menu.html.erb +0 -41
  21. data/app/views/layouts/phcmembers/components/backend/sidebars/_side_menu.html.erb +9 -9
  22. data/app/views/layouts/phcmembers/mailer.html.erb +0 -1
  23. data/app/views/layouts/phcmembers/member_profile.html.erb +7 -6
  24. data/app/views/phcmembers/api/v1/listings/index.json.rabl +1 -1
  25. data/app/views/phcmembers/directory/categories/_form.html.erb +8 -7
  26. data/app/views/phcmembers/directory/categories/edit.html.erb +3 -1
  27. data/app/views/phcmembers/directory/categories/index.html.erb +21 -16
  28. data/app/views/phcmembers/directory/categories/new.html.erb +3 -1
  29. data/app/views/phcmembers/directory/categories/show.html.erb +1 -1
  30. data/app/views/phcmembers/member/addresses/_form.html.erb +8 -7
  31. data/app/views/phcmembers/member/addresses/components/_address_audits_table.html.erb +7 -7
  32. data/app/views/phcmembers/member/addresses/edit.html.erb +3 -1
  33. data/app/views/phcmembers/member/addresses/index.html.erb +23 -20
  34. data/app/views/phcmembers/member/addresses/new.html.erb +3 -1
  35. data/app/views/phcmembers/member/addresses/show.html.erb +38 -28
  36. data/app/views/phcmembers/member/listings/_form.html.erb +33 -32
  37. data/app/views/phcmembers/member/listings/components/_listing_audits_table.html.erb +7 -7
  38. data/app/views/phcmembers/member/listings/components/_listing_main.html.erb +3 -4
  39. data/app/views/phcmembers/member/listings/edit.html.erb +3 -1
  40. data/app/views/phcmembers/member/listings/index.html.erb +24 -21
  41. data/app/views/phcmembers/member/listings/new.html.erb +3 -1
  42. data/app/views/phcmembers/member/listings/show.html.erb +24 -30
  43. data/app/views/phcmembers/member/profiles/_form.html.erb +21 -20
  44. data/app/views/phcmembers/member/profiles/components/_profile_addresses_table.html.erb +6 -6
  45. data/app/views/phcmembers/member/profiles/components/_profile_audits_table.html.erb +7 -7
  46. data/app/views/phcmembers/member/profiles/components/_profile_header.html.erb +1 -0
  47. data/app/views/phcmembers/member/profiles/components/_profile_information_table.html.erb +1 -1
  48. data/app/views/phcmembers/member/profiles/components/_profile_listings_table.html.erb +6 -6
  49. data/app/views/phcmembers/member/profiles/components/_profile_sidebar.html.erb +15 -15
  50. data/app/views/phcmembers/member/profiles/edit.html.erb +3 -1
  51. data/app/views/phcmembers/member/profiles/index.html.erb +23 -21
  52. data/app/views/phcmembers/member/profiles/new.html.erb +3 -1
  53. data/app/views/phcmembers/member/profiles/show.html.erb +2 -2
  54. data/config/routes.rb +8 -11
  55. data/db/migrate/20190317215659_create_join_table_categories_listings.rb +0 -4
  56. data/lib/phcmembers/engine.rb +54 -54
  57. data/lib/phcmembers/version.rb +1 -1
  58. metadata +6 -6
@@ -3,64 +3,55 @@ module Phcmembers
3
3
 
4
4
  # Clean URL Initialize
5
5
  extend FriendlyId
6
-
7
- # Add Paper Trail
6
+
7
+ # Paper Trail Initialize
8
8
  has_paper_trail :class_name => 'Phcmembers::ListingVersions'
9
-
10
- # Model Relationships
9
+
10
+ # Relationships
11
11
  belongs_to :profile, class_name: 'Phcmembers::Member::Profile'
12
12
  has_and_belongs_to_many :categories, class_name: 'Phcmembers::Directory::Category', :join_table => 'categories_listings'
13
-
14
- # Validation for Form Fields
13
+
14
+ # Form Fields Validation
15
15
  validates :listing_company_name,
16
- presence: true,
17
- length: { minimum: 2 }
18
-
16
+ presence: true
17
+
19
18
  validates :listing_contact_name,
20
- presence: true,
21
- length: { minimum: 2 }
22
-
19
+ presence: true
20
+
23
21
  validates :listing_address_line_1,
24
- length: { minimum: 3 }
25
-
22
+ presence: true
23
+
26
24
  validates :listing_city,
27
- presence: true,
28
- length: { minimum: 3 }
29
-
25
+ presence: true
26
+
30
27
  validates :listing_country,
31
- presence: true,
32
- length: { minimum: 2 }
33
-
28
+ presence: true
29
+
34
30
  validates :listing_province,
35
- presence: true,
36
- length: { minimum: 2 }
37
-
31
+ presence: true
32
+
38
33
  validates :listing_postal_code,
39
- presence: true,
40
- length: { minimum: 3 }
41
-
34
+ presence: true
35
+
42
36
  validates :listing_contact_email,
43
- presence: true,
44
- length: { minimum: 3 },
45
- format: { with: /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/, message: "Please follow this Email format: *****@********.***" }
46
-
37
+ presence: true,
38
+ format: { with: /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/, message: "Please follow this Email format: *****@********.***" }
39
+
47
40
  validates :listing_website,
48
- presence: true,
49
- length: { minimum: 6 },
50
- format: { with: URI::regexp(%w(http https)), message: "Please follow this URL format http or https://www.**********.com" }
51
-
41
+ presence: true,
42
+ format: { with: URI::regexp(%w(http https)), message: "Please follow this URL format http or https://www.**********.com" }
43
+
52
44
  validates :listing_phone,
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 Member Format: ***-***-****" }
55
-
45
+ presence: true,
46
+ format: { with: /\A(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}\z/, message: "Please Follow this Phone Member Format: ***-***-****" }
47
+
56
48
  # Clean URL Define
57
- friendly_id :phcmembers_listings_slug, use: [:slugged, :finders]
58
-
59
- # Define for Multiple Records
60
- def phcmembers_listings_slug
61
- [
62
- [:listing_company_name, :listing_contact_name]
63
- ]
49
+ friendly_id :phc_nice_url_slug, use: [:slugged, :finders]
50
+
51
+ def phc_nice_url_slug
52
+ [
53
+ [:listing_company_name, :listing_contact_name]
54
+ ]
64
55
  end
65
56
 
66
57
  end
@@ -4,32 +4,29 @@ module Phcmembers
4
4
  # Clean URL Initialize
5
5
  extend FriendlyId
6
6
 
7
- # Add Paper Trail
7
+ # Paper Trail Initialize
8
8
  has_paper_trail :class_name => 'Phcmembers::ProfileVersions'
9
9
 
10
- # Gravatar
10
+ # Profile Gravatar
11
11
  include Gravtastic
12
12
  gravtastic :member_email
13
13
 
14
- # Model Relationships
14
+ # Relationships
15
15
  has_many :addresses, class_name: 'Phcmembers::Member::Address', :dependent => :destroy
16
16
  has_many :listings, class_name: 'Phcmembers::Member::Listing', :dependent => :destroy
17
17
 
18
- # Validation for Form Fields
18
+ # Form Fields Validation
19
19
  validates :member_first_name,
20
- presence: true,
21
- length: { minimum: 1 }
20
+ presence: true
22
21
 
23
22
  validates :member_last_name,
24
- presence: true,
25
- length: { minimum: 1 }
23
+ presence: true
26
24
 
27
25
  validates :member_title,
28
- length: { minimum: 2 }
26
+ presence: true
29
27
 
30
28
  validates :member_email,
31
29
  presence: true,
32
- length: { minimum: 6 },
33
30
  format: { with: /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/, message: "Please follow this Email format: *****@********.***" }
34
31
 
35
32
  validates :member_phone,
@@ -37,10 +34,9 @@ module Phcmembers
37
34
  format: { with: /\A(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}\z/, message: "Please Follow this Phone Number Format: ***-***-****" }
38
35
 
39
36
  # Clean URL Define
40
- friendly_id :phcmembers_profiles_slug, use: [:slugged, :finders]
37
+ friendly_id :phc_nice_url_slug, use: [:slugged, :finders]
41
38
 
42
- # Define for Multiple Records
43
- def phcmembers_profiles_slug
39
+ def phc_nice_url_slug
44
40
  [
45
41
  [:member_first_name, :member_last_name]
46
42
  ]
@@ -22,7 +22,6 @@
22
22
 
23
23
  <!-- CSS Styles -->
24
24
  <%= stylesheet_link_tag 'phcmembers/application', media: 'all', 'data-turbolinks-track': 'reload' %>
25
-
26
25
  <!-- CSS Styles -->
27
26
 
28
27
  <!-- Font -->
@@ -33,7 +32,7 @@
33
32
  <body>
34
33
 
35
34
  <!-- Page Container -->
36
- <div id="page-container" class="page-container fade page-sidebar-fixed page-header-fixed">
35
+ <div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
37
36
 
38
37
  <!-- Page Header -->
39
38
  <div id="header" class="header navbar-default">
@@ -70,11 +69,11 @@
70
69
 
71
70
  <!-- JavaScript Loader -->
72
71
  <script>
73
- $(document).ready(function() {
74
- App.init();
75
- });
76
- </script>
72
+ $(document).ready(function() {
73
+ App.init();
74
+ });
75
+ </script>
77
76
  <!-- JavaScript Loader -->
78
77
 
79
78
  </body>
80
- </html>
79
+ </html>
@@ -1,9 +1,9 @@
1
1
  <span class="float-left">
2
- 2012-<%= Time.now.year %> -
3
- <strong>PHC</strong>Members -
4
- Engine v<%= Gem.loaded_specs["phcmembers"].version.to_s %>
2
+ 2012-<%= Time.now.year %> -
3
+ <strong>PHC</strong>Members -
4
+ Engine v<%= Gem.loaded_specs["phcmembers"].version.to_s %>
5
5
  </span>
6
6
  <span class="float-right">
7
- Developed with <i class="fas fa-heart hanna_hearts"></i> by
8
- <a class="phcnet_copyright" href="https://phcdevworks.com/"><strong>PHC</strong>Devworks</a>
7
+ Developed with <i class="fas fa-heart hanna_hearts"></i> by
8
+ <a class="phcnet_copyright" href="https://phcdevworks.com/"><strong>PHC</strong>Devworks</a>
9
9
  </span>
@@ -15,47 +15,6 @@
15
15
  <% if current_user %>
16
16
  <ul class="navbar-nav navbar-right">
17
17
 
18
- <!-- Topbar - Navigation Main - Search
19
- <li>
20
- <form class="navbar-form">
21
- <div class="form-group">
22
- <input type="text" class="form-control" placeholder="Enter keyword" />
23
- <button type="submit" class="btn btn-search"><i class="fa fa-search"></i></button>
24
- </div>
25
- </form>
26
- </li>
27
- Topbar - Navigation Main - Search -->
28
-
29
- <!-- Topbar - Navigation Main - Notifications Menu
30
- <li class="dropdown">
31
- <a href="javascript:;" data-toggle="dropdown" class="dropdown-toggle f-s-14">
32
- <i class="fa fa-bell"></i>
33
- <span class="label">5</span>
34
- </a>
35
- <ul class="dropdown-menu media-list dropdown-menu-right">
36
- <li class="dropdown-header">NOTIFICATIONS (5)</li>
37
- <li class="media">
38
- <a href="javascript:;">
39
- <div class="media-left">
40
- <i class="fa fa-bug media-object bg-silver-darker"></i>
41
- </div>
42
- <div class="media-body">
43
- <h6 class="media-heading">
44
- Server Error Reports
45
- <i class="fa fa-exclamation-circle text-danger"></i>
46
- </h6>
47
- <div class="text-muted f-s-11">3 minutes ago</div>
48
- </div>
49
- </a>
50
- </li>
51
- ...
52
- <li class="dropdown-footer text-center">
53
- <a href="javascript:;">View more</a>
54
- </li>
55
- </ul>
56
- </li>
57
- Topbar - Navigation Main - Notifications Menu -->
58
-
59
18
  <!-- Topbar - Navigation Main - User Menu -->
60
19
  <li class="dropdown navbar-user">
61
20
  <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
@@ -144,14 +144,14 @@
144
144
  <% if current_user && current_user.admin? %>
145
145
  <!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
146
146
  <li class="nav-header">User Administration</li>
147
- <li class="has-sub">
148
- <a href="javascript:;">
149
- <b class="caret"></b>
150
- <i class="fas fa-user"></i>
151
- <span>Admin</span>
152
- </a>
153
- <ul class="sub-menu">
154
- <li class="<%= phc_menus_active_controller('phcaccounts/admin/users') %>"><%= link_to 'User List', phcaccounts.admin_users_path %></li>
147
+ <li class="has-sub">
148
+ <a href="javascript:;">
149
+ <b class="caret"></b>
150
+ <i class="fas fa-user"></i>
151
+ <span>Admin</span>
152
+ </a>
153
+ <ul class="sub-menu">
154
+ <li class="<%= phc_menus_active_controller('phcaccounts/admin/users') %>"><%= link_to 'User List', phcaccounts.admin_users_path %></li>
155
155
  </ul>
156
156
  </li>
157
157
  <!-- Sidebar - Sidebar Navigation - PHCAccounts Admin Options -->
@@ -173,7 +173,7 @@
173
173
  </li>
174
174
  <!-- Sidebar - Sidebar Navigation - PHCAccounts User Options -->
175
175
  <% end %>
176
-
176
+
177
177
  <!-- Sidebar - Sidebar Minifier -->
178
178
  <li>
179
179
  <a href="javascript:;" class="sidebar-minify-btn" data-click="sidebar-minify">
@@ -3,7 +3,6 @@
3
3
  <head>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
5
  <style>
6
- /* Email styles need to be inline */
7
6
  </style>
8
7
  </head>
9
8
  <body>
@@ -8,7 +8,7 @@
8
8
  <!-- SEO System -->
9
9
 
10
10
  <!-- SEO and Site Description -->
11
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
12
12
  <title><%= yield(:phc_seo_title) %></title>
13
13
  <meta name="description" content="<%= yield(:phc_seo_description) %>">
14
14
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
@@ -32,7 +32,7 @@
32
32
  <body>
33
33
 
34
34
  <!-- Page Container -->
35
- <div id="page-container" class="page-container fade page-sidebar-fixed page-header-fixed">
35
+ <div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
36
36
 
37
37
  <!-- Page Header -->
38
38
  <div id="header" class="header navbar-default">
@@ -49,6 +49,7 @@
49
49
 
50
50
  <!-- Page Content -->
51
51
  <div id="content" class="content content-full-width">
52
+ <%= render 'phcnotifi/default/notifications' %>
52
53
  <%= yield %>
53
54
  </div>
54
55
  <!-- Page Content -->
@@ -68,10 +69,10 @@
68
69
 
69
70
  <!-- JavaScript Loader -->
70
71
  <script>
71
- $(document).ready(function() {
72
- App.init();
73
- });
74
- </script>
72
+ $(document).ready(function() {
73
+ App.init();
74
+ });
75
+ </script>
75
76
  <!-- JavaScript Loader -->
76
77
 
77
78
  </body>
@@ -1,2 +1,2 @@
1
1
  object @member_listings
2
- attributes :id, :mbcompanyname, :mbcontactname, :mbaddressl1, :mbaddressl2, :mbcity, :mbprovince, :mbcountry, :mbpostalcode, :mbphone, :mbcontactemail, :mbwebsite
2
+ attributes :id, :listing_company_name, :listing_contact_name, :listing_address_line_1, :listing_address_line_2, :listing_city, :listing_province, :listing_country, :listing_postal_code, :listing_phone, :listing_contact_email, :listing_website
@@ -1,21 +1,22 @@
1
- <!-- PHCMembers Form - Directory Categories -->
1
+ <!-- Form - Directory - Category -->
2
2
  <%= form_with(model: @directory_category, local: true) do |form| %>
3
3
 
4
4
  <!-- PHCNotifi Render Validation -->
5
5
  <%= render 'phcnotifi/default/validations', :object => @directory_category %>
6
6
  <!-- PHCNotifi Render Validation -->
7
7
 
8
- <!-- PHCMembers Field - Directory Categories -->
8
+ <!-- Form Input Fields -->
9
9
  <div class="form-group field_with_errors">
10
10
  <%= form.label :category_name, "Category Name" %>
11
11
  <%= form.text_field :category_name, class: "form-control", placeholder: "Directory Category" %>
12
12
  </div>
13
- <br>
13
+ <!-- Form Input Fields -->
14
+
15
+ <!-- Form Submition Button -->
14
16
  <div class="actions">
15
- <%= form.submit class: "btn btn-primary btn-gradient waves-effect waves-light btn-md" %>
17
+ <%= form.submit class: "btn btn-primary btn-md" %>
16
18
  </div>
17
- <br>
18
- <!-- PHCMembers Field - Directory Categories -->
19
+ <!-- For Submition Button -->
19
20
 
20
21
  <% end %>
21
- <!-- PHCMembers Form - Directory Categories -->
22
+ <!-- Form - Directory - Category -->
@@ -17,7 +17,7 @@
17
17
  <!-- Page Header -->
18
18
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
19
  <!-- Page Header -->
20
-
20
+
21
21
  <!-- Page Content -->
22
22
  <div class="panel panel-inverse">
23
23
  <div class="panel-heading">
@@ -29,7 +29,9 @@
29
29
  <h4 class="panel-title"><%= yield(:phc_title) %></h4>
30
30
  </div>
31
31
  <div class="panel-body">
32
+ <!-- Form to Edit Directory Category -->
32
33
  <%= render 'form', directory_category: @directory_category %>
34
+ <!-- Form to Edit Directory Category -->
33
35
  </div>
34
36
  </div>
35
37
  <!-- Page Content -->
@@ -7,26 +7,29 @@
7
7
 
8
8
  <!-- Page Bradcrumbs -->
9
9
  <ol class="breadcrumb pull-right">
10
- <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
11
- <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
10
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
11
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_two) %></li>
12
12
  </ol>
13
13
  <!-- Page Bradcrumbs -->
14
14
 
15
15
  <!-- Page Header -->
16
16
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
17
17
  <!-- Page Header -->
18
-
19
- <!-- Page Content -->
18
+
19
+ <!-- Page & Panel Content -->
20
20
  <div class="panel panel-inverse">
21
- <div class="panel-heading">
22
- <div class="panel-heading-btn">
23
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
24
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
25
- <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
26
- </div>
27
- <h4 class="panel-title"><%= yield(:phc_title) %></h4>
28
- </div>
29
- <div class="panel-body">
21
+ <!-- Panel Heading -->
22
+ <div class="panel-heading">
23
+ <div class="panel-heading-btn">
24
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
27
+ </div>
28
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
+ </div>
30
+ <!-- Panel Heading -->
31
+ <!-- Panel Body -->
32
+ <div class="panel-body">
30
33
  <!-- Un-Ordered List - Listing Categories -->
31
34
  <ul class="list-group">
32
35
  <% @directory_categories.each do |directory_category| %>
@@ -37,11 +40,13 @@
37
40
  <% end %>
38
41
  </ul>
39
42
  <!-- Un-Ordered List - Listing Categories -->
40
- </br>
43
+ <br>
41
44
  <%= link_to phcmembers.new_directory_category_path, class: "btn btn-primary" do %>
42
45
  <i class="fas fa-plus-circle"></i>
43
46
  <%= "Add a New Directory Category" %>
44
47
  <% end %>
45
- </div>
48
+ <!-- Un-Ordered List - Listing Categories -->
49
+ </div>
50
+ <!-- Panel Body -->
46
51
  </div>
47
- <!-- Page Content -->
52
+ <!-- Page & Panel Content -->
@@ -17,7 +17,7 @@
17
17
  <!-- Page Header -->
18
18
  <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
19
  <!-- Page Header -->
20
-
20
+
21
21
  <!-- Page Content -->
22
22
  <div class="panel panel-inverse">
23
23
  <div class="panel-heading">
@@ -29,7 +29,9 @@
29
29
  <h4 class="panel-title"><%= yield(:phc_title) %></h4>
30
30
  </div>
31
31
  <div class="panel-body">
32
+ <!-- Form for New Directory Category -->
32
33
  <%= render 'form', directory_category: @directory_category %>
34
+ <!-- Form for New Directory Category -->
33
35
  </div>
34
36
  </div>
35
37
  <!-- Page Content -->