diff --git a/app/models/environment.rb b/app/models/environment.rb index e0d5e8a..d4becb6 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -44,6 +44,7 @@ class Environment < ActiveRecord::Base 'enterprise_activation' => _('Enable activation of enterprises'), 'warn_obsolete_browser' => _('Enable warning of obsolete browser'), 'wysiwyg_editor_for_environment_home' => _('Use WYSIWYG editor to edit environment home page'), + 'media_panel' => _('Media panel in WYSIWYG editor'), } end diff --git a/app/views/cms/edit.rhtml b/app/views/cms/edit.rhtml index b72dc96..1f370a7 100644 --- a/app/views/cms/edit.rhtml +++ b/app/views/cms/edit.rhtml @@ -1,6 +1,7 @@ <%= error_messages_for 'article' %> -<% labelled_form_for 'article', @article, :html => { :multipart => true, :style => 'width:57%;float:left;' } do |f| %> +
'> +<% labelled_form_for 'article', @article, :html => { :multipart => true } do |f| %> <%= hidden_field_tag("type", @type) if @type %> @@ -38,7 +39,8 @@ <% end %> <% end %> <% end %> +
-<% if [TinyMceArticle, Event, EnterpriseHomepage].any?{|klass| @article.kind_of?(klass)} %> +<% if environment.enabled?('media_panel') && [TinyMceArticle, Event, EnterpriseHomepage].any?{|klass| @article.kind_of?(klass)} %> <%= render :partial => 'media_listing' %> <% end %> diff --git a/public/stylesheets/controller_cms.css b/public/stylesheets/controller_cms.css index 036b8ca..6cb4ac5 100644 --- a/public/stylesheets/controller_cms.css +++ b/public/stylesheets/controller_cms.css @@ -161,3 +161,12 @@ div.file-manager-button a:hover { .msie #media-listing-iframe { height: 610px; } + +div.with_media_panel { + width: 57%; + float: left; +} +div.no_media_panel { + margin-left: 200px; + margin-right: 200px; +} -- libgit2 0.21.2