Sha256: 9b0ca216af05c157c4afb6d3773040302975d70aaa383785b47d4efd39c0db27

Contents?: true

Size: 1.26 KB

Versions: 3

Compression:

Stored size: 1.26 KB

Contents

<%= form_for(@post, html: {class: "new_blog_post", id: "new_blog_post"}) do |f| %>

  <% if @post.errors.any? %>
    <div id="error_explanation">
      <h2><%=t :prohibited_this_post_from_being_saved, scope: 'blogit.posts', count: @post.errors.count%></h2>

      <ul>
        <% @post.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <fieldset>
    <%= field do %>
      <%= f.text_field :title, placeholder: t(:give_your_post_a_title, scope: 'blogit.posts') %>
    <% end %>

    <%= field do %>
      <%= f.text_area :body, placeholder: t(:write_something_here, scope: 'blogit.posts') %>
    <% end %>
  </fieldset>

  <fieldset>

    <%= field id: "new_blog_post_tag_field" do %>
      <%= f.label :tag_list, t(:tags, scope: 'blogit.posts') %>
      <%= f.text_field :tag_list, placeholder: t(:tag_placeholder, scope: 'blogit.posts') %>
    <% end %>

    <p class="blog_post_tip">
      <%=t :tip_you_can_style_your_post_using, scope: 'blogit.posts', parser: blogit_conf.default_parser %>
    </p>

  </fieldset>

  <%= actions do %>
    <%= f.submit %> <%=t :or, scope: 'blogit.posts'%>
    <%= link_to(t(:cancel, scope: 'blogit.posts'), @post.new_record? ? root_path : post_path(@post)) %>
  <% end %>

<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blogit-0.6.0 app/views/blogit/posts/_form.html.erb
blogit-0.5.1 app/views/blogit/posts/_form.html.erb
blogit-0.5.0 app/views/blogit/posts/_form.html.erb