phcdevworks_scripts 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +35 -0
  4. data/Rakefile +32 -0
  5. data/app/assets/config/phcdevworks_scripts_manifest.js +1 -0
  6. data/app/assets/javascripts/phcdevworks_scripts/application.js +2 -0
  7. data/app/assets/javascripts/phcdevworks_scripts/script/versions.coffee +3 -0
  8. data/app/assets/stylesheets/phcdevworks_scripts/application.scss +2 -0
  9. data/app/assets/stylesheets/phcdevworks_scripts/script/authors.css +4 -0
  10. data/app/assets/stylesheets/phcdevworks_scripts/script/extensions.css +4 -0
  11. data/app/assets/stylesheets/phcdevworks_scripts/script/listings.css +4 -0
  12. data/app/assets/stylesheets/phcdevworks_scripts/script/urls.css +4 -0
  13. data/app/assets/stylesheets/phcdevworks_scripts/script/versions.scss +3 -0
  14. data/app/assets/stylesheets/phcdevworks_scripts/snippet/posts.css +4 -0
  15. data/app/assets/stylesheets/phcdevworks_scripts/snippet/urls.css +4 -0
  16. data/app/controllers/phcdevworks_scripts/application_controller.rb +13 -0
  17. data/app/controllers/phcdevworks_scripts/script/authors_controller.rb +82 -0
  18. data/app/controllers/phcdevworks_scripts/script/extensions_controller.rb +82 -0
  19. data/app/controllers/phcdevworks_scripts/script/listings_controller.rb +82 -0
  20. data/app/controllers/phcdevworks_scripts/script/urls_controller.rb +77 -0
  21. data/app/controllers/phcdevworks_scripts/script/versions_controller.rb +82 -0
  22. data/app/controllers/phcdevworks_scripts/snippet/posts_controller.rb +80 -0
  23. data/app/controllers/phcdevworks_scripts/snippet/urls_controller.rb +76 -0
  24. data/app/helpers/phcdevworks_scripts/application_helper.rb +4 -0
  25. data/app/helpers/phcdevworks_scripts/script/authors_helper.rb +4 -0
  26. data/app/helpers/phcdevworks_scripts/script/extensions_helper.rb +4 -0
  27. data/app/helpers/phcdevworks_scripts/script/listings_helper.rb +4 -0
  28. data/app/helpers/phcdevworks_scripts/script/urls_helper.rb +4 -0
  29. data/app/helpers/phcdevworks_scripts/script/versions_helper.rb +4 -0
  30. data/app/helpers/phcdevworks_scripts/snippet/posts_helper.rb +4 -0
  31. data/app/helpers/phcdevworks_scripts/snippet/urls_helper.rb +4 -0
  32. data/app/jobs/phcdevworks_scripts/application_job.rb +4 -0
  33. data/app/mailers/phcdevworks_scripts/application_mailer.rb +6 -0
  34. data/app/models/phcdevworks_scripts/application_record.rb +5 -0
  35. data/app/models/phcdevworks_scripts/author_versions.rb +5 -0
  36. data/app/models/phcdevworks_scripts/extension_versions.rb +5 -0
  37. data/app/models/phcdevworks_scripts/listing_versions.rb +5 -0
  38. data/app/models/phcdevworks_scripts/script.rb +7 -0
  39. data/app/models/phcdevworks_scripts/script/author.rb +33 -0
  40. data/app/models/phcdevworks_scripts/script/extension.rb +32 -0
  41. data/app/models/phcdevworks_scripts/script/listing.rb +38 -0
  42. data/app/models/phcdevworks_scripts/script/url.rb +24 -0
  43. data/app/models/phcdevworks_scripts/script/version.rb +26 -0
  44. data/app/models/phcdevworks_scripts/scriptversion_versions.rb +5 -0
  45. data/app/models/phcdevworks_scripts/snippet.rb +7 -0
  46. data/app/models/phcdevworks_scripts/snippet/post.rb +25 -0
  47. data/app/models/phcdevworks_scripts/snippet/url.rb +16 -0
  48. data/app/models/phcdevworks_scripts/url_versions.rb +5 -0
  49. data/app/views/layouts/phcdevworks_scripts/application.html.erb +94 -0
  50. data/app/views/layouts/phcdevworks_scripts/components/backend/footer/_footer.html.erb +16 -0
  51. data/app/views/layouts/phcdevworks_scripts/components/backend/navigation/_top_menu.html.erb +37 -0
  52. data/app/views/layouts/phcdevworks_scripts/components/backend/sidebars/_side_menu.html.erb +183 -0
  53. data/app/views/phcdevworks_scripts/script/authors/_form.html.erb +32 -0
  54. data/app/views/phcdevworks_scripts/script/authors/edit.html.erb +37 -0
  55. data/app/views/phcdevworks_scripts/script/authors/index.html.erb +63 -0
  56. data/app/views/phcdevworks_scripts/script/authors/new.html.erb +37 -0
  57. data/app/views/phcdevworks_scripts/script/authors/show.html.erb +49 -0
  58. data/app/views/phcdevworks_scripts/script/extensions/_form.html.erb +28 -0
  59. data/app/views/phcdevworks_scripts/script/extensions/edit.html.erb +37 -0
  60. data/app/views/phcdevworks_scripts/script/extensions/index.html.erb +59 -0
  61. data/app/views/phcdevworks_scripts/script/extensions/new.html.erb +37 -0
  62. data/app/views/phcdevworks_scripts/script/extensions/show.html.erb +49 -0
  63. data/app/views/phcdevworks_scripts/script/listings/_form.html.erb +62 -0
  64. data/app/views/phcdevworks_scripts/script/listings/edit.html.erb +35 -0
  65. data/app/views/phcdevworks_scripts/script/listings/index.html.erb +62 -0
  66. data/app/views/phcdevworks_scripts/script/listings/new.html.erb +36 -0
  67. data/app/views/phcdevworks_scripts/script/listings/show.html.erb +48 -0
  68. data/app/views/phcdevworks_scripts/script/urls/_form.html.erb +36 -0
  69. data/app/views/phcdevworks_scripts/script/urls/edit.html.erb +36 -0
  70. data/app/views/phcdevworks_scripts/script/urls/index.html.erb +61 -0
  71. data/app/views/phcdevworks_scripts/script/urls/new.html.erb +37 -0
  72. data/app/views/phcdevworks_scripts/script/urls/show.html.erb +49 -0
  73. data/app/views/phcdevworks_scripts/script/versions/_form.html.erb +20 -0
  74. data/app/views/phcdevworks_scripts/script/versions/edit.html.erb +37 -0
  75. data/app/views/phcdevworks_scripts/script/versions/index.html.erb +57 -0
  76. data/app/views/phcdevworks_scripts/script/versions/new.html.erb +37 -0
  77. data/app/views/phcdevworks_scripts/script/versions/show.html.erb +49 -0
  78. data/app/views/phcdevworks_scripts/snippet/posts/_form.html.erb +26 -0
  79. data/app/views/phcdevworks_scripts/snippet/posts/edit.html.erb +39 -0
  80. data/app/views/phcdevworks_scripts/snippet/posts/index.html.erb +68 -0
  81. data/app/views/phcdevworks_scripts/snippet/posts/new.html.erb +39 -0
  82. data/app/views/phcdevworks_scripts/snippet/posts/show.html.erb +71 -0
  83. data/app/views/phcdevworks_scripts/snippet/urls/_form.html.erb +22 -0
  84. data/app/views/phcdevworks_scripts/snippet/urls/edit.html.erb +39 -0
  85. data/app/views/phcdevworks_scripts/snippet/urls/index.html.erb +66 -0
  86. data/app/views/phcdevworks_scripts/snippet/urls/new.html.erb +39 -0
  87. data/app/views/phcdevworks_scripts/snippet/urls/show.html.erb +71 -0
  88. data/config/initializers/friendly_id.rb +107 -0
  89. data/config/routes.rb +32 -0
  90. data/db/migrate/20170509002355_create_phcdevworks_scripts_friendly_id_slugs.rb +18 -0
  91. data/db/migrate/20170517064030_create_phcdevworks_scripts_extension_versions.rb +17 -0
  92. data/db/migrate/20170517064049_create_phcdevworks_scripts_listing_versions.rb +17 -0
  93. data/db/migrate/20170517064114_create_phcdevworks_scripts_scriptversion_versions.rb +17 -0
  94. data/db/migrate/20170517064150_create_phcdevworks_scripts_url_versions.rb +17 -0
  95. data/db/migrate/20170517064208_create_phcdevworks_scripts_author_versions.rb +17 -0
  96. data/db/migrate/20170517064427_create_phcdevworks_scripts_licence_versions.rb +17 -0
  97. data/db/migrate/20190818022002_create_phcdevworks_scripts_snippet_posts.rb +16 -0
  98. data/db/migrate/20190818022024_create_phcdevworks_scripts_snippet_urls.rb +17 -0
  99. data/db/migrate/20190818022939_create_phcdevworks_scripts_script_authors.rb +18 -0
  100. data/db/migrate/20190818023353_create_phcdevworks_scripts_script_listings.rb +27 -0
  101. data/db/migrate/20190818023709_create_phcdevworks_scripts_script_extensions.rb +17 -0
  102. data/db/migrate/20190818023911_create_phcdevworks_scripts_script_urls.rb +21 -0
  103. data/db/migrate/20190818031653_create_phcdevworks_scripts_script_versions.rb +15 -0
  104. data/lib/phcdevworks_scripts.rb +5 -0
  105. data/lib/phcdevworks_scripts/engine.rb +33 -0
  106. data/lib/phcdevworks_scripts/version.rb +3 -0
  107. data/lib/tasks/phcdevworks_scripts_tasks.rake +4 -0
  108. metadata +352 -0
