phcmemberspro 82.3.1 → 82.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bca6573791e7b5cfacb0118fb3b23be9fd4ae09ad11848cf873802e73c936d7
4
- data.tar.gz: ce8f7d0571a9a737ea43c9267084ac8dea8a0cbdae65e04d94677981a2e04691
3
+ metadata.gz: f3556433c10d3b0fc59f7480155e7d3ba103e064adc91eb5f7839c59198556bc
4
+ data.tar.gz: 4a2ab8268865a38835abdcd52fc882cc7b10ab2bcaf26518e708202562d07847
5
5
  SHA512:
6
- metadata.gz: 560f1e68115665dc989d899086b69854e1764323ec5df9ce9d90f2e5249cf3901e4effd101f09d7da2983d70a72716fa2f5c03c3d53d783af61607e3a3e0268f
7
- data.tar.gz: 66e2efdacfa1eab979ce86c713d882438cd876591487d7dd121f47935521ea8c5d5b292efbde8da956ada8b16b6444a320dbad5476c45f0364ceaf7742bacf8f
6
+ metadata.gz: 733ce9935b5b49810b7efdb7ef716bf62b685f878ed29548519829974f0162d557edb00efd5b96fb54fbee739c1212f77192a7c40d0b42284f8d29b4bcfd27da
7
+ data.tar.gz: aa565f77024e946df1f76461bc37b4b4b637f03b38b35a924bdb025d8abb4fbbac41c9f5c07270bb1efbe343de72ff8fdf0a936dd1ca66f96904bf666566a922
@@ -3,7 +3,8 @@ require_dependency "phcmemberspro/application_controller"
3
3
  module Phcmemberspro
4
4
  class Directory::CategoriesController < ApplicationController
5
5
 
6
- # Security & Action Filters
6
+ # Include Core Helpers, Security & Action Filters
7
+ include Phccorehelpers::PhcpluginsproHelper
7
8
  before_action :authenticate_user!
8
9
  before_action :set_paper_trail_whodunnit
9
10
  before_action :set_directory_category, only: [:show, :edit, :update, :destroy]
@@ -22,8 +23,6 @@ module Phcmemberspro
22
23
  # NEW - Directory Category
23
24
  def new
24
25
  @directory_category = Directory::Category.new
25
- @directory_category.user_id = current_user.id
26
- @directory_category.org_id = current_user.org_id
27
26
  end
28
27
 
29
28
  # EDIT - Directory Category
@@ -33,8 +32,8 @@ module Phcmemberspro
33
32
  # POST - Directory Category
34
33
  def create
35
34
  @directory_category = Directory::Category.new(directory_category_params)
36
- @directory_category.org_id = current_user.org_id
37
35
  @directory_category.user_id = current_user.id
36
+ @directory_category.org_id = current_user.org_id
38
37
  if @directory_category.save
39
38
  redirect_to directory_categories_url, notice: 'Category was successfully created.'
40
39
  else
@@ -44,8 +43,6 @@ module Phcmemberspro
44
43
 
45
44
  # PATCH/PUT - Directory Category
46
45
  def update
47
- @directory_category.org_id = current_user.org_id
48
- @directory_category.user_id = current_user.id
49
46
  if @directory_category.update(directory_category_params)
50
47
  redirect_to directory_categories_url, notice: 'Category was successfully updated.'
51
48
  else
@@ -2,9 +2,9 @@ require_dependency "phcmemberspro/application_controller"
2
2
 
3
3
  module Phcmemberspro
4
4
  class Member::AddressesController < ApplicationController
5
-
5
+
6
6
  # Include Core Helpers, Security & Action Filters
7
- include Phccorehelpers::ApplicationHelper
7
+ include Phccorehelpers::PhcpluginsproHelper
8
8
  before_action :phcmemberspro_get_member_profile_info
9
9
  before_action :authenticate_user!
10
10
  before_action :set_paper_trail_whodunnit
@@ -41,19 +41,18 @@ module Phcmemberspro
41
41
  @member_address.org_id = current_user.org_id
42
42
  if @member_address.save
43
43
  redirect_to member_profile_addresses_url, notice: 'Listing was successfully created.'
44
- else
45
- render :new
44
+ else
45
+ render :new
46
46
  end
47
47
  end
48
48
 
