typo 5.1.98 → 5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/app/controllers/admin/blacklist_controller.rb +9 -3
  2. data/app/controllers/admin/content_controller.rb +1 -1
  3. data/app/controllers/admin/feedback_controller.rb +9 -0
  4. data/app/controllers/admin/themes_controller.rb +46 -0
  5. data/app/controllers/comments_controller.rb +5 -1
  6. data/app/helpers/admin/base_helper.rb +2 -1
  7. data/app/helpers/admin/feedback_helper.rb +3 -0
  8. data/app/helpers/application_helper.rb +2 -1
  9. data/app/helpers/theme_helper.rb +5 -1
  10. data/app/models/article.rb +8 -3
  11. data/app/models/blacklist_pattern.rb +2 -0
  12. data/app/models/feedback.rb +7 -1
  13. data/app/views/admin/blacklist/_blacklist_patterns.html.erb +10 -10
  14. data/app/views/admin/blacklist/_form.html.erb +1 -1
  15. data/app/views/admin/blacklist/_quick_post.html.erb +2 -1
  16. data/app/views/admin/categories/_form.html.erb +1 -1
  17. data/app/views/admin/categories/new.html.erb +1 -1
  18. data/app/views/admin/content/_form.html.erb +21 -8
  19. data/app/views/admin/content/index.html.erb +2 -2
  20. data/app/views/admin/dashboard/_comments.html.erb +3 -3
  21. data/app/views/admin/dashboard/_inbound.html.erb +2 -2
  22. data/app/views/admin/dashboard/_popular.html.erb +2 -2
  23. data/app/views/admin/dashboard/_posts.html.erb +2 -2
  24. data/app/views/admin/dashboard/_sysinfo.html.erb +4 -4
  25. data/app/views/admin/dashboard/_typo_dev.html.erb +1 -1
  26. data/app/views/admin/feedback/_button.html.erb +1 -0
  27. data/app/views/admin/feedback/_form.html.erb +1 -1
  28. data/app/views/admin/feedback/_item.html.erb +7 -7
  29. data/app/views/admin/feedback/article.html.erb +1 -1
  30. data/app/views/admin/feedback/edit.html.erb +1 -1
  31. data/app/views/admin/pages/_form.html.erb +2 -2
  32. data/app/views/admin/settings/feedback.html.erb +3 -3
  33. data/app/views/admin/settings/index.html.erb +3 -3
  34. data/app/views/admin/settings/read.html.erb +1 -1
  35. data/app/views/admin/settings/seo.html.erb +1 -1
  36. data/app/views/admin/settings/update_database.html.erb +2 -2
  37. data/app/views/admin/sidebar/index.html.erb +5 -5
  38. data/app/views/admin/themes/catalogue.html.erb +25 -0
  39. data/app/views/admin/themes/editor.html.erb +1 -4
  40. data/app/views/admin/themes/index.html.erb +1 -1
  41. data/app/views/admin/users/index.html.erb +6 -6
  42. data/app/views/articles/_article.html.erb +1 -1
  43. data/app/views/articles/_comment.html.erb +1 -1
  44. data/app/views/articles/comment_preview.html.erb +1 -1
  45. data/app/views/layouts/administration.html.erb +0 -1
  46. data/app/views/trackbacks/trackback.xml.builder +4 -0
  47. data/app/views/xml/feed.atom.builder +1 -1
  48. data/config/environment.rb +2 -0
  49. data/config/initializers/access_rules.rb +1 -0
  50. data/lang/fr_FR.rb +4 -0
  51. data/lib/spam_protection.rb +0 -18
  52. data/lib/tasks/release.rake +3 -1
  53. data/lib/typo_version.rb +1 -1
  54. data/public/javascripts/fckeditor/fckconfig.js +21 -14
  55. data/public/javascripts/fckeditor/fckeditor.js +1 -1
  56. data/public/javascripts/quicktags.js +2 -2
  57. data/public/robots.txt +0 -11
  58. data/public/stylesheets/administration.css +163 -280
  59. data/spec/controllers/articles_controller_spec.rb +8 -0
  60. data/spec/controllers/xml_controller_spec.rb +7 -0
  61. data/spec/models/comment_spec.rb +1 -1
  62. data/spec/models/trackback_spec.rb +4 -1
  63. data/spec/views/articles/index_spec.rb +0 -1
  64. data/themes/dirtylicious/views/articles/_article.html.erb +2 -2
  65. data/themes/dirtylicious/views/articles/_comment.html.erb +1 -1
  66. data/themes/dirtylicious/views/articles/comment_preview.html.erb +1 -1
  67. data/themes/dirtylicious/views/articles/read.html.erb +9 -3
  68. data/themes/scribbish/views/articles/_article.html.erb +2 -2
  69. data/themes/scribbish/views/articles/_comment.html.erb +1 -1
  70. data/themes/scribbish/views/articles/read.html.erb +9 -3
  71. data/themes/standard_issue/views/articles/_article.html.erb +3 -3
  72. data/themes/standard_issue/views/articles/_comment.html.erb +1 -1
  73. data/themes/standard_issue/views/articles/comment_preview.html.erb +1 -1
  74. data/themes/standard_issue/views/articles/read.html.erb +8 -3
  75. data/themes/typographic/views/articles/_article.html.erb +3 -3
  76. data/themes/typographic/views/articles/_comment.html.erb +1 -1
  77. data/themes/typographic/views/articles/comment_preview.html.erb +1 -1
  78. data/themes/typographic/views/articles/read.html.erb +6 -2
  79. data/vendor/plugins/fckeditor/app/controllers/fckeditor_controller.rb +8 -7
  80. data/vendor/plugins/fckeditor/lib/fckeditor_version.rb +1 -1
  81. data/vendor/plugins/xml_sidebar/lib/xml_sidebar.rb +11 -2
  82. data/vendor/plugins/xml_sidebar/views/content.rhtml +6 -6
  83. metadata +176 -157
  84. data/vendor/plugins/fckeditor/Rakefile +0 -72
