phcscriptcdn 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +3 -3
  4. data/Rakefile +18 -12
  5. data/app/assets/config/phcscriptcdn_manifest.js +2 -0
  6. data/app/assets/javascripts/phcscriptcdn/application.js +1 -4
  7. data/app/assets/javascripts/phcscriptcdn/scriptcdn/{scripts.js → authors.js} +0 -0
  8. data/app/assets/javascripts/phcscriptcdn/scriptcdn/{scripturls.js → information.js} +0 -0
  9. data/app/assets/javascripts/phcscriptcdn/scriptcdn/{scriptversions.js → mains.js} +0 -0
  10. data/app/assets/javascripts/phcscriptcdn/scriptcdn/urls.js +2 -0
  11. data/app/assets/javascripts/phcscriptcdn/scriptcdn/versions.js +2 -0
  12. data/app/assets/stylesheets/phcscriptcdn/application.css +15 -0
  13. data/app/assets/stylesheets/phcscriptcdn/scriptcdn/authors.scss +3 -0
  14. data/app/assets/stylesheets/phcscriptcdn/scriptcdn/information.scss +3 -0
  15. data/app/assets/stylesheets/phcscriptcdn/scriptcdn/mains.scss +3 -0
  16. data/app/assets/stylesheets/phcscriptcdn/scriptcdn/urls.scss +3 -0
  17. data/app/assets/stylesheets/phcscriptcdn/scriptcdn/versions.scss +3 -0
  18. data/app/assets/stylesheets/scaffolds.scss +89 -0
  19. data/app/controllers/phcscriptcdn/application_controller.rb +4 -1
  20. data/app/controllers/phcscriptcdn/scriptcdn/authors_controller.rb +69 -0
  21. data/app/controllers/phcscriptcdn/scriptcdn/informations_controller.rb +69 -0
  22. data/app/controllers/phcscriptcdn/scriptcdn/mains_controller.rb +62 -0
  23. data/app/controllers/phcscriptcdn/scriptcdn/urls_controller.rb +84 -0
  24. data/app/controllers/phcscriptcdn/scriptcdn/versions_controller.rb +69 -0
  25. data/app/jobs/phcscriptcdn/application_job.rb +4 -0
  26. data/app/models/phcscriptcdn/application_record.rb +5 -0
  27. data/app/models/phcscriptcdn/scriptcdn/author.rb +8 -0
  28. data/app/models/phcscriptcdn/scriptcdn/information.rb +8 -0
  29. data/app/models/phcscriptcdn/scriptcdn/main.rb +11 -0
  30. data/app/models/phcscriptcdn/scriptcdn/url.rb +8 -0
  31. data/app/models/phcscriptcdn/scriptcdn/version.rb +8 -0
  32. data/app/models/phcscriptcdn/scriptcdn.rb +5 -5
  33. data/app/views/layouts/phcscriptcdn/application.html.erb +2 -2
  34. data/app/views/layouts/phcscriptcdn/frontend.html.erb +21 -0
  35. data/app/views/phcscriptcdn/scriptcdn/authors/_form.html.erb +29 -0
  36. data/app/views/phcscriptcdn/scriptcdn/authors/_formpatch.html.erb +29 -0
  37. data/app/views/phcscriptcdn/scriptcdn/authors/edit.html.erb +3 -0
  38. data/app/views/phcscriptcdn/scriptcdn/authors/index.html.erb +23 -0
  39. data/app/views/phcscriptcdn/scriptcdn/authors/new.html.erb +3 -0
  40. data/app/views/phcscriptcdn/scriptcdn/information/_form.html.erb +49 -0
  41. data/app/views/phcscriptcdn/scriptcdn/information/_formpatch.html.erb +49 -0
  42. data/app/views/phcscriptcdn/scriptcdn/information/edit.html.erb +3 -0
  43. data/app/views/phcscriptcdn/scriptcdn/information/index.html.erb +26 -0
  44. data/app/views/phcscriptcdn/scriptcdn/information/new.html.erb +3 -0
  45. data/app/views/phcscriptcdn/scriptcdn/information/show.html.erb +58 -0
  46. data/app/views/phcscriptcdn/scriptcdn/mains/_form.html.erb +13 -0
  47. data/app/views/phcscriptcdn/scriptcdn/mains/edit.html.erb +3 -0
  48. data/app/views/phcscriptcdn/scriptcdn/mains/index.html.erb +19 -0
  49. data/app/views/phcscriptcdn/scriptcdn/mains/new.html.erb +3 -0
  50. data/app/views/phcscriptcdn/scriptcdn/urls/_form.html.erb +17 -0
  51. data/app/views/phcscriptcdn/scriptcdn/urls/_formpatch.html.erb +17 -0
  52. data/app/views/phcscriptcdn/scriptcdn/urls/edit.html.erb +3 -0
  53. data/app/views/phcscriptcdn/scriptcdn/urls/index.html.erb +21 -0
  54. data/app/views/phcscriptcdn/scriptcdn/urls/new.html.erb +3 -0
  55. data/app/views/phcscriptcdn/scriptcdn/versions/_form.html.erb +13 -0
  56. data/app/views/phcscriptcdn/scriptcdn/versions/_formpatch.html.erb +13 -0
  57. data/app/views/phcscriptcdn/scriptcdn/versions/edit.html.erb +3 -0
  58. data/app/views/phcscriptcdn/scriptcdn/versions/index.html.erb +20 -0
  59. data/app/views/phcscriptcdn/scriptcdn/versions/new.html.erb +3 -0
  60. data/config/routes.rb +1 -2
  61. data/db/migrate/20160704004828_create_phcscriptcdn_scriptcdn_authors.rb +20 -0
  62. data/db/migrate/20160704005455_create_phcscriptcdn_scriptcdn_information.rb +27 -0
  63. data/db/migrate/20160704011123_create_phcscriptcdn_scriptcdn_urls.rb +19 -0
  64. data/db/migrate/20160704011452_create_phcscriptcdn_scriptcdn_versions.rb +15 -0
  65. data/db/migrate/20160704011727_create_phcscriptcdn_scriptcdn_mains.rb +11 -0
  66. data/lib/phcscriptcdn/engine.rb +3 -3
  67. data/lib/phcscriptcdn/version.rb +2 -2
  68. metadata +116 -166
  69. data/LICENSE +0 -238
  70. data/app/assets/stylesheets/phcscriptcdn/application.css.scss +0 -10
  71. data/app/assets/stylesheets/phcscriptcdn/custom.scss +0 -4
  72. data/app/assets/stylesheets/phcscriptcdn/scriptcdn/scripts.css +0 -4
  73. data/app/assets/stylesheets/phcscriptcdn/scriptcdn/scripturls.css +0 -4
  74. data/app/assets/stylesheets/phcscriptcdn/scriptcdn/scriptversions.css +0 -4
  75. data/app/controllers/phcscriptcdn/scriptcdn/scripts_controller.rb +0 -66
  76. data/app/controllers/phcscriptcdn/scriptcdn/scripturls_controller.rb +0 -88
  77. data/app/controllers/phcscriptcdn/scriptcdn/scriptversions_controller.rb +0 -62
  78. data/app/helpers/phcscriptcdn/scriptcdn/scripts_helper.rb +0 -4
  79. data/app/helpers/phcscriptcdn/scriptcdn/scripturls_helper.rb +0 -4
  80. data/app/helpers/phcscriptcdn/scriptcdn/scriptversions_helper.rb +0 -4
  81. data/app/models/phcscriptcdn/scriptcdn/script.rb +0 -15
  82. data/app/models/phcscriptcdn/scriptcdn/scripturl.rb +0 -14
  83. data/app/models/phcscriptcdn/scriptcdn/scriptversion.rb +0 -15
  84. data/app/views/phcscriptcdn/scriptcdn/scripts/_form.html.erb +0 -22
  85. data/app/views/phcscriptcdn/scriptcdn/scripts/edit.html.erb +0 -12
  86. data/app/views/phcscriptcdn/scriptcdn/scripts/index.html.erb +0 -36
  87. data/app/views/phcscriptcdn/scriptcdn/scripts/index_scriptlist.html.erb +0 -8
  88. data/app/views/phcscriptcdn/scriptcdn/scripts/new.html.erb +0 -11
  89. data/app/views/phcscriptcdn/scriptcdn/scripts/show.html.erb +0 -19
  90. data/app/views/phcscriptcdn/scriptcdn/scripts/show_scriptlisting.html.erb +0 -16
  91. data/app/views/phcscriptcdn/scriptcdn/scripturls/_form.html.erb +0 -22
  92. data/app/views/phcscriptcdn/scriptcdn/scripturls/_formpatch.html.erb +0 -22
  93. data/app/views/phcscriptcdn/scriptcdn/scripturls/edit.html.erb +0 -12
  94. data/app/views/phcscriptcdn/scriptcdn/scripturls/index.html.erb +0 -37
  95. data/app/views/phcscriptcdn/scriptcdn/scripturls/new.html.erb +0 -12
  96. data/app/views/phcscriptcdn/scriptcdn/scripturls/show.html.erb +0 -11
  97. data/app/views/phcscriptcdn/scriptcdn/scriptversions/_form.html.erb +0 -19
  98. data/app/views/phcscriptcdn/scriptcdn/scriptversions/edit.html.erb +0 -12
  99. data/app/views/phcscriptcdn/scriptcdn/scriptversions/index.html.erb +0 -37
  100. data/app/views/phcscriptcdn/scriptcdn/scriptversions/new.html.erb +0 -12
  101. data/db/migrate/20160222025658_create_phcscriptcdn_scriptcdn_scripts.rb +0 -12
  102. data/db/migrate/20160222030223_create_phcscriptcdn_scriptcdn_scriptversions.rb +0 -12
  103. data/db/migrate/20160222030446_create_phcscriptcdn_scriptcdn_scripturls.rb +0 -13
  104. data/lib/generators/phcscriptcdn/views_generator.rb +0 -59
