Changeset 1614
- Timestamp:
- 01/05/08 16:01:37 (4 months ago)
- Files:
-
- trunk/app/controllers/admin/general_controller.rb (modified) (1 diff)
- trunk/app/controllers/articles_controller.rb (modified) (1 diff)
- trunk/app/helpers/admin/base_helper.rb (modified) (2 diffs)
- trunk/app/models/blog.rb (modified) (1 diff)
- trunk/app/views/admin/settings/write.html.erb (modified) (1 diff)
- trunk/app/views/admin/sidebar/index.html.erb (modified) (1 diff)
- trunk/app/views/admin/textfilters/list.html.erb (modified) (1 diff)
- trunk/app/views/admin/themes/editor.html.erb (modified) (1 diff)
- trunk/app/views/admin/themes/index.html.erb (modified) (1 diff)
- trunk/app/views/layouts/administration.html.erb (modified) (1 diff)
- trunk/spec/models/configuration_spec.rb (modified) (1 diff)
- trunk/spec/models/content_state_spec.rb~ (deleted)
- trunk/spec/models/delegate_to_content_state_spec.rb~ (deleted)
- trunk/test/fixtures/blogs.yml (modified) (1 diff)
- trunk/test/functional/articles_controller_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/controllers/admin/general_controller.rb
r1611 r1614 1 1 class Admin::GeneralController < Admin::BaseController 2 def index 3 redirect_to :controller => 'settings' 4 end 5 2 6 def update_database 3 7 @current_version = Migrator.current_schema_version trunk/app/controllers/articles_controller.rb
r1611 r1614 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 trunk/app/helpers/admin/base_helper.rb
r1609 r1614 169 169 end 170 170 171 def class_presentation 172 if controller.controller_name =~ /sidebar|themes|textfilters/ 173 "current" 174 end 175 end 176 171 def class_themes 172 if controller.controller_name =~ /themes/ 173 "current" 174 end 175 end 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/ … … 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 trunk/app/models/blog.rb
r1601 r1614 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 trunk/app/views/admin/settings/write.html.erb
r1611 r1614 2 2 3 3 <% content_for('tasks') do -%> 4 <%= subtab _("General settings"), "", {:controller => " general"} %>5 <%= subtab _("Read"), " current", { :controller => 'settings', :action => 'read' } %>6 <%= subtab _("Write"), " ", { :controller => 'settings', :action => 'write' } %>4 <%= subtab _("General settings"), "", {:controller => "settings"} %> 5 <%= subtab _("Read"), "", { :controller => 'settings', :action => 'read' } %> 6 <%= subtab _("Write"), "current", { :controller => 'settings', :action => 'write' } %> 7 7 <%= subtab _("Feedback"), "", { :controller => 'settings', :action => 'feedback' } %> 8 8 <%= subtab _("Spam"), "", { :controller => 'settings', :action => 'spam' } %> trunk/app/views/admin/sidebar/index.html.erb
r1609 r1614 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> trunk/app/views/admin/textfilters/list.html.erb
r1572 r1614 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 %> trunk/app/views/admin/themes/editor.html.erb
r1572 r1614 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 trunk/app/views/admin/themes/index.html.erb
r1609 r1614 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 trunk/app/views/layouts/administration.html.erb
r1611 r1614 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 25 <%= content_tag :li, (link_to _("Settings"), {:controller=>"settings", :action => 'index'}, :class=>class_admin) %> trunk/spec/models/configuration_spec.rb
r1571 r1614 44 44 end 45 45 46 it '#text_filter and #comment_text_filter should be blank' do47 @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 trunk/test/fixtures/blogs.yml
r1570 r1614 9 9 blog_name: test blog 10 10 title_prefix: 1 11 limit_article_display: 1011 limit_article_display: 2 12 12 sp_url_limit: 3 13 13 use_gravatar: false trunk/test/functional/articles_controller_test.rb
r1577 r1614 53 53 def test_index 54 54 get :index 55 assert_response :success 56 assert_template "index" 57 end 58 59 # index with page 60 def test_index_with_page 61 get :index, :page => 2 55 62 assert_response :success 56 63 assert_template "index"
