phcpresspro 5.7.4 → 5.7.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c975025c824944d76f8ae25bdc10cfdcbbb9406c
4
- data.tar.gz: 5153c813accb2d8fd439fd5af8fa95fdcd06108c
3
+ metadata.gz: 22d37b65a9ff1531dfff7557b443bd8cfd7121c4
4
+ data.tar.gz: 110c60117d8a81bb922037ea94bbf68416fac51e
5
5
  SHA512:
6
- metadata.gz: 0318bab487daeb135ac08e075a9d1c2ee0745d53f818d4869bca7078bc8ddf555b1c83694272bf70a7316e985321bd23508581eef5e1badc271397f73f85c53c
7
- data.tar.gz: 86a855f35bbd8dc8bded53ff2dfa30c62321c4d7e15ea4f378d6134de1b31ffded29da33bd452d7f1de22c1c266013e0538302034fbbdf3c15dcd266c744ec48
6
+ metadata.gz: 21796c8a18b21ff197463e89f54e55a105eb47ff087a6c3290ea87a20eb587bc3802ee0002080948e31fc38687018642d761ce5f6ad145a14bf168ec10955867
7
+ data.tar.gz: cfddee76fd66d1163a5289ae93718b9458e33f5b1b0fd4929062d445a3e0e08bd90cb661cec6124091adf7e2194a194de5fa65073c7f2b49a3c62bf2c8065c27
@@ -1,6 +1,6 @@
1
1
  $(function() {
2
2
  var summer_note;
3
- summer_note = $('#articles_post_psttext');
3
+ summer_note = $('.summernote');
4
4
  summer_note.summernote({
5
5
  height: 800,
6
6
  toolbar: [
@@ -5,15 +5,23 @@ module Phcpresspro
5
5
 
6
6
  # Security & Filters
7
7
  layout '/layouts/phcpresspro/frontend.html.erb'
8
+ before_action :set_frontend_index, only: [:show, :edit, :update, :destroy]
8
9
 
9
10
  # Article Index
10
11
  def index
11
- @article_index = Articles::Post.all
12
+ @article_indicies = Articles::Post.all
12
13
  end
13
14
 
14
15
  # Single Article Post
15
16
  def show
16
- @article_single = Articles::Post.find(params[:id])
17
+ @article_index = Articles::Post.find(params[:id])
18
+ end
19
+
20
+ private
21
+
22
+ # Common Callbacks
23
+ def set_frontend_index
24
+ @article_index = Articles::Post.find(params[:id])
17
25
  end
18
26
 
19
27
  end
@@ -90,7 +90,7 @@
90
90
  </div>
91
91
  <div class="form-group">
92
92
  <%= f.label :psttext, "Text" %>
93
- <%= f.text_area :psttext, class: "articles_post_psttext form-control" %>
93
+ <%= f.text_area :psttext, class: "summernote form-control" %>
94
94
  </div>
95
95
  </div>
96
96
 
@@ -24,16 +24,16 @@
24
24
  <!-- Blog List -->
25
25
  <div class="col-md-9 col-sm-9">
26
26
 
27
- <% @article_index.each do |article_index| %>
27
+ <% @article_indicies.each do |article_index| %>
28
28
  <div class="blog-post-item">
29
29
  <% if article_index.pstimage? %>
30
30
  <figure class="margin-bottom-20">
31
- <%= link_to phcpresspro.frontend_article_path(@article) do %>
31
+ <%= link_to phcpresspro.frontend_index_path do %>
32
32
  <%= image_tag article_index.pstimage_url, class: "img-responsive" %>
33
33
  <% end %>
34
34
  </figure>
35
35
  <% end %>
36
- <h2><%= link_to article_index.psttitle, phcpresspro.frontend_article_path(@article) %></h2>
36
+ <h2><%= link_to article_index.psttitle, phcpresspro.frontend_index_path %></h2>
37
37
  <ul class="blog-post-info list-inline">
38
38
  <li>
39
39
  <%= link_to "#" do %>
@@ -22,12 +22,12 @@
22
22
 
23
23
  <!-- Blog List -->
24
24
  <div class="col-md-9 col-sm-9">
25
- <h1 class="blog-post-title"><%= @article_single.psttitle %></h1>
25
+ <h1 class="blog-post-title"><%= @article_index.psttitle %></h1>
26
26
  <ul class="blog-post-info list-inline">
27
27
  <li>
28
28
  <%= link_to "#" do %>
29
29
  <i class="fa fa-clock-o"></i>
30
- <span class="font-lato"><%= @article_single.created_at %></span>
30
+ <span class="font-lato"><%= @article_index.created_at %></span>
31
31
  <% end %>
32
32
  </li>
33
33
  <li>
@@ -48,16 +48,16 @@
48
48
  <li>
49
49
  <%= link_to "#" do %>
50
50
  <i class="fa fa-user"></i>
51
- <span class="font-lato"><%= @article_single.user_name %></span>
51
+ <span class="font-lato"><%= @article_index.user_name %></span>
52
52
  <% end %>
53
53
  </li>
54
54
  </ul>
55
- <% if @article_single.pstimage? %>
55
+ <% if @article_index.pstimage? %>
56
56
  <figure class="margin-bottom-20">
57
- <%= image_tag @article_single.pstimage_url, class: "img-responsive" %>
57
+ <%= image_tag @article_index.pstimage_url, class: "img-responsive" %>
58
58
  </figure>
59
59
  <% end %>
60
- <p class="dropcap"><%= @article_single.psttext %></p>
60
+ <p class="dropcap"><%= @article_index.psttext %></p>
61
61
  </div>
62
62
  <!-- Blog List -->
63
63
 
data/config/routes.rb CHANGED
@@ -3,7 +3,6 @@ Phcpresspro::Engine.routes.draw do
3
3
  # Frontend
4
4
  namespace :frontend do
5
5
  resources :articles
6
- resources :indices
7
6
  end
8
7
 
9
8
  # API
@@ -1,3 +1,3 @@
1
1
  module Phcpresspro
2
- VERSION = "5.7.4"
2
+ VERSION = "5.7.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcpresspro
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.7.4
4
+ version: 5.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts