phcscriptcdnpro 1.4.2 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/phcscriptcdnpro/scriptcdn/authors_controller.rb +12 -12
  3. data/app/controllers/phcscriptcdnpro/scriptcdn/mains_controller.rb +67 -0
  4. data/app/controllers/phcscriptcdnpro/scriptcdn/urls_controller.rb +85 -0
  5. data/app/controllers/phcscriptcdnpro/scriptcdn/versions_controller.rb +63 -0
  6. data/app/helpers/phcscriptcdnpro/scriptcdn/mains_helper.rb +4 -0
  7. data/app/helpers/phcscriptcdnpro/scriptcdn/urls_helper.rb +4 -0
  8. data/app/helpers/phcscriptcdnpro/scriptcdn/versions_helper.rb +4 -0
  9. data/app/models/phcscriptcdnpro/scriptcdn/author.rb +1 -1
  10. data/app/models/phcscriptcdnpro/scriptcdn/{script.rb → main.rb} +3 -3
  11. data/app/models/phcscriptcdnpro/scriptcdn/url.rb +9 -0
  12. data/app/models/phcscriptcdnpro/scriptcdn/version.rb +10 -0
  13. data/app/views/phcscriptcdnpro/scriptcdn/mains/_form.html.erb +18 -0
  14. data/app/views/phcscriptcdnpro/scriptcdn/{scripts → mains}/edit.html.erb +3 -3
  15. data/app/views/phcscriptcdnpro/scriptcdn/mains/index.html.erb +66 -0
  16. data/app/views/phcscriptcdnpro/scriptcdn/{scripts → mains}/new.html.erb +3 -3
  17. data/app/views/phcscriptcdnpro/scriptcdn/mains/show.html.erb +19 -0
  18. data/app/views/phcscriptcdnpro/scriptcdn/urls/_form.html.erb +14 -0
  19. data/app/views/phcscriptcdnpro/scriptcdn/urls/_formpatch.html.erb +14 -0
  20. data/app/views/phcscriptcdnpro/scriptcdn/{scripturls → urls}/edit.html.erb +1 -1
  21. data/app/views/phcscriptcdnpro/scriptcdn/{scripturls → urls}/index.html.erb +10 -17
  22. data/app/views/phcscriptcdnpro/scriptcdn/{scripturls → urls}/new.html.erb +1 -1
  23. data/app/views/phcscriptcdnpro/scriptcdn/urls/show.html.erb +9 -0
  24. data/app/views/phcscriptcdnpro/scriptcdn/versions/_form.html.erb +21 -0
  25. data/app/views/phcscriptcdnpro/scriptcdn/{scriptversions → versions}/edit.html.erb +1 -1
  26. data/app/views/phcscriptcdnpro/scriptcdn/{scriptversions → versions}/index.html.erb +5 -5
  27. data/app/views/phcscriptcdnpro/scriptcdn/{scriptversions → versions}/new.html.erb +1 -1
  28. data/config/routes.rb +9 -0
  29. data/db/migrate/20160617181959_create_phcscriptcdnpro_scriptcdn_authors.rb +5 -1
  30. data/db/migrate/20160618200955_create_phcscriptcdnpro_scriptcdn_urls.rb +19 -0
  31. data/db/migrate/20160618201418_create_phcscriptcdnpro_scriptcdn_mains.rb +20 -0
  32. data/db/migrate/20160618201703_create_phcscriptcdnpro_scriptcdn_versions.rb +15 -0
  33. data/lib/phcscriptcdnpro/version.rb +1 -1
  34. metadata +29 -25
  35. data/app/controllers/phcscriptcdnpro/scriptcdn/scripts_controller.rb +0 -73
  36. data/app/controllers/phcscriptcdnpro/scriptcdn/scripturls_controller.rb +0 -85
  37. data/app/controllers/phcscriptcdnpro/scriptcdn/scriptversions_controller.rb +0 -64
  38. data/app/models/phcscriptcdnpro/scriptcdn/scripturl.rb +0 -15
  39. data/app/models/phcscriptcdnpro/scriptcdn/scriptversion.rb +0 -15
  40. data/app/views/phcscriptcdnpro/scriptcdn/scripts/_form.html.erb +0 -22
  41. data/app/views/phcscriptcdnpro/scriptcdn/scripts/index.html.erb +0 -66
  42. data/app/views/phcscriptcdnpro/scriptcdn/scripts/show.html.erb +0 -20
  43. data/app/views/phcscriptcdnpro/scriptcdn/scripturls/_form.html.erb +0 -22
  44. data/app/views/phcscriptcdnpro/scriptcdn/scripturls/_formpatch.html.erb +0 -22
  45. data/app/views/phcscriptcdnpro/scriptcdn/scriptversions/_form.html.erb +0 -14
  46. data/db/migrate/20160222025658_create_phcscriptcdnpro_scriptcdn_scripts.rb +0 -14
  47. data/db/migrate/20160222030223_create_phcscriptcdnpro_scriptcdn_scriptversions.rb +0 -11
  48. data/db/migrate/20160222030446_create_phcscriptcdnpro_scriptcdn_scripturls.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a084cf3c486e42260e55d7f6ae7ac460c2500295
