typo 5.0.1 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/app/controllers/accounts_controller.rb +1 -1
  2. data/app/controllers/admin/cache_controller.rb +2 -2
  3. data/app/controllers/admin/general_controller.rb +2 -22
  4. data/app/controllers/admin/settings_controller.rb +58 -0
  5. data/app/controllers/admin/sidebar_controller.rb +3 -1
  6. data/app/controllers/articles_controller.rb +2 -1
  7. data/app/controllers/content_controller.rb +0 -4
  8. data/app/helpers/admin/base_helper.rb +9 -3
  9. data/app/helpers/admin/general_helper.rb +0 -16
  10. data/app/helpers/admin/settings_helper.rb +18 -0
  11. data/app/models/blog.rb +2 -2
  12. data/app/models/blog_sweeper.rb +10 -2
  13. data/app/models/page_cache.rb +8 -2
  14. data/app/views/admin/advanced/index.html.erb +0 -162
  15. data/app/views/admin/general/update_database.html.erb +1 -1
  16. data/app/views/admin/settings/_submit.html.erb +3 -0
  17. data/app/views/admin/settings/feedback.html.erb +77 -0
  18. data/app/views/admin/settings/index.html.erb +81 -0
  19. data/app/views/admin/settings/podcast.html.erb +53 -0
  20. data/app/views/admin/settings/read.html.erb +38 -0
  21. data/app/views/admin/settings/spam.html.erb +51 -0
  22. data/app/views/admin/settings/write.html.erb +71 -0
  23. data/app/views/admin/sidebar/index.html.erb +1 -3
  24. data/app/views/admin/textfilters/list.html.erb +0 -2
  25. data/app/views/admin/themes/editor.html.erb +0 -2
  26. data/app/views/admin/themes/index.html.erb +0 -2
  27. data/app/views/layouts/administration.html.erb +3 -2
  28. data/config/environments/development.rb +1 -1
  29. data/db/schema_version +1 -1
  30. data/lib/tasks/release.rake +3 -2
  31. data/lib/typo_version.rb +1 -1
  32. data/spec/controllers/accounts_controller_spec.rb +2 -2
  33. data/spec/models/configuration_spec.rb +3 -3
  34. data/test/fixtures/blogs.yml +1 -1
  35. data/test/functional/admin/{general_controller_test.rb → settings_controller_test.rb} +6 -6
  36. data/test/functional/articles_controller_test.rb +7 -0
  37. metadata +23 -7
  38. data/app/controllers/admin/advanced_controller.rb +0 -20
  39. data/app/views/admin/general/index.html.erb +0 -141
  40. data/test/functional/admin/advanced_controller_test.rb +0 -21
@@ -30,7 +30,7 @@ class AccountsController < ApplicationController
30
30
  if request.post? and @user.save
31
31
  session[:user_id] = @user.id
32
32
  flash[:notice] = "Signup successful"
33
- redirect_to :controller => "admin/general", :action => "index"
33
+ redirect_to :controller => "admin/settings", :action => "index"
34
34
  return
35
35
  end
36
36
  end
@@ -14,7 +14,7 @@ class Admin::CacheController < Admin::BaseController
14
14
  expire_fragment(/.*/)
15
15
 
16
16
  flash[:notice] = _('Cache was cleared')
17
- redirect_to :controller => '/admin/general'
17
+ redirect_to :controller => '/admin/settings'
18
18
  end
19
19
 
20
20
  def sweep_html
@@ -22,7 +22,7 @@ class Admin::CacheController < Admin::BaseController
22
22
  expire_fragment(/^contents_html.*/)
23
23
 
24
24
  flash[:notice] = _('HTML was cleared')
25
- redirect_to :controller => '/admin/general'
25
+ redirect_to :controller => '/admin/settings'
26
26
  end
27
27
 
28
28
  end
@@ -1,16 +1,8 @@
1
1
  class Admin::GeneralController < Admin::BaseController
2
-
3
2
  def index
4
- if this_blog.base_url.blank?
5
- this_blog.base_url = blog_base_url
6
- end
3
+ redirect_to :controller => 'settings'
7
4
  end
8
-
9
- def redirect
10
- flash[:notice] = "Please review and save the settings before continuing"
11
- redirect_to :action => "index"
12
- end
13
-
5
+
14
6
  def update_database