@@ -0,0 +1,57 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script Listings Manager" %>
3
+ <% phc_title_tagline "Script Version Index" %>
4
+ <% phc_breadcrumb_one link_to "Script Index", phcdevworks_scripts.script_listings_path %>
5
+ <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
+ <!-- Title System -->
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
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page & Panel Content -->
20
+ <div class="panel panel-inverse">
21
+ <!-- Panel Heading -->
22
+ <div class="panel-heading">
23
+ <div class="panel-heading-btn">
24
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
27
+ </div>
28
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
+ </div>
30
+ <!-- Panel Heading -->
31
+ <!-- Panel Body -->
32
+ <div class="panel-body">
33
+ <!-- Table - Version Index -->
34
+ <div class="table-responsive">
35
+ <table class="table table-striped table-bordered">
36
+ <thead>
37
+ <tr>
38
+ <th>Script Version</th>
39
+ </tr>
40
+ </thead>
41
+ <tbody>
42
+ <% @script_versions.each do |script_version| %>
43
+ <tr>
44
+ <td><%= link_to script_version.script_version_number, script_version %></td>
45
+ </tr>
46
+ <% end %>
47
+ </tbody>
48
+ </table>
49
+ <%= link_to phcdevworks_scripts.new_script_version_path, class: "btn btn-primary" do %>
50
+ <i class="fas fa-plus-circle"></i>
51
+ Add a New Version Number
52
+ <% end %>
53
+ </div>
54
+ <!-- Table - Version Index -->
55
+ </div>
56
+ </div>
57
+ <!-- Page Content -->
@@ -0,0 +1,37 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script Listings Manager" %>
3
+ <% phc_title_tagline "Create a New Version" %>
4
+ <% phc_breadcrumb_one link_to "Script Index", phcdevworks_scripts.script_listings_path %>
5
+ <% phc_breadcrumb_two link_to "Script Version Index", phcdevworks_scripts.script_versions_path %>
6
+ <% phc_breadcrumb_three yield(:phc_title_tagline) %>
7
+ <!-- Title System -->
8
+
9
+ <!-- Page Bradcrumbs -->
10
+ <ol class="breadcrumb pull-right">
11
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
+ </ol>
15
+ <!-- Page Bradcrumbs -->
16
+
17
+ <!-- Page Header -->
18
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
+ <!-- Page Header -->
20
+
21
+ <!-- Page Content -->
22
+ <div class="panel panel-inverse">
23
+ <div class="panel-heading">
24
+ <div class="panel-heading-btn">
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
27
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
28
+ </div>
29
+ <h4 class="panel-title"><%= yield(:phc_title) %></h4>
30
+ </div>
31
+ <div class="panel-body">
32
+ <!-- Form for New Version -->
33
+ <%= render 'form', script_version: @script_version %>
34
+ <!-- Form for New Version -->
35
+ </div>
36
+ </div>
37
+ <!-- Page Content -->
@@ -0,0 +1,49 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Script Listings Manager" %>
3
+ <% phc_title_tagline "Script Version Details" %>
4
+ <% phc_breadcrumb_one link_to "Script Index", phcdevworks_scripts.script_listings_path %>
5
+ <% phc_breadcrumb_two link_to "Script Version Index", phcdevworks_scripts.script_versions_path %>
6
+ <% phc_breadcrumb_three yield(:phc_title_tagline) %>
7
+ <!-- Title System -->
8
+
9
+ <!-- Page Bradcrumbs -->
10
+ <ol class="breadcrumb pull-right">
11
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_one) %></li>
12
+ <li class="breadcrumb-item"><%= yield(:phc_breadcrumb_two) %></li>
13
+ <li class="breadcrumb-item active"><%= yield(:phc_breadcrumb_three) %></li>
14
+ </ol>
15
+ <!-- Page Bradcrumbs -->
16
+
17
+ <!-- Page Header -->
18
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
19
+ <!-- Page Header -->
20
+
21
+ <!-- Page Content -->
22
+ <div class="row">
23
+
24
+ <!-- Button Panel -->
25
+ <div class="col-lg-4">
26
+
27
+ <div class="panel panel-inverse">
28
+ <div class="panel-heading">
29
+ <div class="panel-heading-btn">
30
+ </div>
31
+ </div>
32
+ <div class="panel-body">
33
+ <div class="btn-group d-flex" role="group">
34
+ <%= link_to 'Update', phcdevworks_scripts.edit_script_version_path, class: "btn btn-primary" %>
35
+ <%= link_to 'Remove', phcdevworks_scripts.script_version_path, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger" %>
36
+ </div>
37
+ </div>
38
+ </div>
39
+
40
+ </div>
41
+ <!-- Button Panel -->
42
+
43
+ <!-- Main Panel -->
44
+ <div class="col-lg-8">
45
+ </div>
46
+ <!-- Main Panel -->
47
+
48
+ </div>
49
+ <!-- Page Content -->
@@ -0,0 +1,26 @@
1
+ <!-- Form - Script - Snippets -->
2
+ <%= form_with(model: @snippet_post, local: true) do |form| %>
3
+
4
+ <!-- PHCNotifi Render Validation -->
5
+ <%= render 'phcdevworks_notifications/bootstrap/validations', :object => @snippet_post %>
6
+ <!-- PHCNotifi Render Validation -->
7
+
8
+ <!-- Form Input Fields -->
9
+ <div class="form-group field_with_errors">
10
+ <%= form.label :snippet_title, "Snippet Title" %>
11
+ <%= form.text_field :snippet_title, class: 'form-control', placeholder: 'Snippet Title' %>
12
+ </div>
13
+ <div class="form-group field_with_errors">
14
+ <%= form.label :snippet_code, "Code Snippet" %>
15
+ <%= form.text_area :snippet_code, class: 'form-control', placeholder: 'Code Snippet', rows: '10' %>
16
+ </div>
17
+ <!-- Form Input Fields -->
18
+
19
+ <!-- Form Submition Button -->
20
+ <div class="actions">
21
+ <%= form.submit class: "btn btn-primary" %>
22
+ </div>
23
+ <!-- For Submition Button -->
24
+
25
+ <% end %>
26
+ <!-- Form - Script - Snippets -->
@@ -0,0 +1,39 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Code Snippet Manager" %>
3
+ <% phc_title_tagline "Update Code Snippet" %>
4
+ <% phc_breadcrumb_one link_to "Code Snippet Index", phcdevworks_scripts.snippet_posts_path %>
5
+ <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
+ <!-- Title System -->
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
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page & Panel Content -->
20
+ <div class="panel panel-inverse">
21
+ <!-- Panel Heading -->
22
+ <div class="panel-heading">
23
+ <div class="panel-heading-btn">
24
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
27
+ </div>
28
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
+ </div>
30
+ <!-- Panel Heading -->
31
+ <!-- Panel Body -->
32
+ <div class="panel-body">
33
+ <!-- Form to Edit Script Snippet -->
34
+ <%= render 'form', script_snippet: @script_snippet %>
35
+ <!-- Form to Edit Script Snippet -->
36
+ </div>
37
+ <!-- Panel Body -->
38
+ </div>
39
+ <!-- Page & Panel Content -->
@@ -0,0 +1,68 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Code Snippet Manager" %>
3
+ <% phc_title_tagline "Code Snippet Index" %>
4
+ <% phc_breadcrumb_one yield(:phc_title_tagline) %>
5
+ <% phc_breadcrumb_two link_to "Code Snippet Index", phcdevworks_scripts.snippet_posts_path %>
6
+ <!-- Title System -->
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
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page & Panel Content -->
20
+ <div class="panel panel-inverse">
21
+ <!-- Panel Heading -->
22
+ <div class="panel-heading">
23
+ <div class="panel-heading-btn">
24
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
27
+ </div>
28
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
+ </div>
30
+ <!-- Panel Heading -->
31
+ <!-- Panel Body -->
32
+ <div class="panel-body">
33
+ <!-- Table - Snippet Index -->
34
+ <div class="table-responsive">
35
+ <table class="table table-striped table-bordered">
36
+ <thead>
37
+ <tr>
38
+ <th>Snippet Title</th>
39
+ <th>Snippet Summary</th>
40
+ <th></th>
41
+ </tr>
42
+ </thead>
43
+ <tbody>
44
+ <% @snippet_posts.each do |snippet_post| %>
45
+ <tr>
46
+ <td><%= snippet_post.snippet_title %></td>
47
+ <td><%= truncate(snippet_post.snippet_code, :length => 80) %></td>
48
+ <td>
49
+ <div class="btn-group d-flex" role="group">
50
+ <%= link_to 'Details', snippet_post, class: "btn btn-purple btn-xs" %>
51
+ <%= link_to 'Update', edit_snippet_post_path(snippet_post), class: "btn btn-primary btn-xs" %>
52
+ <%= link_to 'Remmove', snippet_post, method: :delete, data: { confirm: 'Are you sure? This will aslo delte the snippet urls.' }, class: "btn btn-danger btn-xs" %>
53
+ </div>
54
+ </td>
55
+ </tr>
56
+ <% end %>
57
+ </tbody>
58
+ </table>
59
+ <%= link_to phcdevworks_scripts.new_snippet_post_path, class: "btn btn-primary btn-sm" do %>
60
+ <i class="fas fa-plus-circle"></i>
61
+ Add a New Code Snippet
62
+ <% end %>
63
+ </div>
64
+ <!-- Table - Snippet Index -->
65
+ </div>
66
+ <!-- Panel Body -->
67
+ </div>
68
+ <!-- Page & Panel Content -->
@@ -0,0 +1,39 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Code Snippet Manager" %>
3
+ <% phc_title_tagline "Create a New Code Snippet" %>
4
+ <% phc_breadcrumb_one link_to "Code Snippet Index", phcdevworks_scripts.snippet_posts_path %>
5
+ <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
+ <!-- Title System -->
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
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page & Panel Content -->
20
+ <div class="panel panel-inverse">
21
+ <!-- Panel Heading -->
22
+ <div class="panel-heading">
23
+ <div class="panel-heading-btn">
24
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
27
+ </div>
28
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
+ </div>
30
+ <!-- Panel Heading -->
31
+ <!-- Panel Body -->
32
+ <div class="panel-body">
33
+ <!-- Form for New Script Snippet -->
34
+ <%= render 'form', snippet_post: @snippet_post %>
35
+ <!-- Form for New Script Snippet -->
36
+ </div>
37
+ <!-- Panel Body -->
38
+ </div>
39
+ <!-- Page & Panel Content -->
@@ -0,0 +1,71 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Code Snippet Manager" %>
3
+ <% phc_title_tagline "Code Snippet Details" %>
4
+ <% phc_breadcrumb_one link_to "Code Snippet Index", phcdevworks_scripts.snippet_posts_path %>
5
+ <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
+ <!-- Title System -->
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
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page Content -->
20
+ <div class="row">
21
+
22
+ <!-- Button Area -->
23
+ <div class="col-lg-4">
24
+ <!-- Button Panel -->
25
+ <div class="panel panel-inverse">
26
+ <!-- Panel Heading -->
27
+ <div class="panel-heading">
28
+ <h4 class="panel-title">Options Panel</h4>
29
+ </div>
30
+ <!-- Panel Heading -->
31
+ <!-- Panel Body -->
32
+ <div class="panel-body">
33
+ <div class="btn-group d-flex" role="group">
34
+ <%= link_to 'Update', phcdevworks_scripts.edit_snippet_post_path, class: "btn btn-primary" %>
35
+ <%= link_to 'Remove', phcdevworks_scripts.snippet_post_path, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger" %>
36
+ </div>
37
+ </div>
38
+ <!-- Panel Body -->
39
+ </div>
40
+ <!-- Button Panel -->
41
+ </div>
42
+ <!-- Button Area -->
43
+
44
+ <!-- Main Area -->
45
+ <div class="col-lg-8">
46
+ <!-- Main Panel -->
47
+ <div class="panel panel-inverse">
48
+ <!-- Panel Heading -->
49
+ <div class="panel-heading">
50
+ <div class="panel-heading-btn">
51
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
52
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
53
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
54
+ </div>
55
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
56
+ </div>
57
+ <!-- Panel Heading -->
58
+ <!-- Panel Body -->
59
+ <div class="panel-body">
60
+ <p class="h3"><%= @snippet_post.snippet_title %></p>
61
+ <hr>
62
+ <pre><code><%= @snippet_post.snippet_code %></code></pre>
63
+ </div>
64
+ <!-- Panel Body -->
65
+ </div>
66
+ <!-- Main Panel -->
67
+ </div>
68
+ <!-- Main Area -->
69
+
70
+ </div>
71
+ <!-- Page Content -->
@@ -0,0 +1,22 @@
1
+ <!-- Form - Script - Url -->
2
+ <%= form_with(model: [ @script_snippet, @script_url], url: form_url, local: true) do |form| %>
3
+
4
+ <!-- PHCNotifi Render Validation -->
5
+ <%= render 'phcdevworks_notifications/bootstrap/validations', :object => @article_post %>
6
+ <!-- PHCNotifi Render Validation -->
7
+
8
+ <!-- Form Input Fields -->
9
+ <div class="form-group field_with_errors">
10
+ <%= form.label :script_url %>
11
+ <%= form.text_field :script_url, class: 'form-control', placeholder: 'Script Url' %>
12
+ </div>
13
+ <!-- Form Input Fields -->
14
+
15
+ <!-- Form Submition Button -->
16
+ <div class="actions">
17
+ <%= form.submit class: "btn btn-primary" %>
18
+ </div>
19
+ <!-- For Submition Button -->
20
+
21
+ <% end %>
22
+ <!-- Form - Script - Url -->
@@ -0,0 +1,39 @@
1
+ <!-- Title System -->
2
+ <% phc_title "Code Snippet Manager" %>
3
+ <% phc_title_tagline "Update Asset URL" %>
4
+ <% phc_breadcrumb_one link_to "Code Snippet Index", phcdevworks_scripts.snippet_posts_path %>
5
+ <% phc_breadcrumb_two yield(:phc_title_tagline) %>
6
+ <!-- Title System -->
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
+ <h1 class="page-header"><%= yield(:phc_title) %></h1>
17
+ <!-- Page Header -->
18
+
19
+ <!-- Page & Panel Content -->
20
+ <div class="panel panel-inverse">
21
+ <!-- Panel Heading -->
22
+ <div class="panel-heading">
23
+ <div class="panel-heading-btn">
24
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
25
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-redo"></i></a>
26
+ <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
27
+ </div>
28
+ <h4 class="panel-title"><%= yield(:phc_title_tagline) %></h4>
29
+ </div>
30
+ <!-- Panel Heading -->
31
+ <!-- Panel Body -->
32
+ <div class="panel-body">
33
+ <!-- Form to Edit Script Snippet Asset URLS -->
34
+ <%= render 'form', { form_url: snippet_post_url_path } %>
35
+ <!-- Form to Edit Script Snippet Asset URLS -->
36
+ </div>
37
+ <!-- Panel Body -->
38
+ </div>
39
+ <!-- Page & Panel Content -->