Sha256: a138dfc8afacc358e711f78a11f5c1f606198a8c15860f04d65cda9a2c4b3649

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

.container-fluid.hidden#post_dashboard
  .row
    .text-center
      %h1 New Post
  .row
    %hr
    .col-md-12
      = form_for @project, html:{class: "form-horizontal"} do |f|
        = f.fields_for :posts, @project.posts.build do |p|
          = form_group_for p, :title do
            .col-sm-8
              = p.text_field :title, class: "form-control"
          = form_group_for p, :content do
            .col-sm-8
              = p.text_area :content, class: "summernote"
          .form-group
            .col-sm-8.col-sm-offset-2
              = p.check_box :private
              = p.label :private
        .form-group
          .col-sm-offset-2.col-sm-10
            = hidden_field_tag 'anchor', 'post'
            = f.submit "Save Post" , class: 'btn btn-success'
  .row
    %hr
    .text-center
      %h2 Old Posts
    .col-md-12
      - @project.posts.order('created_at DESC').each do |post|
        - if post.persisted?
          .col-sm-8.col-md-offset-2.well
            .col-md-6
              %p= link_to post.title, project_post_path(@project, post)
              %p= "Created at #{post.created_at.strftime("%m/%d/%Y - %l:%M%p")}"
            .col-md-6
              .pull-right
                = link_to "", project_post_path(@project, post), class: 'btn btn-default fa fa-lg fa-trash ', method: :delete, data:{confirm:'Are you sure?'}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hatchy-0.0.8.pre app/views/hatchy/projects/edit/_post.html.haml