49
49
  # PATCH/PUT - Directory Listings
50
50
  def update
51
- @member_address.user_id = current_user.id
52
- @member_address.org_id = current_user.org_id
51
+ @profile = Member::Profile.find(params[:profile_id])
53
52
  if @member_address.update(member_address_params)
54
53
  redirect_to member_profile_addresses_url, notice: 'Listing was successfully updated.'
55
- else
56
- render :edit
54
+ else
55
+ render :edit
57
56
  end
58
57
  end
59
58
 
@@ -4,7 +4,7 @@ module Phcmemberspro
4
4
  class Member::ListingsController < ApplicationController
5
5
 
6
6
  # Include Core Helpers, Security & Action Filters
7
- include Phccorehelpers::ApplicationHelper
7
+ include Phccorehelpers::PhcpluginsproHelper
8
8
  before_action :phcmemberspro_get_member_profile_info
9
9
  before_action :authenticate_user!
10
10
  before_action :set_paper_trail_whodunnit
@@ -27,8 +27,6 @@ module Phcmemberspro
27
27
  def new
28
28
  profile = Member::Profile.find(params[:profile_id])
29
29
  @member_listing = profile.listings.build
30
- @member_listing.user_id = current_user.id
31
- @member_listing.org_id = current_user.org_id
32
30
  end
33
31
 
34
32
  # EDIT - Directory Listings
@@ -50,8 +48,7 @@ module Phcmemberspro
50
48
 
51
49
  # PATCH/PUT - Directory Listings
52
50
  def update
53
- @member_listing.user_id = current_user.id
54
- @member_listing.org_id = current_user.org_id
51
+ @profile = Member::Profile.find(params[:profile_id])
55
52
  if @member_listing.update(member_listing_params)
56
53
  redirect_to member_profile_listings_url, notice: 'Listing was successfully updated.'
57
54
  else
@@ -3,7 +3,8 @@ require_dependency "phcmemberspro/application_controller"
3
3
  module Phcmemberspro
4
4
  class Member::ProfilesController < ApplicationController
5
5
 
6
- # Security, Layouts & Action Filters
6
+ # Include Core Helpers, Security & Action Filters
7
+ include Phccorehelpers::PhcpluginsproHelper
7
8
  before_action :authenticate_user!
8
9
  before_action :set_paper_trail_whodunnit
9
10
  before_action :set_member_profile, only: [:show, :edit, :update, :destroy]
@@ -23,8 +24,6 @@ module Phcmemberspro
23
24
  # NEW FORM - Member Profile
24
25
  def new
25
26
  @member_profile = Member::Profile.new
26
- @member_profile.user_id = current_user.id
27
- @member_profile.org_id = current_user.org_id
28
27
  end
29
28
 
30
29
  # EDIT FORM - Member Profile
@@ -45,8 +44,6 @@ module Phcmemberspro
45
44
 
46
45
  # PATCH/PUT - Member Profile
47
46
  def update
48
- @member_profile.user_id = current_user.id
49
- @member_profile.org_id = current_user.org_id
50
47
  if @member_profile.update(member_profile_params)
51
48
  redirect_to member_profiles_url, notice: 'Profile was successfully updated.'
52
49
  else
@@ -1 +1,9 @@
1
- <span class="float-left">&copy; 2012-<%= Time.now.year %> - <strong>PHC</strong>Members(Pro) Engine v<%= Gem.loaded_specs["phcmemberspro"].version.to_s %></span> <span class="float-right">Developed with <i class="fas fa-heart hanna_hearts"></i> by <strong>PHC</strong>Devworks</span>
1
+ <span class="float-left">
2
+ &copy; 2012-<%= Time.now.year %> -
3
+ <strong>PHC</strong><i>Members (Pro)</i> -
4
+ Engine v<%= Gem.loaded_specs["phcmemberspro"].version.to_s %>
5
+ </span>
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>
9
+ </span>
@@ -1,8 +1,7 @@
1
1
  <!-- Topbar - Navigation Header -->
2
2
  <div class="navbar-header">
3
3
  <%= link_to phcmemberspro.member_profiles_path, class: "navbar-brand" do %>
4
- <!--<span class="navbar-logo"></span>-->
5
- <strong>PHC</strong>Members(Pro)
4
+ <strong>PHC</strong><i>Members (Pro)</i>
6
5
  <% end %>