@@ -0,0 +1,11 @@
1
+ module Phcscriptcdn
2
+ class Scriptcdn::Main < ActiveRecord::Base
3
+
4
+ # Relationships
5
+ has_many :versions, class_name: 'Scriptcdn::Version'
6
+ has_many :informations, class_name: 'Scriptcdn::Information'
7
+ has_many :urls, class_name: 'Scriptcdn::Url'
8
+ has_many :authors, class_name: 'Scriptcdn::Author'
9
+
10
+ end
11
+ end
@@ -0,0 +1,8 @@
1
+ module Phcscriptcdn
2
+ class Scriptcdn::Url < ActiveRecord::Base
3
+
4
+ # Relationships
5
+ belongs_to :main, class_name: 'Scriptcdn::Main'
6
+
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Phcscriptcdn
2
+ class Scriptcdn::Version < ActiveRecord::Base
3
+
4
+ # Relationships
5
+ belongs_to :main, class_name: 'Scriptcdn::Main'
6
+
7
+ end
8
+ end
@@ -1,7 +1,7 @@
1
1
  module Phcscriptcdn
2
- module Scriptcdn
3
- def self.table_name_prefix
4
- 'phcscriptcdn_scriptcdn_'
5
- end
6
- end
2
+ module Scriptcdn
3
+ def self.table_name_prefix
4
+ 'phcscriptcdn_scriptcdn_'
5
+ end
6
+ end
7
7
  end
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
 
5
- <title>PHCScriptCDN - Script Listing Engine</title>
5
+ <title>PHCScriptCDN - Script Listing Engine Backend</title>
6
6
 
7
7
  <%= stylesheet_link_tag "phcscriptcdn/application", media: "all" %>
8
8
  <%= javascript_include_tag "phcscriptcdn/application" %>
@@ -18,4 +18,4 @@
18
18
  </div>
19
19
  </body>
20
20
 
21
- </html>
21
+ </html>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+
5
+ <title>PHCScriptCDN - Script Listing Engine Frontend</title>
6
+
7
+ <%= stylesheet_link_tag "phcscriptcdn/application", media: "all" %>
8
+ <%= javascript_include_tag "phcscriptcdn/application" %>
9
+ <%= csrf_meta_tags %>
10
+
11
+ </head>
12
+
13
+ <body>
14
+ <div class="container">
15
+ <div class="row">
16
+ <%= yield %>
17
+ </div>
18
+ </div>
19
+ </body>
20
+
21
+ </html>
@@ -0,0 +1,29 @@
1
+ <%= form_for([@scriptcdn_author.main, @scriptcdn_author], url: scriptcdn_main_authors_path) do |f| %>
2
+
3
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_author %>
4
+
5
+ <div class="form-group field_with_error">
6
+ <%= f.label :authorfirstname, "Author First Name" %>
7
+ <%= f.text_field :authorfirstname, placeholder: "Author First Name", class: "form-control" %>
8
+ </div>
9
+ <div class="form-group field_with_error">
10
+ <%= f.label :authorlastname, "Author Last Name" %>
11
+ <%= f.text_field :authorlastname, placeholder: "Author Last Name", class: "form-control" %>
12
+ </div>
13
+ <div class="form-group field_with_error">
14
+ <%= f.label :authorwebsite, "Author Website" %>
15
+ <%= f.text_field :authorwebsite, placeholder: "Author Website", class: "form-control" %>
16
+ </div>
17
+ <div class="form-group field_with_error">
18
+ <%= f.label :authorgithub, "Author Github" %>
19
+ <%= f.text_field :authorgithub, placeholder: "Author Github", class: "form-control" %>
20
+ </div>
21
+ <div class="form-group field_with_error">
22
+ <%= f.label :authortwitter, "Author Twitter" %>
23
+ <%= f.text_field :authortwitter, placeholder: "Author Twitter", class: "form-control" %>
24
+ </div>
25
+ <div class="actions">
26
+ <%= f.submit class: "btn blue-hoki" %>
27
+ </div>
28
+
29
+ <% end %>
@@ -0,0 +1,29 @@
1
+ <%= form_for([@scriptcdn_author.main, @scriptcdn_author], url: scriptcdn_main_author_path, method: :patch) do |f| %>
2
+
3
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_author %>
4
+
5
+ <div class="form-group field_with_error">
6
+ <%= f.label :authorfirstname, "Author First Name" %>
7
+ <%= f.text_field :authorfirstname, placeholder: "Author First Name", class: "form-control" %>
8
+ </div>
9
+ <div class="form-group field_with_error">
10
+ <%= f.label :authorlastname, "Author Last Name" %>
11
+ <%= f.text_field :authorlastname, placeholder: "Author Last Name", class: "form-control" %>
12
+ </div>
13
+ <div class="form-group field_with_error">
14
+ <%= f.label :authorwebsite, "Author Website" %>
15
+ <%= f.text_field :authorwebsite, placeholder: "Author Website", class: "form-control" %>
16
+ </div>
17
+ <div class="form-group field_with_error">
18
+ <%= f.label :authorgithub, "Author Github" %>
19
+ <%= f.text_field :authorgithub, placeholder: "Author Github", class: "form-control" %>
20
+ </div>
21
+ <div class="form-group field_with_error">
22
+ <%= f.label :authortwitter, "Author Twitter" %>
23
+ <%= f.text_field :authortwitter, placeholder: "Author Twitter", class: "form-control" %>
24
+ </div>
25
+ <div class="actions">
26
+ <%= f.submit class: "btn blue-hoki" %>
27
+ </div>
28
+
29
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h1>Edit Author</h1>
2
+
3
+ <%= render 'formpatch', scriptcdn_author: @scriptcdn_author %>
@@ -0,0 +1,23 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Authors</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Firstname</th>
9
+ <th>Lastname</th>
10
+ <th></th>
11
+ </tr>
12
+ </thead>
13
+
14
+ <tbody>
15
+ <% @scriptcdn_authors.each do |scriptcdn_author| %>
16
+ <tr>
17
+ <td><%= link_to scriptcdn_author.authorfirstname, edit_scriptcdn_main_author_path(scriptcdn_author.main, scriptcdn_author) %></td>
18
+ <td><%= link_to scriptcdn_author.authorlastname, edit_scriptcdn_main_author_path(scriptcdn_author.main, scriptcdn_author) %></td>
19
+ <td><%= link_to 'Destroy', scriptcdn_main_author_path(scriptcdn_author.main, scriptcdn_author), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn red-mint" %></td>
20
+ </tr>
21
+ <% end %>
22
+ </tbody>
23
+ </table>
@@ -0,0 +1,3 @@
1
+ <h1>New Author</h1>
2
+
3
+ <%= render 'form', scriptcdn_author: @scriptcdn_author %>
@@ -0,0 +1,49 @@
1
+ <%= form_for([@scriptcdn_information.main, @scriptcdn_information], url: scriptcdn_main_informations_path) do |f| %>
2
+
3
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_information %>
4
+
5
+ <div class="form-group field_with_error">
6
+ <%= f.label :scripttitle, "Script Title" %>
7
+ <%= f.text_field :scripttitle, placeholder: "Script Information Title", class: "form-control" %>
8
+ </div>
9
+ <div class="form-group field_with_error">
10
+ <%= f.label :scriptdescription, "Script Description" %>
11
+ <%= f.text_field :scriptdescription, placeholder: "Script Information Description", class: "form-control" %>
12
+ </div>
13
+ <div class="form-group field_with_error">
14
+ <%= f.label :scriptcategory, "Script Category" %>
15
+ <%= f.select( :scriptcategory, [['HTML','html'],['CSS','css']], { :multiple => true, :size => 5 }, {class: "form-control form-control"}) %>
16
+ </div>
17
+ <div class="form-group field_with_error">
18
+ <%= f.label :scriptwebsite, "Script Website" %>
19
+ <%= f.text_field :scriptwebsite, placeholder: "Script Information Website", class: "form-control" %>
20
+ </div>
21
+ <div class="form-group field_with_error">
22
+ <%= f.label :scripttwitter, "Script Twitter" %>
23
+ <%= f.text_field :scripttwitter, placeholder: "Script Information Twitter Address", class: "form-control" %>
24
+ </div>
25
+ <div class="form-group field_with_error">
26
+ <%= f.label :scriptgithub, "Script Github" %>
27
+ <%= f.text_field :scriptgithub, placeholder: "Script Information Github Address", class: "form-control" %>
28
+ </div>
29
+ <div class="form-group field_with_error">
30
+ <%= f.label :scriptinitialrelease, "Initial Release" %>
31
+ <%= f.date_select :scriptinitialrelease, class: "form-control" %>
32
+ </div>
33
+ <div class="form-group field_with_error">
34
+ <%= f.label :scriptlicence, "Script Licence" %>
35
+ <%= f.select( :scriptlicence, [['MIT','MIT'],['Apache 2.0','Apache v2']], {}, {class: "form-control form-control-sm"}) %>
36
+ </div>
37
+ <div class="form-group field_with_error">
38
+ <%= f.label :scriptplatform, "Script Platform" %>
39
+ <%= f.select( :scriptplatform, [['Web Engine','Web Engine']], {}, {class: "form-control form-control"}) %>
40
+ </div>
41
+ <div class="form-group field_with_error">
42
+ <%= f.label :scriptstatus, "Script Status" %>
43
+ <%= f.select( :scriptstatus, [['Active','Active'],['Outdated','Out Dated'],['Deactivated','Not Active']], {}, {class: "form-control form-control"}) %>
44
+ </div>
45
+ <div class="form-group field_with_error">
46
+ <%= f.submit class: "btn blue-hoki" %>
47
+ </div>
48
+
49
+ <% end %>
@@ -0,0 +1,49 @@
1
+ <%= form_for([@scriptcdn_information.main, @scriptcdn_information], url: scriptcdn_main_information_path, method: :patch) do |f| %>
2
+
3
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_information %>
4
+
5
+ <div class="form-group field_with_error">
6
+ <%= f.label :scripttitle, "Script Title" %>
7
+ <%= f.text_field :scripttitle, placeholder: "Script Information Title", class: "form-control" %>
8
+ </div>
9
+ <div class="form-group field_with_error">
10
+ <%= f.label :scriptdescription, "Script Description" %>
11
+ <%= f.text_field :scriptdescription, placeholder: "Script Information Description", class: "form-control" %>
12
+ </div>
13
+ <div class="form-group field_with_error">
14
+ <%= f.label :scriptcategory, "Script Category" %>
15
+ <%= f.select( :scriptcategory, [['HTML','html'],['CSS','css']], { :multiple => true, :size => 5 }, {class: "form-control form-control"}) %>
16
+ </div>
17
+ <div class="form-group field_with_error">
18
+ <%= f.label :scriptwebsite, "Script Website" %>
19
+ <%= f.text_field :scriptwebsite, placeholder: "Script Information Website", class: "form-control" %>
20
+ </div>
21
+ <div class="form-group field_with_error">
22
+ <%= f.label :scripttwitter, "Script Twitter" %>
23
+ <%= f.text_field :scripttwitter, placeholder: "Script Information Twitter Address", class: "form-control" %>
24
+ </div>
25
+ <div class="form-group field_with_error">
26
+ <%= f.label :scriptgithub, "Script Github" %>
27
+ <%= f.text_field :scriptgithub, placeholder: "Script Information Github Address", class: "form-control" %>
28
+ </div>
29
+ <div class="form-group field_with_error">
30
+ <%= f.label :scriptinitialrelease, "Initial Release" %>
31
+ <%= f.date_select :scriptinitialrelease, class: "form-control" %>
32
+ </div>
33
+ <div class="form-group field_with_error">
34
+ <%= f.label :scriptlicence, "Script Licence" %>
35
+ <%= f.select( :scriptlicence, [['MIT','MIT'],['Apache 2.0','Apache v2']], {}, {class: "form-control form-control-sm"}) %>
36
+ </div>
37
+ <div class="form-group field_with_error">
38
+ <%= f.label :scriptplatform, "Script Platform" %>
39
+ <%= f.select( :scriptplatform, [['Web Engine','Web Engine']], {}, {class: "form-control form-control"}) %>
40
+ </div>
41
+ <div class="form-group field_with_error">
42
+ <%= f.label :scriptstatus, "Script Status" %>
43
+ <%= f.select( :scriptstatus, [['Active','Active'],['Outdated','Out Dated'],['Deactivated','Not Active']], {}, {class: "form-control form-control"}) %>
44
+ </div>
45
+ <div class="form-group field_with_error">
46
+ <%= f.submit class: "btn blue-hoki" %>
47
+ </div>
48
+
49
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h1>Edit Information</h1>
2
+
3
+ <%= render 'formpatch', scriptcdn_information: @scriptcdn_information %>
@@ -0,0 +1,26 @@
1
+ <p id="notice"><%= notice %></p>
2
+ <h1>Information</h1>
3
+
4
+ <table>
5
+ <thead>
6
+ <tr>
7
+ <th>Title</th>
8
+ <th>Category</th>
9
+ <th>Licence</th>
10
+ <th>Platform</th>
11
+ <th></th>
12
+ </tr>
13
+ </thead>
14
+
15
+ <tbody>
16
+ <% @scriptcdn_informations.each do |scriptcdn_information| %>
17
+ <tr>
18
+ <td><%= link_to scriptcdn_information.scripttitle, edit_scriptcdn_main_information_path(scriptcdn_information.main, scriptcdn_information) %></td>
19
+ <td><%= link_to scriptcdn_information.scriptcategory, edit_scriptcdn_main_information_path(scriptcdn_information.main, scriptcdn_information) %></td>
20
+ <td><%= link_to scriptcdn_information.scriptlicence, edit_scriptcdn_main_information_path(scriptcdn_information.main, scriptcdn_information) %></td>
21
+ <td><%= link_to scriptcdn_information.scriptplatform, edit_scriptcdn_main_information_path(scriptcdn_information.main, scriptcdn_information) %></td>
22
+ <td><%= link_to 'Destroy', scriptcdn_main_information_path(scriptcdn_information.main, scriptcdn_information), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn red-mint" %></td>
23
+ </tr>
24
+ <% end %>
25
+ </tbody>
26
+ </table>
@@ -0,0 +1,3 @@
1
+ <h1>New Information</h1>
2
+
3
+ <%= render 'form', scriptcdn_information: @scriptcdn_information %>
@@ -0,0 +1,58 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Scripttitle:</strong>
5
+ <%= @scriptcdn_information.scripttitle %>
6
+ </p>
7
+
8
+ <p>
9
+ <strong>Scriptdescription:</strong>
10
+ <%= @scriptcdn_information.scriptdescription %>
11
+ </p>
12
+
13
+ <p>
14
+ <strong>Scriptcategory:</strong>
15
+ <%= @scriptcdn_information.scriptcategory %>
16
+ </p>
17
+
18
+ <p>
19
+ <strong>Scriptwebsite:</strong>
20
+ <%= @scriptcdn_information.scriptwebsite %>
21
+ </p>
22
+
23
+ <p>
24
+ <strong>Scripttwitter:</strong>
25
+ <%= @scriptcdn_information.scripttwitter %>
26
+ </p>
27
+
28
+ <p>
29
+ <strong>Scriptgithub:</strong>
30
+ <%= @scriptcdn_information.scriptgithub %>
31
+ </p>
32
+
33
+ <p>
34
+ <strong>Scriptinitialrelease:</strong>
35
+ <%= @scriptcdn_information.scriptinitialrelease.parse(date) %>
36
+ </p>
37
+
38
+ <p>
39
+ <strong>Scriptlicence:</strong>
40
+ <%= @scriptcdn_information.scriptlicence %>
41
+ </p>
42
+
43
+ <p>
44
+ <strong>Scriptplatform:</strong>
45
+ <%= @scriptcdn_information.scriptplatform %>
46
+ </p>
47
+
48
+ <p>
49
+ <strong>Version:</strong>
50
+ <%= @scriptcdn_information.version %>
51
+ </p>
52
+
53
+ <p>
54
+ <strong>Main:</strong>
55
+ <%= @scriptcdn_information.main %>
56
+ </p>
57
+
58
+ <%= link_to 'Back', scriptcdn_information_main_index_path %>
@@ -0,0 +1,13 @@
1
+ <%= form_for(@scriptcdn_main) do |f| %>
2
+
3
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_main %>
4
+
5
+ <div class="form-group field_with_error">
6
+ <%= f.label :scriptname, "Script Name" %>
7
+ <%= f.text_field :scriptname, placeholder: "Script Information Website", class: "form-control" %>
8
+ </div>
9
+ <div class="form-group field_with_error">
10
+ <%= f.submit class: "btn blue-hoki" %>
11
+ </div>
12
+
13
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h1>Edit Script Pack Name</h1>
2
+
3
+ <%= render 'form', scriptcdn_main: @scriptcdn_main %>
@@ -0,0 +1,19 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Script CDN Main List</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Script Name</th>
9
+ </tr>
10
+ </thead>
11
+
12
+ <tbody>
13
+ <% @scriptcdn_mains.each do |scriptcdn_main| %>
14
+ <tr>
15
+ <td><%= link_to scriptcdn_main.scriptname, edit_scriptcdn_main_path(scriptcdn_main) %></td>
16
+ </tr>
17
+ <% end %>
18
+ </tbody>
19
+ </table>
@@ -0,0 +1,3 @@
1
+ <h1>New Script Pack for CDN</h1>
2
+
3
+ <%= render 'form', scriptcdn_main: @scriptcdn_main %>
@@ -0,0 +1,17 @@
1
+ <%= form_for([@scriptcdn_url.main, @scriptcdn_url], url: scriptcdn_main_urls_path) do |f| %>
2
+
3
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_url %>
4
+
5
+ <div class="form-group field_with_error">
6
+ <%= f.label :scripturl, "Script URL" %>
7
+ <%= f.text_field :scripturl, placeholder: "Script Name", class: "form-control" %>
8
+ </div>
9
+ <div class="form-group field_with_error">
10
+ <%= f.label :scripturlext, "Script Extention" %>
11
+ <%= f.select( :scripturlext, [['.css','css'],['.js','js'],['.html','html'],['.scss','scss']], {}, {class: "form-control form-control"}) %>
12
+ </div>
13
+ <div class="form-group field_with_error">
14
+ <%= f.submit class: "btn blue-hoki" %>
15
+ </div>
16
+
17
+ <% end %>
@@ -0,0 +1,17 @@
1
+ <%= form_for([@scriptcdn_url.main, @scriptcdn_url], url: scriptcdn_main_url_path, method: :patch) do |f| %>
2
+
3
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_script %>
4
+
5
+ <div class="form-group field_with_error">
6
+ <%= f.label :scripturl, "Script URL" %>
7
+ <%= f.text_field :scripturl, placeholder: "Script Name", class: "form-control" %>
8
+ </div>
9
+ <div class="form-group field_with_error">
10
+ <%= f.label :scripturlext, "Script Extention" %>
11
+ <%= f.select( :scripturlext, [['.css','css'],['.js','js'],['.html','html'],['.scss','scss']], {}, {class: "form-control form-control"}) %>
12
+ </div>
13
+ <div class="form-group field_with_error">
14
+ <%= f.submit class: "btn blue-hoki" %>
15
+ </div>
16
+
17
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h1>Edit Script Url</h1>
2
+
3
+ <%= render 'formpatch', scriptcdn_url: @scriptcdn_url %>
@@ -0,0 +1,21 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Scriptcdn Url List</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>URL Path</th>
9
+ <th></th>
10
+ </tr
11
+ </thead>
12
+
13
+ <tbody>
14
+ <% @scriptcdn_urls.each do |scriptcdn_url| %>
15
+ <tr>
16
+ <td><%= link_to scriptcdn_url.scripturl, edit_scriptcdn_main_url_path(scriptcdn_url.main, scriptcdn_url) %></td>
17
+ <td><%= link_to 'Destroy', scriptcdn_main_url_path(scriptcdn_url.main, scriptcdn_url), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn red-mint" %></td>
18
+ </tr>
19
+ <% end %>
20
+ </tbody>
21
+ </table>
@@ -0,0 +1,3 @@
1
+ <h1>New Script Url</h1>
2
+
3
+ <%= render 'form', scriptcdn_url: @scriptcdn_url %>
@@ -0,0 +1,13 @@
1
+ <%= form_for([@scriptcdn_version.main, @scriptcdn_version], url: scriptcdn_main_versions_path) do |f| %>
2
+
3
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_version %>
4
+
5
+ <div class="form-group field_with_error">
6
+ <%= f.label :versionnumber %>
7
+ <%= f.text_field :versionnumber, placeholder: "Script Version", class: "form-control" %>
8
+ </div>
9
+ <div class="form-group field_with_error">
10
+ <%= f.submit class: "btn blue-hoki" %>
11
+ </div>
12
+
13
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <%= form_for([@scriptcdn_version.main, @scriptcdn_version], url: scriptcdn_main_version_path, method: :patch) do |f| %>
2
+
3
+ <%= render 'phcnotifi/validations', :object => @scriptcdn_version %>
4
+
5
+ <div class="form-group field_with_error">
6
+ <%= f.label :versionnumber %>
7
+ <%= f.text_field :versionnumber, placeholder: "Script Version", class: "form-control" %>
8
+ </div>
9
+ <div class="form-group field_with_error">
10
+ <%= f.submit class: "btn blue-hoki" %>
11
+ </div>
12
+
13
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <h1>Edit Script Version</h1>
2
+
3
+ <%= render 'formpatch', scriptcdn_version: @scriptcdn_version %>
@@ -0,0 +1,20 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Script Version</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Script Version</th>
9
+ <th></th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <% @scriptcdn_versions.each do |scriptcdn_version| %>
14
+ <tr>
15
+ <td><%= link_to scriptcdn_version.versionnumber, edit_scriptcdn_main_version_path(scriptcdn_version.main, scriptcdn_version) %></td>
16
+ <td><%= link_to 'Destroy', scriptcdn_main_version_path(scriptcdn_version.main, scriptcdn_version), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn red-mint" %></td>
17
+ </tr>
18
+ <% end %>
19
+ </tbody>
20
+ </table>
@@ -0,0 +1,3 @@
1
+ <h1>New Script Version</h1>
2
+
3
+ <%= render 'form', scriptcdn_version: @scriptcdn_version %>
data/config/routes.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  Phcscriptcdn::Engine.routes.draw do
2
2
 
3
-
4
3
  # Script CDN Listing System
5
4
  namespace :scriptcdn do
6
5
  resources :scripts
@@ -9,4 +8,4 @@ Phcscriptcdn::Engine.routes.draw do
9
8
  end
10
9
  end
11
10
 
12
- end
11
+ end
@@ -0,0 +1,20 @@
1
+ class CreatePhcscriptcdnScriptcdnAuthors < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_scriptcdn_authors do |t|
5
+
6
+ t.string :authorfirstname
7
+ t.string :authorlastname
8
+
9
+ t.string :authorwebsite
10
+ t.string :authorgithub
11
+ t.string :authortwitter
12
+
13
+ t.references :main, index: true
14
+
15
+ t.timestamps null: false
16
+
17
+ end
18
+
19
+ end
20
+ end
@@ -0,0 +1,27 @@
1
+ class CreatePhcscriptcdnScriptcdnInformation < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_scriptcdn_information do |t|
5
+
6
+ t.string :scripttitle
7
+ t.text :scriptdescription
8
+
9
+ t.string :scriptcategory
10
+
11
+ t.string :scriptwebsite
12
+ t.string :scripttwitter
13
+ t.string :scriptgithub
14
+
15
+ t.date :scriptinitialrelease
16
+ t.string :scriptlicence
17
+ t.string :scriptplatform
18
+ t.string :scriptstatus
19
+
20
+ t.references :main, index: true
21
+
22
+ t.timestamps null: false
23
+
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,19 @@
1
+ class CreatePhcscriptcdnScriptcdnUrls < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_scriptcdn_urls do |t|
5
+
6
+ t.string :scripturl
7
+ t.string :scripturlext
8
+
9
+ t.references :main, index: true
10
+
11
+ t.string :user_id
12
+ t.string :membership_id
13
+ t.string :oganization_id
14
+
15
+ t.timestamps null: false
16
+ end
17
+
18
+ end
19
+ end
@@ -0,0 +1,15 @@
1
+ class CreatePhcscriptcdnScriptcdnVersions < ActiveRecord::Migration[5.0]
2
+ def change
3
+
4
+ create_table :phcscriptcdn_scriptcdn_versions do |t|
5
+
6
+ t.string :versionnumber
7
+
8
+ t.references :main, index: true
9
+
10
+ t.timestamps null: false
11
+
12
+ end
13
+
14
+ end
15
+ end