4
- data.tar.gz: d90f8b5c116585944a0053fe490e926732098019
3
+ metadata.gz: 1953263639e969b8c3f8b1fdb8cb5364382a1d3d
4
+ data.tar.gz: c4cd0c54d9d67e5974b5b55b33ce7df979a61c28
5
5
  SHA512:
6
- metadata.gz: 05d4048adba046609dc2190bd6b2fc5a57221f5866745ba2af7751dcd1297f289393654dca518f6176eefdb9b283a5fc057b0f1a6a40c9d4bf8db2d87299d9e8
7
- data.tar.gz: 3821a05a9887383aead52d422c8e366a10c433cefc88d3366a51d658f98298dfe516c5ce615389259d2187465e76822b0ec33c5b20f35e8ae06206bb3062a11b
6
+ metadata.gz: 7d7cca3dc48d67c93226cdebc6395cf2b8de085c935f90934a4763a460fe31490361877043b2e88f0df8a64a11f98c04944312d5d2e1d86957f547c2c99ac962
7
+ data.tar.gz: d83459de91b58d35ff274e7682962a86b5eb788feb2f5e685947841e1709110c6769a4c112fb0c2b0fa7607f8e149b4205df1c523da28141728a0e5dae6c11af
@@ -1,4 +1,4 @@
1
- require_dependency "phcscriptcdnpro/application_controller"
1
+ require_dependency "phcscriptcdnpro/application_controller"
2
2
 
3
3
  module Phcscriptcdnpro
4
4
  class Scriptcdn::AuthorsController < ApplicationController
@@ -10,26 +10,26 @@ module Phcscriptcdnpro
10
10
 
11
11
  # Author Index
12
12
  def index
13
- scriptcdn_script = Scriptcdn::Script.find(params[:script_id])
14
- @scriptcdn_authors = scriptcdn_script.authors
13
+ scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
14
+ @scriptcdn_authors = scriptcdn_main.authors
15
15
  end
16
16
 
17
17
  # New Author
18
18
  def new
19
- scriptcdn_script = Scriptcdn::Script.find(params[:script_id])
20
- @scriptcdn_author = scriptcdn_script.authors.build
19
+ scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
20
+ @scriptcdn_author = scriptcdn_main.authors.build
21
21
  end
22
22
 
23
23
  # Edit Author
24
24
  def edit
25
- scriptcdn_script = Scriptcdn::Script.find(params[:script_id])
26
- @scriptcdn_author = scriptcdn_script.authors.find(params[:id])
25
+ scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
26
+ @scriptcdn_author = scriptcdn_main.authors.find(params[:id])
27
27
  end
28
28
 
29
29
  # POST Author
30
30
  def create
