spud_blog 1.0.0.rc1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.markdown +54 -42
- data/app/assets/images/spud/admin/blog_icon.png +0 -0
- data/app/assets/images/spud/admin/blog_icon@2x.png +0 -0
- data/app/assets/images/spud/admin/news_icon.png +0 -0
- data/app/assets/images/spud/admin/news_icon@2x.png +0 -0
- data/app/assets/stylesheets/spud/admin/posts.css +1 -3
- data/app/controllers/blog_controller.rb +5 -1
- data/app/controllers/spud/admin/news_posts_controller.rb +5 -1
- data/app/controllers/spud/admin/posts_controller.rb +5 -1
- data/app/views/spud/admin/post_categories/_category.html.erb +6 -2
- data/app/views/spud/admin/post_categories/_form.html.erb +8 -8
- data/app/views/spud/admin/post_categories/index.html.erb +1 -1
- data/app/views/spud/admin/post_comments/index.html.erb +7 -5
- data/app/views/spud/admin/posts/_form.html.erb +71 -52
- data/app/views/spud/admin/posts/index.html.erb +5 -3
- data/lib/spud_blog/configuration.rb +4 -1
- data/lib/spud_blog/engine.rb +2 -2
- data/lib/spud_blog/version.rb +1 -1
- metadata +12 -11
- data/app/assets/images/spud/admin/news_thumb.png +0 -0
- data/app/assets/images/spud/admin/news_thumb@2x.png +0 -0
- data/app/assets/images/spud/admin/posts_thumb.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 551d70bc0641494763008a68a10b9dd6a15e2409
|
4
|
+
data.tar.gz: 17ea6699d5617a0256c052c9bb4448e03680dc77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd01d1f8338857ac0a061cf5b680a42107465c54f4ae0e4d1acdc43e56ab79fbd73dc53860b41d74ac21e2b13ce5a3d77786222da8dd54648b2ed2e0266bbea4
|
7
|
+
data.tar.gz: af39b0b7621aae0460b8290a5d8c6ebc7d2b0203f9c667a3aaf7918818176e8d9d3fecf879bb449025fb53e71191de9f8df6f38819645ac7db3bf3815d8b6150
|
data/Readme.markdown
CHANGED
@@ -13,14 +13,14 @@ __NOTE:__ This project is still in its early infancy.
|
|
13
13
|
|
14
14
|
1. In your Gemfile add the following
|
15
15
|
|
16
|
-
|
17
|
-
|
16
|
+
gem 'spud_core'
|
17
|
+
gem 'spud_blog'
|
18
18
|
|
19
19
|
2. Run bundle install
|
20
20
|
3. Copy in database migrations to your new rails project
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
bundle exec rake railties:install:migrations
|
23
|
+
rake db:migrate
|
24
24
|
|
25
25
|
4. run a rails server instance and point your browser to /spud/admin
|
26
26
|
|
@@ -28,23 +28,24 @@ __NOTE:__ This project is still in its early infancy.
|
|
28
28
|
|
29
29
|
Spud Blog current accepts the following configuration options.
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
Spud::Blog.configure do |config|
|
32
|
+
config.base_layout = 'blog'
|
33
|
+
config.blog_enabled = true
|
34
|
+
config.news_enabled = true
|
35
|
+
config.blog_path = 'blog'
|
36
|
+
config.news_path = 'news'
|
37
|
+
config.posts_per_page = 5
|
38
|
+
config.has_custom_fields = false
|
39
|
+
config.custom_fields = []
|
40
|
+
config.caching_enabled = true
|
41
|
+
config.caching_expires_in = 1.hour
|
42
|
+
end
|
42
43
|
|
43
44
|
## Customizing Views
|
44
45
|
|
45
46
|
A number of built-in views have been provided to help you get started with the frontend display. Customzing these views will require you to copy them into your local application, which can be accomplished by using the views generator.
|
46
47
|
|
47
|
-
|
48
|
+
rails generate spud:blog:views
|
48
49
|
|
49
50
|
__NOTE:__ The built-in views are likely to undergo changes as features are added to the blogging engine. If a new version of Spud Blog does not play nicely with your customized views, try backing up your views to an alternate location and running the views generator again to see what has changed.
|
50
51
|
|
@@ -52,7 +53,7 @@ __NOTE:__ The built-in views are likely to undergo changes as features are added
|
|
52
53
|
|
53
54
|
Spud Blog includes a small, unobtrusive javascript driver that adds functionality to the built-in views. Including the driver is optional, as all client-side views and controllers are designed to work whether you include it or not.
|
54
55
|
|
55
|
-
|
56
|
+
<%= javascript_include_tag 'spud/blog' %>
|
56
57
|
|
57
58
|
## Custom Fields
|
58
59
|
|
@@ -61,21 +62,32 @@ You may find that your blog requires a field that isn't included in the default
|
|
61
62
|
1. Set `has_custom_fields` to true in your Spud Blog configuration
|
62
63
|
2. Create a migration adding the necessary column(s) to your database
|
63
64
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
65
|
+
```ruby
|
66
|
+
class AddCaptionToPosts < ActiveRecord::Migration
|
67
|
+
def change
|
68
|
+
add_column :spud_posts, :caption, :string
|
69
|
+
end
|
70
|
+
end
|
71
|
+
```
|
72
|
+
|
73
|
+
3. Add an array of the new custom fields to `Spud::Blog.config.custom_fields` in application.rb for strong parameter filtering.
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
Spud::Blog.configure do |config|
|
77
|
+
config.custom_fields = [:caption]
|
78
|
+
end
|
79
|
+
```
|
80
|
+
|
81
|
+
4. Save a view partial at `app/views/spud/admin/posts/_custom_fields.html.erb` with the desired inputs
|
82
|
+
|
83
|
+
```erb
|
84
|
+
<div class="control-group">
|
85
|
+
<%= f.label :caption, 'Caption',:class => "control-label" %>
|
86
|
+
<div class="controls">
|
87
|
+
<%= f.text_field :caption %>
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
```
|
79
91
|
|
80
92
|
## Extending the Post Model
|
81
93
|
|
@@ -84,16 +96,16 @@ Rails engines allow you to extend or even completely override classes by adding
|
|
84
96
|
1. Create a file at `app/models/spud_post.rb`
|
85
97
|
2. Add the following code:
|
86
98
|
|
87
|
-
|
88
|
-
|
99
|
+
# Use this helper method to pull in the SpudPost source code from the engine
|
100
|
+
Spud::Blog::Engine.require_model('spud_post')
|
89
101
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
102
|
+
# Add your own methods to SpudPost
|
103
|
+
class SpudPost
|
104
|
+
attr_accessible :caption
|
105
|
+
def byline
|
106
|
+
return "'#{self.title}' was posted by #{self.author.full_name} on #{self.display_date}"
|
107
|
+
end
|
108
|
+
end
|
97
109
|
|
98
110
|
## Akismet Support
|
99
111
|
|
@@ -107,7 +119,7 @@ Spud Blog Engine now supports spam comment filtering using akismet. All you have
|
|
107
119
|
|
108
120
|
Also make sure to add the rakismet gem to your gemfile
|
109
121
|
|
110
|
-
|
122
|
+
gem 'rakismet'
|
111
123
|
|
112
124
|
Testing
|
113
125
|
-----------------
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -132,7 +132,11 @@ private
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def comment_params
|
135
|
-
|
135
|
+
allowed_params = [:author,:content]
|
136
|
+
if Spud::Blog.config.custom_comment_fields
|
137
|
+
allowed_params.concat(Spud::Blog.config.custom_comment_fields)
|
138
|
+
end
|
139
|
+
params.require(:spud_post_comment).permit *allowed_params
|
136
140
|
end
|
137
141
|
|
138
142
|
end
|
@@ -59,7 +59,11 @@ class Spud::Admin::NewsPostsController < Spud::Admin::ApplicationController
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def post_params
|
62
|
-
|
62
|
+
allowed_params = [:is_news,:published_at,:title,:content,:spud_user_id,:url_name,:visible,:comments_enabled,:meta_keywords,:meta_description,{:category_ids => []}, {:spud_site_ids => []}, :content_format]
|
63
|
+
if Spud::Blog.config.custom_fields
|
64
|
+
allowed_params.concat(Spud::Blog.config.custom_fields)
|
65
|
+
end
|
66
|
+
params.require(:spud_post).permit *allowed_params
|
63
67
|
end
|
64
68
|
|
65
69
|
end
|
@@ -62,7 +62,11 @@ private
|
|
62
62
|
|
63
63
|
|
64
64
|
def post_params
|
65
|
-
|
65
|
+
allowed_params = [:is_news,:published_at,:title,:content,:spud_user_id,:url_name,:visible,:comments_enabled,:meta_keywords,:meta_description,{:category_ids => []}, {:spud_site_ids => []}, :content_format]
|
66
|
+
if Spud::Blog.config.custom_fields
|
67
|
+
allowed_params.concat(Spud::Blog.config.custom_fields)
|
68
|
+
end
|
69
|
+
params.require(:spud_post).permit *allowed_params
|
66
70
|
end
|
67
71
|
|
68
72
|
end
|
@@ -3,8 +3,12 @@
|
|
3
3
|
<%= category.name %>
|
4
4
|
</span>
|
5
5
|
<span class="spud_blog_category_manager_item_actions">
|
6
|
-
<%= link_to
|
7
|
-
|
6
|
+
<%= link_to edit_spud_admin_post_category_path(category), :class => 'btn btn-xs btn-link spud_blog_category_edit' do%>
|
7
|
+
<span class="glyphicon glyphicon-pencil"></span>
|
8
|
+
<%end%>
|
9
|
+
<%= link_to spud_admin_post_category_path(category), :class => 'btn btn-xs btn-danger spud_blog_category_delete' do%>
|
10
|
+
<span class="glyphicon glyphicon-trash"></span>
|
11
|
+
<%end%>
|
8
12
|
</span>
|
9
13
|
<ul class="spud_blog_category_manager_item_children">
|
10
14
|
<% if @post_categories[category.id] %>
|
@@ -3,16 +3,16 @@
|
|
3
3
|
<%= error_messages_for(f.object) %>
|
4
4
|
|
5
5
|
<fieldset>
|
6
|
-
<div class="
|
7
|
-
<%= f.label :name,"Name",:class => "control-label" %>
|
8
|
-
<div class="
|
9
|
-
<%= f.text_field :name %>
|
6
|
+
<div class="form-group">
|
7
|
+
<%= f.label :name,"Name",:class => "control-label col-sm-2" %>
|
8
|
+
<div class="col-sm-10">
|
9
|
+
<%= f.text_field :name, :class => "form-control" %>
|
10
10
|
</div>
|
11
11
|
</div>
|
12
|
-
<div class="
|
13
|
-
<%= label_tag :parent,'Parent',:class => "control-label" %>
|
14
|
-
<div class="
|
15
|
-
<select name="spud_post_category[parent_id]">
|
12
|
+
<div class="form-group">
|
13
|
+
<%= label_tag :parent,'Parent',:class => "control-label col-sm-2" %>
|
14
|
+
<div class="col-sm-10">
|
15
|
+
<select name="spud_post_category[parent_id]" class="form-control">
|
16
16
|
<option value="">No Parent</option>
|
17
17
|
<%= options_for_select(SpudPostCategory.options_for_categories(:filter => @post_category.id), @post_category.parent_id) %>
|
18
18
|
</select>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="spud_blog_category_manager">
|
2
|
-
<%= link_to "New Post Category", new_spud_admin_post_category_path, :class => "btn btn-
|
2
|
+
<%= link_to "New Post Category", new_spud_admin_post_category_path, :class => "btn btn-sm btn-success spud_blog_category_add_new", :title => "New Post Category" %>
|
3
3
|
<ul class="spud_blog_category_manager_list">
|
4
4
|
<% if @post_categories.length == 0 %>
|
5
5
|
<li class="spud_blog_category_manager_empty">You do not have any Post Categories at this time.</li>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<%=content_for :detail do %>
|
6
|
-
<table class="admin-table">
|
6
|
+
<table class="admin-table table table-responsive">
|
7
7
|
<thead>
|
8
8
|
<tr>
|
9
9
|
|
@@ -30,10 +30,12 @@
|
|
30
30
|
Approved
|
31
31
|
<% end %>
|
32
32
|
</td>
|
33
|
-
<td align="right">
|
34
|
-
<%= link_to 'Approve', approve_spud_admin_post_comment_path(comment), :class => 'btn btn-success btn-
|
35
|
-
<%= link_to 'Spam', spam_spud_admin_post_comment_path(comment), :class => 'btn btn-warning btn-
|
36
|
-
<%= link_to
|
33
|
+
<td align="right" style="min-width:200px;">
|
34
|
+
<%= link_to 'Approve', approve_spud_admin_post_comment_path(comment), :class => 'btn btn-success btn-sm' %>
|
35
|
+
<%= link_to 'Spam', spam_spud_admin_post_comment_path(comment), :class => 'btn btn-warning btn-sm' %>
|
36
|
+
<%= link_to spud_admin_post_comment_path(comment), :method => :delete, :confirm => 'Are you sure you want to delete this comment?', :class => 'btn btn-danger btn-sm' do%>
|
37
|
+
<span class="glyphicon glyphicon-trash"></span>
|
38
|
+
<%end%>
|
37
39
|
</td>
|
38
40
|
</tr>
|
39
41
|
<%end%>
|
@@ -1,17 +1,20 @@
|
|
1
1
|
<%=error_messages_for(f.object)%>
|
2
2
|
|
3
3
|
<fieldset>
|
4
|
-
<div class="
|
5
|
-
|
6
|
-
|
4
|
+
<div class="form-group">
|
5
|
+
<%= f.label :title, :required=>true,:style =>"display:none;" %>
|
6
|
+
<div class="col-sm-12">
|
7
|
+
<%= f.text_field :title, :class => "full-width form-control",:placeholder=>"Enter title here" %>
|
8
|
+
</div>
|
7
9
|
</div>
|
8
10
|
</fieldset>
|
9
|
-
|
10
|
-
|
11
|
+
|
12
|
+
<div style="formtab clearfix">
|
13
|
+
<div class="form-group">
|
14
|
+
<div class="col-sm-12">
|
11
15
|
<%=f.select :content_format,Spud::Core.renderers.collect { |k,v| [v[:description] || k, k]}, {:include_blank => false}, :class => "pull-right", "data-formatter" => "spud_post_content"%>
|
12
16
|
</div>
|
13
17
|
</div>
|
14
|
-
<div style="clear:both;">
|
15
18
|
<%= f.text_area :content,:style => "width:100%;", :class => 'spud-formatted-editor full-width', "data-format" => f.object.content_format %>
|
16
19
|
</div>
|
17
20
|
|
@@ -25,30 +28,37 @@
|
|
25
28
|
<fieldset class="spud_post_form_fieldset">
|
26
29
|
<legend>Advanced</legend>
|
27
30
|
|
28
|
-
<div class="
|
31
|
+
<div class="col-sm-6">
|
32
|
+
<div class="form-horizontal">
|
29
33
|
<h4>Meta Data</h4>
|
30
34
|
|
31
|
-
<div class="
|
32
|
-
<%= f.label :published_at, 'Publish Date' %>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
35
|
+
<div class="form-group">
|
36
|
+
<%= f.label :published_at, 'Publish Date', :class => "control-label col-sm-4" %>
|
37
|
+
<div class="col-sm-8">
|
38
|
+
<%= f.text_field :published_at,:value => f.object.published_at.strftime("%Y-%m-%d %H:%M") , :class => 'spud_form_date_picker form-control' %>
|
39
|
+
<span class="time_select">
|
40
|
+
<%= f.time_select :published_at, :ignore_date => true,:ampm => true%>
|
41
|
+
</span>
|
42
|
+
</div>
|
43
|
+
|
37
44
|
</div>
|
38
45
|
|
39
46
|
<% if @current_user.super_admin %>
|
40
|
-
<div class="
|
41
|
-
<%= f.label :spud_user_id, 'Author' %>
|
42
|
-
|
47
|
+
<div class="form-group">
|
48
|
+
<%= f.label :spud_user_id, 'Author', :class => "control-label col-sm-4" %>
|
49
|
+
<div class="col-sm-8">
|
50
|
+
<%= f.select :spud_user_id,options_for_select(SpudUser.order(:first_name,:last_name,:login).all.collect{|user| [user.full_name,user.id]},f.object.spud_user_id), :class => "form-control"%>
|
51
|
+
</div>
|
52
|
+
|
43
53
|
</div>
|
44
54
|
<% else %>
|
45
55
|
<%= f.hidden_field :spud_user_id %>
|
46
56
|
<% end %>
|
47
57
|
|
48
58
|
<% if Spud::Core.config.multisite_mode_enabled %>
|
49
|
-
<div class="
|
50
|
-
<%= f.label :sites, 'Websites to Publish' %>
|
51
|
-
<div class="spud_post_form_input_group">
|
59
|
+
<div class="form-group">
|
60
|
+
<%= f.label :sites, 'Websites to Publish', :class => "control-label col-sm-4" %>
|
61
|
+
<div class="spud_post_form_input_group col-sm-8">
|
52
62
|
<%= spud_post_site_check_box_tag(Spud::Core.default_site_config, @post) %>
|
53
63
|
<%= spud_post_site_label_tag(Spud::Core.default_site_config) %>
|
54
64
|
<% Spud::Core.config.multisite_config.each do |site| %>
|
@@ -59,55 +69,64 @@
|
|
59
69
|
</div>
|
60
70
|
<% end %>
|
61
71
|
|
62
|
-
<div class="
|
63
|
-
<%= f.label :visible %>
|
64
|
-
<div class="
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
<label class="radio
|
72
|
+
<div class="form-group">
|
73
|
+
<%= f.label :visible, :class => "control-label col-sm-4" %>
|
74
|
+
<div class="col-sm-8">
|
75
|
+
<label class="radio-inline">
|
76
|
+
<%= f.radio_button :visible, true %> Yes
|
77
|
+
</label>
|
78
|
+
<label class="radio-inline">
|
79
|
+
<%= f.radio_button :visible, false %> No
|
80
|
+
</label>
|
69
81
|
</div>
|
70
82
|
</div>
|
71
83
|
|
72
84
|
<% unless @post.is_news %>
|
73
|
-
<div class="
|
74
|
-
<%= f.label :comments_enabled,"Comments Enabled" %>
|
75
|
-
<div class="
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<label class="radio
|
85
|
+
<div class="form-group">
|
86
|
+
<%= f.label :comments_enabled,"Comments Enabled", :class => "control-label col-sm-4" %>
|
87
|
+
<div class="col-sm-8">
|
88
|
+
<label class="radio-inline">
|
89
|
+
<%= f.radio_button :comments_enabled, true %> Yes
|
90
|
+
</label>
|
91
|
+
<label class="radio-inline">
|
92
|
+
<%= f.radio_button :comments_enabled, false %> No
|
93
|
+
</label>
|
80
94
|
</div>
|
81
95
|
</div>
|
82
96
|
<% end %>
|
83
97
|
|
84
|
-
<div class="
|
85
|
-
<%= f.label :meta_keywords, 'Keywords' %>
|
86
|
-
|
87
|
-
|
98
|
+
<div class="form-group">
|
99
|
+
<%= f.label :meta_keywords, 'Keywords', :class => "control-label col-sm-4" %>
|
100
|
+
<div class="col-sm-8">
|
101
|
+
<%= f.text_field :meta_keywords, :class => "form-control" %>
|
102
|
+
<span class="spud_post_form_help_block">A Comma seperated list of keywords for search engines. Keep it short (no more than 10 keywords)</span>
|
103
|
+
</div>
|
104
|
+
|
88
105
|
</div>
|
89
106
|
|
90
|
-
<div class="
|
91
|
-
<%= f.label :meta_description, 'Description' %>
|
92
|
-
|
93
|
-
|
107
|
+
<div class="form-group">
|
108
|
+
<%= f.label :meta_description, 'Description', :class => "control-label col-sm-4" %>
|
109
|
+
<div class="col-sm-8">
|
110
|
+
<%= f.text_area :meta_description, :class => "form-control" %>
|
111
|
+
<span class="spud_post_form_help_block">A short description of the article. This is what appears on a search engines search result page.</span>
|
112
|
+
</div>
|
94
113
|
</div>
|
95
114
|
</div>
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
115
|
+
</div>
|
116
|
+
<div class="col-sm-6">
|
117
|
+
<h4>Categories</h4>
|
118
|
+
<%= link_to 'Add Category', new_spud_admin_post_category_path, :class => 'btn btn-sm btn-success spud_post_add_category' %>
|
119
|
+
<input type="hidden" name="spud_post[category_ids][]" value="" />
|
120
|
+
<ul class="spud_post_categories_form">
|
121
|
+
<%= render :partial => '/spud/admin/posts/category', :collection => @categories[nil] %>
|
122
|
+
</ul>
|
123
|
+
</div>
|
105
124
|
|
106
125
|
</fieldset>
|
107
126
|
<%= f.hidden_field :is_news %>
|
108
127
|
|
109
|
-
<div class="
|
110
|
-
<%=f.submit "Save Post", :class=>"btn btn-primary form-btn","data-loading-text"=>"Saving..."%> or <%=link_to "cancel",request.referer, :class => "btn"%>
|
128
|
+
<div class="col-sm-6 col-sm-offset-2">
|
129
|
+
<%=f.submit "Save Post", :class=>"btn btn-primary form-btn","data-loading-text"=>"Saving..."%> or <%=link_to "cancel",request.referer, :class => "btn btn-default"%>
|
111
130
|
</div>
|
112
131
|
|
113
132
|
<script type="text/javascript">
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= content_for :data_controls do %>
|
2
|
-
<%= link_to "Manage Categories", spud_admin_post_categories_path, :class => 'btn spud_blog_manage_categories', :title => 'Manage Categories' %>
|
3
|
-
<%= link_to "Manage Comments", spud_admin_post_comments_path, :class => 'btn', :title => 'Manage Comments' %>
|
2
|
+
<%= link_to "Manage Categories", spud_admin_post_categories_path, :class => 'btn btn-info spud_blog_manage_categories', :title => 'Manage Categories' %>
|
3
|
+
<%= link_to "Manage Comments", spud_admin_post_comments_path, :class => 'btn btn-default', :title => 'Manage Comments' %>
|
4
4
|
<%= link_to "New Post", new_spud_admin_post_path, :class => "btn btn-primary", :title => "New Post" %>
|
5
5
|
<% end %>
|
6
6
|
|
@@ -34,7 +34,9 @@
|
|
34
34
|
Spam: <%=link_to post.spam_comments.count, spud_admin_post_post_comments_path(:post_id => post.id) %>
|
35
35
|
</td>
|
36
36
|
<td align="right">
|
37
|
-
<%= link_to
|
37
|
+
<%= link_to spud_admin_post_path(post), :method => :delete, :data => {:confirm => 'Are you sure you want to delete this post?'}, :class => 'btn btn-sm btn-danger' do%>
|
38
|
+
<span class="glyphicon glyphicon-trash"></span>
|
39
|
+
<%end%>
|
38
40
|
</td>
|
39
41
|
</tr>
|
40
42
|
<%end%>
|
@@ -5,8 +5,9 @@ module Spud
|
|
5
5
|
:base_layout, :news_layout, :blog_enabled,
|
6
6
|
:news_enabled, :posts_per_page, :blog_path,
|
7
7
|
:news_path, :enable_sitemap, :has_custom_fields,
|
8
|
-
:enable_rakismet
|
8
|
+
:enable_rakismet, :custom_fields, :custom_comment_fields
|
9
9
|
)
|
10
|
+
|
10
11
|
self.base_layout = 'application'
|
11
12
|
self.news_layout = nil
|
12
13
|
self.news_enabled = false
|
@@ -16,6 +17,8 @@ module Spud
|
|
16
17
|
self.news_path = 'news'
|
17
18
|
self.enable_sitemap = true
|
18
19
|
self.has_custom_fields = false
|
20
|
+
self.custom_fields = []
|
21
|
+
self.custom_comment_fields = []
|
19
22
|
self.enable_rakismet = false
|
20
23
|
end
|
21
24
|
end
|
data/lib/spud_blog/engine.rb
CHANGED
@@ -23,7 +23,7 @@ module Spud
|
|
23
23
|
if Spud::Blog.config.blog_enabled
|
24
24
|
Spud::Core.config.admin_applications += [{
|
25
25
|
:name => 'Blog Posts',
|
26
|
-
:thumbnail => 'spud/admin/
|
26
|
+
:thumbnail => 'spud/admin/blog_icon.png',
|
27
27
|
:url => '/spud/admin/posts',
|
28
28
|
:order => 1
|
29
29
|
}]
|
@@ -31,7 +31,7 @@ module Spud
|
|
31
31
|
if Spud::Blog.config.news_enabled
|
32
32
|
Spud::Core.config.admin_applications += [{
|
33
33
|
:name => 'News Posts',
|
34
|
-
:thumbnail => 'spud/admin/
|
34
|
+
:thumbnail => 'spud/admin/news_icon.png',
|
35
35
|
:url => '/spud/admin/news_posts',
|
36
36
|
:order => 2
|
37
37
|
}]
|
data/lib/spud_blog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spud_blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Woods
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.0.0
|
33
|
+
version: 1.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.0.0
|
40
|
+
version: 1.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: spud_permalinks
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.0.0
|
47
|
+
version: 1.0.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.0.0
|
54
|
+
version: 1.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: truncate_html
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,9 +241,10 @@ executables: []
|
|
241
241
|
extensions: []
|
242
242
|
extra_rdoc_files: []
|
243
243
|
files:
|
244
|
-
- app/assets/images/spud/admin/
|
245
|
-
- app/assets/images/spud/admin/
|
246
|
-
- app/assets/images/spud/admin/
|
244
|
+
- app/assets/images/spud/admin/blog_icon.png
|
245
|
+
- app/assets/images/spud/admin/blog_icon@2x.png
|
246
|
+
- app/assets/images/spud/admin/news_icon.png
|
247
|
+
- app/assets/images/spud/admin/news_icon@2x.png
|
247
248
|
- app/assets/javascripts/spud/admin/post_categories.js
|
248
249
|
- app/assets/javascripts/spud/admin/posts.js
|
249
250
|
- app/assets/javascripts/spud/blog/sitemaps.js
|
@@ -337,9 +338,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
337
338
|
version: '0'
|
338
339
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
339
340
|
requirements:
|
340
|
-
- - '
|
341
|
+
- - '>='
|
341
342
|
- !ruby/object:Gem::Version
|
342
|
-
version:
|
343
|
+
version: '0'
|
343
344
|
requirements: []
|
344
345
|
rubyforge_project:
|
345
346
|
rubygems_version: 2.0.5
|
Binary file
|
Binary file
|
Binary file
|