phcpress 7.1.2 → 8.0.0b

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +15 -15
  4. data/Rakefile +1 -1
  5. data/app/assets/config/phcpress_manifest.js +1 -1
  6. data/app/assets/javascripts/phcpress/application.js +1 -1
  7. data/app/assets/stylesheets/phcpress/application.scss +1 -1
  8. data/app/controllers/phcpress/api/v1/categories_controller.rb +4 -4
  9. data/app/controllers/phcpress/api/v1/posts_controller.rb +4 -4
  10. data/app/controllers/phcpress/application_controller.rb +4 -4
  11. data/app/controllers/phcpress/articles/posts_controller.rb +12 -12
  12. data/app/controllers/phcpress/frontend/articles_controller.rb +5 -5
  13. data/app/controllers/phcpress/modules/categories_controller.rb +12 -12
  14. data/app/controllers/phcpress/modules/connections_controller.rb +12 -12
  15. data/app/helpers/phcpress/application_helper.rb +1 -1
  16. data/app/jobs/phcpress/application_job.rb +1 -1
  17. data/app/mailers/phcpress/application_mailer.rb +1 -1
  18. data/app/models/phcpress/api/v1/category.rb +1 -1
  19. data/app/models/phcpress/api/v1/post.rb +1 -1
  20. data/app/models/phcpress/application_record.rb +1 -1
  21. data/app/models/phcpress/articles.rb +1 -1
  22. data/app/models/phcpress/articles/post.rb +5 -5
  23. data/app/models/phcpress/frontend.rb +1 -1
  24. data/app/models/phcpress/frontend/article.rb +1 -1
  25. data/app/models/phcpress/modules.rb +1 -1
  26. data/app/models/phcpress/modules/category.rb +1 -1
  27. data/app/models/phcpress/modules/connection.rb +3 -3
  28. data/app/uploaders/phcpress/pstimage_uploader.rb +2 -2
  29. data/app/views/layouts/components/backend/footer/_footer.html.erb +2 -2
  30. data/app/views/layouts/components/backend/navigation/_navigation.html.erb +5 -5
  31. data/app/views/layouts/components/backend/topbar/_topbar.html.erb +1 -1
  32. data/app/views/layouts/phcpress/frontend.html.erb +1 -1
  33. data/app/views/phcpress/api/v1/categories/index.json.rabl +1 -1
  34. data/app/views/phcpress/api/v1/posts/index.json.rabl +1 -1
  35. data/app/views/phcpress/articles/posts/_form.html.erb +3 -3
  36. data/app/views/phcpress/articles/posts/edit.html.erb +1 -1
  37. data/app/views/phcpress/articles/posts/index.html.erb +1 -1
  38. data/app/views/phcpress/articles/posts/new.html.erb +1 -1
  39. data/app/views/phcpress/articles/posts/show.html.erb +1 -1
  40. data/app/views/phcpress/frontend/articles/index.html.erb +3 -3
  41. data/app/views/phcpress/frontend/articles/show.html.erb +3 -3
  42. data/app/views/phcpress/modules/categories/_form.html.erb +3 -3
  43. data/app/views/phcpress/modules/categories/edit.html.erb +1 -1
  44. data/app/views/phcpress/modules/categories/index.html.erb +2 -2
  45. data/app/views/phcpress/modules/categories/new.html.erb +1 -1
  46. data/app/views/phcpress/modules/categories/show.html.erb +1 -1
  47. data/app/views/phcpress/modules/connections/_form.html.erb +3 -3
  48. data/app/views/phcpress/modules/connections/edit.html.erb +1 -1
  49. data/app/views/phcpress/modules/connections/index.html.erb +2 -2
  50. data/app/views/phcpress/modules/connections/new.html.erb +1 -1
  51. data/app/views/phcpress/modules/connections/show.html.erb +3 -3
  52. data/config/routes.rb +5 -5
  53. data/config/tinymce.yml +1 -1
  54. data/db/migrate/20160716182848_create_phcpress_modules_categories.rb +7 -7
  55. data/db/migrate/20160720181307_create_phcpress_articles_posts.rb +7 -7
  56. data/db/migrate/20160720235314_create_phcpress_modules_connections.rb +7 -7
  57. data/lib/phcpress.rb +1 -1
  58. data/lib/phcpress/engine.rb +8 -8
  59. data/lib/phcpress/version.rb +2 -2
  60. data/lib/tasks/phcpress_tasks.rake +1 -1
  61. metadata +168 -204
@@ -4,4 +4,4 @@ module Phcpress
4
4
  'phcpress_articles_'
5
5
  end
6
6
  end
7
- end
7
+ end
@@ -1,13 +1,13 @@
1
1
  module Phcpress
2
2
  class Articles::Post < ApplicationRecord
3
-
3
+
4
4
  # For Image Uploads
5
5
  mount_uploader :pstimage, Phcpress::PstimageUploader
6
-
6
+
7
7
  # Relationships
8
8
  has_many :connections, class_name: 'Phcpress::Modules::Connection', dependent: :destroy
9
9
  has_many :categories, class_name: 'Phcpress::Modules::Category', :through => :connections
10
-
10
+
11
11
  # Validation for Form Fields
12
12
  validates :psttitle,
13
13
  presence: true,
@@ -19,6 +19,6 @@ module Phcpress
19
19
 
20
20
  validates :pststatus,
21
21
  presence: true
22
-
22
+
23
23
  end
24
- end
24
+ end
@@ -4,4 +4,4 @@ module Phcpress
4
4
  'phcpress_frontend_'
5
5
  end
6
6
  end
7
- end
7
+ end
@@ -1,4 +1,4 @@
1
1
  module Phcpress
2
2
  class Frontend::Article < ApplicationRecord
3
3
  end
4
- end
4
+ end
@@ -4,4 +4,4 @@ module Phcpress
4
4
  'phcpress_modules_'
5
5
  end
6
6
  end
7
- end
7
+ end
@@ -11,4 +11,4 @@ module Phcpress
11
11
  length: { minimum: 3 }
12
12
 
13
13
  end
14
- end
14
+ end
@@ -1,9 +1,9 @@
1
1
  module Phcpress
2
2
  class Modules::Connection < ApplicationRecord
3
-
3
+
4
4
  # Relationships
5
5
  belongs_to :post, class_name: 'Phcpress::Articles::Post'
6
6
  belongs_to :category, class_name: 'Phcpress::Modules::Category'
7
-
7
+
8
8
  end
9
- end
9
+ end
@@ -13,7 +13,7 @@ class Phcpress::PstimageUploader < CarrierWave::Uploader::Base
13
13
  def extension_white_list
14
14
  %w(jpg jpeg gif png)
15
15
  end
16
-
16
+
17
17
  # Hash filenames
18
18
  def filename
19
19
  "#{secure_token}.#{file.extension}" if original_filename.present?
@@ -27,4 +27,4 @@ class Phcpress::PstimageUploader < CarrierWave::Uploader::Base
27
27
  model.instance_variable_get(var) or model.instance_variable_set(var, SecureRandom.uuid)
28
28
  end
29
29
 
30
- end
30
+ end
@@ -1,4 +1,4 @@
1
1
  <div class="pull-right hidden-xs">
2
- <b>Version</b> 7.1.2 - 04-14-<%= Date.today.year %>
2
+ <b>Version</b> 8.0.0b - 04-28-<%= Date.today.year %>
3
3
  </div>
4
- <strong>&copy; 2012-<%= Time.now.year %> <%= link_to "https://phcnetworks.net", target: "_blank", rel: "nofollow" do %>PHCNetworks<% end %></strong>
4
+ <strong>&copy; 2012-<%= Time.now.year %> <%= link_to "https://phcnetworks.net", target: "_blank", rel: "nofollow" do %>PHCNetworks<% end %></strong>
@@ -10,13 +10,13 @@
10
10
  <ul class="treeview-menu">
