app/views/spud/admin/posts/_form.html.erb in spud_blog-0.8.12 vs app/views/spud/admin/posts/_form.html.erb in spud_blog-0.8.13

- old
+ new

@@ -5,83 +5,99 @@ <%=f.label :title, :required=>true,:style =>"display:none;", :class=>"control-label"%> <%=f.text_field :title, :class => "full-width",:placeholder=>"Enter title here"%> </div> </fieldset> - <div> - <%= f.text_area :content,:style => "width:100%;", :class => 'tinymce full-width' %> - </div> +<div> + <%= f.text_area :content,:style => "width:100%;", :class => 'tinymce full-width' %> +</div> - <fieldset> - <legend>Categories</legend> - <input type="hidden" name="spud_post[category_ids][]" value="" /> - <ul id="spud_post_categories_form"> - <%= render :partial => '/spud/admin/posts/category', :collection => @categories[0] %> - </ul> - </fieldset> +<fieldset> + <legend>Categories</legend> + <input type="hidden" name="spud_post[category_ids][]" value="" /> + <ul id="spud_post_categories_form"> + <%= render :partial => '/spud/admin/posts/category', :collection => @categories[0] %> + </ul> +</fieldset> - <% if Spud::Blog.config.has_custom_fields %> - <fieldset> - <legend>Custom Fields</legend> - <%= render :partial => '/spud/admin/posts/custom_fields', :locals => {:f => f} %> - </fieldset> - <% end %> +<% if Spud::Blog.config.has_custom_fields %> +<fieldset> + <legend>Custom Fields</legend> + <%= render :partial => '/spud/admin/posts/custom_fields', :locals => {:f => f} %> +</fieldset> +<% end %> - <fieldset> - <legend>Advanced</legend> - - <div class="control-group"> - <%= f.label :published_at, 'Publish Date', :class=>"control-label" %> - <div class="controls"> - <%= f.text_field :published_at,:value => f.object.published_at.strftime("%Y-%m-%d %H:%M") , :class => 'spud_form_date_picker' %> - </div> +<% if Spud::Core.config.multisite_mode_enabled %> +<fieldset id="spud_post_site_options"> + <legend>Sites</legend> + <div class="control-group"> + <div class="controls"> + <span class="help-block"><b>Choose which websites you would like to publish to:</b></span> + <%= spud_post_site_check_box_tag(Spud::Core.default_site_config, @post) %> + <%= spud_post_site_label_tag(Spud::Core.default_site_config) %> + <% Spud::Core.config.multisite_config.each do |site| %> + <%= spud_post_site_check_box_tag(site, @post) %> + <%= spud_post_site_label_tag(site) %> + <% end %> + </div> + </div> +</fieldset> +<% end %> + +<fieldset> + <legend>Advanced</legend> + + <div class="control-group"> + <%= f.label :published_at, 'Publish Date', :class=>"control-label" %> + <div class="controls"> + <%= f.text_field :published_at,:value => f.object.published_at.strftime("%Y-%m-%d %H:%M") , :class => 'spud_form_date_picker' %> </div> - <%if @current_user.super_admin%> - <div class="control-group"> - <%= f.label :spud_user_id, 'Author', :class=>"control-label" %> - <div class="controls"> - <%=f.select :spud_user_id,options_for_select(SpudUser.order(:first_name,:last_name,:login).all.collect{|user| [user.full_name,user.id]},f.object.spud_user_id)%> - </div> - </div> - <%else%> - <%= f.hidden_field :spud_user_id %> - <%end%> + </div> + <%if @current_user.super_admin%> <div class="control-group"> - <%= f.label :visible, :class=>"control-label" %> + <%= f.label :spud_user_id, 'Author', :class=>"control-label" %> <div class="controls"> - <%= f.check_box :visible %> + <%=f.select :spud_user_id,options_for_select(SpudUser.order(:first_name,:last_name,:login).all.collect{|user| [user.full_name,user.id]},f.object.spud_user_id)%> </div> </div> - <div class="control-group"> - <%= f.label :meta_keywords, 'Keywords', :class=>"control-label" %> - <div class="controls"> - <%= f.text_field :meta_keywords ,:style=>"width:600px;" %> - <span class="help-block">A Comma seperated list of keywords for search engines. Keep it short (no more than 10 keywords)</span> - </div> + <%else%> + <%= f.hidden_field :spud_user_id %> + <%end%> + <div class="control-group"> + <%= f.label :visible, :class=>"control-label" %> + <div class="controls"> + <%= f.check_box :visible %> </div> - <div class="control-group"> - <%= f.label :meta_description, 'Description', :class=>"control-label" %> - <div class="controls"> - <%= f.text_area :meta_description, :style =>"width:600px;height:40px;"%> - <span class="help-block">A short description of the article. This is what appears on a search engines search result page.</span> - </div> + </div> + <div class="control-group"> + <%= f.label :meta_keywords, 'Keywords', :class=>"control-label" %> + <div class="controls"> + <%= f.text_field :meta_keywords ,:style=>"width:600px;" %> + <span class="help-block">A Comma seperated list of keywords for search engines. Keep it short (no more than 10 keywords)</span> </div> - <% unless @post.is_news %> - <div class="control-group"> - <%= f.label :comments_enabled,"Comments Enabled", :class=>"control-label" %> - <div class="controls"> - <%= f.check_box :comments_enabled %> - </div> + </div> + <div class="control-group"> + <%= f.label :meta_description, 'Description', :class=>"control-label" %> + <div class="controls"> + <%= f.text_area :meta_description, :style =>"width:600px;height:40px;"%> + <span class="help-block">A short description of the article. This is what appears on a search engines search result page.</span> </div> - <% end %> - </ol> - </fieldset> - <%= f.hidden_field :is_news %> - - <div class="form-actions"> - <%=f.submit "Save Post", :class=>"btn btn-primary form-btn","data-loading-text"=>"Saving..."%> or <%=link_to "cancel",request.referer, :class => "btn"%> - </div> + </div> + <% unless @post.is_news %> + <div class="control-group"> + <%= f.label :comments_enabled,"Comments Enabled", :class=>"control-label" %> + <div class="controls"> + <%= f.check_box :comments_enabled %> + </div> + </div> + <% end %> + </ol> +</fieldset> +<%= f.hidden_field :is_news %> +<div class="form-actions"> + <%=f.submit "Save Post", :class=>"btn btn-primary form-btn","data-loading-text"=>"Saving..."%> or <%=link_to "cancel",request.referer, :class => "btn"%> +</div> <script type="text/javascript"> $(document).ready(Spud.Admin.Posts.edit); </script> \ No newline at end of file