31
- @scriptcdn_script = Scriptcdn::Script.find(params[:script_id])
32
- @scriptcdn_author = @scriptcdn_script.authors.create(scriptcdn_author_params)
31
+ @scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
32
+ @scriptcdn_author = @scriptcdn_main.authors.create(scriptcdn_author_params)
33
33
  if @scriptcdn_author.save
34
34
  redirect_to @scriptcdn_author, notice: 'Author was successfully created.'
35
35
  else
@@ -48,8 +48,8 @@ module Phcscriptcdnpro
48
48
 
49
49
  # DELETE Author
50
50
  def destroy
51
- @scriptcdn_script = Scriptcdn::Script.find(params[:script_id])
52
- @scriptcdn_author = @scriptcdn_script.authors.find(params[:id])
51
+ @scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
52
+ @scriptcdn_author = @scriptcdn_main.authors.find(params[:id])
53
53
  @scriptcdn_author.destroy
54
54
  redirect_to scriptcdn_authors_url, notice: 'Author was successfully destroyed.'
55
55
  end
@@ -58,7 +58,7 @@ module Phcscriptcdnpro
58
58
 
59
59
  # Common Callbacks
60
60
  def set_scriptcdn_author
61
- @scriptcdn_author = Scriptcdn::Author.find(params[:id])
61
+ @scriptcdn_author = Scriptcdn::Author.find(params[:id])
62
62
  end
63
63
 
64
64
  # Whitelist
@@ -0,0 +1,67 @@
1
+ require_dependency "phcscriptcdnpro/application_controller"
2
+
3
+ module Phcscriptcdnpro
4
+ class Scriptcdn::MainsController < ApplicationController
5
+
6
+ # Security & Action Filters
7
+ before_action :require_user
8
+ layout '/layouts/phcscriptcdnpro/application.html.erb'
9
+ before_action :set_scriptcdn_main, only: [:show, :edit, :update, :destroy]
10
+
11
+ # Script CDN Backend Index
12
+ def index
13
+ @scriptcdn_mains = Scriptcdn::Main.all
14
+ end
15
+
16
+ # Script CDN Backend Profile
17
+ def show
18
+ end
19
+
20
+ # New Script Listing
21
+ def new
22
+ @scriptcdn_main = Scriptcdn::Main.new
23
+ end
24
+
25
+ # Edit Script Listing
26
+ def edit
27
+ end
28
+
29
+ # POST Script CDN
30
+ def create
31
+ @scriptcdn_main = Scriptcdn::Main.new(scriptcdn_main_params)
32
+ if @scriptcdn_main.save
33
+ redirect_to @scriptcdn_main, notice: 'Main was successfully created.'
34
+ else
35
+ render :new
36
+ end
37
+ end
38
+
39
+ # PATCH/PUT Script
40
+ def update
41
+ if @scriptcdn_main.update(scriptcdn_main_params)
42
+ redirect_to @scriptcdn_main, notice: 'Main was successfully updated.'
43
+ else
44
+ render :edit
45
+ end
46
+ end
47
+
48
+ # DELETE Script
49
+ def destroy
50
+ @scriptcdn_main.destroy
51
+ redirect_to scriptcdn_mains_url, notice: 'Main was successfully destroyed.'
52
+ end
53
+
54
+ private
55
+
56
+ # Common Callbacks
57
+ def set_scriptcdn_main
58
+ @scriptcdn_main = Scriptcdn::Main.find(params[:id])
59
+ end
60
+
61
+ # Whitelist
62
+ def scriptcdn_main_params
63
+ params.require(:scriptcdn_main).permit(:scriptname, :scriptdescription, :version_id)
64
+ end
65
+
66
+ end
67
+ end
@@ -0,0 +1,85 @@
1
+ require_dependency "phcscriptcdnpro/application_controller"
2
+
3
+ module Phcscriptcdnpro
4
+ class Scriptcdn::ScripturlsController < ApplicationController
5
+
6
+ # Security & Action Filters
7
+ before_action :require_user
8
+ layout '/layouts/phcscriptcdnpro/application.html.erb'
9
+ before_action :set_scriptcdn_scripturl, only: [:edit, :update, :destroy]
10
+
11
+ # Index for Script URL
12
+ def index
13
+ scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
14
+ @scriptcdn_scripturls = scriptcdn_main.urls
15
+ end
16
+
17
+ # New Script URL
18
+ def new
19
+ scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
20
+ @scriptcdn_url = scriptcdn_main.urls.build
21
+ respond_to do |format|
22
+ format.html # new.html.erb
23
+ format.xml { render :xml => @scriptcdn_main }
24
+ end
25
+ end
26
+
27
+ # Edit Script URL
28
+ def edit
29
+ scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
30
+ @scriptcdn_url = scriptcdn_main.urls.find(params[:id])
31
+ end
32
+
33
+ # POST Script URL
34
+ def create
35
+ @scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
36
+ @scriptcdn_url = @scriptcdn_main.urls.create(scriptcdn_scripturl_params)
37
+ respond_to do |format|
38
+ if @scriptcdn_url.save
39
+ format.html { redirect_to scriptcdn_script_scripturls_path, notice: 'Script URL was Successfully Created.' }
40
+ format.json { render action: 'show', status: :created, location: @scriptcdn_url }
41
+ else
42
+ format.html { render action: 'new' }
43
+ format.json { render json: @scriptcdn_url.errors, status: :unprocessable_entity }
44
+ end
45
+ end
46
+ end
47
+
48
+ # PATCH/PUT Script URL
49
+ def update
50
+ respond_to do |format|
51
+ if @scriptcdn_url.update(scriptcdn_scripturl_params)
52
+ format.html { redirect_to scriptcdn_script_scripturls_path, notice: 'Script URL was Successfully Updated.' }
53
+ format.json { head :no_content }
54
+ else
55
+ format.html { render action: 'edit' }
56
+ format.json { render json: @scriptcdn_url.errors, status: :unprocessable_entity }
57
+ end
58
+ end
59
+ end
60
+
61
+ # Delete Script URL
62
+ def destroy
63
+ @scriptcdn_main = Scriptcdn::Main.find(params[:main_id])
64
+ @scriptcdn_url = @scriptcdn_main.urls.find(params[:id])
65
+ @scriptcdn_url.destroy
66
+ respond_to do |format|
67
+ format.html { redirect_to scriptcdn_script_scripturls_path, notice: 'Script URL was Successfully Deleted.' }
68
+ format.json { head :no_content }
69
+ end
70
+ end
71
+
72
+ private
73
+
74
+ # Common Callbacks
75
+ def set_scriptcdn_scripturl
76
+ @scriptcdn_url = Scriptcdn::Url.find(params[:id])
77
+ end
78
+
79
+ # Whitelist
80
+ def scriptcdn_scripturl_params
81
+ params.require(:scriptcdn_url).permit(:scripturl, :main_id)
82
+ end
83
+
84
+ end
85
+ end
@@ -0,0 +1,63 @@
1
+ require_dependency "phcscriptcdnpro/application_controller"
2
+
3
+ module Phcscriptcdnpro
4
+ class Scriptcdn::VersionsController < ApplicationController
5
+
6
+ # Security & Action Filters
7
+ before_action :require_user
8
+ layout '/layouts/phcscriptcdnpro/application.html.erb'
9
+ before_action :set_scriptcdn_version, only: [:edit, :update, :destroy]
10
+
11
+ # Script Version Index
12
+ def index
13
+ @scriptcdn_versions = Scriptcdn::Version.all
14
+ end
15
+
16
+ # New Script Version
17
+ def new
18
+ @scriptcdn_version = Scriptcdn::Version.new
19
+ end
20
+
21
+ # Edit Script Version
22
+ def edit
23
+ end
24
+
25
+ # POST Script Version
26
+ def create
27
+ @scriptcdn_version = Scriptcdn::Version.new(scriptcdn_version_params)
28
+ if @scriptcdn_version.save
29
+ redirect_to scriptcdn_versions_url, notice: 'Script version was successfully created.'
30
+ else
31
+ render :new
32
+ end
33
+ end
34
+
35
+ # PATCH/PUT Script Version
36
+ def update
37
+ if @scriptcdn_version.update(scriptcdn_version_params)
38
+ redirect_to scriptcdn_versions_url, notice: 'Script version was successfully updated.'
39
+ else
40
+ render :edit
41
+ end
42
+ end
43
+
44
+ # DELETE Script Version
45
+ def destroy
46
+ @scriptcdn_version.destroy
47
+ redirect_to scriptcdn_versions_url, notice: 'Script version was successfully destroyed.'
48
+ end
49
+
50
+ private
51
+
52
+ # Callbacks
53
+ def set_scriptcdn_version
54
+ @scriptcdn_version = Scriptcdn::Version.find(params[:id])
55
+ end
56
+
57
+ # Whitelist
58
+ def scriptcdn_version_params
59
+ params.require(:scriptcdn_version).permit(:scriptversion)
60
+ end
61
+
62
+ end
63
+ end
@@ -0,0 +1,4 @@
1
+ module Phcscriptcdnpro
2
+ module Scriptcdn::MainsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Phcscriptcdnpro
2
+ module Scriptcdn::UrlsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Phcscriptcdnpro
2
+ module Scriptcdn::VersionsHelper
3
+ end
4
+ end
@@ -2,7 +2,7 @@ module Phcscriptcdnpro
2
2
  class Scriptcdn::Author < ActiveRecord::Base
3
3
 
4
4
  # Relationships
5
- belongs_to :script, class_name: 'Script::Main'
5
+ belongs_to :main, class_name: 'Script::Main'
6
6
 
7
7
  end
8
8
  end
@@ -1,9 +1,9 @@
1
1
  module Phcscriptcdnpro
2
- class Scriptcdn::Script < ActiveRecord::Base
2
+ class Scriptcdn::Main < ActiveRecord::Base
3
3
 
4
4
  # Relationships
5
- has_many :scriptversions, class_name: 'Script::Version'
6
- has_many :scripturls, class_name: 'Script::Url'
5
+ has_many :versions, class_name: 'Script::Version'
6
+ has_many :urls, class_name: 'Script::Url'
7
7
  has_many :authors, class_name: 'Script::Author'
8
8
 
9
9
  # Validation for Form Fields
@@ -0,0 +1,9 @@
1
+ module Phcscriptcdnpro
2
+ class Scriptcdn::Url < ActiveRecord::Base
3
+
4
+ # Relationships
5
+ has_many :versions, class_name: 'Script::Version'
6
+ belongs_to :main, class_name: 'Script::Main'
7
+
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ module Phcscriptcdnpro
2
+ class Scriptcdn::Version < ActiveRecord::Base
3
+
4
+ # Relationships
5
+ belongs_to :versions, class_name: 'Script::Version'
6
+ has_many :urls, class_name: 'Script::Url'
7
+ has_many :authors, class_name: 'Script::Author'
8
+
9
+ end
10
+ end
@@ -0,0 +1,18 @@
1
+ <%= form_for(@scriptcdn_main) do |f| %>
2
+
3
+ # Validation Notifier
4
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_script %>
5
+
6
+ <div class="form-group field_with_error">
7
+ <%= f.label :scriptname, "Script Name" %>
8
+ <%= f.text_field :scriptname, placeholder: "Script Name", class: "form-control" %>
9
+ </div>
10
+ <div class="form-group field_with_error">
11
+ <%= f.label :scriptdescription, "Script Description", class: "form-control" %>
12
+ <%= f.text_area :scriptdescription %>
13
+ </div>
14
+ <div class="form-group field_with_error">
15
+ <%= f.submit, class: "btn blue-hoki" %>
16
+ </div>
17
+
18
+ <% end %>
@@ -1,12 +1,12 @@
1
1
  <!-- Title System -->
2
- <% phc_title "Scripts" %>
3
- <% phc_title_tagline "Update Script" %>
2
+ <% phc_title "Script Listing" %>
3
+ <% phc_title_tagline "Update Script Information" %>
4
4
 
5
5
  <!-- Bread Crumb -->
6
6
  <div class="page-bar">
7
7
 
8
8
  <ul class="page-breadcrumb">
9
- <li><%= link_to "Scripts Main", phcscriptcdnpro.scriptcdn_scripts_path %><i class="fa fa-circle"></i></li>
9
+ <li><%= link_to "Scripts Main", phcscriptcdnpro.scriptcdn_mains_path %><i class="fa fa-circle"></i></li>
10
10
  <li class="active"><%= yield(:phc_title_tagline) %></li>
11
11
  </ul>
12
12
 
@@ -0,0 +1,66 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script" %>
3
+ <% phc_title_tagline "Script CDN Index" %>
4
+
5
+ <!-- Bread Crumb -->
6
+ <div class="page-bar">
7
+
8
+ <ul class="page-breadcrumb">
9
+ <li><%= link_to "Script Listing", scriptcdn_script_path %><i class="fa fa-circle"></i></li>
10
+ <li class="active"><%= yield(:phc_title_tagline) %></li>
11
+ </ul>
12
+
13
+ </div>
14
+
15
+ <!-- Main Content -->
16
+ <div class="row">
17
+ <div class="col-lg-12">
18
+ <div class="portlet light">
19
+
20
+ <div class="portlet-title">
21
+ <div class="caption">
22
+ <span class="caption-subject bold uppercase"><%= yield(:phc_title_tagline) %></span>
23
+ </div>
24
+ <div class="actions">
25
+ <%= link_to new_scriptcdn_main_path, class: "btn blue-chambray" do %>
26
+ <i class="fa fa-plus"></i> Add a New Script for CDN
27
+ <% end %>
28
+ </div>
29
+ </div>
30
+
31
+ <div class="portlet-body">
32
+ <div class="table-responsive">
33
+ <table class="table table-striped table-bordered table-hover table-header-fixed">
34
+ <thead>
35
+ <tr>
36
+ <th>Scriptname</th>
37
+ <th>Scriptdescription</th>
38
+ <th>Version</th>
39
+ <th></th>
40
+ </tr>
41
+ </thead>
42
+ <tbody>
43
+ <% @scriptcdn_mains.each do |scriptcdn_main| %>
44
+ <tr>
45
+ <td><%= scriptcdn_main.scriptname %></td>
46
+ <td><%= scriptcdn_main.scriptdescription %></td>
47
+ <td><%= scriptcdn_main.version %></td>
48
+ <td>
49
+ <div class="btn-group" role="group" aria-label="Script">
50
+ <% if current_user %>
51
+ <%= link_to 'Show', scriptcdn_script, class: "btn blue-chambray" %>
52
+ <%= link_to 'Edit', edit_scriptcdn_script_path(scriptcdn_script), class: "btn blue-chambray" %>
53
+ <%= link_to 'Destroy', scriptcdn_script, class: "btn btn-w-m btn-danger btn-xs btn-phc-custom", method: :delete, data: { confirm: 'Are you sure?' }, class: "btn red-mint" %>
54
+ <% end %>
55
+ </div>
56
+ </td>
57
+ </tr>
58
+ <% end %>
59
+ </tbody>
60
+ </table>
61
+ </div>
62
+ </div>
63
+
64
+ </div>
65
+ </div>
66
+ </div>
@@ -1,12 +1,12 @@
1
1
  <!-- Title System -->
2
- <% phc_title "Scripts" %>
3
- <% phc_title_tagline "New CDN Script" %>
2
+ <% phc_title "Script Listing" %>
3
+ <% phc_title_tagline "Add New Script" %>
4
4
 
5
5
  <!-- Bread Crumb -->
6
6
  <div class="page-bar">
7
7
 
8
8
  <ul class="page-breadcrumb">
9
- <li><%= link_to "Scripts Main", phcscriptcdnpro.scriptcdn_scripts_path %><i class="fa fa-circle"></i></li>
9
+ <li><%= link_to "Scripts Main", phcscriptcdnpro.scriptcdn_mains_path %><i class="fa fa-circle"></i></li>
10
10
  <li class="active"><%= yield(:phc_title_tagline) %></li>