11
11
  <li class="">
12
12
  <%= link_to articles_posts_path do %>
13
- <i class="fa fa-circle-o"></i>
13
+ <i class="fa fa-circle-o"></i>
14
14
  Article Index
15
15
  <% end %>
16
16
  </li>
17
17
  <li class="">
18
18
  <%= link_to new_articles_post_path do %>
19
- <i class="fa fa-circle-o"></i>
19
+ <i class="fa fa-circle-o"></i>
20
20
  New Article
21
21
  <% end %>
22
22
  </li>
@@ -32,17 +32,17 @@
32
32
  <ul class="treeview-menu">
33
33
  <li class="">
34
34
  <%= link_to modules_categories_path do %>
35
- <i class="fa fa-circle-o"></i>
35
+ <i class="fa fa-circle-o"></i>
36
36
  Category List
37
37
  <% end %>
38
38
  </li>
39
39
  <li class="">
40
40
  <%= link_to new_modules_category_path do %>
41
- <i class="fa fa-circle-o"></i>
41
+ <i class="fa fa-circle-o"></i>
42
42
  New Category
43
43
  <% end %>
44
44
  </li>
45
45
  </ul>
46
46
  </li>
47
47
  </ul>
48
- </section>
48
+ </section>
@@ -2,4 +2,4 @@
2
2
  <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
3
3
  <span class="sr-only">Toggle navigation</span>
4
4
  </a>
5
- <!-- Mobile Toggle -->
5
+ <!-- Mobile Toggle -->
@@ -21,4 +21,4 @@
21
21
 
22
22
  </body>
23
23
 
24
- </html>
24
+ </html>
@@ -1,2 +1,2 @@
1
1
  object @modules_categories
2
- attributes :id, :catname
2
+ attributes :id, :catname
@@ -1,2 +1,2 @@
1
1
  object @articles_posts
2
- attributes :id, :psttitle, :psttext, :pststatus, :pstimage
2
+ attributes :id, :psttitle, :psttext, :pststatus, :pstimage
@@ -3,7 +3,7 @@
3
3
 
4
4
  <!-- PHC-Notifi Render Validation -->
5
5
  <%= render 'phcnotifi/validations', :object => @articles_post %>
6
-
6
+
7
7
  <div class="col-md-3">
8
8
 
9
9
  <div class="panel panel-primary">
@@ -63,7 +63,7 @@
63
63
  <div class="panel-body">
64
64
 
65
65
  <%= render 'phcnotifi/validations', :object => @articles_post %>
66
-
66
+
67
67
  <div class="form-group">
68
68
  <%= f.label :psttext, "Post Title" %>
69
69
  <%= f.text_field :psttitle, class: "form-control" %>
@@ -81,4 +81,4 @@
81
81
  <% end %>
82
82
  </div>
83
83
 
84
- <%= tinymce %>
84
+ <%= tinymce %>
@@ -29,4 +29,4 @@
29
29
  </div>
30
30
  </div>
31
31
  </section>
32
- <!-- Main Content -->
32
+ <!-- Main Content -->
@@ -66,4 +66,4 @@
66
66
  </div>
67
67
  </div>
68
68
  </section>
69
- <!-- Main Content -->
69
+ <!-- Main Content -->
@@ -29,4 +29,4 @@
29
29
  </div>
30
30
  </div>
31
31
  </section>
32
- <!-- Main Content -->
32
+ <!-- Main Content -->
@@ -37,4 +37,4 @@
37
37
  </div>
38
38
  </div>
39
39
  </section>
40
- <!-- Main Content -->
40
+ <!-- Main Content -->
@@ -37,13 +37,13 @@
37
37
  <ul class="blog-post-info list-inline">
38
38
  <li>
39
39
  <%= link_to "#" do %>
