- unless @article_localization.blank? = version_alerts(@article_localization.versions , @article_localization.version, can?(:publish , Gluttonberg::Blog::Article) ) = version_listing(@article_localization.versions , @article_localization.version) = form_for(@article_localization, :url => url , :html => {:class => "validation auto_save"}) do |f| = gb_error_messages_for(@article_localization) .span5 .tabbable .versions.page_content_form - unless action_name == "new" || action_name == "create" - if Gluttonberg.localized? && Gluttonberg::Locale.all.length > 1 .btn-group %a{ :class => "btn dropdown-toggle" , "data-toggle" => "dropdown", :href => "#"} Editing #{@article_localization.locale.name} Content %span.caret %ul.dropdown-menu - for locale in Gluttonberg::Locale.all - localization = Gluttonberg::Blog::ArticleLocalization.where({ :article_id => @article.id , :locale_id => locale.id }).first %li %a{:href => edit_admin_blog_article_path(@blog, @article , :localization_id => localization.id) ,:id=>"edit_content_tab",:class=>"button"} = "Edit #{localization.locale.name}" %ul.nav.nav-tabs %li.active %a{:href => "#content", "data-toggle" => "tab" } Content %li %a{:href => "#seo", "data-toggle" => "tab" } SEO .tab-content .tab-pane.active#content .pad %p = f.fields_for :article , @article do |article_form| %p = article_form.hidden_field(:user_id, :value => current_user.id) if @article.user_id.blank? = article_form.hidden_field(:blog_id, :value => @blog.id) if @article.blog_id.blank? %p = f.label :title = f.text_field(:title, :id => "page_title" , :class => "required") %p #page_slug_holder #{current_domain}#{@article.slug} - unless @article.new_record? = link_to("Preview", "Javascript:;", :class => "btn btn-mini preview-page", :target => "_blank", "data-url" => "#{blog_article_path(@article_localization.locale.slug ,@blog.slug, @article.slug)}?preview=true") .clear = f.fields_for :article , @article do |article_form| %p = article_form.label :author = article_form.select("author_id" , @authors.collect{|a| [a.email , a.id] } , :class => "required" ) %p = f.label :featured_image_id = f.asset_browser( :featured_image_id , opts = { :filter => "image" } ) %p = f.label :excerpt = f.text_area(:excerpt , :class => "jwysiwyg" ) %p = f.label :body, "Content" = f.text_area(:body , :class => "jwysiwyg" ) .tab-pane#seo .pad = f.fields_for :article , @article do |article_form| .seo_body %p = article_form.label :slug = article_form.text_field(:slug, :id => 'page_slug' , :donotmodify => (action_name == "edit" || action_name == "update")) %p = f.label :seo_title = f.text_field :seo_title , :class => "span4 " %p = f.label :seo_keywords , "Keywords" = f.text_area :seo_keywords , :class => "span4 " , :rows => 3 %p = f.label :seo_description , "Description" = f.text_area :seo_description , :class => "span4 " , :rows => 3 %p = f.label :fb_icon_id , "Facebook Icon" = f.asset_browser :fb_icon_id , :class => "" , :filter => "image" .span4 = f.fields_for :article , @article do |article_form| %legend Categories & Tags %p = article_form.label :article_category_list , "Categories" = article_form.text_field(:article_category_list, :class => "tags" , :rel => tags_string("article_category") ) %p = article_form.label :tag_list , "Tags" = article_form.text_field(:tag_list, :class => "tags" , :rel => tags_string("tag") ) %p %em seperate categories & tags with a comma %legend Comments %p = article_form.label :disable_comments = article_form.check_box(:disable_comments) = submit_and_publish_controls(article_form, @article, can?(:publish , Gluttonberg::Blog::Article)) = enable_redactor("jwysiwyg")