Changeset 1677
- Timestamp:
- 03/16/08 08:40:28 (2 months ago)
- Files:
-
- trunk/app/controllers/admin/sidebar_controller.rb (modified) (4 diffs)
- trunk/app/models/profile.rb (modified) (1 diff)
- trunk/app/models/right.rb (added)
- trunk/app/models/tag.rb (modified) (1 diff)
- trunk/app/views/admin/content/_form.html.erb (modified) (3 diffs)
- trunk/app/views/admin/sidebar/index.html.erb (modified) (1 diff)
- trunk/db/migrate/068_fix_grands.rb (added)
- trunk/lang/fr_FR.rb (modified) (1 diff)
- trunk/MAINTAINERS (modified) (1 diff)
- trunk/vendor/plugins/fckeditor/lib/fckeditor_file_utils.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/controllers/admin/sidebar_controller.rb
r1615 r1677 3 3 @available = available 4 4 # 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') 8 7 flash[:sidebars] = @active.map {|sb| sb.id } 9 8 end … … 25 24 flash[:sidebars] = params[:active].inject([]) do |array, name| 26 25 if klass_for.has_key?(name) 27 @new_item = klass_for[name].create! (:blog => this_blog)26 @new_item = klass_for[name].create! 28 27 @target = name 29 28 array << @new_item.id … … 48 47 params[:configure] ||= { } 49 48 # 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") 52 50 flash[:sidebars].each do |id| 53 51 sidebar = Sidebar.find(id) … … 63 61 position += 1 64 62 end 65 Sidebar.delete_all(['blog_id = ? and active_position is null', 66 this_blog.id]) 63 Sidebar.delete_all('active_position is null') 67 64 end 68 65 index trunk/app/models/profile.rb
r1472 r1677 1 1 class Profile < ActiveRecord::Base 2 2 validates_uniqueness_of :label 3 has_and_belongs_to_many :rights 3 4 end trunk/app/models/tag.rb
r1621 r1677 26 26 self.display_name = self.name 27 27 end 28 self.name = self.name.tr('.', '-') 28 29 self.name = self.name.tr(' ', '').downcase 29 30 end trunk/app/views/admin/content/_form.html.erb
r1664 r1677 30 30 </select> 31 31 </li> 32 <li class="paginate l" id="tags">32 <li class="paginate l"> 33 33 <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) } %> 35 35 </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> 37 39 </li> 38 40 <li class="paginate l"> … … 70 72 <legend><%= _("Options")%></legend> 71 73 <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 76 82 <li class="checkbox"> 77 83 <label for="article_allow_comments" class="float"><%= _("Allow comments") %>: </label> … … 82 88 <%= check_box 'article', 'allow_pings' %> 83 89 </li> 84 <li>85 <label for="article_text_filter" class="float"><%= _("Textfilter")%>: </label>86 90 <%= hidden_field_tag 'text_filter', this_blog.text_filter %> 87 </li>88 91 </ul> 89 92 </fieldset> trunk/app/views/admin/sidebar/index.html.erb
r1614 r1677 4 4 <%= subtab(_("Text Filters"), "", {:controller=>"textfilters", :action=>"list"}) %> 5 5 <% 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> 7 7 8 8 <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 187 187 l.store "Textfilter", "Formatage du texte" 188 188 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" 189 190 190 191 #admin/content/_pages.rhtml trunk/MAINTAINERS
r1381 r1677 10 10 Peons 11 11 12 Scott Laird <scott@sigkill.org>13 blog: http://scottstuff.net/14 irc: slaird15 16 12 Piers Cawley <pdcawley@bofh.org.uk> 17 13 blog: http://www.bofh.org.uk/ 18 14 irc: pdcawley 19 15 20 Kevin Ballard <kevin@sb.org>21 blog: http://kevin.sb.org22 irc: Eridius23 24 16 Frédéric de Villamil <frederic@de-villamil.com> 25 17 blog: http://fredericdevillamil.com trunk/vendor/plugins/fckeditor/lib/fckeditor_file_utils.rb
r1636 r1677 46 46 47 47 def FckeditorFileUtils.create_uploads_directory 48 uploads = File.join(RAILS_ROOT, '/public/ uploads')48 uploads = File.join(RAILS_ROOT, '/public/files') 49 49 FileUtils.mkdir(uploads) unless File.exist?(uploads) 50 50 end