7
6
  <button type="button" class="navbar-toggle" data-click="sidebar-toggled">
8
7
  <span class="icon-bar"></span>
@@ -47,8 +47,8 @@
47
47
  <span>Article Posts</span>
48
48
  </a>
49
49
  <ul class="sub-menu">
50
- <li class="<%= is_active_controller('phcpresspro/article/posts') %>"><%= link_to('Article Index', phcpresspro.article_posts_path) %></li>
51
- <li class="<%= is_active_controller('phcpresspro/article/posts#new') %>"><%= link_to('New Aritcle', phcpresspro.new_article_post_path) %></li>
50
+ <li class="<%= phc_menus_active_controller('phcpresspro/article/posts') %>"><%= link_to('Article Index', phcpresspro.article_posts_path) %></li>
51
+ <li class="<%= phc_menus_active_controller('phcpresspro/article/posts#new') %>"><%= link_to('New Aritcle', phcpresspro.new_article_post_path) %></li>
52
52
  </ul>
53
53
  </li>
54
54
  <li class="has-sub">
@@ -58,8 +58,8 @@
58
58
  <span>Article Categories</span>
59
59
  </a>
60
60
  <ul class="sub-menu">
61
- <li class="<%= is_active_controller('phcpresspro/article/categories') %>"><%= link_to('Category Index', phcpresspro.article_categories_path) %></li>
62
- <li class="<%= is_active_controller('phcpresspro/article/categories#new') %>"><%= link_to('New Category', phcpresspro.new_article_category_path) %></li>
61
+ <li class="<%= phc_menus_active_controller('phcpresspro/article/categories') %>"><%= link_to('Category Index', phcpresspro.article_categories_path) %></li>
62
+ <li class="<%= phc_menus_active_controller('phcpresspro/article/categories#new') %>"><%= link_to('New Category', phcpresspro.new_article_category_path) %></li>
63
63
  </ul>
64
64
  </li>
65
65
  <!-- Sidebar - Sidebar Navigation - PHCPress(Pro) -->
@@ -75,8 +75,8 @@
75
75
  <span>Member's Data</span>
76
76
  </a>
77
77
  <ul class="sub-menu">
78
- <li class="<%= is_active_controller('phcmemberspro/member/profiles') %>"><%= link_to('Profile Index', phcmemberspro.member_profiles_path) %></li>
79
- <li class="<%= is_active_controller('phcmemberspro/member/profiles#new') %>"><%= link_to('New Member Profile', phcmemberspro.new_member_profile_path) %></li>
78
+ <li class="<%= phc_menus_active_controller('phcmemberspro/member/profiles') %>"><%= link_to('Profile Index', phcmemberspro.member_profiles_path) %></li>
79
+ <li class="<%= phc_menus_active_controller('phcmemberspro/member/profiles#new') %>"><%= link_to('New Member Profile', phcmemberspro.new_member_profile_path) %></li>
80
80
  </ul>
81
81
  </li>
82
82
  <li class="has-sub">
@@ -86,8 +86,8 @@
86
86
  <span>Member's Directory</span>
87
87
  </a>
88
88
  <ul class="sub-menu">
89
- <li class="<%= is_active_controller('phcmemberspro/directory/categories') %>"><%= link_to('Directory Index', phcmemberspro.directory_categories_path) %></li>
90
- <li class="<%= is_active_controller('phcmemberspro/directory/categories#new') %>"><%= link_to('New Directory Listing', phcmemberspro.new_directory_category_path) %></li>
89
+ <li class="<%= phc_menus_active_controller('phcmemberspro/directory/categories') %>"><%= link_to('Directory Index', phcmemberspro.directory_categories_path) %></li>
90
+ <li class="<%= phc_menus_active_controller('phcmemberspro/directory/categories#new') %>"><%= link_to('New Directory Listing', phcmemberspro.new_directory_category_path) %></li>
91
91
  </ul>
92
92
  </li>
93
93
  <!-- Sidebar - Sidebar Navigation - PHCPress(Pro) -->
@@ -103,8 +103,8 @@
103
103
  <span>Script Posts</span>
104
104
  </a>
105
105
  <ul class="sub-menu">