11
11
  </ul>
12
12
 
@@ -0,0 +1,19 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Scriptname:</strong>
5
+ <%= @scriptcdn_main.scriptname %>
6
+ </p>
7
+
8
+ <p>
9
+ <strong>Scriptdescription:</strong>
10
+ <%= @scriptcdn_main.scriptdescription %>
11
+ </p>
12
+
13
+ <p>
14
+ <strong>Version:</strong>
15
+ <%= @scriptcdn_main.version %>
16
+ </p>
17
+
18
+ <%= link_to 'Edit', edit_scriptcdn_main_path(@scriptcdn_main) %> |
19
+ <%= link_to 'Back', scriptcdn_mains_path %>
@@ -0,0 +1,14 @@
1
+ <%= form_for([@scriptcdn_url.script, @scriptcdn_url], url: scriptcdn_script_urls_path) do |f| %>
2
+
3
+ # Validation Notifier
4
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_script %>
5
+
6
+ <div class="form-group field_with_error">
7
+ <%= f.label :scripturl, "Script URL" %>
8
+ <%= f.text_field :scripturl, placeholder: "Script Name", class: "form-control" %>
9
+ </div>
10
+ <div class="form-group field_with_error">
11
+ <%= f.submit, class: "btn blue-hoki" %>
12
+ </div>
13
+
14
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <%= form_for([@scriptcdn_url.script, @scriptcdn_url], url: scriptcdn_script_url_path, method: :patch) do |f| %>
2
+
3
+ # Validation Notifier
4
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_script %>
5
+
6
+ <div class="form-group field_with_error">
7
+ <%= f.label :scripturl, "Script URL" %>
8
+ <%= f.text_field :scripturl, placeholder: "Script Name", class: "form-control" %>
9
+ </div>
10
+ <div class="form-group field_with_error">
11
+ <%= f.submit, class: "btn blue-hoki" %>
12
+ </div>
13
+
14
+ <% end %>
@@ -6,7 +6,7 @@
6
6
  <div class="page-bar">
7
7
 
8
8
  <ul class="page-breadcrumb">
9
- <li><%= link_to "Script URL List", phcscriptcdnpro.scriptcdn_script_scripturls_path %><i class="fa fa-circle"></i></li>
9
+ <li><%= link_to "Script URL List", phcscriptcdnpro.scriptcdn_script_urls_path %><i class="fa fa-circle"></i></li>
10
10
  <li class="active"><%= yield(:phc_title_tagline) %></li>
11
11
  </ul>
12
12
 
@@ -1,12 +1,12 @@
1
1
  <!-- Title System -->
2
2
  <% phc_title "Script URL" %>
3
- <% phc_title_tagline "New Script URL" %>
3
+ <% phc_title_tagline "Script URL Index" %>
4
4
 
5
5
  <!-- Bread Crumb -->
6
6
  <div class="page-bar">
7
7
 
8
8
  <ul class="page-breadcrumb">
9
- <li><%= link_to "Script Versions", phcscriptcdnpro.scriptcdn_script_scripturls_path %><i class="fa fa-circle"></i></li>
9
+ <li><%= link_to "Script Versions", phcscriptcdnpro.scriptcdn_script_urls_path %><i class="fa fa-circle"></i></li>
10
10
  <li class="active"><%= yield(:phc_title_tagline) %></li>
11
11
  </ul>
12
12
 
@@ -23,8 +23,8 @@
23
23
  <span class="caption-subject bold uppercase"><%= yield(:phc_title_tagline) %></span>
24
24
  </div>
25
25
  <div class="actions">
26
- <%= link_to new_scriptcdn_scriptversion_scripturl_path, class: "btn blue-chambray" do %>
27
- <i class="fa fa-plus"></i> Add a New Script Url
26
+ <%= link_to new_scriptcdn_main_path, class: "btn blue-chambray" do %>
27
+ <i class="fa fa-plus"></i> Add a New Script
28
28
  <% end %>