15
7
  @current_version = Migrator.current_schema_version
16
8
  @needed_version = Migrator.max_schema_version
@@ -26,17 +18,5 @@ class Admin::GeneralController < Admin::BaseController
26
18
  redirect_to :action => 'update_database'
27
19
  end
28
20
  end
29
-
30
- def update
31
- if request.post?
32
- Blog.transaction do
33
- params[:setting].each { |k,v| this_blog.send("#{k.to_s}=", v) }
34
- this_blog.save
35
- flash[:notice] = _('config updated.')
36
- end
37
- redirect_to :action => 'index'
38
- end
39
- end
40
-
41
21
  private
42
22
  end
@@ -0,0 +1,58 @@
1
+ class Admin::SettingsController < Admin::BaseController
2
+ def index
3
+ if this_blog.base_url.blank?
4
+ this_blog.base_url = blog_base_url
5
+ end
6
+
7
+ if request.post?
8
+ self.update
9
+ end
10
+ end
11
+
12
+ def read
13
+ if request.post?
14
+ self.update
15
+ end
16
+ end
17
+
18
+ def write
19
+ if request.post?
20
+ self.update
21
+ end
22
+ end
23
+
24
+ def feedback
25
+ if request.post?
26
+ self.update
27
+ end
28
+ end
29
+
30
+ def spam
31
+ if request.post?
32
+ self.update
33
+ end
34
+ end
35
+
36
+ def podcast
37
+ if request.post?
38
+ self.update
39
+ end
40
+ end
41
+
42
+ def redirect
43
+ flash[:notice] = "Please review and save the settings before continuing"
44
+ redirect_to :action => "index"
45
+ end
46
+
47
+ def update
48
+ if request.post?
49
+ Blog.transaction do
50
+ params[:setting].each { |k,v| this_blog.send("#{k.to_s}=", v) }
51
+ this_blog.save
52
+ flash[:notice] = _('config updated.')
53
+ end
54
+ redirect_to :action => 'index'
55
+ end
56
+ end
57
+
58
+ end
@@ -46,7 +46,9 @@ class Admin::SidebarController < Admin::BaseController
46
46
  Sidebar.transaction do
47
47
  position = 0
48
48
  params[:configure] ||= { }
49
- this_blog.sidebars.update_all('active_position = null')
49
+ # Crappy workaround to rails update_all bug with PgSQL / SQLite
50
+ # this_blog.sidebars.update_all('active_position = null')
51
+ ActiveRecord::Base.connection.execute("update sidebars set active_position=null where blog_id = #{this_blog.id}")
50
52
  flash[:sidebars].each do |id|
51
53
  sidebar = Sidebar.find(id)
52
54
  sb_attribs = params[:configure][id.to_s] || {}
@@ -35,6 +35,7 @@ class ArticlesController < ContentController
35
35
  end
36
36
  end
37
37
  if params[:page]
38
+ @page_title = 'Older posts,' if @page_title.blank?
38
39
  @page_title << " page " << params[:page]
39
40
  end
40
41
 
@@ -117,7 +118,7 @@ class ArticlesController < ContentController
117
118
  if User.count == 0
118
119
  redirect_to :controller => "accounts", :action => "signup"
119
120
  elsif ! this_blog.configured?
120
- redirect_to :controller => "admin/general", :action => "redirect"
121
+ redirect_to :controller => "admin/settings", :action => "redirect"
121
122
  else
122
123
  return true
123
124
  end
@@ -43,10 +43,6 @@ class ContentController < ApplicationController
43
43
  end
44
44
  end
45
45
 
46
- def self.expire_page(path)
47
- PageCache.zap_pages(path)
48
- end
49
-
50
46
  protected
51
47
 
52
48
  def auto_discovery_defaults
@@ -168,12 +168,18 @@ module Admin::BaseHelper
168
168
  end
169
169
  end
170
170
 
171
- def class_presentation
172
- if controller.controller_name =~ /sidebar|themes|textfilters/
171
+ def class_themes
172
+ if controller.controller_name =~ /themes/
173
173
  "current"
174
174
  end
175
175
  end
176
176
 
177
+ def class_plugins
178
+ if controller.controller_name =~ /sidebar|textfilter/
179
+ "current"
180
+ end
181
+ end
182
+
177
183
  def class_users
178
184
  if controller.controller_name =~ /users/
179
185
  "current"