106
- <li class="<%= is_active_controller('phcscriptcdnpro/script/listings') %>"><%= link_to "All Script Listings", phcscriptcdnpro.script_listings_path %></li>
107
- <li class="<%= is_active_controller('phcscriptcdnpro/script/listings#new') %>"><%= link_to "Add a New Listing", phcscriptcdnpro.new_script_listing_path %></li>
106
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/listings') %>"><%= link_to "All Script Listings", phcscriptcdnpro.script_listings_path %></li>
107
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/listings#new') %>"><%= link_to "Add a New Listing", phcscriptcdnpro.new_script_listing_path %></li>
108
108
  </ul>
109
109
  </li>
110
110
  <li class="has-sub">
@@ -114,10 +114,10 @@
114
114
  <span>Script Extras</span>
115
115
  </a>
116
116
  <ul class="sub-menu">
117
- <li class="<%= is_active_controller('phcscriptcdnpro/script/authors') %>"><%= link_to "Script Authors", phcscriptcdnpro.script_authors_path %></li>
118
- <li class="<%= is_active_controller('phcscriptcdnpro/script/licences') %>"><%= link_to "Script Licences", phcscriptcdnpro.script_licences_path %></li>
119
- <li class="<%= is_active_controller('phcscriptcdnpro/script/extensions') %>"><%= link_to "Script Extensions", phcscriptcdnpro.script_extensions_path %></li>
120
- <li class="<%= is_active_controller('phcscriptcdnpro/script/versions') %>"><%= link_to "Script Versions", phcscriptcdnpro.script_versions_path %></li>
117
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/authors') %>"><%= link_to "Script Authors", phcscriptcdnpro.script_authors_path %></li>
118
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/licences') %>"><%= link_to "Script Licences", phcscriptcdnpro.script_licences_path %></li>
119
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/extensions') %>"><%= link_to "Script Extensions", phcscriptcdnpro.script_extensions_path %></li>
120
+ <li class="<%= phc_menus_active_controller('phcscriptcdnpro/script/versions') %>"><%= link_to "Script Versions", phcscriptcdnpro.script_versions_path %></li>
121
121
  </ul>
122
122
  </li>
123
123
  <!-- Sidebar - Sidebar Navigation - PHCScriptCDN(Pro) -->
@@ -133,8 +133,8 @@
133
133
  <span>Accounts Dashboard</span>
134
134
  </a>
135
135
  <ul class="sub-menu">
136
- <li class="<%= is_active_controller('phcaccountspro/admin/edit') %>"><%= link_to('Settings', phcaccountspro.edit_user_registration_path) %></li>
137
- <li class="<%= is_active_controller('phcaccountspro/admin/new') %>"><%= link_to('Logout', phcaccountspro.destroy_user_session_path, method: :delete) %></li>
136
+ <li class="<%= phc_menus_active_controller('phcaccountspro/admin/edit') %>"><%= link_to('Settings', phcaccountspro.edit_user_registration_path) %></li>
137
+ <li class="<%= phc_menus_active_controller('phcaccountspro/admin/new') %>"><%= link_to('Logout', phcaccountspro.destroy_user_session_path, method: :delete) %></li>
138
138
  </ul>
139
139
  </li>
140
140
  <!-- Sidebar - Sidebar Navigation - PHCAccountsPro -->
@@ -51,7 +51,7 @@
51
51
  <%= phc_members_pro_member_listings.text_field :mbwebsite, class: "form-control", placeholder: "Business/Organization: Website (Public)" %>
52
52
  </div>
53
53
  <div class="form-group field_with_errors">
54
- <%= phc_members_pro_member_listings.collection_check_boxes :category_ids, Phcmemberspro::Directory::Category.all, :id, :catname do |listing_category| %>
54
+ <%= phc_members_pro_member_listings.collection_check_boxes :category_ids, Phcmemberspro::Directory::Category.where(org_id: current_user.org_id), :id, :catname do |listing_category| %>
55
55
  <%= listing_category.check_box %>
56
56
  <%= listing_category.label %></br>
57
57
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module Phcmemberspro
2
- VERSION = "82.3.1"
2
+ VERSION = "82.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcmemberspro
3
3
  version: !ruby/object:Gem::Version
4
- version: 82.3.1
4
+ version: 82.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-14 00:00:00.000000000 Z
11
+ date: 2019-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails