blog_logic 1.2.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/models/post.rb +7 -6
- data/app/views/admin/posts/_form.html.erb +3 -0
- data/app/views/admin/posts/index.html.erb +8 -5
- data/app/views/admin/posts/show.html.erb +3 -0
- data/blog_logic.gemspec +2 -2
- metadata +5 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
data/app/models/post.rb
CHANGED
@@ -13,16 +13,17 @@ class Post
|
|
13
13
|
scope :by_slug, lambda {|slug| {:where => {:slug.in => ["#{slug}".gsub('//','/'), "/#{slug}/".gsub('//','/')] } } }
|
14
14
|
|
15
15
|
# Mongoid ========================================================================================
|
16
|
-
field :title
|
17
|
-
field :title_short # because "title" is often too long for a decent layout
|
18
|
-
field :content
|
19
|
-
field :tags, :type => Array
|
20
|
-
field :slug
|
21
16
|
field :author
|
17
|
+
field :content
|
18
|
+
field :meta_keywords
|
19
|
+
field :publication_date, :type => DateTime
|
22
20
|
field :published_at, :type => Date
|
21
|
+
field :slug
|
23
22
|
field :state
|
24
|
-
field :publication_date, :type => DateTime
|
25
23
|
field :summary
|
24
|
+
field :tags, :type => Array
|
25
|
+
field :title
|
26
|
+
field :title_short # because "title" is often too long for a decent layout
|
26
27
|
index :slug
|
27
28
|
index :state, :unique => false
|
28
29
|
belongs_to :blog
|
@@ -5,17 +5,20 @@
|
|
5
5
|
<%- else -%>
|
6
6
|
<table class="standard">
|
7
7
|
<tr>
|
8
|
-
<th style="width: 20%;"><%= sort_link("admin/blogs/#{
|
9
|
-
<th style="width: 20%;"><%= sort_link("admin/blogs/#{
|
10
|
-
<th style="width: 10%;"><%= sort_link("admin/blogs/#{
|
11
|
-
<th style="width: 10%;"><%= sort_link("admin/blogs/#{
|
8
|
+
<th style="width: 20%;"><%= sort_link("admin/blogs/#{@blog.id}/posts", 'slug', params) -%></th>
|
9
|
+
<th style="width: 20%;"><%= sort_link("admin/blogs/#{@blog.id}/posts", 'title', params) -%> / <%= sort_link("admin/blogs/#{@blog.id}/posts", 'title_short', params) -%></th>
|
10
|
+
<th style="width: 10%;"><%= sort_link("admin/blogs/#{@blog.id}/posts", 'state', params) -%></th>
|
11
|
+
<th style="width: 10%;"><%= sort_link("admin/blogs/#{@blog.id}/posts", 'publication_date', params) -%></th>
|
12
12
|
<th style="width: 5%;"></th>
|
13
13
|
</tr>
|
14
14
|
|
15
15
|
<%- @posts.each do |post| -%>
|
16
16
|
<tr class="<%= cycle('odd', 'even') -%>">
|
17
17
|
<td><%= link_to post.full_path, admin_blog_post_path(@blog, post) -%></td>
|
18
|
-
<td
|
18
|
+
<td>
|
19
|
+
<%= post.title -%><br />
|
20
|
+
<%= post.title_short -%>
|
21
|
+
</td>
|
19
22
|
<td><%= post.status -%></td>
|
20
23
|
<td><%= post.publication_date.try(:to_s, :concise) -%></td>
|
21
24
|
<td class="crud_links"><%= crud_links_for_actions_and_paths :show => admin_blog_post_path(@blog, post), :edit => edit_admin_blog_post_path(@blog, post), :destroy => admin_blog_post_path(@blog, post) -%></td>
|
data/blog_logic.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "blog_logic"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bantik"]
|
12
|
-
s.date = "2011-09-
|
12
|
+
s.date = "2011-09-30"
|
13
13
|
s.description = "An engine for search-engine-optimized blog management."
|
14
14
|
s.email = "corey@seologic.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blog_logic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 1.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bantik
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-30 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: bson_ext
|