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
@@ -0,0 +1,81 @@
1
+ <% @page_heading = _('General settings') %>
2
+
3
+ <% content_for('tasks') do -%>
4
+ <%= subtab _("General settings"), "current", {:controller => "settings"} %>
5
+ <%= subtab _("Read"), "", { :controller => 'settings', :action => 'read' } %>
6
+ <%= subtab _("Write"), "", { :controller => 'settings', :action => 'write' } %>
7
+ <%= subtab _("Feedback"), "", { :controller => 'settings', :action => 'feedback' } %>
8
+ <%= subtab _("Spam"), "", { :controller => 'settings', :action => 'spam' } %>
9
+ <%= subtab _("Podcasts"), "", { :controller => 'settings', :action => 'podcast' } %>
10
+ <%= subtab _("Empty Fragment Cache"), "", {:controller => '/admin/cache', :action => 'sweep'} if this_blog.cache_option == 'caches_action_with_params' %>
11
+ <%= subtab _("Rebuild cached HTML"), "", {:controller => '/admin/cache', :action => 'sweep_html'} if this_blog.cache_option == 'caches_page' %>
12
+ <% end -%>
13
+
14
+ <% form_tag :action => 'index' do %>
15
+
16
+ <div class="admin">
17
+ <fieldset id="gensettings" class="set" style="margin-top:10px;">
18
+ <legend><%= _("General options")%></legend>
19
+ <ul>
20
+ <li>
21
+ <label for="blog_name" class="float"><%= _("Blog name")%>:</label>
22
+ <input name="setting[blog_name]" id="blog_name" type="text" value="<%=h this_blog.blog_name %>" size="<%= this_blog.blog_name.length %>" />
23
+ </li>
24
+ <li>
25
+ <label class="float" for="blog_subtitle"><%= _("Blog subtitle")%>:</label>
26
+ <input name="setting[blog_subtitle]" id="blog_subtitle" type="text" value="<%=h this_blog.blog_subtitle %>" size="<%= this_blog.blog_subtitle.length%>" />
27
+ </li>
28
+ <li>
29
+ <label class="float" for="base_url"><%= _("Blog URL")%>:</label>
30
+ <input name="setting[base_url]" id="base_url" type="text" value="<%=h this_blog.base_url %>" size="<%= this_blog.base_url.length %> " />
31
+ </li>
32
+ <li>
33
+ <label class="float" for="lang"><%= _("Language")%>:</label>
34
+ <select name="setting[lang]">
35
+ <%= fetch_langs %>
36
+ </select>
37
+ </li>
38
+ <li><%= _("This option let you choose between the simple admin interface or the complete one, displaying much more options and therefore more complicated to use. For advanced users only!") %></li>
39
+ <li>
40
+ <label class="float" for="display_advanced">Choose interface:</label>
41
+ <input type="radio" name="setting[display_advanced]" value="0" id="display_advanced_0" <%= 'checked="checked"' if this_blog.display_advanced == 0 %>/>
42
+ <label for="display_advanced_0"><%= _("Use simple interface (default)")%></label>
43
+ <span class="float">
44
+ <input type="radio" name="setting[display_advanced]" value="1" id="display_advanced_1" <%= 'checked="checked"' if this_blog.display_advanced == 1 %>/>
45
+ <label for="display_advanced_1"><%= _("Use complete admin")%></label>
46
+ </span>
47
+ </li>
48
+ <li><%= _("By default, Typo generates static HTML pages for your posts. However, if you plan to publish posts in the futur, you may want to use semi dynamic caching") %>.</li>
49
+ <li>
50
+ <label class="float" for="caches_page">Choose caching methode:</label>
51
+ <input type="radio" name="setting[cache_option]" value="caches_page" id="cache_option_0" <%= 'checked="checked"' if this_blog.cache_option == 'caches_page' %>/>
52
+ <label for="cache_option_0"><%= _("Use static HTML page caching ")%></label>
53
+ <span class="float">
54
+ <input type="radio" name="setting[cache_option]" value="caches_action_with_params" id="cache_option_1" <%= 'checked="checked"' if this_blog.cache_option == 'caches_action_with_params' %>/>
55
+ <label for="cache_option_1"><%= _("Use semi static caching (default)")%></label>
56
+ </span>
57
+ </li>
58
+ </ul>
59
+ </fieldset>
60
+
61
+ <fieldset id="seo" class="set" style="margin-top:10px;">
62
+ <legend><%= _("Search Engine Optimisation")%></legend>
63
+ <ul>
64
+ <li>
65
+ <label class="float"><%= _("Show blog name")%>:</label>
66
+ <input type="radio" name="setting[title_prefix]" value="1" id="blog_title_prefix_1" <%= 'checked="checked"' if this_blog.title_prefix == 1 %>/>
67
+ <label for="blog_title_prefix_1"><%= _("At the beginning of page title")%></label>
68
+ <span class="float">
69
+ <input type="radio" name="setting[title_prefix]" value="2" id="blog_title_prefix_2" <%= 'checked="checked"' if this_blog.title_prefix == 2 %>/>
70
+ <label for="blog_title_prefix_2"><%= _("At the end of page title")%></label>
71
+ </span>
72
+ <span class="float">
73
+ <input type="radio" name="setting[title_prefix]" value="0" id="blog_title_prefix_0" <%= 'checked="checked"' if this_blog.title_prefix == 0 %>/>
74
+ <label for="blog_title_prefix_0"><%= _("Don't show blog name in page title")%></label>
75
+ </span>
76
+ </li>
77
+ </ul>
78
+ </fieldset>
79
+ <%= render :partial => 'submit' %>
80
+ </div>
81
+ <% end %>
@@ -0,0 +1,53 @@
1
+ <% @page_heading = _('Podcast') %>
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"), "", { :controller => 'settings', :action => 'feedback' } %>
8
+ <%= subtab _("Spam"), "", { :controller => 'settings', :action => 'spam' } %>
9
+ <%= subtab _("Podcasts"), "current", { :controller => 'settings', :action => 'podcast' } %>
10
+ <% end -%>
11
+
12
+ <% form_tag :action => 'podcast' do %>
13
+
14
+ <div class="admin">
15
+ <fieldset id="resources" class="set">
16
+ <ul>
17
+ <li><%= _("The below settings act as defaults when you choose to publish an enclosure with iTunes metadata")%>.</li>
18
+ <li>
19
+ <label for="itunes_author" class="float"><%= _("Author")%>:</label>
20
+ <input name="setting[itunes_author]" size="25" id="itunes_author" type="text" value="<%= this_blog.itunes_author %>" />
21
+ </li>
22
+ <li>
23
+ <label for="itunes_subtitle" class="float"><%= _("Subtitle")%>: <span class="mandatory">*</span></label>
24
+ <input name="setting[itunes_subtitle]" size="25" id="itunes_subtitle" type="text" value="<%= this_blog.itunes_subtitle %>" />
25
+ </li>
26
+ <li>
27
+ <label class="float" for="itunes_summary"><%= _("Summary")%>: <span class="mandatory">*</span></label>
28
+ <textarea name="setting[itunes_summary]" cols="40" rows="3"><%=h this_blog.itunes_summary %></textarea>
29
+ <span class="float mandatory">* <%= _("Setting for channel")%></span>
30
+ </li>
31
+ <li>
32
+ <label class="float" for="itunes_email"><%= _("Email")%>: <span class="mandatory">**</span></label>
33
+ <input name="setting[itunes_email]" size="25" id="itunes_email" type="text" value="<%= this_blog.itunes_email %>" />
34
+ </li>
35
+ <li>
36
+ <label class="float" for="itunes_name"><%= _("Optional Name")%>: <span class="mandatory">**</span></label>
37
+ <input name="setting[itunes_name]" size="25" id="itunes_name" type="text" value="<%= this_blog.itunes_name %>" />
38
+ <span class="float mandatory">** <%= _("Not published by Apple")%></span>
39
+ </li>
40
+ <li>
41
+ <label class="float" for="itunes_copyright"><%= _("Copyright Information")%>:</label>
42
+ <input name="setting[itunes_copyright]" size="25" id="itunes_copyright" type="text" value="<%= this_blog.itunes_copyright %>" />
43
+ </li>
44
+ <li class="checkbox">
45
+ <label class="float" for="itunes_explicit"><%= _("Explicit")%>:</label>
46
+ <input name="setting[itunes_explicit]" id="itunes_explicit" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.itunes_explicit%> />
47
+ <input name="setting[itunes_explicit]" type="hidden" value="0" />
48
+ </li>
49
+ </ul>
50
+ </fieldset>
51
+ <%= render :partial => 'submit' %>
52
+ </div>
53
+ <% end %>
@@ -0,0 +1,38 @@
1
+ <% @page_heading = _('Read') %>
2
+
3
+ <% content_for('tasks') do -%>
4
+ <%= subtab _("General settings"), "", {:controller => 'settings'} %>
5
+ <%= subtab _("Read"), "current", { :controller => 'settings', :action => 'read' } %>
6
+ <%= subtab _("Write"), "", { :controller => 'settings', :action => 'write' } %>
7
+ <%= subtab _("Feedback"), "", { :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 => 'read' do %>
13
+
14
+ <div class="admin">
15
+ <fieldset id="read" class="set">
16
+ <ul>
17
+ <li>
18
+ <label for="limit_article_display" class="float"><%= _("Display")%> </label>
19
+ <input name="setting[limit_article_display]" size="4" id="limit_article_display" type="text" value="<%= this_blog.limit_article_display %>" />
20
+ <%= _("articles on my homepage by default")%>
21
+ </li>
22
+ <li>
23
+ <label for="limit_rss_display" class="float"><%= _("Display")%> </label>
24
+ <input name="setting[limit_rss_display]" size="4" id="limit_rss_display" type="text" value="<%= this_blog.limit_rss_display %>" />
25
+ <%= _("articles in my news feed by default")%>.
26
+ </li>
27
+ <li class="checkbox">
28
+ <label class="float" for="show_extended_on_rss"><%= _("Show full article on feed")%>:</label>
29
+ <input name="setting[show_extended_on_rss]" id="show_extended_on_rss" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.show_extended_on_rss%> />
30
+ <input name="setting[show_extended_on_rss]" type="hidden" value="0" />
31
+ </li>
32
+ </ul>
33
+ </fieldset>
34
+
35
+ <%= render :partial => 'submit' %>
36
+
37
+ </div>
38
+ <% end %>
@@ -0,0 +1,51 @@
1
+ <% @page_heading = _('Spam') %>
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"), "", { :controller => 'settings', :action => 'feedback' } %>
8
+ <%= subtab _("Spam"), "current", { :controller => 'settings', :action => 'spam' } %>
9
+ <%= subtab _("Podcasts"), "", { :controller => 'settings', :action => 'podcast' } %>
10
+ <% end -%>
11
+
12
+ <% form_tag :action => 'spam' do %>
13
+
14
+ <div class="admin">
15
+ <fieldset id="spam" class="set">
16
+ <ul>
17
+ <li><%= _("Enabling spam protection will make typo compare the IP address of posters as well as the contents of their posts against local and remote blacklists. Good defense against spam bots")%>.</li>
18
+ <li class="checkbox">
19
+ <label for="sp_global" class="float"><%= _("Enable spam protection")%>:</label>
20
+ <input name="setting[sp_global]" id="sp_global" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.sp_global%> /><input name="setting[sp_global]" type="hidden" value="0" />
21
+ </li>
22
+ <li><%= _("Typo can (optionally) use the %s spam-filtering service. You need to register with Akismet and receive an API key before you can use their service. If you have an Akismet key, enter it here", '<a href="http://akismet.com">Akismet</a>')%> .
23
+ </li>
24
+ <li>
25
+ <label class="float" for="sp_akismet_key"><%= _("Akismet Key")%>:</label>
26
+ <input name="setting[sp_akismet_key]" id="sp_akismet_key" type="text" value="<%=h this_blog.sp_akismet_key %>" />
27
+ </li>
28
+ <li>
29
+ <%= _("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.")%>
30
+ </li>
31
+ <li class="checkbox">
32
+ <label for="sp_allow_non_ajax_comments" class="float"><%= _("Allow non-ajax comments") %>:</label>
33
+ <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%> />
34
+ <input name="setting[sp_allow_non_ajax_comments]" type="hidden" value="0" />
35
+ </li>
36
+ <li>
37
+ <label for="sp_article_auto_close" class="float"><%= _("Disable comments after")%></label>
38
+ <input name="setting[sp_article_auto_close]" size="4" id="sp_article_auto_close" type="text" value="<%= this_blog.sp_article_auto_close %>" /> <%= _("days") %>
39
+ <span class="float"><%= _("Set to 0 to never disable comments")%></span>
40
+ </li>
41
+ <li>
42
+ <p><%= _("Typo will automatically reject comments and trackbacks which contain over a certain amount of links in them")%>.</p>
43
+ <label class="float" for="sp_url_limit"><%= _("Max Links")%>:</label>
44
+ <input name="setting[sp_url_limit]" size="4" id="sp_url_limit" type="text" value="<%= this_blog.sp_url_limit %>" />
45
+ <span class="float"><%= _("Set to 0 to never reject comments")%></span>
46
+ </li>
47
+ </ul>
48
+ </fieldset>
49
+ <%= render :partial => 'submit' %>
50
+ </div>
51
+ <% end %>
@@ -0,0 +1,71 @@
1
+ <% @page_heading = _('Write') %>
2
+
3
+ <% content_for('tasks') do -%>
4
+ <%= subtab _("General settings"), "", {:controller => "settings"} %>
5
+ <%= subtab _("Read"), "", { :controller => 'settings', :action => 'read' } %>
6
+ <%= subtab _("Write"), "current", { :controller => 'settings', :action => 'write' } %>
7
+ <%= subtab _("Feedback"), "", { :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 => 'write' do %>
13
+
14
+ <div class="admin">
15
+ <fieldset id="write" class="set">
16
+ <legend><%= _("Write")%></legend>
17
+ <ul>
18
+ <li>
19
+ <label class="float"><%= _("Editor")%>:</label>
20
+ <input type="radio" name="setting[editor]" value="2" id="editor_2" <%= 'checked="checked"' if this_blog.editor == 2 %>/>
21
+ <label for="editor_2"><%= _("Use visual rich editor")%></label>
22
+ <span class="float">
23
+ <input type="radio" name="setting[editor]" value="1" id="editor_1" <%= 'checked="checked"' if this_blog.editor == 1 %>/>
24
+ <label for="editor_1"><%= _("Use simple editor with live preview (default)")%></label>
25
+ </span>
26
+ <span class="float">
27
+ <input type="radio" name="setting[editor]" value="0" id="editor_0" <%= 'checked="checked"' if this_blog.editor == 0 %>/>
28
+ <label for="editor_0"><%= _("Use simple editor without live preview")%></label>
29
+ </span>
30
+ </li>
31
+ <li>
32
+ <label class="float" for="text_filter"><%= _("Article filter")%>:</label>
33
+ <select name="setting[text_filter]" id="text_filter">
34
+ <%= options_for_select text_filter_options, TextFilter.find_by_name(this_blog.text_filter) %>
35
+ </select>
36
+ </li>
37
+ <li>
38
+ <label for="comment_text_filter" class="float"><%= _("Comments filter")%>:</label>
39
+ <select name="setting[comment_text_filter]" id="comment_text_filter">
40
+ <%= options_for_select text_filter_options, TextFilter.find_by_name(this_blog.comment_text_filter) %>
41
+ </select>
42
+ </li>
43
+ </ul>
44
+ </fieldset>
45
+
46
+ <fieldset id="publish" class="set">
47
+ <legend><%= _("Publish")%></legend>
48
+ <ul>
49
+ <li>
50
+ <%= _("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.")%>
51
+ </li>
52
+ <li class="checkbox">
53
+ <label class="float" for="send_outbound_pings"><%= _("Send trackbacks")%>:</label>
54
+ <input name="setting[send_outbound_pings]" id="send_outbound_pings" type="checkbox" value="1" <%= 'checked="checked"' if this_blog.send_outbound_pings%> />
55
+ <input name="setting[send_outbound_pings]" type="hidden" value="0" />
56
+ </li>
57
+ <li>
58
+ <label class="float" for="ping_urls"><%= _("URLs to ping automatically")%>:</label>
59
+ <textarea name="setting[ping_urls]" id="ping_urls" rows="5" cols="50"><%=h this_blog.ping_urls %></textarea>
60
+ </li>
61
+ <li>
62
+ <label class="float" for="geourl_location"><%= _("Latitude, Longitude")%>:</label>
63
+ <input name="setting[geourl_location]" size="20" id="geourl_location" type="text" value="<%= this_blog.geourl_location %>" />
64
+ <span class="float"><%= _("Display")%> <a href="http://geourl.org"><%= _("your lattitude and longitude")%></a> (<%= _("exemple")%> <tt>47.774,-122.201</tt>)</span>
65
+ </li>
66
+
67
+ </ul>
68
+ </fieldset>
69
+ <%= render :partial => 'submit' %>
70
+ </div>
71
+ <% end %>
@@ -1,9 +1,7 @@
1
1
  <% @page_heading = 'Sidebar' %>
2
2
  <% content_for('tasks') do %>
3
3
  <%= subtab _("Sidebar"), "current", {:controller=>"sidebar", :action=>"index"} %>
4
- <%= subtab _("Choose theme"), "", {:controller=>"themes", :action=>"index"} %>
5
- <%= subtab _("Theme editor"), "", {:controller=>"themes", :action=>"editor"} %>
6
- <%= subtab(_("Text Filters"), "", {:controller=>"textfilters", :action=>"list"}) if this_blog.display_advanced == 1 %>
4
+ <%= subtab(_("Text Filters"), "", {:controller=>"textfilters", :action=>"list"}) %>
7
5
  <% end %>
8
6
  <p class="paginate l">You can download and install sidebar plugins from our official <a href="http://svn.typosphere.org/typo/plugins/">plugin repository</a> running script/plugins install http://svn.typosphere.org/typo/plugins/myplugin, or upload them in the vendors/plugin directory.</p>
9
7
 
@@ -2,8 +2,6 @@
2
2
 
3
3
  <% content_for('tasks') do %>
4
4
  <%= subtab _("Sidebar"), "", {:controller=>"sidebar", :action=>"index"} %>
5
- <%= subtab _("Choose theme"), "", {:controller=>"themes", :action=>"index"} %>
6
- <%= subtab _("Theme editor"), "", {:controller=>"themes", :action=>"editor"} %>
7
5
  <%= subtab _("Text Filters"), "current", {:controller=>"textfilters", :action=>"list"} %>
8
6
  <% end %>
9
7
 
@@ -1,9 +1,7 @@
1
1
  <% @page_heading = _('Theme editor') %>
2
2
  <% content_for('tasks') do %>
3
- <%= subtab _("Sidebar"), "", {:controller=>"sidebar", :action=>"index"} %>
4
3
  <%= subtab _("Choose themes"), "", {:controller=>"themes", :action=>"index"} %>
5
4
  <%= subtab _("Theme editor"), "current", {:controller=>"themes", :action=>"editor"} %>
6
- <%= subtab _("Text Filters"), "", {:controller=>"textfilters", :action=>"list"} if (this_blog.display_advanced == 1) %>
7
5
  <% end %>
8
6
 
9
7
  <div id="theme_list">
@@ -1,9 +1,7 @@
1
1
  <% @page_heading = _('Choose a theme') %>
2
2
  <% content_for('tasks') do %>
3
- <%= subtab _("Sidebar"), "", {:controller=>"sidebar", :action=>"index"} %>
4
3
  <%= subtab _("Choose theme"), "current", {:controller=>"themes", :action=>"index"} %>
5
4
  <%= subtab _("Theme editor"), "", {:controller=>"themes", :action=>"editor"} %>
6
- <%= subtab(_("Text Filters"), "", {:controller=>"textfilters", :action=>"list"}) if (this_blog.display_advanced == 1) %>
7
5
  <% end %>
8
6
 
9
7
  <p class="paginate l">
@@ -19,9 +19,10 @@
19
19
  <%= content_tag :li, (link_to _("Write"), {:controller=>"content", :action => 'new'}, :class=>class_write) %>
20
20
  <%= content_tag :li, (link_to _("Manage"), {:controller=>"content", :action => 'index'}, :class=>class_manage) %>
21
21
  <%= content_tag :li, (link_to _("Feedback"), {:controller=>"feedback", :action => 'index'}, :class=>class_feedback) %>
22
- <%= content_tag :li, (link_to _("Presentation"), {:controller=>"sidebar", :action => 'index'}, :class=>class_presentation) %>
22
+ <%= content_tag :li, (link_to _("Themes"), {:controller=>"themes", :action => 'index'}, :class=>class_themes) %>
23
+ <%= content_tag :li, (link_to _("Plugins"), {:controller=>"sidebar", :action => 'index'}, :class=>class_plugins) %>
23
24
  <%= content_tag :li, (link_to _("Users"), {:controller=>"users", :action => 'index'}, :class=>class_users) %>
24
- <%= content_tag :li, (link_to _("Settings"), {:controller=>"general", :action => 'index'}, :class=>class_admin) %>
25
+ <%= content_tag :li, (link_to _("Settings"), {:controller=>"settings", :action => 'index'}, :class=>class_admin) %>
25
26
  <li><%= current_user_notice %></li>
26
27
  <%= tab _('your blog'), :controller => "/articles" %>
27
28
  </ul>
@@ -8,7 +8,7 @@ config.whiny_nils = true
8
8
 
9
9
  # Show full error reports and disable caching
10
10
  config.action_controller.consider_all_requests_local = true
11
- config.action_controller.perform_caching = true
11
+ config.action_controller.perform_caching = false
12
12
 
13
13
  # Don't care if the mailer can't send
14
14
  config.action_mailer.raise_delivery_errors = false
data/db/schema_version CHANGED
@@ -1 +1 @@
1
- 53
1
+ 62
@@ -1,7 +1,7 @@
1
1
  require 'rake/gempackagetask'
2
2
  require 'rake/contrib/rubyforgepublisher'
3
3
 
4
- PKG_VERSION = "5.0.1"
4
+ PKG_VERSION = "5.0.2"
5
5
  PKG_NAME = "typo"
6
6
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
7
7
  RUBY_FORGE_PROJECT = 'typo'
@@ -31,7 +31,7 @@ spec = Gem::Specification.new do |s|
31
31
  s.executables = ['typo']
32
32
 
33
33
  s.add_dependency("rails", ">= 2.0.2")
34
- s.add_dependency("mongrel", ">= 1.1.1")
34
+ s.add_dependency("mongrel", ">= 1.1.3")
35
35
  s.add_dependency("mongrel_cluster", ">= 0.2.0")
36
36
  s.add_dependency("sqlite3-ruby", ">= 1.1.0")
37
37
  s.add_dependency("rails-app-installer", ">= 0.2.0")
@@ -39,6 +39,7 @@ spec = Gem::Specification.new do |s|
39
39
  s.add_dependency("rcov", ">= 0.8.1")
40
40
  s.add_dependency("flexmock", ">= 0.8.0")
41
41
  s.add_dependency("rspec", ">= 1.1.1")
42
+ s.add_dependency("ruby-debug", ">= 0.10.0")
42
43
  end
43
44
 
44
45
  Rake::GemPackageTask.new(spec) do |p|
data/lib/typo_version.rb CHANGED
@@ -1 +1 @@
1
- TYPO_VERSION = '5.0.1'
1
+ TYPO_VERSION = '5.0.2'
@@ -156,9 +156,9 @@ describe 'POST signup with 0 existing users' do
156
156
  assigns[:user].should == @user
157
157
  end
158
158
 
159
- it 'redirects to /admin/general' do
159
+ it 'redirects to /admin/settings' do
160
160
  post 'signup', params
161
- response.should redirect_to(:controller => 'admin/general', :action => 'index')
161
+ response.should redirect_to(:controller => 'admin/settings', :action => 'index')
162
162
  end
163
163
 
164
164
  it 'session gets a user' do
@@ -43,9 +43,9 @@ describe 'Given a new blog' do
43
43
  end
44
44
  end
45
45
 
46
- it '#text_filter and #comment_text_filter should be blank' do
47
- @blog.text_filter.should == ''
48
- @blog.comment_text_filter.should == ''
46
+ it '#text_filter and #comment_text_filter should be markdown smartypants' do
47
+ @blog.text_filter.should == 'markdown smartypants'
48
+ @blog.comment_text_filter.should == 'markdown smartypants'
49
49
  end
50
50
 
51
51
  it '#limit_article_display and #limit_rss_display should be 10' do
@@ -8,7 +8,7 @@ default:
8
8
  itunes_owner: ""
9
9
  blog_name: test blog
10
10
  title_prefix: 1
11
- limit_article_display: 10
11
+ limit_article_display: 2
12
12
  sp_url_limit: 3
13
13
  use_gravatar: false
14
14
  itunes_email: ""
@@ -1,14 +1,14 @@
1
1
  require File.dirname(__FILE__) + '/../../test_helper'
2
- require 'admin/general_controller'
2
+ require 'admin/settings_controller'
3
3
 
4
4
  # Re-raise errors caught by the controller.
5
- class Admin::GeneralController; def rescue_action(e) raise e end; end
5
+ class Admin::SettingsController; def rescue_action(e) raise e end; end
6
6
 
7
- class Admin::GeneralControllerTest < Test::Unit::TestCase
7
+ class Admin::SettingsControllerTest < Test::Unit::TestCase
8
8
  fixtures :users
9
9
 
10
10
  def setup
11
- @controller = Admin::GeneralController.new
11
+ @controller = Admin::SettingsController.new
12
12
  @request = ActionController::TestRequest.new
13
13
  @response = ActionController::TestResponse.new
14
14
  @request.session = { :user_id => users(:tobi).id }
@@ -21,6 +21,6 @@ class Admin::GeneralControllerTest < Test::Unit::TestCase
21
21
 
22
22
  def test_redirect
23
23
  get :redirect
24
- assert_response :redirect, :controller => 'admin/general', :action => 'index'
24
+ assert_response :redirect, :controller => 'admin/settings', :action => 'index'
25
25
  end
26
- end
26
+ end
@@ -56,6 +56,13 @@ class ArticlesControllerTest < Test::Unit::TestCase
56
56
  assert_template "index"
57
57
  end
58
58
 
59
+ # index with page
60
+ def test_index_with_page
61
+ get :index, :page => 2
62
+ assert_response :success
63
+ assert_template "index"
64
+ end
65
+
59
66
  # Archives page
60
67
  def test_archives
61
68
  get :archives
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typo
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Fr\xC3\xA9d\xC3\xA9ric de Villamil"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2007-12-31 00:00:00 +01:00
12
+ date: 2008-01-06 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -28,7 +28,7 @@ dependencies:
28
28
  requirements:
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
- version: 1.1.1
31
+ version: 1.1.3
32
32
  version:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: mongrel_cluster
@@ -93,6 +93,15 @@ dependencies:
93
93
  - !ruby/object:Gem::Version
94
94
  version: 1.1.1
95
95
  version:
96
+ - !ruby/object:Gem::Dependency
97
+ name: ruby-debug
98
+ version_requirement:
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 0.10.0
104
+ version:
96
105
  description:
97
106
  email: frederic@de-villamil.com
98
107
  executables:
@@ -111,7 +120,6 @@ files:
111
120
  - app/controllers
112
121
  - app/controllers/accounts_controller.rb
113
122
  - app/controllers/admin
114
- - app/controllers/admin/advanced_controller.rb
115
123
  - app/controllers/admin/base_controller.rb
116
124
  - app/controllers/admin/blacklist_controller.rb
117
125
  - app/controllers/admin/cache_controller.rb
@@ -124,6 +132,7 @@ files:
124
132
  - app/controllers/admin/pages_controller.rb
125
133
  - app/controllers/admin/profiles_controller.rb
126
134
  - app/controllers/admin/resources_controller.rb
135
+ - app/controllers/admin/settings_controller.rb
127
136
  - app/controllers/admin/sidebar_controller.rb
128
137
  - app/controllers/admin/textfilters_controller.rb
129
138
  - app/controllers/admin/themes_controller.rb
@@ -157,6 +166,7 @@ files:
157
166
  - app/helpers/admin/general_helper.rb
158
167
  - app/helpers/admin/pages_helper.rb
159
168
  - app/helpers/admin/resources_helper.rb
169
+ - app/helpers/admin/settings_helper.rb
160
170
  - app/helpers/admin/sidebar_helper.rb
161
171
  - app/helpers/admin/textfilters_helper.rb
162
172
  - app/helpers/admin/themes_helper.rb
@@ -272,7 +282,6 @@ files:
272
282
  - app/views/admin/feedback/_item.html.erb
273
283
  - app/views/admin/feedback/list.html.erb
274
284
  - app/views/admin/general
275
- - app/views/admin/general/index.html.erb
276
285
  - app/views/admin/general/update_database.html.erb
277
286
  - app/views/admin/pages
278
287
  - app/views/admin/pages/_form.html.erb
@@ -295,6 +304,14 @@ files:
295
304
  - app/views/admin/resources/destroy.html.erb
296
305
  - app/views/admin/resources/list.html.erb
297
306
  - app/views/admin/resources/new.html.erb
307
+ - app/views/admin/settings
308
+ - app/views/admin/settings/_submit.html.erb
309
+ - app/views/admin/settings/feedback.html.erb
310
+ - app/views/admin/settings/index.html.erb
311
+ - app/views/admin/settings/podcast.html.erb
312
+ - app/views/admin/settings/read.html.erb
313
+ - app/views/admin/settings/spam.html.erb
314
+ - app/views/admin/settings/write.html.erb
298
315
  - app/views/admin/shared
299
316
  - app/views/admin/shared/_edit.html.erb
300
317
  - app/views/admin/sidebar
@@ -909,17 +926,16 @@ files:
909
926
  - test/functional
910
927
  - test/functional/accounts_controller_test.rb
911
928
  - test/functional/admin
912
- - test/functional/admin/advanced_controller_test.rb
913
929
  - test/functional/admin/article_preview_test.rb
914
930
  - test/functional/admin/blacklist_controller_test.rb
915
931
  - test/functional/admin/categories_controller_test.rb
916
932
  - test/functional/admin/comments_controller_test.rb
917
933
  - test/functional/admin/content_controller_test.rb
918
934
  - test/functional/admin/feedback_controller_test.rb
919
- - test/functional/admin/general_controller_test.rb
920
935
  - test/functional/admin/pages_controller_test.rb
921
936
  - test/functional/admin/profiles_controller_test.rb
922
937
  - test/functional/admin/resources_controller_test.rb
938
+ - test/functional/admin/settings_controller_test.rb
923
939
  - test/functional/admin/textfilters_controller_test.rb
924
940
  - test/functional/admin/themes_controller_test.rb
925
941
  - test/functional/admin/trackbacks_controller_test.rb
@@ -1,20 +0,0 @@
1
- class Admin::AdvancedController < Admin::BaseController
2
- def index
3
- if this_blog.base_url.blank?
4
- this_blog.base_url = blog_base_url
5
- end
6
- end
7
-
8
- def update
9
- if request.post?
10
- Blog.transaction do
11
- params[:setting].each { |k,v| this_blog.send("#{k.to_s}=", v) }
12
- this_blog.save
13
- flash[:notice] = _('config updated.')
14
- end
15
- redirect_to :action => 'index'
16
- end
17
- end
18
-
19
- private
20
- end