40
- <i class="fa fa-clock-o"></i>
40
+ <i class="fa fa-clock-o"></i>
41
41
  <span class="font-lato"><%= frontend_article.created_at %></span>
42
42
  <% end %>
43
43
  </li>
44
44
  <li>
45
45
  <%= link_to "#" do %>
46
- <i class="fa fa-comment-o"></i>
46
+ <i class="fa fa-comment-o"></i>
47
47
  <span class="font-lato">0 Comments</span>
48
48
  <% end %>
49
49
  </li>
@@ -58,7 +58,7 @@
58
58
  </li>
59
59
  <li>
60
60
  <%= link_to "#" do %>
61
- <i class="fa fa-user"></i>
61
+ <i class="fa fa-user"></i>
62
62
  <span class="font-lato"><%= frontend_article.user_name %></span>
63
63
  <% end %>
64
64
  </li>
@@ -26,13 +26,13 @@
26
26
  <ul class="blog-post-info list-inline">
27
27
  <li>
28
28
  <%= link_to "#" do %>
29
- <i class="fa fa-clock-o"></i>
29
+ <i class="fa fa-clock-o"></i>
30
30
  <span class="font-lato"><%= @articles_single.created_at %></span>
31
31
  <% end %>
32
32
  </li>
33
33
  <li>
34
34
  <%= link_to "#" do %>
35
- <i class="fa fa-comment-o"></i>
35
+ <i class="fa fa-comment-o"></i>
36
36
  <span class="font-lato">0 Comments</span>
37
37
  <% end %>
38
38
  </li>
@@ -47,7 +47,7 @@
47
47
  </li>
48
48
  <li>
49
49
  <%= link_to "#" do %>
50
- <i class="fa fa-user"></i>
50
+ <i class="fa fa-user"></i>
51
51
  <span class="font-lato"><%= @articles_single.user_name %></span>
52
52
  <% end %>
53
53
  </li>
@@ -3,18 +3,18 @@
3
3
  <!-- PHC-Notifi Render Validation -->
4
4
  <%= render 'phcnotifi/validations', :object => @modules_category %>
5
5
  <!-- PHC-Notifi Render Validation -->
6
-
6
+
7
7
  <!-- Form Fields -->
8
8
  <div class="form-group field_with_errors">
9
9
  <label><%= f.label :catname, "Category Name" %></label>
10
10
  <%= f.text_field :catname, class: "form-control" %>
11
11
  </div>
12
12
  <!-- Form Fields -->
13
-
13
+
14
14
  <!-- Form Button -->
15
15
  <div class="actions">
16
16
  <%= f.submit class: "btn btn-primary" %>
17
17
  </div>
18
18
  <!-- Form Button -->
19
19
 
20
- <% end %>
20
+ <% end %>
@@ -36,4 +36,4 @@
36
36
  </div>
37
37
  </div>
38
38
  </section>
39
- <!-- Main Content -->
39
+ <!-- Main Content -->
@@ -35,7 +35,7 @@
35
35
  <th></th>
36
36
  </tr>
37
37
  </thead>
38
-
38
+
39
39
  <tbody>
40
40
  <% @modules_categories.each do |modules_category| %>
41
41
  <tr>
@@ -63,4 +63,4 @@
63
63
  </div>
64
64
  </div>
65
65
  </section>
66
- <!-- Main Content -->
66
+ <!-- Main Content -->
@@ -36,4 +36,4 @@
36
36
  </div>
37
37
  </div>
38
38
  </section>
39
- <!-- Main Content -->
39
+ <!-- Main Content -->
@@ -37,4 +37,4 @@
37
37
  </div>
38
38
  </div>
39
39
  </section>
40
- <!-- Main Content -->
40
+ <!-- Main Content -->
@@ -3,7 +3,7 @@
3
3
  <!-- PHC-Notifi Render Validation -->
4
4
  <%= render 'phcnotifi/validations', :object => @articles_post %>
5
5
  <!-- PHC-Notifi Render Validation -->