@@ -17,15 +17,21 @@ class Admin::BlacklistController < Admin::BaseController
17
17
 
18
18
  if request.post? and @blacklist_pattern.save
19
19
  flash[:notice] = _('Blacklist Pattern was successfully created.')
20
- redirect_to :action => 'index'
20
+ else
21
+ flash[:error] = _('Blacklist Pattern could not be created.')
21
22
  end
23
+ redirect_to :action => 'index'
22
24
  end
23
25
 
24
26
  def edit
25
27
  @blacklist_pattern = BlacklistPattern.find(params[:id])
26
28
  @blacklist_pattern.attributes = params[:blacklist_pattern]
27
- if request.post? and @blacklist_pattern.save
28
- flash[:notice] = _('BlacklistPattern was successfully updated.')
29
+ if request.post?
30
+ if @blacklist_pattern.save
31
+ flash[:notice] = _('BlacklistPattern was successfully updated.')
32
+ else
33
+ flash[:error] = _('Blacklist Pattern could not be updated.')
34
+ end
29
35
  redirect_to :action => 'index'
30
36
  end
31
37
  end
@@ -132,7 +132,7 @@ class Admin::ContentController < Admin::BaseController
132
132
 
133
133
  params[:article] ||= {}
134
134
 
135
- @resources = Resource.find(:all, :order => 'created_at DESC')
135
+ @resources = Resource.find(:all, :order => 'filename')
136
136
  @article.attributes = params[:article]
137
137
 
138
138
  setup_categories
@@ -128,6 +128,8 @@ class Admin::FeedbackController < Admin::BaseController
128
128
  when 'Confirm Classification of Checked Items'
129
129
  update_feedback(items, :confirm_classification!)
130
130
  flash[:notice] = _("Confirmed classification of %s item(s)",ids.size)
131
+ when 'Delete all spam'
132
+ delete_all_spam
131
133
  else
132
134
  flash[:notice] = _("Not implemented")
133
135
  end
@@ -137,6 +139,13 @@ class Admin::FeedbackController < Admin::BaseController
137
139
 
138
140
  protected
139
141
 
142
+ def delete_all_spam
143
+ if request.post?
144
+ Feedback.delete_all('state in ("presumed_spam", "spam")')
145
+ flash[:notice] = _("All spam have been deleted")
146
+ end
147
+ end
148
+
140
149
  def update_feedback(items, method)
141
150
  items.each do |value|
142
151
  value.send(method)
@@ -1,4 +1,7 @@
1
1
  class Admin::ThemesController < Admin::BaseController
2
+ require 'open-uri'
3
+ require 'time'
4
+ require 'rexml/document'
2
5
 
3
6
  cache_sweeper :blog_sweeper
4
7
 
@@ -65,9 +68,52 @@ class Admin::ThemesController < Admin::BaseController
65
68
  end
66
69
  end
67
70
 
71
+ def catalogue
72
+ # Data get by this URI is a JSON formatted
73
+ # The return is a list. All element represent a item
74
+ # Each item is a hash with this key :
75
+ # * uid
76
+ # * download_uri
77
+ # * name
78
+ # * author
79
+ # * description
80
+ # * tags
81
+ # * screenshot_uri
82
+ url = "http://www.dev411.com/typo/themes_2-1.txt"
83
+ open(url) do |http|
84
+ @themes = parse_catalogue_by_json(http.read)
85
+ end
86
+ rescue OpenURI::HTTPError
87
+ @themes = []
88
+ @error = true
89
+ end
90
+
68
91
  protected
69
92
 
70
93
  def zap_theme_caches
71
94
  FileUtils.rm_rf(%w{stylesheets javascript images}.collect{|v| page_cache_directory + "/#{v}/theme"})
72
95
  end
96
+
97
+ private
98
+
99
+ class ThemeItem < Struct.new(:image, :name, :url, :author, :description)
100
+ def to_s; name; end
101
+ end
102
+
103
+ def parse_catalogue_by_json(body)
104
+ items_json = JSON.parse(body)
105
+ items = []
106
+ items_json.each do |elem|
107
+ next unless elem['download_uri'] # No display theme without download URI
108
+ item = ThemeItem.new
109
+ item.image = elem['screenshot_uri']
110
+ item.url = elem['download_uri']
111
+ item.name = elem['name']
112
+ item.author = elem['author']
113
+ item.description = elem['description']
114
+ items << item
115
+ end
116
+ items
117
+ items.sort_by { |item| item.name }
118
+ end
73
119
  end
@@ -36,7 +36,11 @@ class CommentsController < FeedbackController
36
36
  set_headers
37
37
  @comment = Comment.new(params[:comment])
38
38
 
39
- render :template => 'articles/comment_preview'
39
+ unless Article.find_by_params_hash(params).comments_closed?
40
+ render :template => 'articles/comment_preview'
41
+ else
42
+ render :text => 'Comment are closed'
43
+ end
40
44
  end
41
45
 
42
46
  protected
@@ -169,7 +169,8 @@ module Admin::BaseHelper
169
169
  end
170
170
 
171
171
  def link_to_published(item)
172
- item.published? ? link_to_permalink(item, _("published")) : _("unpublished")
172
+
173
+ item.published? ? link_to_permalink(item, _("published"), '', 'published') : "<span class='unpublished'>#{_("unpublished")}</span>"
173
174
  end
174
175
 
175
176
  def macro_help_popup(macro, text)
@@ -1,2 +1,5 @@
1
1
  module Admin::FeedbackHelper
2
+ def comment_class state
3
+ (state.to_s =~ /Ham/) ? 'published' : 'unpublished'
4
+ end
2
5
  end
@@ -205,9 +205,10 @@ module ApplicationHelper
205
205
  end.flatten.uniq
206
206
  (
207
207
  <<-HTML
208
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
208
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
209
209
  #{ meta_tag 'ICBM', this_blog.geourl_location unless this_blog.geourl_location.blank? }
210
210
  #{ meta_tag 'description', @description unless @description.blank? }
211
+ <meta name="generator" content="Typo #{TYPO_VERSION}">
211
212
  #{ meta_tag 'keywords', @keywords unless @keywords.blank? }
212
213
  <link rel="EditURI" type="application/rsd+xml" title="RSD" href="#{ url_for :controller => '/xml', :action => 'rsd' }" />
213
214
  <link rel="alternate" type="application/atom+xml" title="Atom" href="#{ @auto_discovery_url_atom }" />
@@ -1,3 +1,7 @@
1
1
  module ThemeHelper
2
-
2
+ # adds per theme helpers if file exists. Ugly but at least it works.
3
+ # Use : just add your methods in yourtheme/helpers/theme_helper.rb
4
+ unless Blog.default.nil?
5
+ require "#{Blog.default.current_theme.path}/helpers/theme_helper.rb" if File.exists? "#{Blog.default.current_theme.path}/helpers/theme_helper.rb"
6
+ end
3
7
  end
@@ -313,6 +313,7 @@ class Article < Content
313
313
  !(allow_comments? && in_feedback_window?)
314
314
  end
315
315
 
316
+ # check if time to comment is open or not
316
317
  def in_feedback_window?
317
318
  self.blog.sp_article_auto_close.zero? ||
318
319
  self.created_at.to_i > self.blog.sp_article_auto_close.days.ago.to_i
@@ -470,12 +471,16 @@ class Article < Content
470
471
  else
471
472
  rss_desc = ""
472
473
  end
473
-
474
- post = html(blog.show_extended_on_rss ? :all : :body)
474
+
475
+ # This HTMLEntities is use to convert bad entities on dabase. We can check
476
+ # some bad data insert by FCKEditor. We can found to &eacute; by exemple.
477
+ # If we doesn't change that, the atom feed is invalid
478
+ coder = HTMLEntities.new
479
+ post = coder.decode(html(blog.show_extended_on_rss ? :all : :body))
475
480
  content = blog.rss_description ? post + rss_desc : post
476
481
 
477
482
  xml.summary "type" => "xhtml" do
478
- xml.div(:xmlns => "http://www.w3.org/1999/xhtml") {xml << html(:body) }
483
+ xml.div(:xmlns => "http://www.w3.org/1999/xhtml") {xml << coder.decode(html(:body)) }
479
484
  end
480
485
  if blog.show_extended_on_rss
481
486
  xml.content(:type => "xhtml") do
@@ -2,6 +2,7 @@ class BlacklistPattern < ActiveRecord::Base
2
2
  end
3
3
 
4
4
  class RegexPattern < BlacklistPattern
5
+ validates_presence_of :pattern
5
6
  def matches?(string)
6
7
  string.match(/#{pattern}/)
7
8
  end
@@ -12,6 +13,7 @@ class RegexPattern < BlacklistPattern
12
13
  end
13
14
 
14
15
  class StringPattern < BlacklistPattern
16
+ validates_presence_of :pattern
15
17
  def matches?(string)
16
18
  string.match(/\b#{Regexp.quote(pattern)}\b/)
17
19
  end
@@ -5,7 +5,7 @@ class Feedback < Content
5
5
 
6
6
  include TypoGuid
7
7
 
8
- validates_age_of :article_id
8
+ validate_on_create :feedback_not_closed
9
9
 
10
10
  before_create :create_guid, :article_allows_this_feedback
11
11
  before_save :correct_url
@@ -157,4 +157,10 @@ class Feedback < Content
157
157
  confirm_classification
158
158
  self.save
159
159
  end
160
+
161
+ def feedback_not_closed
162
+ if article.comments_closed?
163
+ errors.add(:article_id, 'Comment are closed')
164
+ end
165
+ end
160
166
  end
@@ -1,13 +1,13 @@
1
1
  <table cellspacing="1" cellpadding="0">
2
- <tr>
3
- <th><%= _("Pattern") %></th>
4
- <th><%= _("Type") %></th>
5
- </tr>
6
- <% for blacklist_pattern in @blacklist_patterns -%>
7
- <tr <%= alternate_class -%>>
8
- <td class="field"><%= link_to h(blacklist_pattern.pattern), :action => "edit", :id => blacklist_pattern.id %></td>
9
- <td class="field"><%= blacklist_pattern.class %></td>
10
- </tr>
2
+ <tr>
3
+ <th><%= _("Pattern") %></th>
4
+ <th><%= _("Type") %></th>
5
+ </tr>
6
+ <% for blacklist_pattern in @blacklist_patterns -%>
7
+ <tr <%= alternate_class -%>>
8
+ <td><%= link_to h(blacklist_pattern.pattern), :action => "edit", :id => blacklist_pattern.id %></td>
9
+ <td><%= blacklist_pattern.class %></td>
10
+ </tr>
11
11
  <% end -%>
12
- <tr class="paginate"><td colspan="3"><%= will_paginate @blacklist_patterns %></td></tr>
12
+ <tr class="paginate"><td colspan="3"><%= will_paginate @blacklist_patterns %></td></tr>
13
13
  </table>
@@ -1,6 +1,6 @@
1
1
  <%= error_messages_for 'blacklist_pattern' %>
2
2
 
3
- <ul class="admin set">
3
+ <ul class="admin">
4
4
  <li>
5
5
  <label for="blacklist_pattern_pattern" class="block"><%= _("Pattern")%></label>
6
6
  <%= text_field 'blacklist_pattern', 'pattern' %>
@@ -3,6 +3,7 @@
3
3
  <%= render :partial => "form" %>
4
4
 
5
5
  <p class="paginate r">
6
- <a href="#" onclick="new Effect.BlindUp('quick-post', {duration: 0.4}); return false;" ><%= _("Cancel")%></a> <%= _("or")%> <%= save(_("Save") + "&raquo;") %>
6
+ <a href="#" onclick="new Effect.BlindUp('quick-post', {duration: 0.4}); return false;" >
7
+ <%= _("Cancel")%></a> <%= _("or")%> <%= save(_("Save") + "&raquo;") %>
7
8
  </p>
8
9
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <%= error_messages_for 'category' %>
2
- <ul class="set admin" id="article_form">
2
+ <ul class="admin" id="article_form">
3
3
  <li>
4
4
  <label for="category_name" class="title block"><%= _("Name")%></label>
5
5
  <%= text_field 'category', 'name', :class => 'medium' %>
@@ -1,7 +1,7 @@
1
1
  <% @page_heading = _("#{controller.action_name.capitalize} Category") %>
2
2
  <% subtabs_for(:content) %>
3
3
  <% form_tag :action=>"edit", :id => @category.id do %>
4
- <div class="admin set">
4
+ <div class="admin">
5
5
  <%= render :partial => "form" %>
6
6
  </div>
7
7
 
@@ -1,7 +1,7 @@
1
1
  <%= error_messages_for 'article' %>
2
2
  <div id="autosave"></div>
3
3
  <div id="article_keywords_auto_complete" class="auto_complete"></div>
4
- <ul class="set admin">
4
+ <ul class="admin">
5
5
  <li>
6
6
  <label for="article_title" class="block title"><%= _("Title")%></label>
7
7
  <%= text_field 'article', 'title', :class => 'large' %>
@@ -12,7 +12,7 @@
12
12
  <div id="categories" style="height: 170px;">
13
13
  <%= checkboxes_from_collection(@categories, "id", "name", @selected) %>
14
14
  </div>
15
- <p class="paginate r paginate_1">
15
+ <p class="paginate r">
16
16
  <label for="article_allow_comments"><%= _("Allow comments") %>: </label>
17
17
  <%= check_box 'article', 'allow_comments' %><br />
18
18
  <label for="article_allow_pings"><%= _("Allow trackbacks")%>: </label>
@@ -20,8 +20,9 @@
20
20
  <label for="article_published"><%= _("Published")%>:</label>
21
21
  <%= check_box 'article', 'published' %><br />
22
22
  <%= link_to_destroy_draft @article %>
23
+ <input class="submit" type="submit" value="<%= _('Save as draft') %> &raquo;" name="article[draft]"/>&nbsp;
24
+ <%= save( _("Publish") + " &raquo;") %><br />
23
25
  <%= link_to_destroy_with_profiles @article%>
24
- <%= save( _("Publish") + " &raquo;") %>
25
26
  </p>
26
27
  </div>
27
28
  <div id="editor">
@@ -34,23 +35,35 @@
34
35
  </div>
35
36
  </li>
36
37
  <li>
37
- <label class="block tags" for="article_keywords"><%= _("Tags") %></label>
38
+ <label class="block content" for="article_keywords"><%= _("Tags") %></label>
38
39
  <%= text_field 'article', 'keywords', {:autocomplete => 'off', :class => 'large'} %>
39
40
  <%= auto_complete_field 'article_keywords', { :url => { :action => "auto_complete_for_article_keywords"}, :tokens => ','}%>
40
41
  </li>
41
42
  </ul>
42
43
 
43
- <ul class="admin set">
44
- <li class="paginate l paginate_1">
44
+ <ul class="admin">
45
+ <li class="paginate l">
46
+ <label class="block">
47
+ <%= link_to_function _("Excerpt") + " (+/-)",update_page { |page| page.visual_effect(:toggle_blind, "excerpt", :duration => 0.2) } %>
48
+ </label>
49
+ <ul id="excerpt" <%= "style='display: none;'" if @article.excerpt.blank? %>>
50
+ <li>
51
+ <%= t_textarea 'article', 'excerpt', {:height => '150', :class => 'medium', :rows => '8'} %>
52
+ </li>
53
+ </ul>
54
+ </li>
55
+
56
+ <li class="paginate l">
45
57
  <label class="block">
46
58
  <%= link_to_function _("Uploads") + " (+/-)",update_page { |page| page.visual_effect(:toggle_blind, "attachments", :duration => 0.2) } %>
47
59
  </label>
48
60
  <ul id="attachments" <%= 'style="display: none"' unless @article.resources.count > 0 %>>
61
+ <li><small>Uploads will be displayed as attachments in your RSS feed, but won't appear in your articles.</small></li>
49
62
  <%= render :partial => 'admin/content/attachment', :locals => { :attachment_num => 1, :hidden => false } -%>
50
63
  </ul>
51
64
  </li>
52
65
 
53
- <li class="paginate l paginate_1">
66
+ <li class="paginate l">
54
67
  <label class="block">
55
68
  <%= link_to_function _("Post settings") + " (+/-)",update_page { |page| page.visual_effect(:toggle_blind, "publishing_options", :duration => 0.2) } %>
56
69
  </label>
@@ -64,6 +77,6 @@
64
77
  <span id="permalink"><%= text_field 'article', 'permalink' %></span>
65
78
  </li>
66
79
  </ul>
67
- </li>
80
+ </li>
68
81
  </ul>
69
82
  <%= hidden_field_tag 'text_filter', this_blog.text_filter %>
@@ -12,8 +12,8 @@
12
12
  :complete => "Element.hide('spinner')" \
13
13
  do %>
14
14
 
15
- <label><%= _("Search articles that contains...")%></label><br />
16
- <input type="text" name="search[searchstring]" size="30" />
15
+ <label for="search"><%= _("Search articles that contains...")%></label><br />
16
+ <input id="search" type="text" name="search[searchstring]" size="30" />
17
17
  <%= submit_tag _("Search") %>
18
18
  <span id='spinner' style="display:none;"><%= image_tag('spinner.gif') %></span>
19
19
 
@@ -2,11 +2,11 @@
2
2
  <h3><%= _("Last Comments") %></h3>
3
3
  <ul>
4
4
  <% if @comments.size == 0 %>
5
- <li <%= alternate_class %>><%= _("No comments yet") %></li>
5
+ <li><%= _("No comments yet") %></li>
6
6
  <% else %>
7
7
  <% for comment in @comments -%>
8
- <li <%= alternate_class %>>
9
- <%= link_to_permalink comment,h( _("by %s on %s", comment.author , comment.article.title) ) %>
8
+ <li>
9
+ <%= link_to_permalink comment, h(_("by %s on %s", comment.author, comment.article.title)) %>
10
10
  </li>
11
11
  <% end %>
12
12
  <% end %>
@@ -5,10 +5,10 @@
5
5
  <% else %>
6
6
  <ul>
7
7
  <% if @inbound_links.size == 0 %>
8
- <li <%= alternate_class %>><%= _("No one made a link to you yet") %></li>
8
+ <li><%= _("No one made a link to you yet") %></li>
9
9
  <% else %>
10
10
  <% for link in @inbound_links -%>
11
- <li <%= alternate_class %>>
11
+ <li>
12
12
  <%= link_to(link.author, link.link) + _(" made a link to you saying ") + link.description.slice(0, 50) %>
13
13
  </li>
14
14
  <% end %>
@@ -2,10 +2,10 @@
2
2
  <h3><%= _("Most popular") %></h3>
3
3
  <ul>
4
4
  <% if @bestof.size == 0 %>
5
- <li <%= alternate_class %>><%= _("Nothing to show yet") %> !</li>
5
+ <li><%= _("Nothing to show yet") %> !</li>
6
6
  <% else %>
7
7
  <% for article in @bestof -%>
8
- <li <%= alternate_class %>><%= link_to_permalink article, article.title %> (<%= link_to_permalink article, article.comment_count %>)</li>
8
+ <li><%= link_to_permalink article, article.title %> (<%= link_to_permalink article, article.comment_count %>)</li>
9
9
  <% end %>
10
10
  <% end -%>
11
11
  </ul>
@@ -2,10 +2,10 @@
2
2
  <h3><%= _("Last posts") %></h3>
3
3
  <ul>
4
4
  <% if @recent_posts.size == 0 %>
5
- <li <%= alternate_class %>> <%= link_to _("No posts yet, why don't you start and write one"), :controller => 'content', :action => 'new' %> ?</li>
5
+ <li> <%= link_to _("No posts yet, why don't you start and write one"), :controller => 'content', :action => 'new' %> ?</li>
6
6
  <% else %>
7
7
  <% for post in @recent_posts -%>
8
- <li <%= alternate_class %>>
8
+ <li>
9
9
  <%= link_to_permalink post, post.title %> (<%= link_to_permalink(post, post.published_comments.size) %>)
10
10
  </li>
11
11
  <% end %>
@@ -5,9 +5,9 @@
5
5
  </ul>
6
6
  <h3><%= _("Statistics") %></h3>
7
7
  <ul>
8
- <li <%= alternate_class %>> <%= _("Total posts : %d", @statposts) %></li>
9
- <li <%= alternate_class %>> <%= _("Your posts : %d" , @statuserposts) %></li>
10
- <li <%= alternate_class %>> <%= _("Total comments : %d" , @statcomments) %></li>
11
- <li <%= alternate_class %>> <%= _("Spam comments : %d" , @statspam) %></li>
8
+ <li> <%= _("Total posts : %d", @statposts) %></li>
9
+ <li> <%= _("Your posts : %d" , @statuserposts) %></li>
10
+ <li> <%= _("Total comments : %d" , @statcomments) %></li>
11
+ <li> <%= _("Spam comments : %d" , @statspam) %></li>
12
12
  </ul>
13
13
  </div>