29
29
  </div>
30
30
  </div>
@@ -32,33 +32,26 @@
32
32
  <div class="portlet-body">
33
33
  <div class="table-responsive">
34
34
  <table class="table table-striped table-bordered table-hover table-header-fixed">
35
-
36
35
  <thead>
37
36
  <tr>
38
- <th>Script URL</th>
39
- <th>Script Type</th>
37
+ <th>Scripturl</th>
40
38
  <th></th>
41
39
  </tr>
42
40
  </thead>
43
-
44
41
  <tbody>
45
- <% @scriptcdn_scripturls.each do |scriptcdn_scripturl| %>
42
+ <% @scriptcdn_urls.each do |scriptcdn_url| %>
46
43
  <tr>
47
- <td><%= scriptcdn_scripturl.scrpturlphc %></td>
48
- <td><%= scriptcdn_scripturl.scrpturltype %></td>
49
- <td><div class="btn-group" role="group" aria-label="Script CDN">
50
- <%= link_to 'Edit', edit_scriptcdn_script_scripturl_path(scriptcdn_scripturl.script, scriptcdn_scripturl), class: "btn blue-chambray" %>
51
- <%= link_to 'Destroy', scriptcdn_script_scripturl_path(scriptcdn_scripturl.script, scriptcdn_scripturl), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn red-mint" %>
52
- </div></td>
44
+ <td><%= scriptcdn_url.scripturl %></td>
45
+ <td><%= link_to 'Show', scriptcdn_url %></td>
46
+ <td><%= link_to 'Edit', edit_scriptcdn_url_path(scriptcdn_url) %></td>
47
+ <td><%= link_to 'Destroy', scriptcdn_url, method: :delete, data: { confirm: 'Are you sure?' } %></td>
53
48
  </tr>
54
49
  <% end %>
55
50
  </tbody>
56
-
57
51
  </table>
58
52
  </div>
59
53
  </div>
60
54
 
61
55
  </div>
62
-
63
56
  </div>
64
57
  </div>
@@ -6,7 +6,7 @@
6
6
  <div class="page-bar">
7
7
 
8
8
  <ul class="page-breadcrumb">
9
- <li><%= link_to "Script URL List", phcscriptcdnpro.scriptcdn_script_scripturls_path %><i class="fa fa-circle"></i></li>
9
+ <li><%= link_to "Script URL List", phcscriptcdnpro.scriptcdn_script_urls_path %><i class="fa fa-circle"></i></li>
10
10
  <li class="active"><%= yield(:phc_title_tagline) %></li>
11
11
  </ul>
12
12
 
@@ -0,0 +1,9 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Scripturl:</strong>
5
+ <%= @scriptcdn_url.scripturl %>
6
+ </p>
7
+
8
+ <%= link_to 'Edit', edit_scriptcdn_url_path(@scriptcdn_url) %> |
9
+ <%= link_to 'Back', scriptcdn_urls_path %>
@@ -0,0 +1,21 @@
1
+ <%= form_for(@scriptcdn_version) do |f| %>
2
+ <% if @scriptcdn_version.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@scriptcdn_version.errors.count, "error") %> prohibited this scriptcdn_version from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @scriptcdn_version.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :scriptversion %><br>
16
+ <%= f.text_field :scriptversion %>
17
+ </div>
18
+ <div class="actions">
19
+ <%= f.submit %>
20
+ </div>
21
+ <% end %>
@@ -6,7 +6,7 @@
6
6
  <div class="page-bar">
7
7
 
8
8
  <ul class="page-breadcrumb">
9
- <li><%= link_to "Script Versions", phcscriptcdnpro.scriptcdn_scriptversions_path %><i class="fa fa-circle"></i></li>
9
+ <li><%= link_to "Script Versions", phcscriptcdnpro.scriptcdn_versions_path %><i class="fa fa-circle"></i></li>
10
10
  <li class="active"><%= yield(:phc_title_tagline) %></li>
11
11
  </ul>
12
12