tb_blog 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/assets/javascripts/spud/admin/post_comments.js +24 -1
- data/app/assets/stylesheets/spud/admin/{posts.css → posts.css.scss} +48 -22
- data/app/controllers/spud/admin/post_comments_controller.rb +1 -1
- data/app/views/spud/admin/post_comments/index.html.erb +17 -17
- data/lib/spud_blog/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTI0ODdlNDI3MjE3MWM4ZDIyMmNjOGU5NjZmOTE0ZGRkZjc0ZGJjMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzA5NmJjYjliNmZlYmU0ZjdiYThiYWU1ZTE4NDc0YWQwOWI0ZDVkMQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGU5ZjJhZWU3NWJkNjNlMzU0YmJiYzQ0MDEyNDkyODc5NjdkMzQ2ODg3MzI1
|
10
|
+
YTI0YzU3ZDk2OTJmMjMxMjdiNTA4ZGZlYzVkOTBiOWQyYWI0OGFlNGZmYjAz
|
11
|
+
MTBmOWI3NGZhOTE3ODRkMzIzZmVhZDAwOTdiZDIyZGEzNmQ4YjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWQzYmI5MmI2MzJiNzEwYmM4NTM4YzNmZjA0NDQ2OTAwM2Y2MDFmNTVmYTcz
|
14
|
+
YzhhM2EzNDZkZTU3NTllNmUwZGY1ZTMzYWEzOTcyYzllYmNlMGE4Nzg2NTc3
|
15
|
+
ODJhMzgxYmUzOWUzNDczOTgzOWIwMzYyY2JlMDhlMjJlYTMxMGE=
|
@@ -2,13 +2,36 @@
|
|
2
2
|
|
3
3
|
spud.admin.post_comments = {
|
4
4
|
index: function(){
|
5
|
+
|
6
|
+
var maxChars = 100;
|
7
|
+
$('.spud-post-comment-details-content').each(function(){
|
8
|
+
var el = $(this);
|
9
|
+
var fulltext = el.html();
|
10
|
+
if(fulltext.length > maxChars){
|
11
|
+
var shorttext = fulltext.substr(0, maxChars) + " (...)";
|
12
|
+
el.data('fulltext', fulltext);
|
13
|
+
el.data('shorttext', shorttext);
|
14
|
+
el.data('shortened', true);
|
15
|
+
el.html(shorttext);
|
16
|
+
el.next('.blog-comment-content-toggle').show();
|
17
|
+
}
|
18
|
+
});
|
19
|
+
|
5
20
|
$('body').on('click', '.blog-comment-content-toggle', clickedToggleCommentContent);
|
6
21
|
}
|
7
22
|
};
|
8
23
|
|
9
24
|
var clickedToggleCommentContent = function(e){
|
10
25
|
e.preventDefault();
|
11
|
-
$(this).
|
26
|
+
var el = $(this).prev('.spud-post-comment-details-content');
|
27
|
+
if(el.data('shortened')){
|
28
|
+
el.data('shortened', false);
|
29
|
+
el.html(el.data('fulltext'));
|
30
|
+
}
|
31
|
+
else{
|
32
|
+
el.data('shortened', true);
|
33
|
+
el.html(el.data('shorttext'));
|
34
|
+
}
|
12
35
|
};
|
13
36
|
|
14
37
|
})();
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
// Form Layout
|
2
|
+
//////////////////
|
3
3
|
.spud_post_form_fieldset{
|
4
4
|
margin: 30px 0;
|
5
5
|
}
|
@@ -39,8 +39,8 @@
|
|
39
39
|
height: 100px;
|
40
40
|
}
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
// Categories
|
43
|
+
//////////////
|
44
44
|
.spud_post_categories_form{
|
45
45
|
white-space: nowrap;
|
46
46
|
list-style-type: none;
|
@@ -69,8 +69,8 @@
|
|
69
69
|
margin: 4px 0;
|
70
70
|
}
|
71
71
|
|
72
|
-
|
73
|
-
|
72
|
+
// Category Manager
|
73
|
+
//////////////////
|
74
74
|
.spud_blog_category_add_new{
|
75
75
|
float: right;
|
76
76
|
}
|
@@ -91,7 +91,7 @@
|
|
91
91
|
.spud_blog_category_manager_item{
|
92
92
|
position: relative;
|
93
93
|
margin: 10px 0;
|
94
|
-
|
94
|
+
|
95
95
|
}
|
96
96
|
.spud_blog_category_manager_item_children{
|
97
97
|
margin: 0;
|
@@ -106,27 +106,53 @@
|
|
106
106
|
display: none;
|
107
107
|
}
|
108
108
|
|
109
|
-
|
110
|
-
|
109
|
+
// Comment Manager
|
110
|
+
//////////////////
|
111
111
|
.spud-post-comments-manage{
|
112
112
|
font-size: 12px;
|
113
113
|
font-style: italic;
|
114
114
|
}
|
115
|
-
.submitted-on {
|
116
|
-
display:block;
|
117
|
-
color:#555;
|
118
|
-
}
|
119
|
-
.blog-comment-content{
|
120
115
|
|
116
|
+
.spud-post-comment-details{
|
117
|
+
width: 600px;
|
118
|
+
padding: 0 25px 0 0;
|
119
|
+
p{
|
120
|
+
margin: 4px 0;
|
121
|
+
font-size: 12px;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
.spud-post-comment-details-author{
|
125
|
+
font-weight: bold;
|
126
|
+
}
|
127
|
+
.spud-post-comment-details-title{
|
128
|
+
font-style: italic;
|
121
129
|
}
|
122
|
-
.
|
123
|
-
font-size: 12px;
|
130
|
+
.spud-post-comment-details-content{
|
124
131
|
display: block;
|
132
|
+
background: #EEEEEE;
|
133
|
+
border-radius: 5px;
|
134
|
+
padding: 5px;
|
125
135
|
}
|
126
|
-
.
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
136
|
+
td.spud-post-comment-actions{
|
137
|
+
text-align: right;
|
138
|
+
white-space: nowrap;
|
139
|
+
}
|
140
|
+
.blog-comment-content-toggle{
|
131
141
|
display: none;
|
132
|
-
}
|
142
|
+
}
|
143
|
+
|
144
|
+
// .submitted-on {
|
145
|
+
// display:block;
|
146
|
+
// color:#555;
|
147
|
+
// }
|
148
|
+
// .blog-comment-content{
|
149
|
+
|
150
|
+
// }
|
151
|
+
|
152
|
+
// .blog-comment-content-hidden{
|
153
|
+
// font-size: 12px;
|
154
|
+
// margin: 4px 0 0;
|
155
|
+
// padding: 4px 0 0;
|
156
|
+
// border-top: 1px solid #666;
|
157
|
+
// display: none;
|
158
|
+
// }
|
@@ -14,7 +14,7 @@ class Spud::Admin::PostCommentsController < Spud::Admin::ApplicationController
|
|
14
14
|
else
|
15
15
|
@post_comments = SpudPostComment
|
16
16
|
end
|
17
|
-
@post_comments = @post_comments.includes(:post).paginate(:page => params[:page], :per_page => 15)
|
17
|
+
@post_comments = @post_comments.order('created_at desc').includes(:post).paginate(:page => params[:page], :per_page => 15)
|
18
18
|
respond_with @post_comments
|
19
19
|
end
|
20
20
|
|
@@ -2,14 +2,11 @@
|
|
2
2
|
|
3
3
|
<% end %>
|
4
4
|
|
5
|
-
<%=content_for :detail do %>
|
6
|
-
<table class="
|
5
|
+
<%= content_for :detail do %>
|
6
|
+
<table class="table table-striped">
|
7
7
|
<thead>
|
8
8
|
<tr>
|
9
|
-
|
10
|
-
<th>Author</th>
|
11
9
|
<th>Comment</th>
|
12
|
-
<th>Attached To</th>
|
13
10
|
<th>Status</th>
|
14
11
|
<th> </th>
|
15
12
|
</tr>
|
@@ -17,18 +14,21 @@
|
|
17
14
|
<tbody>
|
18
15
|
<% @post_comments.each do |comment| %>
|
19
16
|
<tr>
|
20
|
-
<td
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<
|
27
|
-
<%= comment.
|
28
|
-
</
|
29
|
-
|
17
|
+
<td>
|
18
|
+
<div class="spud-post-comment-details">
|
19
|
+
<p>
|
20
|
+
Posted by <span class="spud-post-comment-details-author"><%= comment.author %></span>
|
21
|
+
<span class="spud-post-comment-details-timestamp"><%= timestamp(comment.created_at) %></span>
|
22
|
+
</p>
|
23
|
+
<p class="spud-post-comment-details-title">
|
24
|
+
<%= link_to truncate(comment.post.title, {:length => 100}), blog_post_path(comment.post.url_name), :target => :blank %>
|
25
|
+
</p>
|
26
|
+
<p>
|
27
|
+
<span class="spud-post-comment-details-content"><%= comment.content %></span>
|
28
|
+
<a href="#" class="blog-comment-content-toggle">Expand</a>
|
29
|
+
</p>
|
30
|
+
</div>
|
30
31
|
</td>
|
31
|
-
<td><%= link_to comment.post.title, blog_post_path(comment.post.url_name)%></td>
|
32
32
|
<td>
|
33
33
|
<% if comment.spam %>
|
34
34
|
Spam
|
@@ -38,7 +38,7 @@
|
|
38
38
|
Pending
|
39
39
|
<% end %>
|
40
40
|
</td>
|
41
|
-
<td
|
41
|
+
<td class="spud-post-comment-actions">
|
42
42
|
<% if !comment.approved %>
|
43
43
|
<%= link_to 'Approve', approve_spud_admin_post_comment_path(comment), :class => 'btn btn-success btn-small' %>
|
44
44
|
<% end %>
|
data/lib/spud_blog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tb_blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Woods
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -236,7 +236,7 @@ files:
|
|
236
236
|
- app/assets/javascripts/spud/blog/sitemaps.js
|
237
237
|
- app/assets/javascripts/spud/blog.js
|
238
238
|
- app/assets/stylesheets/news.css
|
239
|
-
- app/assets/stylesheets/spud/admin/posts.css
|
239
|
+
- app/assets/stylesheets/spud/admin/posts.css.scss
|
240
240
|
- app/assets/stylesheets/spud/blog/sitemaps.css
|
241
241
|
- app/assets/stylesheets/spud/blog/validity.css
|
242
242
|
- app/controllers/blog_controller.rb
|
@@ -370,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
370
370
|
version: '0'
|
371
371
|
requirements: []
|
372
372
|
rubyforge_project:
|
373
|
-
rubygems_version: 2.0.
|
373
|
+
rubygems_version: 2.0.3
|
374
374
|
signing_key:
|
375
375
|
specification_version: 4
|
376
376
|
summary: Twice Baked Blog Engine.
|