phcscriptcdnpro 5.8.4 → 5.8.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +5 -6
  4. data/Rakefile +11 -14
  5. data/app/controllers/phcscriptcdnpro/application_controller.rb +48 -46
  6. data/app/controllers/phcscriptcdnpro/frontend/listings_controller.rb +4 -2
  7. data/app/controllers/phcscriptcdnpro/script/authors_controller.rb +70 -70
  8. data/app/controllers/phcscriptcdnpro/script/extensions_controller.rb +70 -70
  9. data/app/controllers/phcscriptcdnpro/script/licences_controller.rb +70 -70
  10. data/app/controllers/phcscriptcdnpro/script/listings_controller.rb +70 -70
  11. data/app/controllers/phcscriptcdnpro/script/urls_controller.rb +79 -79
  12. data/app/controllers/phcscriptcdnpro/script/versions_controller.rb +71 -69
  13. data/app/helpers/phcscriptcdnpro/application_helper.rb +9 -10
  14. data/app/jobs/phcscriptcdnpro/application_job.rb +2 -3
  15. data/app/mailers/phcscriptcdnpro/application_mailer.rb +4 -4
  16. data/app/models/phcscriptcdnpro/application_record.rb +3 -3
  17. data/app/models/phcscriptcdnpro/frontend.rb +2 -0
  18. data/app/models/phcscriptcdnpro/frontend/listing.rb +1 -2
  19. data/app/models/phcscriptcdnpro/script.rb +5 -5
  20. data/app/models/phcscriptcdnpro/script/author.rb +5 -5
  21. data/app/models/phcscriptcdnpro/script/extension.rb +6 -6
  22. data/app/models/phcscriptcdnpro/script/licence.rb +5 -5
  23. data/app/models/phcscriptcdnpro/script/listing.rb +13 -11
  24. data/app/models/phcscriptcdnpro/script/url.rb +9 -9
  25. data/app/models/phcscriptcdnpro/script/version.rb +7 -7
  26. data/app/views/layouts/phcscriptcdnpro/application.html.erb +6 -7
  27. data/app/views/layouts/phcscriptcdnpro/components/backend/footer/_footer.html.erb +1 -1
  28. data/app/views/layouts/phcscriptcdnpro/components/backend/navigation/_top_bar.html.erb +0 -1
  29. data/app/views/layouts/phcscriptcdnpro/components/backend/sidebars/_left_sidebar.html.erb +1 -2
  30. data/app/views/layouts/phcscriptcdnpro/frontend.html.erb +14 -16
  31. data/app/views/phcscriptcdnpro/frontend/listings/index.html.erb +30 -30
  32. data/app/views/phcscriptcdnpro/frontend/listings/show.html.erb +12 -12
  33. data/app/views/phcscriptcdnpro/script/authors/_form.html.erb +6 -0
  34. data/app/views/phcscriptcdnpro/script/authors/edit.html.erb +6 -7
  35. data/app/views/phcscriptcdnpro/script/authors/index.html.erb +19 -23
  36. data/app/views/phcscriptcdnpro/script/authors/new.html.erb +6 -7
  37. data/app/views/phcscriptcdnpro/script/authors/show.html.erb +6 -6
  38. data/app/views/phcscriptcdnpro/script/extensions/_form.html.erb +6 -0
  39. data/app/views/phcscriptcdnpro/script/extensions/edit.html.erb +8 -9
  40. data/app/views/phcscriptcdnpro/script/extensions/index.html.erb +6 -8
  41. data/app/views/phcscriptcdnpro/script/extensions/new.html.erb +8 -9
  42. data/app/views/phcscriptcdnpro/script/extensions/show.html.erb +7 -9
  43. data/app/views/phcscriptcdnpro/script/licences/_form.html.erb +7 -0
  44. data/app/views/phcscriptcdnpro/script/licences/edit.html.erb +6 -7
  45. data/app/views/phcscriptcdnpro/script/licences/index.html.erb +10 -12
  46. data/app/views/phcscriptcdnpro/script/licences/new.html.erb +6 -7
  47. data/app/views/phcscriptcdnpro/script/licences/show.html.erb +5 -7
  48. data/app/views/phcscriptcdnpro/script/listings/_form.html.erb +7 -1
  49. data/app/views/phcscriptcdnpro/script/listings/edit.html.erb +15 -0
  50. data/app/views/phcscriptcdnpro/script/listings/index.html.erb +14 -4
  51. data/app/views/phcscriptcdnpro/script/listings/new.html.erb +15 -0
  52. data/app/views/phcscriptcdnpro/script/listings/show.html.erb +14 -0
  53. data/app/views/phcscriptcdnpro/script/urls/_form.html.erb +6 -0
  54. data/app/views/phcscriptcdnpro/script/urls/edit.html.erb +17 -6
  55. data/app/views/phcscriptcdnpro/script/urls/index.html.erb +14 -7
  56. data/app/views/phcscriptcdnpro/script/urls/new.html.erb +17 -7
  57. data/app/views/phcscriptcdnpro/script/urls/show.html.erb +14 -10
  58. data/app/views/phcscriptcdnpro/script/versions/_form.html.erb +7 -0
  59. data/app/views/phcscriptcdnpro/script/versions/edit.html.erb +12 -8
  60. data/app/views/phcscriptcdnpro/script/versions/index.html.erb +11 -5
  61. data/app/views/phcscriptcdnpro/script/versions/new.html.erb +12 -8
  62. data/app/views/phcscriptcdnpro/script/versions/show.html.erb +11 -6
  63. data/config/routes.rb +21 -26
  64. data/db/migrate/20160821183652_create_phcscriptcdnpro_script_listings.rb +23 -23
  65. data/db/migrate/20160821183714_create_phcscriptcdnpro_script_authors.rb +17 -17
  66. data/db/migrate/20160821183735_create_phcscriptcdnpro_script_extensions.rb +12 -12
  67. data/db/migrate/20160821183805_create_phcscriptcdnpro_script_licences.rb +18 -18
  68. data/db/migrate/20160821183830_create_phcscriptcdnpro_script_urls.rb +16 -16
  69. data/db/migrate/20160821183946_create_phcscriptcdnpro_script_versions.rb +10 -10
  70. data/lib/phcscriptcdnpro/engine.rb +62 -61
  71. data/lib/phcscriptcdnpro/version.rb +1 -1
  72. metadata +2 -2
@@ -1,74 +1,76 @@
1
1
  require_dependency "phcscriptcdnpro/application_controller"
2
2
 
3
3
  module Phcscriptcdnpro
4
- class Script::VersionsController < ApplicationController
5
-
6
- # Filters & Security
7
- before_action :require_user
8
- before_action :set_script_version, only: [:show, :edit, :update, :destroy]
9
-
10
- # INDEX - Script Versions
11
- def index
12
- @script_versions = Script::Version.all
13
- end
14
-
15
- # DETAILS - Script Versions
16
- def show
17
- end
18
-
19
- # NEW - Script Versions
20
- def new
21
- @script_version = Script::Version.new
22
- end
23
-
24
- # EDIT - Script Versions
25
- def edit
26
- end
27
-
28
- # POST - Script Versions
29
- def create
30
- @script_version = Script::Version.new(script_version_params)
31
- @script_version.user_id = current_user.id
32
- @script_version.user_name = current_user.username
33
- @script_version.membership_id = membership_info.id
34
- @script_version.oganization_id = membership_info.org_id
35
- if @script_version.save
36
- redirect_to script_versions_url, notice: 'Version was successfully created.'
37
- else
38
- render :new
39
- end
40
- end
41
-
42
- # PATCH/PUT - Script Versions
43
- def update
44
- @script_version.user_id = current_user.id
45
- @script_version.user_name = current_user.username
46
- @script_version.membership_id = membership_info.id
47
- @script_version.oganization_id = membership_info.org_id
48
- if @script_version.update(script_version_params)
49
- redirect_to script_versions_url, notice: 'Version was successfully updated.'
50
- else
51
- render :edit
52
- end
53
- end
54
-
55
- # DELETE - Script Versions
56
- def destroy
57
- @script_version.destroy
58
- redirect_to script_versions_url, notice: 'Version was successfully destroyed.'
59
- end
60
-
61
- private
62
-
63
- # Common Callbacks
64
- def set_script_version
65
- @script_version = Script::Version.find(params[:id])
66
- end
4
+ class Script::VersionsController < ApplicationController
5
+
6
+ # Filters & Security
7
+ before_action :require_user
8
+ before_action :set_script_version, only: [:show, :edit, :update, :destroy]
9
+
10
+ # INDEX - Script Versions
11
+ def index
12
+ @script_versions = Script::Version.all
13
+ end
14
+
15
+ # DETAILS - Script Versions
16
+ def show
17
+ end
18
+
19
+ # NEW - Script Versions
20
+ def new
21
+ @script_version = Script::Version.new
22
+ end
23
+
24
+ # EDIT - Script Versions
25
+ def edit
26
+ end
27
+
28
+ # POST - Script Versions
29
+ def create
30
+ @script_version = Script::Version.new(script_version_params)
31
+ @script_version.user_id = current_user.id
32
+ @script_version.user_name = current_user.username
33
+ @script_version.membership_id = membership_info.id
34
+ @script_version.oganization_id = membership_info.org_id
35
+ if @script_version.save
36
+ redirect_to script_versions_url, notice: 'Version was successfully created.'
37
+ else
38
+ render :new
39
+ end
40
+ end
41
+
42
+ # PATCH/PUT - Script Versions
43
+ def update
44
+ @script_version.user_id = current_user.id
45
+ @script_version.user_name = current_user.username
46
+ @script_version.membership_id = membership_info.id
47
+ @script_version.oganization_id = membership_info.org_id
48
+ if @script_version.update(script_version_params)
49
+ redirect_to script_versions_url, notice: 'Version was successfully updated.'
50
+ else
51
+ render :edit
52
+ end
53
+ end
54
+
55
+ # DELETE - Script Versions
56
+ def destroy
57
+ @script_version.destroy
58
+ redirect_to script_versions_url, notice: 'Version was successfully destroyed.'
59
+ end
60
+
61
+ private
62
+
63
+ # Common Callbacks
64
+ def set_script_version
65
+ @script_version = Script::Version.find(params[:id])
66
+ end
67
+
68
+ # Only allow a trusted parameter "white list" through.
69
+ def script_version_params
70
+ params.require(:script_version).permit(:scriptversion, :user_id, :user_name, :membership_id, :oganization_id)
71
+ end
72
+
73
+ end
74
+ end
67
75
 
68
- # Only allow a trusted parameter "white list" through.
69
- def script_version_params
70
- params.require(:script_version).permit(:scriptversion, :user_id, :user_name, :membership_id, :oganization_id)
71
- end
72
76
 
73
- end
74
- end
@@ -1,15 +1,14 @@
1
1
  module Phcscriptcdnpro
2
- module ApplicationHelper
2
+ module ApplicationHelper
3
3
 
4
- # Add Active to Menu
5
- def is_active_controller(controller_name)
6
- params[:controller] == controller_name ? "active open selected" : nil
7
- end
4
+ # Add Active to Menu
5
+ def is_active_controller(controller_name)
6
+ params[:controller] == controller_name ? "active open selected" : nil
7
+ end
8
8
 
9
- def is_active_action(action_name)
10
- params[:action] == action_name ? "active" : nil
11
- end
9
+ def is_active_action(action_name)
10
+ params[:action] == action_name ? "active" : nil
11
+ end
12
12
 
13
-
14
- end
13
+ end
15
14
  end
@@ -1,5 +1,4 @@
1
1
  module Phcscriptcdnpro
2
- class ApplicationJob < ActiveJob::Base
3
-
4
- end
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
5
4
  end
@@ -1,8 +1,8 @@
1
1
  module Phcscriptcdnpro
2
- class ApplicationMailer < ActionMailer::Base
2
+ class ApplicationMailer < ActionMailer::Base
3
3
 
4
- default from: 'no-reply@phcnetworks.net'
5
- layout 'mailer'
4
+ default from: 'no-reply@phcnetworks.net'
5
+ layout 'mailer'
6
6
 
7
- end
7
+ end
8
8
  end
@@ -1,7 +1,7 @@
1
1
  module Phcscriptcdnpro
2
2
 
3
- class ApplicationRecord < ActiveRecord::Base
4
- self.abstract_class = true
5
- end
3
+ class ApplicationRecord < ActiveRecord::Base
4
+ self.abstract_class = true
5
+ end
6
6
 
7
7
  end
@@ -1,7 +1,9 @@
1
1
  module Phcscriptcdnpro
2
2
  module Frontend
3
+
3
4
  def self.table_name_prefix
4
5
  'phcscriptcdnpro_frontend_'
5
6
  end
7
+
6
8
  end
7
9
  end
@@ -1,5 +1,4 @@
1
1
  module Phcscriptcdnpro
2
- class Frontend::Listing < ApplicationRecord
3
-
2
+ class Frontend::Listing < ApplicationRecord
4
3
  end
5
4
  end
@@ -1,9 +1,9 @@
1
1
  module Phcscriptcdnpro
2
- module Script
2
+ module Script
3
3
 
4
- def self.table_name_prefix
5
- 'phcscriptcdnpro_script_'
6
- end
4
+ def self.table_name_prefix
5
+ 'phcscriptcdnpro_script_'
6
+ end
7
7
 
8
- end
8
+ end
9
9
  end
@@ -1,10 +1,10 @@
1
1
  module Phcscriptcdnpro
2
- class Script::Author < ApplicationRecord
2
+ class Script::Author < ApplicationRecord
3
3
 
4
- # Relationships
4
+ # Relationships
5
5
 
6
- # Listing (None Nested)
7
- has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
6
+ # Listing (None Nested)
7
+ has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
8
8
 
9
- end
9
+ end
10
10
  end
@@ -1,11 +1,11 @@
1
1
  module Phcscriptcdnpro
2
- class Script::Extension < ApplicationRecord
2
+ class Script::Extension < ApplicationRecord
3
3
 
4
- # Relationships
4
+ # Relationships
5
5
 
6
- # URLs & Extensions (None Nested)
7
- has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing', :through => :urls
8
- has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
6
+ # URLs & Extensions (None Nested)
7
+ has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing', :through => :urls
8
+ has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
9
9
 
10
- end
10
+ end
11
11
  end
@@ -1,10 +1,10 @@
1
1
  module Phcscriptcdnpro
2
- class Script::Licence < ApplicationRecord
2
+ class Script::Licence < ApplicationRecord
3
3
 
4
- # Relationships
4
+ # Relationships
5
5
 
6
- # Listing (None Nested)
7
- has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
6
+ # Listing (None Nested)
7
+ has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
8
8
 
9
- end
9
+ end
10
10
  end
@@ -1,19 +1,21 @@
1
1
  module Phcscriptcdnpro
2
- class Script::Listing < ApplicationRecord
2
+ class Script::Listing < ApplicationRecord
3
3
 
4
- # Relationships
4
+ # Relationships
5
5
 
6
- # Attach to URL (Nested)
7
- has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
6
+ # Attach to URL (Nested)
7
+ has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
8
8
 
9
- # Attach to Author (None Nested)
10
- belongs_to :author, class_name: 'Phcscriptcdnpro::Script::Author'
9
+ # Attach to Author (None Nested)
10
+ belongs_to :author, class_name: 'Phcscriptcdnpro::Script::Author'
11
11
 
12
- # Attach to Version (None Nested)
13
- belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version'
12
+ # Attach to Version (None Nested)
13
+ belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version'
14
14
 
15
- # Attach to Licence (None Nested)
16
- belongs_to :licence, class_name: 'Phcscriptcdnpro::Script::Licence'
15
+ # Attach to Licence (None Nested)
16
+ belongs_to :licence, class_name: 'Phcscriptcdnpro::Script::Licence'
17
17
 
18
- end
18
+ end
19
19
  end
20
+
21
+
@@ -1,16 +1,16 @@
1
1
  module Phcscriptcdnpro
2
- class Script::Url < ApplicationRecord
2
+ class Script::Url < ApplicationRecord
3
3
 
4
- # Relationships
4
+ # Relationships
5
5
 
6
- # Attach to Listings (Nested)
7
- belongs_to :listing, class_name: 'Phcscriptcdnpro::Script::Listing'
6
+ # Attach to Listings (Nested)
7
+ belongs_to :listing, class_name: 'Phcscriptcdnpro::Script::Listing'
8
8
 
9
- # Attach to Version (None Nested)
10
- belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version'
9
+ # Attach to Version (None Nested)
10
+ belongs_to :version, class_name: 'Phcscriptcdnpro::Script::Version'
11
11
 
12
- # Attach to Extension (None Nested)
13
- belongs_to :extension, class_name: 'Phcscriptcdnpro::Script::Extension'
12
+ # Attach to Extension (None Nested)
13
+ belongs_to :extension, class_name: 'Phcscriptcdnpro::Script::Extension'
14
14
 
15
- end
15
+ end
16
16
  end
@@ -1,13 +1,13 @@
1
1
  module Phcscriptcdnpro
2
- class Script::Version < ApplicationRecord
2
+ class Script::Version < ApplicationRecord
3
3
 
4
- # Relationships
4
+ # Relationships
5
5
 
6
- # Attach to Listing (None Nested)
7
- has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
6
+ # Attach to Listing (None Nested)
7
+ has_many :listings, class_name: 'Phcscriptcdnpro::Script::Listing'
8
8
 
9
- # Attach to URL (None Nested)
10
- has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
9
+ # Attach to URL (None Nested)
10
+ has_many :urls, class_name: 'Phcscriptcdnpro::Script::Url'
11
11
 
12
- end
12
+ end
13
13
  end
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
3
+ <head>
4
4
 
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title><%= content_for?(:title) ? yield(:title) : "PHCScriptCDN - Rails Script Listing Engine" %></title>
@@ -9,16 +9,15 @@
9
9
 
10
10
  <!-- Font -->
11
11
  <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"/>
12
-
12
+
13
13
  <!-- Requried Style Sheets -->
14
14
  <%= stylesheet_link_tag "phcscriptcdnpro/application", media: "all", 'data-turbolinks-track': 'reload' %>
15
-
15
+
16
16
  <!-- Security -->
17
17
  <%= csrf_meta_tags %>
18
18
 
19
- </head>
19
+ </head>
20
20
  <body>
21
-
22
21
  <div id="wrapper" class="<%= params[:controller] %>.<%= params[:action] %>">
23
22
  <nav class="navbar-default navbar-static-side" role="navigation">
24
23
  <%= render 'layouts/phcscriptcdnpro/components/backend/sidebars/left_sidebar' %>
@@ -34,9 +33,9 @@
34
33
  </div>
35
34
  <%= render 'layouts/phcscriptcdnpro/components/backend/sidebars/right_sidebar' %>
36
35
  </div>
37
-
36
+
38
37
  <!-- Requried JavaScripts -->
39
38
  <%= javascript_include_tag "phcscriptcdnpro/application", 'data-turbolinks-track': 'reload' %>
40
-
39
+
41
40
  </body>
42
41
  </html>
@@ -4,5 +4,5 @@
4
4
  <% end %>
5
5
  </div>
6
6
  <div>
7
- &copy; 2012-<%= Time.now.year %> - v5.7.3 - RELEASED - FEB-10-<%= Date.today.year %>
7
+ &copy; 2012-<%= Time.now.year %> - v5.8.4 - RELEASED - FEB-13-<%= Date.today.year %>
8
8
  </div>
@@ -4,7 +4,6 @@
4
4
  </div>
5
5
  <ul class="nav navbar-top-links navbar-right">
6
6
  <li class="nav-item">
7
-
8
7
  </li>
9
8
  </ul>
10
9
  </nav>
@@ -13,7 +13,6 @@
13
13
  </a>
14
14
  <ul class="dropdown-menu animated fadeInRight m-t-xs">
15
15
  <li>
16
-
17
16
  </li>
18
17
  </ul>
19
18
  </div>
@@ -42,7 +41,7 @@
42
41
  </ul>
43
42
  </li>
44
43
  <li class="<%= is_active_controller('phcmemberspro/directory/categories') %>">
45
- <a href=""><i class="fa fa-sitemap"></i> <span class="nav-label">Directories &amp; Listings</span> <span class="fa arrow"></span></a>
44
+ <a href=""><i class="fa fa-sitemap"></i> <span class="nav-label">Directories &amp; Listings</span> <span class="fa arrow"></span></a>
46
45
  <ul class="nav nav-second-level collapse">
47
46
  <li class="<%= is_active_controller('phcmemberspro/directory/categories') %>"><%= link_to "Category List", phcmemberspro.directory_categories_path %></li>
48
47
  <li class="<%= is_active_controller('phcmemberspro/directory/categories#new') %>"><%= link_to "Add a Category", phcmemberspro.new_directory_category_path %></li>