Changeset 1614

Show
Ignore:
Timestamp:
01/05/08 16:01:37 (4 months ago)
Author:
neuro
Message:

Few changes in back office
Fixes 1184
Few bug fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/admin/general_controller.rb

    r1611 r1614  
    11class Admin::GeneralController < Admin::BaseController 
     2  def index 
     3    redirect_to :controller => 'settings' 
     4  end 
     5   
    26  def update_database 
    37    @current_version = Migrator.current_schema_version 
  • trunk/app/controllers/articles_controller.rb

    r1611 r1614  
    3636    end 
    3737    if params[:page] 
     38      @page_title = 'Older posts,' if @page_title.blank? 
    3839      @page_title << " page " << params[:page] 
    3940    end 
  • trunk/app/helpers/admin/base_helper.rb

    r1609 r1614  
    169169  end 
    170170 
    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   
    177183  def class_users 
    178184    if controller.controller_name  =~ /users/ 
     
    188194 
    189195  def class_admin 
    190     if controller.controller_name  =~ /general|advanced
     196    if controller.controller_name  =~ /settings
    191197    "current" 
    192198    end 
  • trunk/app/models/blog.rb

    r1601 r1614  
    7979 
    8080  # 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
    8383  setting :limit_article_display,      :integer, 10 
    8484  setting :limit_rss_display,          :integer, 10 
  • trunk/app/views/admin/settings/write.html.erb

    r1611 r1614  
    22 
    33  <% 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' } %> 
    77          <%= subtab _("Feedback"), "", { :controller => 'settings', :action => 'feedback' } %> 
    88          <%= subtab _("Spam"), "", { :controller => 'settings', :action => 'spam' } %> 
  • trunk/app/views/admin/sidebar/index.html.erb

    r1609 r1614  
    22<% content_for('tasks') do %> 
    33    <%= 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"}) %> 
    75<% end %> 
    86  <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  
    33  <% content_for('tasks') do %> 
    44        <%= subtab _("Sidebar"), "", {:controller=>"sidebar", :action=>"index"} %> 
    5         <%= subtab _("Choose theme"), "", {:controller=>"themes", :action=>"index"} %> 
    6         <%= subtab _("Theme editor"), "", {:controller=>"themes", :action=>"editor"} %> 
    75        <%= subtab _("Text Filters"), "current", {:controller=>"textfilters", :action=>"list"} %> 
    86  <% end %>  
  • trunk/app/views/admin/themes/editor.html.erb

    r1572 r1614  
    11<% @page_heading = _('Theme editor') %> 
    22<% content_for('tasks') do %> 
    3         <%= subtab _("Sidebar"), "", {:controller=>"sidebar", :action=>"index"} %> 
    43        <%= subtab _("Choose themes"), "", {:controller=>"themes", :action=>"index"} %> 
    54        <%= subtab _("Theme editor"), "current", {:controller=>"themes", :action=>"editor"} %> 
    6         <%= subtab _("Text Filters"), "", {:controller=>"textfilters", :action=>"list"} if (this_blog.display_advanced == 1) %> 
    75<% end %>  
    86 
  • trunk/app/views/admin/themes/index.html.erb

    r1609 r1614  
    11<% @page_heading = _('Choose a theme') %> 
    22<% content_for('tasks') do %> 
    3     <%= subtab _("Sidebar"), "", {:controller=>"sidebar", :action=>"index"} %> 
    43    <%= subtab _("Choose theme"), "current", {:controller=>"themes", :action=>"index"} %> 
    54    <%= subtab _("Theme editor"), "", {:controller=>"themes", :action=>"editor"} %> 
    6     <%= subtab(_("Text Filters"), "", {:controller=>"textfilters", :action=>"list"}) if (this_blog.display_advanced == 1) %> 
    75<% end %> 
    86 
  • trunk/app/views/layouts/administration.html.erb

    r1611 r1614  
    2020            <%= content_tag :li, (link_to _("Manage"), {:controller=>"content", :action => 'index'}, :class=>class_manage) %> 
    2121            <%= 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) %> 
    2324            <%= content_tag :li, (link_to _("Users"), {:controller=>"users", :action => 'index'}, :class=>class_users) %> 
    2425            <%= content_tag :li, (link_to _("Settings"), {:controller=>"settings", :action => 'index'}, :class=>class_admin) %> 
  • trunk/spec/models/configuration_spec.rb

    r1571 r1614  
    4444  end 
    4545 
    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
    4949  end 
    5050 
  • trunk/test/fixtures/blogs.yml

    r1570 r1614  
    99    blog_name: test blog 
    1010    title_prefix: 1 
    11     limit_article_display: 10 
     11    limit_article_display: 2 
    1212    sp_url_limit: 3 
    1313    use_gravatar: false 
  • trunk/test/functional/articles_controller_test.rb

    r1577 r1614  
    5353  def test_index 
    5454    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 
    5562    assert_response :success 
    5663    assert_template "index"