phcdevworks_core_modules 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/phcdevworks_core_modules/affiliate/links.coffee +3 -0
  3. data/app/assets/stylesheets/phcdevworks_core_modules/affiliate/links.scss +3 -0
  4. data/app/assets/stylesheets/scaffolds.scss +65 -0
  5. data/app/controllers/phcdevworks_core_modules/affiliate/links_controller.rb +81 -0
  6. data/app/controllers/phcdevworks_core_modules/marketing/optimizations_controller.rb +1 -1
  7. data/app/helpers/phcdevworks_core_modules/affiliate/links_helper.rb +4 -0
  8. data/app/models/phcdevworks_core_modules/affiliate.rb +7 -0
  9. data/app/models/phcdevworks_core_modules/affiliate/link.rb +27 -0
  10. data/app/models/phcdevworks_core_modules/affiliate_link_versions.rb +5 -0
  11. data/app/views/layouts/phcdevworks_core_modules/application.html.erb +2 -2
  12. data/app/views/layouts/phcdevworks_core_modules/components/backend/sidebars/_side_menu.html.erb +19 -2
  13. data/app/views/phcdevworks_core_modules/affiliate/links/_form.html.erb +27 -0
  14. data/app/views/phcdevworks_core_modules/affiliate/links/edit.html.erb +47 -0
  15. data/app/views/phcdevworks_core_modules/affiliate/links/index.html.erb +86 -0
  16. data/app/views/phcdevworks_core_modules/affiliate/links/new.html.erb +47 -0
  17. data/app/views/phcdevworks_core_modules/affiliate/links/show.html.erb +24 -0
  18. data/app/views/phcdevworks_core_modules/marketing/optimizations/index.html.erb +3 -3
  19. data/config/routes.rb +7 -2
  20. data/db/migrate/20210207051304_create_phcdevworks_core_modules_affiliate_link_versions.rb +18 -0
  21. data/db/migrate/20210208130113_create_phcdevworks_core_modules_affiliate_links.rb +18 -0
  22. data/lib/phcdevworks_core_modules/version.rb +1 -1
  23. metadata +67 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30ac8d6358fcbf47857965ccc3e0ea06b080ddbfb8d9564fc2a9a1d865cdc662
4
- data.tar.gz: bc75a4c488d765dc5bbbb0a99ffbf6cc45049ff20b6dbd373d8486bdf3ea12db
3
+ metadata.gz: 5fa62fdc3c286805bd143f1b97e1f3bd33ec47a0e6b2417f14f7f330a5a43a43
4
+ data.tar.gz: 7692cbdb6312e594376bd5a51bb0ed0f411fbcc5ab2b35cf04102ba1fcf5b582
5
5
  SHA512:
6
- metadata.gz: 1b15dfa9d785ff498415af72a1471b6711c73fba6162ff8a4cb9f76a65b381b446093cfa96f128068d676c5a21a8d3a332610dbb5767426993365a2472c8a5f4
7
- data.tar.gz: 73022c91595a8dfee511900c94d4d2b8f61fbe9ab6b710056970aa02345bdb386a4d0fb0a199ae81d01fa141bfc7914ca256ee75ba38aa46729d6d6cfa9d99dc
6
+ metadata.gz: feb2582ab3bfba9e1241a096265e974ad31774e4773178b5350585ba086f7e8fe6c1d199a9982aede68e1b9359a749278500a2f404a703ac7c7350d44249dfb2
7
+ data.tar.gz: c30c3b5a6ecadf348dc32cba0e2128b2ec769165408a768f630f15046607d424731b46a58572d872bc4f8b4d439df7ba9f22f4f69126f995f2efeef58f59f8c3
@@ -0,0 +1,3 @@
1
+ # Place all the behaviors and hooks related to the matching controller here.
2
+ # All this logic will automatically be available in application.js.
3
+ # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the Affiliate::Links controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -0,0 +1,65 @@
1
+ body {
2
+ background-color: #fff;
3
+ color: #333;
4
+ margin: 33px; }
5
+
6
+ body, p, ol, ul, td {
7
+ font-family: verdana, arial, helvetica, sans-serif;
8
+ font-size: 13px;
9
+ line-height: 18px; }
10
+
11
+ pre {
12
+ background-color: #eee;
13
+ padding: 10px;
14
+ font-size: 11px; }
15
+
16
+ a {
17
+ color: #000; }
18
+
19
+ a:visited {
20
+ color: #666; }
21
+
22
+ a:hover {
23
+ color: #fff;
24
+ background-color: #000; }
25
+
26
+ th {
27
+ padding-bottom: 5px; }
28
+
29
+ td {
30
+ padding: 0 5px 7px; }
31
+
32
+ div.field,
33
+ div.actions {
34
+ margin-bottom: 10px; }
35
+
36
+ #notice {
37
+ color: green; }
38
+
39
+ .field_with_errors {
40
+ padding: 2px;
41
+ background-color: red;
42
+ display: table; }
43
+
44
+ #error_explanation {
45
+ width: 450px;
46
+ border: 2px solid red;
47
+ padding: 7px 7px 0;
48
+ margin-bottom: 20px;
49
+ background-color: #f0f0f0; }
50
+
51
+ #error_explanation h2 {
52
+ text-align: left;
53
+ font-weight: bold;
54
+ padding: 5px 5px 5px 15px;
55
+ font-size: 12px;
56
+ margin: -7px -7px 0;
57
+ background-color: #c00;
58
+ color: #fff; }
59
+
60
+ #error_explanation ul li {
61
+ font-size: 12px;
62
+ list-style: square; }
63
+
64
+ label {
65
+ display: block; }
@@ -0,0 +1,81 @@
1
+ require_dependency "phcdevworks_core_modules/application_controller"
2
+
3
+ module PhcdevworksCoreModules
4
+ class Affiliate::LinksController < ApplicationController
5
+
6
+ # Filters & Security
7
+ #include PhcdevworksCore::PhcpluginsHelper
8
+ before_action :authenticate_user!
9
+ before_action :set_paper_trail_whodunnit
10
+ before_action :set_affiliate_link, only: [:show, :edit, :update, :destroy]
11
+
12
+ # GET /affiliate/links
13
+ def index
14
+ @affiliate_links = Affiliate::Link.order('affiliate_link_name ASC')
15
+ end
16
+
17
+ # GET /affiliate/links/1
18
+ def show
19
+ end
20
+
21
+ # GET /affiliate/links/new
22
+ def new
23
+ @affiliate_link = Affiliate::Link.new
24
+ end
25
+
26
+ # GET /affiliate/links/1/edit
27
+ def edit
28
+ end
29
+
30
+ # POST /affiliate/links
31
+ def create
32
+ @affiliate_link = Affiliate::Link.new(affiliate_link_params)
33
+ @affiliate_link.user_id = current_user.id
34
+ @affiliate_link.org_id = current_user.org_id
35
+ respond_to do |format|
36
+ if @affiliate_link.save
37
+ format.html { redirect_to affiliate_links_path, :flash => { :success => 'Affilate Link has been Added.' }}
38
+ format.json { render :show, status: :created, location: @affiliate_link }
39
+ else
40
+ format.html { render :new }
41
+ format.json { render json: @affiliate_link.errors, status: :unprocessable_entity }
42
+ end
43
+ end
44
+ end
45
+
46
+ # PATCH/PUT /affiliate/links/1
47
+ def update
48
+ respond_to do |format|
49
+ if @affiliate_link.update(affiliate_link_params)
50
+ format.html { redirect_to affiliate_links_path, :flash => { :notice => 'Affiliate Link has been Updated.' }}
51
+ format.json { render :show, status: :ok, location: @affiliate_link }
52
+ else
53
+ format.html { render :edit }
54
+ format.json { render json: @affiliate_link.errors, status: :unprocessable_entity }
55
+ end
56
+ end
57
+ end
58
+
59
+ # DELETE /affiliate/links/1
60
+ def destroy
61
+ @affiliate_link.destroy
62
+ respond_to do |format|
63
+ format.html { redirect_to affiliate_links_path, :flash => { :error => 'Affiliate Link and Post Connections have all been Removed.' }}
64
+ format.json { head :no_content }
65
+ end
66
+ end
67
+
68
+ private
69
+
70
+ # Common Callbacks
71
+ def set_affiliate_link
72
+ @affiliate_link = Affiliate::Link.find(params[:id])
73
+ end
74
+
75
+ # Whitelist
76
+ def affiliate_link_params
77
+ params.require(:affiliate_link).permit(:affiliate_link_name, :affiliate_link_button_text, :affiliate_link_url, :affiliate_link_original_url, :slug, :user_id, :org_id)
78
+ end
79
+
80
+ end
81
+ end
@@ -47,7 +47,7 @@ module PhcdevworksCoreModules
47
47
  def update
48
48
  respond_to do |format|
49
49
  if @marketing_optimization.update(marketing_optimization_params)
50
- format.html { redirect_to marketing_optimizations_path, :flash => { :notice => 'Tutorial has been Updated.' }}
50
+ format.html { redirect_to marketing_optimizations_path, :flash => { :notice => 'SEO Attributes has been Updated.' }}
51
51
  format.json { render :show, status: :ok, location: @marketing_optimization }
52
52
  else
53
53
  format.html { render :edit }
@@ -0,0 +1,4 @@
1
+ module PhcdevworksCoreModules
2
+ module Affiliate::LinksHelper
3
+ end
4
+ end
@@ -0,0 +1,7 @@
1
+ module PhcdevworksCoreModules
2
+ module Affiliate
3
+ def self.table_name_prefix
4
+ 'phcdevworks_core_modules_affiliate_'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,27 @@
1
+ module PhcdevworksCoreModules
2
+ class Affiliate::Link < ApplicationRecord
3
+
4
+ # Clean URL Initialize
5
+ extend FriendlyId
6
+
7
+ # Paper Trail Initialize
8
+ has_paper_trail versions: {class_name: "PhcdevworksCoreModules::AffiliateLinkVersions"}
9
+
10
+ # Relationships for Local
11
+ belongs_to :user, class_name: "PhcdevworksAccounts::User"
12
+
13
+ if defined?phcdevworks_press
14
+ has_many :posts, class_name: "PhcdevworksPress::Article::Post"
15
+ has_many :posts, class_name: "PhcdevworksPress::Review::Post"
16
+ has_many :posts, class_name: "PhcdevworksPress::List::Post"
17
+ end
18
+
19
+ # Clean URL Define
20
+ friendly_id :affiliate_link_nice_urls, use: [:slugged, :finders]
21
+
22
+ def affiliate_link_nice_urls
23
+ [:affiliate_link_name]
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,5 @@
1
+ module PhcdevworksCoreModules
2
+ class AffiliateLinkVersions < PaperTrail::Version
3
+ self.table_name = :phcdevworks_core_modules_affiliate_link_versions
4
+ end
5
+ end
@@ -3,8 +3,8 @@
3
3
  <head>
4
4
 
5
5
  <!-- SEO System -->
6
- <% phc_seo_title "PHCDevworks Accounts" %>
7
- <% phc_seo_description "Ruby on Rails 6 Authentication and User Management Engine." %>
6
+ <% phc_seo_title "PHCDevworks Core Modules" %>
7
+ <% phc_seo_description "Ruby on Rails 6 core plugin for PHCDevworks plugins with common modules to handle functions universally handle common functions." %>
8
8
  <!-- SEO System -->
9
9
 
10
10
  <!-- SEO and Site Description -->
@@ -234,7 +234,7 @@
234
234
 
235
235
  <% if defined?phcdevworks_core_modules %>
236
236
  <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Core Modules -->
237
- <li class="nav-header">Core Modules</li>
237
+ <li class="nav-header">Categories</li>
238
238
  <li class="has-sub">
239
239
  <a href="javascript:;">
240
240
  <b class="caret"></b>
@@ -246,11 +246,28 @@
246
246
  <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/post/categories#new") %>"><%= link_to("New Category", phcdevworks_core_modules.new_post_category_path) %></li>
247
247
  </ul>
248
248
  </li>
249
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Core Modules -->
250
+ <% end %>
251
+
252
+ <% if defined?phcdevworks_core_modules %>
253
+ <!-- -PHC- Sidebar - Sidebar Navigation - PHCDevworks Core Modules -->
254
+ <li class="nav-header">Marketing</li>
255
+ <li class="has-sub">
256
+ <a href="javascript:;">
257
+ <b class="caret"></b>
258
+ <i class="fad fa-link"></i>
259
+ <span>Affiliate Links</span>
260
+ </a>
261
+ <ul class="sub-menu">
262
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/affiliate/links") %>"><%= link_to("Affiliate Link Index", phcdevworks_core_modules.affiliate_links_path) %></li>
263
+ <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/affiliate/links#new") %>"><%= link_to("New Affiliate Link", phcdevworks_core_modules.new_affiliate_link_path) %></li>
264
+ </ul>
265
+ </li>
249
266
  <li class="has-sub">
250
267
  <a href="javascript:;">
251
268
  <b class="caret"></b>
252
269
  <i class="fad fa-analytics"></i>
253
- <span>Marketing</span>
270
+ <span>Search Optimization</span>
254
271
  </a>
255
272
  <ul class="sub-menu">
256
273
  <li class="<%= phc_menu_active_controller("phcdevworks_core_modules/marketing/optimizations") %>"><%= link_to("SEO Data Index", phcdevworks_core_modules.marketing_optimizations_path) %></li>
@@ -0,0 +1,27 @@
1
+ <%= form_with(model: affiliate_link) do |form| %>
2
+
3
+ <div class="form-group">
4
+ <%= form.label :affiliate_link_name, "Link Name" %>
5
+ <%= form.text_field :affiliate_link_name, class: "form-control" %>
6
+ </div>
7
+
8
+ <div class="form-group">
9
+ <%= form.label :affiliate_link_button_text, "Button Text" %>
10
+ <%= form.text_field :affiliate_link_button_text, class: "form-control" %>
11
+ </div>
12
+
13
+ <div class="form-group">
14
+ <%= form.label :affiliate_link_url, "Affiliate Link" %>
15
+ <%= form.text_field :affiliate_link_url, class: "form-control" %>
16
+ </div>
17
+
18
+ <div class="form-group">
19
+ <%= form.label :affiliate_link_original_url, "Original URL" %>
20
+ <%= form.text_field :affiliate_link_original_url, class: "form-control" %>
21
+ </div>
22
+
23
+ <div class="actions">
24
+ <%= form.submit class: "btn btn-primary" %>
25
+ </div>
26
+
27
+ <% end %>
@@ -0,0 +1,47 @@
1
+ <!-- PHCTitleSEO Title Variables -->
2
+ <% phc_title "Affiliate Manager" %>
3
+ <% phc_title_tagline "Update Affiliate Link" %>
4
+ <% phc_breadcrumb_one yield(:phc_title_tagline) %>
5
+ <% phc_breadcrumb_two link_to "Affiliate Link Index", phcdevworks_core_modules.affiliate_links_path %>
6
+ <!-- PHCTitleSEO Title Variables -->
7
+
8
+ <!-- Page Bradcrumbs -->
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>
12
+ </ol>
13
+ <!-- Page Bradcrumbs -->
14
+
15
+ <!-- Page Header -->
16
+ <h2 class="page-header"><%= yield(:phc_title) %></h2>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page Content -->
20
+ <div class="row">
21
+ <div class="col-lg-12">
22
+
23
+ <!-- Panel -->
24
+ <div class="panel panel-inverse">
25
+
26
+ <!-- Panel - Heading -->
27
+ <div class="panel-heading">
28
+ <h4 class="panel-title"><%= yield(:phc_title) %></h4>
29
+ </div>
30
+ <!-- Panel - Heading -->
31
+
32
+ <!-- Panel - Body -->
33
+ <div class="panel-body">
34
+
35
+ <!-- Edit Form -->
36
+ <%= render 'form', affiliate_link: @affiliate_link %>
37
+ <!-- Edit Form -->
38
+
39
+ </div>
40
+ <!-- Panel - Body -->
41
+
42
+ </div>
43
+ <!-- Panel -->
44
+
45
+ </div>
46
+ </div>
47
+ <!-- Page Content -->
@@ -0,0 +1,86 @@
1
+ <!-- PHCTitleSEO Title Variables -->
2
+ <% phc_title "Marketing Manager" %>
3
+ <% phc_title_tagline "Affiliate Links" %>
4
+ <% phc_breadcrumb_one yield(:phc_title_tagline) %>
5
+ <% phc_breadcrumb_two link_to "Affiliate Link Index", phcdevworks_core_modules.affiliate_links_path %>
6
+ <!-- PHCTitleSEO Title Variables -->
7
+
8
+ <!-- Page Bradcrumbs -->
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>
12
+ </ol>
13
+ <!-- Page Bradcrumbs -->
14
+
15
+ <!-- Page Header -->
16
+ <h2 class="page-header"><%= yield(:phc_title) %></h2>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page Content -->
20
+ <div class="row">
21
+ <div class="col-lg-12">
22
+
23
+ <!-- Panel -->
24
+ <div class="panel panel-inverse">
25
+
26
+ <!-- Panel - Heading -->
27
+ <div class="panel-heading">
28
+ <h4 class="panel-title"><%= yield(:phc_title) %> - <%= yield(:phc_title_tagline) %></h4>
29
+ </div>
30
+ <!-- Panel - Heading -->
31
+
32
+ <!-- Panel - Body -->
33
+ <div class="panel-body">
34
+
35
+ <!-- Index - Table -->
36
+ <div class="table-responsive">
37
+ <table class="table table-striped table-bordered">
38
+
39
+ <thead>
40
+ <tr>
41
+ <th>Link Name</th>
42
+ <th>Button Text</th>
43
+ <th>Affiliate URL</th>
44
+ <th>Original URL</th>
45
+ <th></th>
46
+ </tr>
47
+ </thead>
48
+
49
+ <tbody>
50
+ <% @affiliate_links.each do |affiliate_link| %>
51
+ <tr>
52
+ <td><%= affiliate_link.affiliate_link_name %></td>
53
+ <td><%= affiliate_link.affiliate_link_button_text %></td>
54
+ <td><%= affiliate_link.affiliate_link_url %></td>
55
+ <td><%= affiliate_link.affiliate_link_original_url %></td>
56
+ <td>
57
+ <div class="btn-group d-flex" role="group">
58
+ <%= link_to "Link Details", affiliate_link, class: "btn btn-purple btn-xs" %>
59
+ <%= link_to "Update Link", edit_affiliate_link_path(affiliate_link), class: "btn btn-primary btn-xs" %>
60
+ <%= link_to "Remove", affiliate_link, method: :delete, data: { confirm: "Are you sure? This action cannot be reversed." }, class: "btn btn-danger btn-xs" %>
61
+ </div>
62
+ </td>
63
+ </tr>
64
+ <% end %>
65
+ </tbody>
66
+
67
+ </table>
68
+ </div>
69
+ <!-- Index - Table -->
70
+
71
+ <!-- New Button -->
72
+ <%= link_to phcdevworks_core_modules.new_affiliate_link_path, class: "btn btn-primary btn-sm" do %>
73
+ <i class="fad fa-plus-circle"></i>
74
+ Add a New Affiliate Link
75
+ <% end %>
76
+ <!-- New Button -->
77
+
78
+ </div>
79
+ <!-- Panel - Body -->
80
+
81
+ </div>
82
+ <!-- Panel -->
83
+
84
+ </div>
85
+ </div>
86
+ <!-- Page Content -->
@@ -0,0 +1,47 @@
1
+ <!-- PHCTitleSEO Title Variables -->
2
+ <% phc_title "Affiliate Manager" %>
3
+ <% phc_title_tagline "New Affiliate Link" %>
4
+ <% phc_breadcrumb_one yield(:phc_title_tagline) %>
5
+ <% phc_breadcrumb_two link_to "Affiliate Link Index", phcdevworks_core_modules.affiliate_links_path %>
6
+ <!-- PHCTitleSEO Title Variables -->
7
+
8
+ <!-- Page Bradcrumbs -->
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>
12
+ </ol>
13
+ <!-- Page Bradcrumbs -->
14
+
15
+ <!-- Page Header -->
16
+ <h2 class="page-header"><%= yield(:phc_title) %></h2>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page Content -->
20
+ <div class="row">
21
+ <div class="col-lg-12">
22
+
23
+ <!-- Panel -->
24
+ <div class="panel panel-inverse">
25
+
26
+ <!-- Panel - Heading -->
27
+ <div class="panel-heading">
28
+ <h4 class="panel-title"><%= yield(:phc_title) %></h4>
29
+ </div>
30
+ <!-- Panel - Heading -->
31
+
32
+ <!-- Panel - Body -->
33
+ <div class="panel-body">
34
+
35
+ <!-- Edit Form -->
36
+ <%= render 'form', affiliate_link: @affiliate_link %>
37
+ <!-- Edit Form -->
38
+
39
+ </div>
40
+ <!-- Panel - Body -->
41
+
42
+ </div>
43
+ <!-- Panel -->
44
+
45
+ </div>
46
+ </div>
47
+ <!-- Page Content -->
@@ -0,0 +1,24 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Affiliate link name:</strong>
5
+ <%= @affiliate_link.affiliate_link_name %>
6
+ </p>
7
+
8
+ <p>
9
+ <strong>Affiliate link button text:</strong>
10
+ <%= @affiliate_link.affiliate_link_button_text %>
11
+ </p>
12
+
13
+ <p>
14
+ <strong>Affiliate link url:</strong>
15
+ <%= @affiliate_link.affiliate_link_url %>
16
+ </p>
17
+
18
+ <p>
19
+ <strong>Affiliate link original url:</strong>
20
+ <%= @affiliate_link.affiliate_link_original_url %>
21
+ </p>
22
+
23
+ <%= link_to 'Edit', edit_affiliate_link_path(@affiliate_link) %> |
24
+ <%= link_to 'Back', affiliate_links_path %>
@@ -24,9 +24,9 @@
24
24
  <div class="panel panel-inverse">
25
25
 
26
26
  <!-- Panel - Heading -->
27
- <div class="panel-heading">
28
- <h4 class="panel-title"><%= yield(:phc_title) %></h4>
29
- </div>
27
+ <div class="panel-heading">
28
+ <h4 class="panel-title"><%= yield(:phc_title) %> - <%= yield(:phc_title_tagline) %></h4>
29
+ </div>
30
30
  <!-- Panel - Heading -->
31
31
 
32
32
  <!-- Panel - Body -->
data/config/routes.rb CHANGED
@@ -4,12 +4,17 @@ PhcdevworksCoreModules::Engine.routes.draw do
4
4
  namespace :post do
5
5
  resources :categories, class_name: 'Post::Category'
6
6
  end
7
-
7
+
8
8
  # Routes for Marketing
9
9
  namespace :marketing do
10
10
  resources :optimizations, class_name: 'Marketing::Optimization'
11
11
  end
12
-
12
+
13
+ # Routes for Affiliate
14
+ namespace :affiliate do
15
+ resources :links, class_name: 'Affiliate::Link'
16
+ end
17
+
13
18
  # Mount Routes
14
19
  mount PhcdevworksAccounts::Engine, :at => '/'
15
20
 
@@ -0,0 +1,18 @@
1
+ class CreatePhcdevworksCoreModulesAffiliateLinkVersions < ActiveRecord::Migration[6.1]
2
+ TEXT_BYTES = 1_073_741_823
3
+ def change
4
+ create_table :phcdevworks_core_modules_affiliate_link_versions do |t|
5
+
6
+ t.string :item_type, {:null=>false}
7
+ t.integer :item_id, null: false
8
+ t.string :event, null: false
9
+ t.string :whodunnit
10
+ t.text :object, limit: TEXT_BYTES
11
+ t.datetime :created_at
12
+
13
+ end
14
+
15
+ add_index :phcdevworks_core_modules_affiliate_link_versions, %i(item_type item_id), :name => 'affiliate_link_versions'
16
+
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ class CreatePhcdevworksCoreModulesAffiliateLinks < ActiveRecord::Migration[6.1]
2
+ def change
3
+ create_table :phcdevworks_core_modules_affiliate_links do |t|
4
+
5
+ t.string :affiliate_link_name
6
+ t.string :affiliate_link_button_text
7
+ t.string :affiliate_link_url
8
+ t.string :affiliate_link_original_url
9
+
10
+ t.string :slug
11
+ t.string :user_id
12
+ t.string :org_id
13
+
14
+ t.timestamps
15
+
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksCoreModules
2
- VERSION = '7.0.0'
2
+ VERSION = "7.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_core_modules
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-24 00:00:00.000000000 Z
11
+ date: 2021-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '6.1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 6.1.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,62 +27,65 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '6.1'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 6.1.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: jbuilder
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '2.10'
39
+ version: '2.11'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '2.10'
46
+ version: '2.11'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: paper_trail
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '11.0'
53
+ version: '11.1'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '11.0'
60
+ version: '11.1'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: phcthemes_admin_panel_pack
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '3.2'
67
+ version: '4.0'
62
68
  type: :runtime
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
72
  - - "~>"
67
73
  - !ruby/object:Gem::Version
68
- version: '3.2'
74
+ version: '4.0'
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: phcthemes_web_theme_pack
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
79
  - - "~>"
74
80
  - !ruby/object:Gem::Version
75
- version: '3.2'
81
+ version: '4.0'
76
82
  type: :runtime
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
86
  - - "~>"
81
87
  - !ruby/object:Gem::Version
82
- version: '3.2'
88
+ version: '4.0'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: phcdevworks_active_menus
85
91
  requirement: !ruby/object:Gem::Requirement
@@ -87,6 +93,9 @@ dependencies:
87
93
  - - "~>"
88
94
  - !ruby/object:Gem::Version
89
95
  version: '2.2'
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 2.2.1
90
99
  type: :runtime
91
100
  prerelease: false
92
101
  version_requirements: !ruby/object:Gem::Requirement
@@ -94,6 +103,9 @@ dependencies:
94
103
  - - "~>"
95
104
  - !ruby/object:Gem::Version
96
105
  version: '2.2'
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: 2.2.1
97
109
  - !ruby/object:Gem::Dependency
98
110
  name: phcdevworks_core
99
111
  requirement: !ruby/object:Gem::Requirement
@@ -101,6 +113,9 @@ dependencies:
101
113
  - - "~>"
102
114
  - !ruby/object:Gem::Version
103
115
  version: '2.2'
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: 2.2.1
104
119
  type: :runtime
105
120
  prerelease: false
106
121
  version_requirements: !ruby/object:Gem::Requirement
@@ -108,6 +123,9 @@ dependencies:
108
123
  - - "~>"
109
124
  - !ruby/object:Gem::Version
110
125
  version: '2.2'
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: 2.2.1
111
129
  - !ruby/object:Gem::Dependency
112
130
  name: phcdevworks_notifications
113
131
  requirement: !ruby/object:Gem::Requirement
@@ -115,6 +133,9 @@ dependencies:
115
133
  - - "~>"
116
134
  - !ruby/object:Gem::Version
117
135
  version: '2.2'
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: 2.2.1
118
139
  type: :runtime
119
140
  prerelease: false
120
141
  version_requirements: !ruby/object:Gem::Requirement
@@ -122,6 +143,9 @@ dependencies:
122
143
  - - "~>"
123
144
  - !ruby/object:Gem::Version
124
145
  version: '2.2'
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: 2.2.1
125
149
  - !ruby/object:Gem::Dependency
126
150
  name: phcdevworks_titleseo
127
151
  requirement: !ruby/object:Gem::Requirement
@@ -129,6 +153,9 @@ dependencies:
129
153
  - - "~>"
130
154
  - !ruby/object:Gem::Version
131
155
  version: '3.2'
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: 3.2.1
132
159
  type: :runtime
133
160
  prerelease: false
134
161
  version_requirements: !ruby/object:Gem::Requirement
@@ -136,6 +163,9 @@ dependencies:
136
163
  - - "~>"
137
164
  - !ruby/object:Gem::Version
138
165
  version: '3.2'
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: 3.2.1
139
169
  - !ruby/object:Gem::Dependency
140
170
  name: wicked
141
171
  requirement: !ruby/object:Gem::Requirement
@@ -184,42 +214,42 @@ dependencies:
184
214
  requirements:
185
215
  - - "~>"
186
216
  - !ruby/object:Gem::Version
187
- version: '1.8'
217
+ version: '1.9'
188
218
  type: :runtime
189
219
  prerelease: false
190
220
  version_requirements: !ruby/object:Gem::Requirement
191
221
  requirements:
192
222
  - - "~>"
193
223
  - !ruby/object:Gem::Version
194
- version: '1.8'
224
+ version: '1.9'
195
225
  - !ruby/object:Gem::Dependency
196
226
  name: aws-sdk-s3
197
227
  requirement: !ruby/object:Gem::Requirement
198
228
  requirements:
199
229
  - - "~>"
200
230
  - !ruby/object:Gem::Version
201
- version: '1.85'
231
+ version: '1.88'
202
232
  type: :runtime
203
233
  prerelease: false
204
234
  version_requirements: !ruby/object:Gem::Requirement
205
235
  requirements:
206
236
  - - "~>"
207
237
  - !ruby/object:Gem::Version
208
- version: '1.85'
238
+ version: '1.88'
209
239
  - !ruby/object:Gem::Dependency
210
240
  name: google-cloud-storage
211
241
  requirement: !ruby/object:Gem::Requirement
212
242
  requirements:
213
243
  - - "~>"
214
244
  - !ruby/object:Gem::Version
215
- version: '1.29'
245
+ version: '1.30'
216
246
  type: :runtime
217
247
  prerelease: false
218
248
  version_requirements: !ruby/object:Gem::Requirement
219
249
  requirements:
220
250
  - - "~>"
221
251
  - !ruby/object:Gem::Version
222
- version: '1.29'
252
+ version: '1.30'
223
253
  - !ruby/object:Gem::Dependency
224
254
  name: mini_magick
225
255
  requirement: !ruby/object:Gem::Requirement
@@ -241,6 +271,9 @@ dependencies:
241
271
  - - "~>"
242
272
  - !ruby/object:Gem::Version
243
273
  version: '3.0'
274
+ - - ">="
275
+ - !ruby/object:Gem::Version
276
+ version: 3.0.1
244
277
  type: :runtime
245
278
  prerelease: false
246
279
  version_requirements: !ruby/object:Gem::Requirement
@@ -248,6 +281,9 @@ dependencies:
248
281
  - - "~>"
249
282
  - !ruby/object:Gem::Version
250
283
  version: '3.0'
284
+ - - ">="
285
+ - !ruby/object:Gem::Version
286
+ version: 3.0.1
251
287
  - !ruby/object:Gem::Dependency
252
288
  name: factory_bot_rails
253
289
  requirement: !ruby/object:Gem::Requirement
@@ -335,17 +371,25 @@ files:
335
371
  - README.md
336
372
  - Rakefile
337
373
  - app/assets/config/phcdevworks_core_modules_manifest.js
374
+ - app/assets/javascripts/phcdevworks_core_modules/affiliate/links.coffee
375
+ - app/assets/stylesheets/phcdevworks_core_modules/affiliate/links.scss
338
376
  - app/assets/stylesheets/phcdevworks_core_modules/application.scss
339
377
  - app/assets/stylesheets/phcdevworks_core_modules/marketing/optimizations.scss
340
378
  - app/assets/stylesheets/phcdevworks_core_modules/post/categories.scss
379
+ - app/assets/stylesheets/scaffolds.scss
380
+ - app/controllers/phcdevworks_core_modules/affiliate/links_controller.rb
341
381
  - app/controllers/phcdevworks_core_modules/application_controller.rb
342
382
  - app/controllers/phcdevworks_core_modules/marketing/optimizations_controller.rb
343
383
  - app/controllers/phcdevworks_core_modules/post/categories_controller.rb
384
+ - app/helpers/phcdevworks_core_modules/affiliate/links_helper.rb
344
385
  - app/helpers/phcdevworks_core_modules/application_helper.rb
345
386
  - app/helpers/phcdevworks_core_modules/marketing/optimizations_helper.rb
346
387
  - app/helpers/phcdevworks_core_modules/post/categories_helper.rb
347
388
  - app/jobs/phcdevworks_core_modules/application_job.rb
348
389
  - app/mailers/phcdevworks_core_modules/application_mailer.rb
390
+ - app/models/phcdevworks_core_modules/affiliate.rb
391
+ - app/models/phcdevworks_core_modules/affiliate/link.rb
392
+ - app/models/phcdevworks_core_modules/affiliate_link_versions.rb
349
393
  - app/models/phcdevworks_core_modules/application_record.rb
350
394
  - app/models/phcdevworks_core_modules/marketing.rb
351
395
  - app/models/phcdevworks_core_modules/marketing/optimization.rb
@@ -358,6 +402,11 @@ files:
358
402
  - app/views/layouts/phcdevworks_core_modules/components/backend/footer/_footer.html.erb
359
403
  - app/views/layouts/phcdevworks_core_modules/components/backend/navigation/_top_menu.html.erb
360
404
  - app/views/layouts/phcdevworks_core_modules/components/backend/sidebars/_side_menu.html.erb
405
+ - app/views/phcdevworks_core_modules/affiliate/links/_form.html.erb
406
+ - app/views/phcdevworks_core_modules/affiliate/links/edit.html.erb
407
+ - app/views/phcdevworks_core_modules/affiliate/links/index.html.erb
408
+ - app/views/phcdevworks_core_modules/affiliate/links/new.html.erb
409
+ - app/views/phcdevworks_core_modules/affiliate/links/show.html.erb
361
410
  - app/views/phcdevworks_core_modules/marketing/optimizations/_form.html.erb
362
411
  - app/views/phcdevworks_core_modules/marketing/optimizations/edit.html.erb
363
412
  - app/views/phcdevworks_core_modules/marketing/optimizations/index.html.erb
@@ -374,6 +423,8 @@ files:
374
423
  - db/migrate/20200705225433_create_phcdevworks_core_modules_marketing_optimization_versions.rb
375
424
  - db/migrate/20200706094820_create_phcdevworks_core_modules_post_categories.rb
376
425
  - db/migrate/20201012225709_remove_phcdevworks_core_modules_post_categories.rb
426
+ - db/migrate/20210207051304_create_phcdevworks_core_modules_affiliate_link_versions.rb
427
+ - db/migrate/20210208130113_create_phcdevworks_core_modules_affiliate_links.rb
377
428
  - lib/phcdevworks_core_modules.rb
378
429
  - lib/phcdevworks_core_modules/engine.rb
379
430
  - lib/phcdevworks_core_modules/version.rb