beef-articles 0.3.10 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.10
1
+ 0.3.11
@@ -12,7 +12,7 @@ class ArticlesController < ApplicationController
12
12
  end
13
13
  if params[:user_id]
14
14
  @user = User.find_by_permalink(params[:user_id])
15
- @page_title << " writen by 'params[:tag]'"
15
+ @page_title << " writen by #{@user.name}"
16
16
  end
17
17
  if params[:year]
18
18
  @page_title << " from #{params[:day]} #{Date::MONTHNAMES[params[:month].to_i] unless params[:month].nil?} #{params[:year]}"
@@ -2,9 +2,16 @@ module ArticlesHelper
2
2
 
3
3
  def article_categories
4
4
  tabs = Category.with( :articles ).collect do |category|
5
- content_tag :li, link_to( h(category.title), [category, :articles] )
5
+ content_tag :li, link_to( h(category.title), category_articles_path(category.permalink) )
6
6
  end
7
- content_tag( :h2, 'Categories' ) + content_tag( :ul, tabs.join, :class => "categories" )
7
+ content_tag( :h2, 'Categories' ) + content_tag( :ul, tabs.join, :class => "categories" ) if tabs.any?
8
+ end
9
+
10
+ def article_authors
11
+ tabs = Article.published.all(:select => 'users.name, users.permalink', :group => 'created_by_id', :joins => :created_by ).collect do |user|
12
+ content_tag :li, link_to( user.name, articles_authored_path(user.permalink) )
13
+ end
14
+ content_tag( :h3, 'Authors' ) + content_tag( :ul, tabs.join, :class => "authors" ) if tabs.any?
8
15
  end
9
16
 
10
17
  def comments_link(article)
@@ -22,6 +22,7 @@
22
22
  <!-- so:supporting-content -->
23
23
  <div id="supporting-content">
24
24
  <%= article_categories %>
25
+ <%= article_authors %>
25
26
 
26
27
  <h2>Archive</h2>
27
28
  <%= archive %>
data/articles.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{articles}
5
- s.version = "0.3.10"
5
+ s.version = "0.3.11"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Steve England"]
9
- s.date = %q{2009-08-24}
9
+ s.date = %q{2009-08-27}
10
10
  s.email = %q{steve@wearebeef.co.uk}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beef-articles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve England
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-24 00:00:00 -07:00
12
+ date: 2009-08-27 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -81,7 +81,6 @@ files:
81
81
  - test/test_helper.rb
82
82
  has_rdoc: false
83
83
  homepage: http://github.com/beef/articles
84
- licenses:
85
84
  post_install_message:
86
85
  rdoc_options:
87
86
  - --charset=UTF-8
@@ -102,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
101
  requirements: []
103
102
 
104
103
  rubyforge_project:
105
- rubygems_version: 1.3.5
104
+ rubygems_version: 1.2.0
106
105
  signing_key:
107
106
  specification_version: 3
108
107
  summary: Article/Blogging engine