@@ -187,7 +193,7 @@ module Admin::BaseHelper
187
193
  end
188
194
 
189
195
  def class_admin
190
- if controller.controller_name =~ /general|advanced/
196
+ if controller.controller_name =~ /settings/
191
197
  "current"
192
198
  end
193
199
  end
@@ -1,18 +1,2 @@
1
1
  module Admin::GeneralHelper
2
- require 'find'
3
-
4
- def fetch_langs
5
- options = content_tag(:option, "en_US", :value => 'en_US')
6
- Find.find(RAILS_ROOT + "/lang") do |lang|
7
- if lang =~ /\.rb$/
8
- lang_pattern = File.basename(lang).gsub(".rb", '')
9
- if this_blog.lang == lang_pattern
10
- options << content_tag(:option, lang_pattern, :value => lang_pattern, :selected => 'selected')
11
- else
12
- options << content_tag(:option, lang_pattern, :value => lang_pattern)
13
- end
14
- end
15
- end
16
- options
17
- end
18
2
  end
@@ -0,0 +1,18 @@
1
+ module Admin::SettingsHelper
2
+ require 'find'
3
+
4
+ def fetch_langs
5
+ options = content_tag(:option, "en_US", :value => 'en_US')
6
+ Find.find(RAILS_ROOT + "/lang") do |lang|
7
+ if lang =~ /\.rb$/
8
+ lang_pattern = File.basename(lang).gsub(".rb", '')
9
+ if this_blog.lang == lang_pattern
10
+ options << content_tag(:option, lang_pattern, :value => lang_pattern, :selected => 'selected')
11
+ else
12
+ options << content_tag(:option, lang_pattern, :value => lang_pattern)
13
+ end
14
+ end
15
+ end
16
+ options
17
+ end
18
+ end
data/app/models/blog.rb CHANGED
@@ -78,8 +78,8 @@ class Blog < CachedModel
78
78
  setting :itunes_copyright, :string, ''
79
79
 
80
80
  # Mostly Behaviour
81
- setting :text_filter, :string, ''
82
- setting :comment_text_filter, :string, ''
81
+ setting :text_filter, :string, 'markdown smartypants'
82
+ setting :comment_text_filter, :string, 'markdown smartypants'
83
83
  setting :limit_article_display, :integer, 10
84
84
  setting :limit_rss_display, :integer, 10
85
85
  setting :default_allow_pings, :boolean, false
@@ -2,6 +2,7 @@ class BlogSweeper < ActionController::Caching::Sweeper
2
2
  observe Category, Blog, Sidebar, User, Article, Page, Categorization
3
3
 
4
4
  def after_comments_create
5
+ logger.debug 'BlogSweeper#after_comments_create'
5
6
  expire_for(controller.send(:instance_variable_get, :@comment))
6
7
  end
7
8
 
@@ -9,16 +10,19 @@ class BlogSweeper < ActionController::Caching::Sweeper
9
10
  alias_method :after_articles_comment, :after_comments_create
10
11
 
11
12
  def after_comments_destroy
13
+ logger.debug 'BlogSweeper#after_comments_destroy'
12
14
  expire_for(controller.send(:instance_variable_get, :@comment), true)
13
15
  end
14
16
 
15
17
  alias_method :after_articles_nuke_comment, :after_comments_destroy
16
18
 
17
19
  def after_articles_trackback
20
+ logger.debug 'BlogSweeper#after_articles_trackback'
18
21
  expire_for(controller.send(:instance_variable_get, :@trackback))
19
22
  end
20
23
 
21
24
  def after_articles_nuke_trackback
25
+ logger.debug 'BlogSweeper#after_articles_nuke_trackback'
22
26
  expire_for(controller.send(:instance_variable_get, :@trackback), true)
23
27
  end
24
28
 
@@ -61,13 +65,17 @@ class BlogSweeper < ActionController::Caching::Sweeper
61
65
 
62
66
  def sweep_articles
63
67
  expire_fragment(%r{.*/articles/.*})
64
- PageCache.zap_pages('index.*', 'articles')
68
+ unless Blog.default && Blog.default.cache_option == "caches_action_with_params"
69
+ PageCache.zap_pages('index.*', 'articles')
70
+ end
65
71
  end
66
72
 
67
73
  def sweep_pages(record = nil)
68
74
  expire_fragment(/.*\/pages\/.*/)
