Changeset 1677

Show
Ignore:
Timestamp:
03/16/08 08:40:28 (2 months ago)
Author:
neuro
Message:

Fixes a few things here and there.

Files:

Legend:

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

    r1615 r1677  
    33    @available = available 
    44    # Reset the staged position based on the active position. 
    5     Sidebar.delete_all(['blog_id = ? and active_position is null', 
    6                          this_blog.id]) 
    7     @active = this_blog.sidebars 
     5    Sidebar.delete_all('active_position is null') 
     6    @active = Sidebar.find(:all, :order => 'active_position ASC') 
    87    flash[:sidebars] = @active.map {|sb| sb.id } 
    98  end 
     
    2524    flash[:sidebars] = params[:active].inject([]) do |array, name| 
    2625      if klass_for.has_key?(name) 
    27         @new_item = klass_for[name].create!(:blog => this_blog) 
     26        @new_item = klass_for[name].create! 
    2827        @target = name 
    2928        array << @new_item.id 
     
    4847      params[:configure] ||= { } 
    4948      # 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}") 
     49      ActiveRecord::Base.connection.execute("update sidebars set active_position=null") 
    5250      flash[:sidebars].each do |id| 
    5351        sidebar = Sidebar.find(id) 
     
    6361        position += 1 
    6462      end 
    65       Sidebar.delete_all(['blog_id = ? and active_position is null', 
    66                           this_blog.id]) 
     63      Sidebar.delete_all('active_position is null') 
    6764    end 
    6865    index 
  • trunk/app/models/profile.rb

    r1472 r1677  
    11class Profile < ActiveRecord::Base 
    22  validates_uniqueness_of :label 
     3  has_and_belongs_to_many :rights 
    34end 
  • trunk/app/models/tag.rb

    r1621 r1677  
    2626      self.display_name = self.name 
    2727    end 
     28    self.name = self.name.tr('.', '-') 
    2829    self.name = self.name.tr(' ', '').downcase 
    2930  end 
  • trunk/app/views/admin/content/_form.html.erb

    r1664 r1677  
    3030          </select> 
    3131       </li> 
    32        <li class="paginate l" id="tags"
     32       <li class="paginate l"
    3333          <label class="block" for="article_keywords"> 
    34           <%= link_to_function _("Tags") + " (+/-)",update_page { |page| page.visual_effect(:toggle_blind, "article_keywords", :duration => 0.2) } %> 
     34          <%= link_to_function _("Tags") + " (+/-)",update_page { |page| page.visual_effect(:toggle_blind, "tags", :duration => 0.2) } %> 
    3535          </label> 
    36           <%= text_field 'article', 'keywords', :style => 'width: 90%;' + "display:none;" if @article.keywords.blank? %> 
     36          <p id="tags" <%= "style='display: none;'" if @article.keywords.blank? %>> 
     37            <%= text_field 'article', 'keywords', :style => 'width: 90%;' %> 
     38          </p> 
    3739      </li> 
    3840      <li class="paginate l"> 
     
    7072  <legend><%= _("Options")%></legend> 
    7173  <ul> 
    72      <li> 
    73        <label for="article_permalink" class="float"><%= _("Permalink")%>:</label> 
    74        <%= text_field 'article', 'permalink'  %> 
    75      </li> 
     74    <li><%= _("These are advanced options. Only experimented users should use them")%>.</li> 
     75    <li class="paginate l"> 
     76      <label for="article_permalink" class="block"> 
     77        <%= link_to_function _("Permalink") + " (+/-)",update_page { |page| page.visual_effect(:toggle_blind, "article_permalink", :duration => 0.2) } %> 
     78      </label> 
     79      <%= text_field 'article', 'permalink', :style => 'width: 90%;' + "display:none;" if @article.keywords.blank?  %> 
     80    </li>      
     81      
    7682     <li class="checkbox"> 
    7783       <label for="article_allow_comments" class="float"><%= _("Allow comments") %>: </label> 
     
    8288        <%= check_box 'article', 'allow_pings'  %> 
    8389     </li> 
    84      <li> 
    85         <label for="article_text_filter" class="float"><%= _("Textfilter")%>: </label> 
    8690        <%= hidden_field_tag 'text_filter', this_blog.text_filter %> 
    87      </li> 
    8891  </ul> 
    8992</fieldset> 
  • trunk/app/views/admin/sidebar/index.html.erb

    r1614 r1677  
    44    <%= subtab(_("Text Filters"), "", {:controller=>"textfilters", :action=>"list"}) %> 
    55<% end %> 
    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> 
     6  <p class="paginate l">You can download and install sidebar plugins from our official <a href="http://typosphere.org/articles/2007/08/26/typo-plugins-directory">plugin repository</a> running script/plugins install http://svn.typosphere.org/typo/plugins/myplugin, or upload them in the vendors/plugin directory.</p> 
    77 
    88  <p><%= _("Drag and drop to change the sidebar items displayed on this blog.  To remove items from the sidebar just click remove  Changes are saved immediately, but not activated until you click the 'Publish' button")%>.</p> 
  • trunk/lang/fr_FR.rb

    r1661 r1677  
    187187  l.store "Textfilter", "Formatage du texte" 
    188188  l.store "Toggle Extended Content", "Afficher le contenu étendu" 
     189  l.store "These are advanced options. Only experimented users should use them", "Options avancées. À ne modifier que par des utilisateurs expérimentés" 
    189190   
    190191  #admin/content/_pages.rhtml 
  • trunk/MAINTAINERS

    r1381 r1677  
    1010Peons 
    1111 
    12 Scott Laird <scott@sigkill.org> 
    13 blog: http://scottstuff.net/ 
    14 irc:  slaird 
    15  
    1612Piers Cawley <pdcawley@bofh.org.uk> 
    1713blog: http://www.bofh.org.uk/ 
    1814irc:  pdcawley 
    1915 
    20 Kevin Ballard <kevin@sb.org> 
    21 blog: http://kevin.sb.org 
    22 irc:  Eridius 
    23  
    2416Frédéric de Villamil <frederic@de-villamil.com> 
    2517blog: http://fredericdevillamil.com 
  • trunk/vendor/plugins/fckeditor/lib/fckeditor_file_utils.rb

    r1636 r1677  
    4646   
    4747  def FckeditorFileUtils.create_uploads_directory 
    48     uploads = File.join(RAILS_ROOT, '/public/uploads') 
     48    uploads = File.join(RAILS_ROOT, '/public/files') 
    4949    FileUtils.mkdir(uploads) unless File.exist?(uploads)     
    5050  end