From 1e465e231ea4edee3cad9bd38c1cae3b2393710f Mon Sep 17 00:00:00 2001 From: did Date: Mon, 4 Jul 2011 19:40:14 +0200 Subject: [PATCH] remove whilelist for theme assets (no useful since we have got roles now) + a little bit of refactoring --- .../admin/theme_assets_controller.rb | 5 +--- app/models/theme_asset.rb | 6 ++--- app/views/admin/theme_assets/_asset.html.haml | 2 +- app/views/admin/theme_assets/_form.html.haml | 4 +-- app/views/admin/theme_assets/index.html.haml | 1 - config/locales/admin_ui.de.yml | 1 - config/locales/admin_ui.en.yml | 1 - config/locales/admin_ui.fr.yml | 1 - config/locales/admin_ui.it.yml | 1 - config/locales/admin_ui.pt-BR.yml | 1 - config/locales/formtastic.fr.yml | 1 - doc/TODO | 8 +++--- .../admin/authorization/theme_assets.feature | 11 +++----- lib/locomotive/import/assets.rb | 24 +++--------------- lib/locomotive/liquid/drops/base.rb | 14 ++-------- lib/locomotive/liquid/drops/content.rb | 1 + lib/locomotive/liquid/drops/page.rb | 3 ++- lib/locomotive/liquid/drops/site.rb | 4 +-- public/javascripts/admin/application.js | 1 + spec/fixtures/themes/default.zip | Bin 397631 -> 401210 bytes spec/lib/locomotive/import_spec.rb | 8 ------ 21 files changed, 24 insertions(+), 74 deletions(-) diff --git a/app/controllers/admin/theme_assets_controller.rb b/app/controllers/admin/theme_assets_controller.rb index 55f2fe7f..45313c1d 100644 --- a/app/controllers/admin/theme_assets_controller.rb +++ b/app/controllers/admin/theme_assets_controller.rb @@ -13,7 +13,7 @@ module Admin before_filter :sanitize_params, :only => [:create, :update] def index - @assets = ThemeAsset.all_grouped_by_folder(current_site, params[:all]) + @assets = ThemeAsset.all_grouped_by_folder(current_site) @js_and_css_assets = (@assets[:javascripts] || []) + (@assets[:stylesheets] || []) if request.xhr? @@ -48,9 +48,6 @@ module Admin def sanitize_params params[:theme_asset] = { :source => params[:file] } if params[:file] - - # performing_plain_text = params[:theme_asset][:performing_plain_text] - # params[:theme_asset].delete(:content_type) if performing_plain_text.blank? || performing_plain_text == 'false' end end diff --git a/app/models/theme_asset.rb b/app/models/theme_asset.rb index 9548ca16..d64135b5 100644 --- a/app/models/theme_asset.rb +++ b/app/models/theme_asset.rb @@ -12,7 +12,6 @@ class ThemeAsset field :height, :type => Integer field :size, :type => Integer field :folder, :default => nil - field :hidden, :type => Boolean, :default => false mount_uploader :source, ThemeAssetUploader ## associations ## @@ -35,7 +34,6 @@ class ThemeAsset validate :content_type_can_not_changed ## named scopes ## - scope :visible, lambda { |all| all ? {} : { :where => { :hidden => false } } } ## accessors ## attr_accessor :plain_text_name, :plain_text, :plain_text_type, :performing_plain_text @@ -101,8 +99,8 @@ class ThemeAsset { :url => self.source.url }.merge(self.attributes).stringify_keys end - def self.all_grouped_by_folder(site, include_all = true) - assets = site.theme_assets.visible(include_all).order_by([[:slug, :asc]]) + def self.all_grouped_by_folder(site) + assets = site.theme_assets.order_by([[:slug, :asc]]) assets.group_by { |a| a.folder.split('/').first.to_sym } end diff --git a/app/views/admin/theme_assets/_asset.html.haml b/app/views/admin/theme_assets/_asset.html.haml index b6bee5ac..99f0e080 100644 --- a/app/views/admin/theme_assets/_asset.html.haml +++ b/app/views/admin/theme_assets/_asset.html.haml @@ -1,6 +1,6 @@ - edit = local_assigns.key?(:edit) ? edit : true -%li{ :class => "#{asset.new_record? ? 'new-asset' : 'asset'} #{'hidden' if asset.hidden?}" } +%li{ :class => (asset.new_record? ? 'new-asset' : 'asset') } %em %strong= link_to asset.local_path(!edit), edit ? edit_admin_theme_asset_path(asset) : asset.source.url, :'data-local-path' => asset.local_path .more diff --git a/app/views/admin/theme_assets/_form.html.haml b/app/views/admin/theme_assets/_form.html.haml index 53083cde..fcd9bb1e 100644 --- a/app/views/admin/theme_assets/_form.html.haml +++ b/app/views/admin/theme_assets/_form.html.haml @@ -32,6 +32,4 @@ != t('admin.theme_assets.form.choose_file') = f.foldable_inputs :name => :options do - = f.input :folder - = f.custom_input :hidden, :css => 'toggle' do - = f.check_box :hidden + = f.input :folder \ No newline at end of file diff --git a/app/views/admin/theme_assets/index.html.haml b/app/views/admin/theme_assets/index.html.haml index 4f979655..ff8deed0 100644 --- a/app/views/admin/theme_assets/index.html.haml +++ b/app/views/admin/theme_assets/index.html.haml @@ -4,7 +4,6 @@ = render 'admin/shared/menu/settings' - content_for :buttons do - = admin_button_tag t('admin.theme_assets.index.all'), all_admin_theme_assets_url, :class => 'show' if can?(:manage, ThemeAsset) = admin_button_tag t('admin.snippets.index.new'), new_admin_snippet_url, :class => 'new' if can?(:manage, Snippet) = admin_button_tag :new, new_admin_theme_asset_url, :class => 'new' if can?(:manage, ThemeAsset) diff --git a/config/locales/admin_ui.de.yml b/config/locales/admin_ui.de.yml index 51254f1d..cea5d3d9 100644 --- a/config/locales/admin_ui.de.yml +++ b/config/locales/admin_ui.de.yml @@ -168,7 +168,6 @@ de: index: title: Template-Dateien help: "In diesem Bereich kannst du alle Dateien organisieren, die für dein Layout verwendet werden. Wenn du eine Bilder-Galerie organisieren möchtest, dann gehe dazu in den Galerien-Abschnitt." - all: alle Dateien new: neue Datei snippets: Snippets css_and_js: Style und Javascript diff --git a/config/locales/admin_ui.en.yml b/config/locales/admin_ui.en.yml index f7803c98..dfea6d19 100644 --- a/config/locales/admin_ui.en.yml +++ b/config/locales/admin_ui.en.yml @@ -172,7 +172,6 @@ en: index: title: Listing theme files help: "The theme files section is the place where you manage the files needed by your layout, snippets...etc. If you need to manage an image gallery, create a new content type instead.
Warning: you may not see all the assets depending on your rights." - all: all assets new: new file snippets: Snippets css_and_js: Style and javascript diff --git a/config/locales/admin_ui.fr.yml b/config/locales/admin_ui.fr.yml index 6bf26378..9e654f1b 100644 --- a/config/locales/admin_ui.fr.yml +++ b/config/locales/admin_ui.fr.yml @@ -169,7 +169,6 @@ fr: index: title: Liste des fichiers du thème help: "Les fichiers du thème sont utilisés pour construire le gabarit de vos pages. Si vous avez besoin d'une galerie d'images, créer un modèle sera plus adéquate.
Attention : Suivant les droits que vous avez, il se peut que vous ne puissiez pas voir tous les fichiers." - all: tous les fichiers new: nouveau fichier snippets: Snippets css_and_js: Style et javascript diff --git a/config/locales/admin_ui.it.yml b/config/locales/admin_ui.it.yml index 86eb2d51..eedb8252 100644 --- a/config/locales/admin_ui.it.yml +++ b/config/locales/admin_ui.it.yml @@ -166,7 +166,6 @@ it: index: title: Lista file del tema help: "La sezione di file del tema è il luogo in cui si amministrano i file necessari al layout, ...ecc. Se devi invece amministrare una galleria immagini, vai nella sezione Risorse." - all: tutte le risorse new: nuovo file snippets: Frammenti css_and_js: Style e javascript diff --git a/config/locales/admin_ui.pt-BR.yml b/config/locales/admin_ui.pt-BR.yml index 4f888baa..c49bee7e 100644 --- a/config/locales/admin_ui.pt-BR.yml +++ b/config/locales/admin_ui.pt-BR.yml @@ -163,7 +163,6 @@ pt-BR: index: title: Listando arquivos do tema help: "Nesta seção todos os arquivos relacionados a layout são armazenados e gerenciados. Se você precisa de uma galeria de imagens, vá a seção de Arquivos." - all: todos arquivos new: novo arquivo snippets: Blocos css_and_js: CSS e Javascript diff --git a/config/locales/formtastic.fr.yml b/config/locales/formtastic.fr.yml index 5903331f..8dc58e95 100644 --- a/config/locales/formtastic.fr.yml +++ b/config/locales/formtastic.fr.yml @@ -27,7 +27,6 @@ fr: plain_text_name: Nom du fichier content_type: Type du fichier folder: Dossier - hidden: Caché new: source: Fichier edit: diff --git a/doc/TODO b/doc/TODO index 215d7c0a..57dca5ef 100644 --- a/doc/TODO +++ b/doc/TODO @@ -63,14 +63,14 @@ x bug: duplicate fields (new entry) when errors in the content type form x tinyMCE => fullscreen x export site x rake task to import a remote template - -=> MERGE +x MERGE +x remove withelist for assets since we've got now roles +- test and/or convert existing templates (the 2 of the themes section) - overide sort for contents - icon for redirection page in the pages section (back-office) -- test and/or convert existing templates (the 2 of the themes section) - [bushido] guiders / welcome page / devise cas authentication (SSO) -- remove withelist for assets since we've now roles + BACKLOG: diff --git a/features/admin/authorization/theme_assets.feature b/features/admin/authorization/theme_assets.feature index b77c25b7..1adccf01 100644 --- a/features/admin/authorization/theme_assets.feature +++ b/features/admin/authorization/theme_assets.feature @@ -11,12 +11,11 @@ Background: Given I am not authenticated When I go to theme assets Then I should see "Log in" - + Scenario: Accessing theme assets as an Admin Given I am an authenticated "admin" When I go to theme assets - Then I should see "all assets" - And I should see "new snippet" + Then I should see "new snippet" And I should see "new file" And I should see "Snippets" And I should see "Style and javascript" @@ -25,8 +24,7 @@ Background: Scenario: Accessing theme assets as a Designer Given I am an authenticated "designer" When I go to theme assets - Then I should see "all assets" - And I should see "new snippet" + Then I should see "new snippet" And I should see "new file" And I should see "Snippets" And I should see "Style and javascript" @@ -35,8 +33,7 @@ Background: Scenario: Accessing theme assets as an Author Given I am an authenticated "author" When I go to theme assets - Then I should not see "all assets" - And I should not see "new snippet" + Then I should not see "new snippet" And I should not see "new file" And I should not see "Snippets" And I should not see "Style and javascript" diff --git a/lib/locomotive/import/assets.rb b/lib/locomotive/import/assets.rb index 98eb4485..73957044 100644 --- a/lib/locomotive/import/assets.rb +++ b/lib/locomotive/import/assets.rb @@ -3,32 +3,26 @@ module Locomotive class Assets < Base def process - whitelist = self.build_regexps_in_withlist(database['site']['assets']['whitelist']) rescue nil - - self.log "white list = #{whitelist.inspect}" - - self.add_theme_assets(whitelist) + self.add_theme_assets self.add_other_assets end protected - def add_theme_assets(whitelist) + def add_theme_assets %w(images media fonts javascripts stylesheets).each do |kind| Dir[File.join(theme_path, 'public', kind, '**/*')].each do |asset_path| next if File.directory?(asset_path) - visible = self.check_against_whitelist(whitelist, asset_path.gsub(File.join(theme_path, 'public'), '').gsub(/^\//, '')) - folder = asset_path.gsub(File.join(theme_path, 'public'), '').gsub(File.basename(asset_path), '').gsub(/^\//, '').gsub(/\/$/, '') asset = site.theme_assets.where(:local_path => File.join(folder, File.basename(asset_path))).first asset ||= site.theme_assets.build(:folder => folder) - asset.attributes = { :source => File.open(asset_path), :performing_plain_text => false, :hidden => !visible } + asset.attributes = { :source => File.open(asset_path), :performing_plain_text => false } begin asset.save! @@ -63,18 +57,6 @@ module Locomotive end end end - - def check_against_whitelist(whitelist, path) - (whitelist || []).each do |rule| - case rule - when Regexp - return true if path =~ rule - when String - return true if path == rule - end - end - false - end end end end \ No newline at end of file diff --git a/lib/locomotive/liquid/drops/base.rb b/lib/locomotive/liquid/drops/base.rb index 8ba0d8a9..f5717f5f 100644 --- a/lib/locomotive/liquid/drops/base.rb +++ b/lib/locomotive/liquid/drops/base.rb @@ -1,4 +1,4 @@ -# Code taken from Mephisto sources (http://mephistoblog.com/) +# Liquify taken from Mephisto sources (http://mephistoblog.com/) module Locomotive module Liquid module Drops @@ -6,26 +6,16 @@ module Locomotive @@forbidden_attributes = %w{_id _version _index} - class_inheritable_reader :liquid_attributes - write_inheritable_attribute :liquid_attributes, [] attr_reader :_source - delegate :hash, :to => :_source def initialize(source) - unless source.nil? - @_source = source - @liquid = liquid_attributes.flatten.inject({}) { |h, k| h.update k.to_s => @_source.send(k) } - end + @_source = source end def id (@_source.respond_to?(:id) ? @_source.id : nil) || 'new' end - def before_method(method) - @liquid[method.to_s] - end - # converts an array of records to an array of liquid drops def self.liquify(*records, &block) i = -1 diff --git a/lib/locomotive/liquid/drops/content.rb b/lib/locomotive/liquid/drops/content.rb index 1475f47b..1aefc759 100644 --- a/lib/locomotive/liquid/drops/content.rb +++ b/lib/locomotive/liquid/drops/content.rb @@ -2,6 +2,7 @@ module Locomotive module Liquid module Drops class Content < Base + delegate :seo_title, :meta_keywords, :meta_description, :to => '_source' def _id diff --git a/lib/locomotive/liquid/drops/page.rb b/lib/locomotive/liquid/drops/page.rb index 18aa0def..8de62944 100644 --- a/lib/locomotive/liquid/drops/page.rb +++ b/lib/locomotive/liquid/drops/page.rb @@ -2,7 +2,8 @@ module Locomotive module Liquid module Drops class Page < Base - delegate :seo_title, :meta_keywords, :meta_description, :to => "_source" + + delegate :seo_title, :meta_keywords, :meta_description, :to => '_source' def title self._source.templatized? ? @context['content_instance'].highlighted_field_value : self._source.title diff --git a/lib/locomotive/liquid/drops/site.rb b/lib/locomotive/liquid/drops/site.rb index 1ff8f8d2..1a52a2e0 100644 --- a/lib/locomotive/liquid/drops/site.rb +++ b/lib/locomotive/liquid/drops/site.rb @@ -3,14 +3,14 @@ module Locomotive module Drops class Site < Base - liquid_attributes << :name << :seo_title << :meta_keywords << :meta_description + delegate :name, :seo_title, :meta_keywords, :meta_description, :to => '_source' def index @index ||= self._source.pages.root.first end def pages - @pages ||= self._source.pages.to_a.collect(&:to_liquid) + @pages ||= liquify(*self._source.pages) end end diff --git a/public/javascripts/admin/application.js b/public/javascripts/admin/application.js index 141db672..86e33e6b 100644 --- a/public/javascripts/admin/application.js +++ b/public/javascripts/admin/application.js @@ -130,4 +130,5 @@ $(document).ready(function() { $('.formtastic fieldset.inputs').bind('refresh', function(e) { $(this).find('ol li:not(.item)').removeClass('last').filter(':visible').last().addClass('last'); }) .trigger('refresh'); + $('.formtastic fieldset.inputs ol li:not(.item)').last().addClass('last'); }); diff --git a/spec/fixtures/themes/default.zip b/spec/fixtures/themes/default.zip index 9d3cc5c9da21e57c0f52d96974984b7d45e7cb43..22fa15647e1d35383e454cd137a7be4d841535ae 100644 GIT binary patch delta 8779 zcmb7}3tWup8o>NFl_cz* zXpLGal0rx-xv#YAcCg1#dm9Q%24%G|##xVVRJ$?7@%OOQRyOcqhh8UNn&z@j>U(NT%%Gbii)wS(gy~7M2*H2&5 zS9s*IVa3Y&+EFzgDv7mifBxn)oiJxgVzF>qgA2n)#3E9l_O;N;)_d&9_Pz zSv-T3R=-z8ZHaT%fd6or>iDcDD))4{*Cg=!`M&F3U$pCO?jIZqno&HoQFms+QU1f& zf=8?#R_48d)i?KL)){)%(ye-bc%s`sBY;-7}J$Y=p%EpBsh3E)Xl?UaFp=k#8EPniSy9c%H*9QltwHj z(jX=wGCHzn{=CIKI*T_4t|RYcs!h-}B?-y88$PnN=3dMrxucfS=v{?7&e{OW7lKD_ z`Cf}#nDo*TCkjuJUr}7{aE`Ig49v$Gj~5*&7L`k`Z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1vrv(;$aq(x~y})>Z%q=MPE?EvDE?lWZQLV}tnFrMQXX848x`X@j51f5AR zV|)VIXV~NfEIR6C#^FL`0Cdx^L9ownDfo$ka&L{t@zz>Nmx$8ABQ)A{Jc2jcC}IWT zLffr^K#B7E1KgId$#a|miYD{mDh%F(E142eoPx1cVepO|Wo85WCW|BU=PDrHpQ9ih zthdaqt1x)8jxu(dfPvOsg@GDnA>c-XOsP z(g*j3EEe?mDjeR=qg?73PTNc2?(y3LZ|+h2xdL}o35j?5D6cJ*K0h7`$?tv~YUP8!{2>h4647D6!mHhKrqT-FU?02@ zKv}{DIXi8_2|`z(WcvL4n@1<8@Cf*Lc#oiDOGJDXR^b@jxH0%q@P+{$Z zn-6auQ0A36L2f02@p14*0%e?*5|lTNVy0tk#pp0HPhkK(1xo4`fN0QRsAP!u7btVT z1~AZVOt==<&&9R+(G15rkI~$|@IN2uJd{EE{NAAhD1At<>jZlpd*V-R04c-!TV{J-MJ3*P`SfV_R%&Vw?c$b2LTF2D^2t11lgLf<_WB) 'stylesheets/style.css').first - asset.hidden.should == false - - asset = @site.theme_assets.where(:local_path => 'stylesheets/ie7.css').first - asset.hidden.should == true - end - it 'inserts all the pages' do @site.pages.count.should == 11 end