69
75
  expire_fragment(/.*\/view_page.*/)
70
- PageCache.zap_pages('pages')
76
+ unless Blog.default && Blog.default.cache_option == "caches_action_with_params"
77
+ PageCache.zap_pages('pages')
78
+ end
71
79
  end
72
80
 
73
81
  def logger
@@ -4,19 +4,25 @@ class PageCache < ActiveRecord::Base
4
4
  end
5
5
 
6
6
  def self.sweep_all
7
- self.zap_pages('index.*', 'articles', 'pages')
7
+ logger.debug "PageCache - sweep_all called"
8
+ unless Blog.default && Blog.default.cache_option == "caches_action_with_params"
9
+ self.zap_pages('index.*', 'articles', 'pages')
10
+ end
8
11
  end
9
12
 
10
13
  def self.sweep_theme_cache
14
+ logger.debug "PageCache - sweep_theme_cache called"
11
15
  self.zap_pages('images/theme', 'stylesheets/theme', 'javascripts/theme')
12
16
  end
13
17
 
14
18
  def self.zap_pages(*paths)
19
+ logger.debug "PageCache - About to zap: #{paths.inspect}"
15
20
  srcs = paths.inject([]) { |o,v|
16
21
  o + Dir.glob(public_path + "/#{v}")
17
22
  }
18
23
  return true if srcs.empty?
19
- trash = Dir::tmpdir
24
+ logger.debug "PageCache - About to delete: #{srcs.inspect}"
25
+ trash = Dir::tmpdir + "/typodel.#{UUID.random_create}"
20
26
  FileUtils.makedirs(trash)
21
27
  FileUtils.mv(srcs, trash, :force => true)
22
28
  FileUtils.rm_rf(trash)
@@ -11,169 +11,7 @@
11
11
  <% form_tag :action => 'update' do %>
12
12
 
13
13
  <div class="admin">
14
- <fieldset id="write" class="set">
15
- <legend><%= _("Write")%></legend>
16
- <ul>
17
- <li>
18
- <label class="float" for="text_filter"><%= _("Article filter")%>:</label>
19
- <select name="setting[text_filter]" id="text_filter">
20
- <%= options_for_select text_filter_options, TextFilter.find_by_name(this_blog.text_filter) %>
21
- </select>
22
- </li>
23
- <li>
24
- <label for="comment_text_filter" class="float"><%= _("Comments filter")%>:</label>
25
- <select name="setting[comment_text_filter]" id="comment_text_filter">
26
- <%= options_for_select text_filter_options, TextFilter.find_by_name(this_blog.comment_text_filter) %>
27
- </select>
28
- </li>
29
- </ul>
30
- </fieldset>
31
14
 