6
-
6
+
7
7
  <!-- Form Fields -->
8
8
  <div class="form-group field_with_errors">
9
9
  <%= f.label :category_id, "Category ID" %>
@@ -14,11 +14,11 @@
14
14
  <%= f.text_field :post_id, class: "form-control" %>
15
15
  </div>
16
16
  <!-- Form Fields -->
17
-
17
+
18
18
  <!-- Form Button -->
19
19
  <div class="actions">
20
20
  <%= f.submit class: "btn btn-primary" %>
21
21
  </div>
22
22
  <!-- Form Button -->
23
23
 
24
- <% end %>
24
+ <% end %>
@@ -36,4 +36,4 @@
36
36
  </div>
37
37
  </div>
38
38
  </section>
39
- <!-- Main Content -->
39
+ <!-- Main Content -->
@@ -36,7 +36,7 @@
36
36
  <th colspan="3"></th>
37
37
  </tr>
38
38
  </thead>
39
-
39
+
40
40
  <tbody>
41
41
  <% @modules_connections.each do |modules_connection| %>
42
42
  <tr>
@@ -63,4 +63,4 @@
63
63
  </div>
64
64
  </div>
65
65
  </section>
66
- <!-- Main Content -->
66
+ <!-- Main Content -->
@@ -36,4 +36,4 @@
36
36
  </div>
37
37
  </div>
38
38
  </section>
39
- <!-- Main Content -->
39
+ <!-- Main Content -->
@@ -32,12 +32,12 @@
32
32
  <strong>Post:</strong>
33
33
  <%= @modules_connection.post_id %>
34
34
  </p>
35
-
35
+
36
36
  <p>
37
37
  <strong>Category:</strong>
38
38
  <%= @modules_connection.category_id %>
39
39
  </p>
40
-
40
+
41
41
  <%= link_to 'Edit', edit_modules_connection_path(@modules_connection) %> |
42
42
  <%= link_to 'Back', modules_connections_path %>
43
43
  <!-- Show Content -->
@@ -47,4 +47,4 @@
47
47
  </div>
48
48
  </div>
49
49
  </section>
50
- <!-- Main Content -->
50
+ <!-- Main Content -->
data/config/routes.rb CHANGED
@@ -4,24 +4,24 @@ Phcpress::Engine.routes.draw do
4
4
  namespace :frontend do
5
5
  resources :articles
6
6
  end
7
-
7
+
8
8
  # API
9
9
  namespace :api do
10
10
  namespace :v1 do
11
- resources :posts, defaults: {format: 'json'}
11
+ resources :posts, defaults: {format: 'json'}
12
12
  resources :categories, defaults: {format: 'json'}
13
13
  end
14
14
  end
15
-
15
+
16
16
  # Article Routes
17
17
  namespace :articles do
18
18
  resources :posts, class_name: 'Phcpress::Articles::Post'
19
19
  end
20
-
20
+
21
21
  # Module Routes
22
22
  namespace :modules do
23
23
  resources :connections, class_name: 'Phcpress::Modules::Connection'
24
24
  resources :categories, class_name: 'Phcpress::Modules::Category'
25
25
  end
26
26
 
27
- end
27
+ end
data/config/tinymce.yml CHANGED
@@ -2,4 +2,4 @@ toolbar:
2
2
  - styleselect | bold italic | undo redo | image | link
3
3
  plugins:
4
4
  - image
5
- - link
5
+ - link
@@ -1,16 +1,16 @@
1
1
  class CreatePhcpressModulesCategories < ActiveRecord::Migration[5.0]
2
2
  def change
3
-
3
+
4
4
  create_table :phcpress_modules_categories do |t|
5
-
5
+
6
6
  t.string :catname
7
-
7
+
8
8
  t.string :user_id
9
9
  t.string :user_name
10
-
10
+
11
11
  t.timestamps
12
-
12
+
13
13
  end
14
-
14
+
15
15
  end
16
- end
16
+ end