32
- <fieldset id="publish" class="set">
33
- <legend><%= _("Publish")%></legend>
34
- <ul>
35
- <li>
36
- <%= _("When publishing articles, Typo can send trackbacks to websites that you link to. This should be disabled for private blogs as it will leak non-public information to sites that you're discussing. For public blogs, there's no real point in disabling this.")%>
37
- </li>
38
- <li class="checkbox">
39
- <label class="float" for="send_outbound_pings"><%= _("Send trackbacks")%>:</label>
40
- <input name="setting[send_outbound_pings]" id="send_outbound_pings" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.send_outbound_pings%> />
41
- <input name="setting[send_outbound_pings]" type="hidden" value="0" />
42
- </li>
43
- <li>
44
- <label class="float" for="ping_urls"><%= _("URLs to ping automatically")%>:</label>
45
- <textarea name="setting[ping_urls]" id="ping_urls" rows="5" cols="50"><%=h this_blog.ping_urls %></textarea>
46
- </li>
47
- <li>
48
- <label class="float" for="geourl_location"><%= _("Latitude, Longitude")%>:</label>
49
- <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= this_blog.geourl_location %>" />
50
- <span class="float"><%= _("Display")%> <a href="http://geourl.org"><%= _("your lattitude and longitude")%></a> (<%= _("exemple")%> <tt>47.774,-122.201</tt>)</span>
51
- </li>
52
-
53
- </ul>
54
- </fieldset>
55
-
56
- <fieldset id="seo" class="set" style="margin-top:10px;">
57
- <legend><%= _("Search Engine Optimisation")%></legend>
58
- <ul>
59
- <li>
60
- <label class="float"><%= _("Show blog name")%>:</label>
61
- <input type="radio" name="setting[title_prefix]" value="1" id="blog_title_prefix_1" <%= 'checked="checked"' if this_blog.title_prefix == 1 %>/>
62
- <label for="blog_title_prefix_1"><%= _("At the beginning of page title")%></label>
63
- <span class="float">
64
- <input type="radio" name="setting[title_prefix]" value="2" id="blog_title_prefix_2" <%= 'checked="checked"' if this_blog.title_prefix == 2 %>/>
65
- <label for="blog_title_prefix_2"><%= _("At the end of page title")%></label>
66
- </span>
67
- <span class="float">
68
- <input type="radio" name="setting[title_prefix]" value="0" id="blog_title_prefix_0" <%= 'checked="checked"' if this_blog.title_prefix == 0 %>/>
69
- <label for="blog_title_prefix_0"><%= _("Don't show blog name in page title")%></label>
70
- </span>
71
- </li>
72
- </ul>
73
- </fieldset>
74
-
75
- <fieldset id="discuss" class="set">
76
- <legend><%= _("Discuss")%></legend>
77
- <ul>
78
- <li>
79
- <%= _("This setting allows you to disable trackbacks for every article in your blog. It won't remove existing trackbacks, but it will prevent any further attempt to add a trackback anywhere on your blog.")%>
80
- </li>
81
- <li class="checkbox">
82
- <label class="float" for="global_pings_disable"><%= _("Disable trackbacks site-wide")%>:</label>
83
- <input name="setting[global_pings_disable]" id="global_pings_disable" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.global_pings_disable%> />
84
- <input name="setting[global_pings_disable]" type="hidden" value="0" />
85
- </li>
86
- <li><%= _("You can enable site wide feeback moderation. If you do so, no comment or trackback will appear on your blog unless you validate it")%>.</li>
87
- <li class="checkbox">
88
- <label class="float" for="default_moderate_comments"><%= _("Enable feedback moderation")%>:</label>
89
- <input name="setting[default_moderate_comments]" id="default_moderate_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_moderate_comments %> />
90
- <input name="setting[default_moderate_comments]" type="hidden" value="0" />
91
- </li>
92
- <li class="checkbox">
93
- <label class="float" for="link_to_author"><%= _("Show your email address") %>:</label>
94
- <input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.link_to_author%> />
95
- <input name="setting[link_to_author]" type="hidden" value="0" />
96
- </li>
97
- <li>
98
- <%= _("You can optionally disable non-Ajax comments. Typo will always use Ajax for comment submission if Javascript is enabled, so non-Ajax comments are either from spammers or users without Javascript.")%>
99
- </li>
100
- <li class="checkbox">
101
- <label for="sp_allow_non_ajax_comments" class="float"><%= _("Allow non-ajax comments") %>:</label>
102
- <input name="setting[sp_allow_non_ajax_comments]" id="sp_allow_non_ajax_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.sp_allow_non_ajax_comments%> />
103
- <input name="setting[sp_allow_non_ajax_comments]" type="hidden" value="0" />
104
- </li>
105
- <li>
106
- <label for="sp_article_auto_close" class="float"><%= _("Disable comments after")%></label>
107
- <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= this_blog.sp_article_auto_close %>" /> <%= _("days") %>
108
- <span class="float"><%= _("Set to 0 to never disable comments")%></span>
109
- </li>
110
- <li>
111
- <p><%= _("Typo will automatically reject comments and trackbacks which contain over a certain amount of links in them")%>.</p>
112
- <label class="float" for="sp_url_limit"><%= _("Max Links")%>:</label>
113
- <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= this_blog.sp_url_limit %>" />
114
- <span class="float"><%= _("Set to 0 to never reject comments")%></span>
115
- </li>
116
- </ul>
117
- </fieldset>
118
-
119
- <fieldset id="notification" class="set">
120
- <legend><%= _("Notification")%></legend>
121
- <ul>
122
- <li><%= _("Typo can notify you when new articles or comments are posted")%></li>
123
- <li>
124
- <label class="float" for="email_from"><%= _("Source Email")%>:</label>
125
- <input name="setting[email_from]" size="25" id="email_from" type="text" value="<%= this_blog.email_from %>" />
126
- <span class="float"><%= _("Email address used by Typo to send notifications")%>.</span>
127
- </li>
128
- <li>
129
- <label for="jabber_address" class="float"><%=_("Jabber account")%>:</label>
130
- <input name="setting[jabber_address]" size="20" id="jabber_address" type="text" value="<%= this_blog.jabber_address %>" />
131
- <span class="float"><%= _("Jabber account to use when sending Jabber notifications") %>.</span>
132
- </li>
133
- <li>
134
- <label class="float" for="jabber_password"><%= _("Jabber password")%>:</label>
135
- <input name="setting[jabber_password]" size="20" id="jabber_password" type="password" value="<%= this_blog.jabber_password %>" />
136
- </li>
137
- </ul>
138
- </fieldset>
139
-
140
- <fieldset id="resources" class="set">
141
- <legend><%= _("Resource Settings")%></legend>
142
- <ul>
143
- <li><%= _("The below settings act as defaults when you choose to publish an enclosure with iTunes metadata")%>.</li>
144
- <li>
145
- <label for="itunes_author" class="float"><%= _("Author")%>:</label>
146
- <input name="setting[itunes_author]" size="25" id="itunes_author" type="text" value="<%= this_blog.itunes_author %>" />
147
- </li>
148
- <li>
149
- <label for="itunes_subtitle" class="float"><%= _("Subtitle")%>: <span class="mandatory">*</span></label>
150
- <input name="setting[itunes_subtitle]" size="25" id="itunes_subtitle" type="text" value="<%= this_blog.itunes_subtitle %>" />
151
- </li>
152
- <li>
153
- <label class="float" for="itunes_summary"><%= _("Summary")%>: <span class="mandatory">*</span></label>
154
- <textarea name="setting[itunes_summary]" cols="40" rows="3"><%=h this_blog.itunes_summary %></textarea>
155
- <span class="float mandatory">* <%= _("Setting for channel")%></span>
156
- </li>
157
- <li>
158
- <label class="float" for="itunes_email"><%= _("Email")%>: <span class="mandatory">**</span></label>
159
- <input name="setting[itunes_email]" size="25" id="itunes_email" type="text" value="<%= this_blog.itunes_email %>" />
160
- </li>
161
- <li>
162
- <label class="float" for="itunes_name"><%= _("Optional Name")%>: <span class="mandatory">**</span></label>
163
- <input name="setting[itunes_name]" size="25" id="itunes_name" type="text" value="<%= this_blog.itunes_name %>" />
164
- <span class="float mandatory">** <%= _("Not published by Apple")%></span>
165
- </li>
166
- <li>
167
- <label class="float" for="itunes_copyright"><%= _("Copyright Information")%>:</label>
168
- <input name="setting[itunes_copyright]" size="25" id="itunes_copyright" type="text" value="<%= this_blog.itunes_copyright %>" />
169
- </li>
170
- <li class="checkbox">
171
- <label class="float" for="itunes_explicit"><%= _("Explicit")%>:</label>
172
- <input name="setting[itunes_explicit]" id="itunes_explicit" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.itunes_explicit%> />
173
- <input name="setting[itunes_explicit]" type="hidden" value="0" />
174
- </li>
175
- </ul>
176
- </fieldset>
177
15
 
178
16
  <div id="operations" class="paginate r">
179
17
  <%= save(_("Save Settings")) %>
@@ -34,7 +34,7 @@
34
34
 
35
35
 
36
36
  <% form_tag :action => 'migrate' do %>
37
- <div id="operations" class="tasks">
37
+ <div id="operations" class="paginate l">
38
38
  <% if @current_version == @needed_version %>
39
39
  <strong><%= _("You are up to date!")%></strong>
40
40
  <% else %>
@@ -0,0 +1,3 @@
1
+ <div id="operations" class="paginate r">
2
+ <%= save(_("Save Settings")) %>
3
+ </div>
@@ -0,0 +1,77 @@
1
+ <% @page_heading = _('Feedback') %>
2
+
3
+ <% content_for('tasks') do -%>
4
+ <%= subtab _("General settings"), "", {:controller => "settings"} %>
5
+ <%= subtab _("Read"), "", { :controller => 'settings', :action => 'read' } %>
6
+ <%= subtab _("Write"), "", { :controller => 'settings', :action => 'write' } %>
7
+ <%= subtab _("Feedback"), "current", { :controller => 'settings', :action => 'feedback' } %>
8
+ <%= subtab _("Spam"), "", { :controller => 'settings', :action => 'spam' } %>
9
+ <%= subtab _("Podcasts"), "", { :controller => 'settings', :action => 'podcast' } %>
10
+ <% end -%>
11
+
12
+ <% form_tag :action => 'feedback' do %>
13
+
14
+ <div class="admin">
15
+ <fieldset id="discuss" class="set">
16
+ <legend><%= _("Feedback")%></legend>
17
+ <ul>
18
+ <li class="checkbox">
19
+ <label class="float" for="default_allow_pings"><%= _("Enable Trackbacks by default")%>:</label>
20
+ <input name="setting[default_allow_pings]" id="default_allow_pings" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_allow_pings%> />
21
+ <input name="setting[default_allow_pings]" type="hidden" value="0" />
22
+ </li>
23
+ <li class="checkbox">
24
+ <label class="float" for="default_allow_comments"><%= _("Enable comments by default")%>:</label>
25
+ <input name="setting[default_allow_comments]" id="default_allow_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_allow_comments%> />
26
+ <input name="setting[default_allow_comments]" type="hidden" value="0" />
27
+ </li>
28
+ <li class="checkbox">
29
+ <label class="float" for="use_gravatar"><%= _("Enable gravatars")%>:</label>
30
+ <input name="setting[use_gravatar]" id="use_gravatar" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.use_gravatar %> />
31
+ <input name="setting[use_gravatar]" type="hidden" value="0" />
32
+ </li>
33
+ <li>
34
+ <%= _("This setting allows you to disable trackbacks for every article in your blog. It won't remove existing trackbacks, but it will prevent any further attempt to add a trackback anywhere on your blog.")%>
35
+ </li>
36
+ <li class="checkbox">
37
+ <label class="float" for="global_pings_disable"><%= _("Disable trackbacks site-wide")%>:</label>
38
+ <input name="setting[global_pings_disable]" id="global_pings_disable" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.global_pings_disable%> />
39
+ <input name="setting[global_pings_disable]" type="hidden" value="0" />
40
+ </li>
41
+ <li><%= _("You can enable site wide feeback moderation. If you do so, no comment or trackback will appear on your blog unless you validate it")%>.</li>
42
+ <li class="checkbox">
43
+ <label class="float" for="default_moderate_comments"><%= _("Enable feedback moderation")%>:</label>
44
+ <input name="setting[default_moderate_comments]" id="default_moderate_comments" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.default_moderate_comments %> />
45
+ <input name="setting[default_moderate_comments]" type="hidden" value="0" />
46
+ </li>
47
+ <li class="checkbox">
48
+ <label class="float" for="link_to_author"><%= _("Show your email address") %>:</label>
49
+ <input name="setting[link_to_author]" id="link_to_author" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.link_to_author%> />
50
+ <input name="setting[link_to_author]" type="hidden" value="0" />
51
+ </li>
52
+ </ul>
53
+ </fieldset>
54
+
55
+ <fieldset id="notification" class="set">
56
+ <legend><%= _("Notification")%></legend>
57
+ <ul>
58
+ <li><%= _("Typo can notify you when new articles or comments are posted")%></li>
59
+ <li>
60
+ <label class="float" for="email_from"><%= _("Source Email")%>:</label>
61
+ <input name="setting[email_from]" size="25" id="email_from" type="text" value="<%= this_blog.email_from %>" />
62
+ <span class="float"><%= _("Email address used by Typo to send notifications")%>.</span>
63
+ </li>
64
+ <li>
65
+ <label for="jabber_address" class="float"><%=_("Jabber account")%>:</label>
66
+ <input name="setting[jabber_address]" size="20" id="jabber_address" type="text" value="<%= this_blog.jabber_address %>" />
67
+ <span class="float"><%= _("Jabber account to use when sending Jabber notifications") %>.</span>
68
+ </li>
69
+ <li>
70
+ <label class="float" for="jabber_password"><%= _("Jabber password")%>:</label>
71
+ <input name="setting[jabber_password]" size="20" id="jabber_password" type="password" value="<%= this_blog.jabber_password %>" />
72
+ </li>
73
+ </ul>
74
+ </fieldset>
75
+ <%= render :partial => 'submit' %>
76
+ </div>
77
+ <% end %>