Sha256: 56c46f56a798112e3c6375241758e289135e7f221010678b375ba2af1c646567

Contents?: true

Size: 1.44 KB

Versions: 10

Compression:

Stored size: 1.44 KB

Contents

%h1 Articles

= link_to 'New Article', new_admin_article_path, class: 'btn btn-default'

<hr>

= form_tag '#', method: :get, class: 'inline-form' do
  = text_field_tag :search, params[:search], class: 'form-control inline-form', placeholder: 'search'
  = select_tag(:status, options_for_select(%w"Archived Published Drafts", params[:status]), include_blank: 'Status', class: 'form-control inline-form')
  <button class="btn btn-default btn-sm inline-form" type="submit">Search</button>

<hr>

%table.table
  %thead
    %tr
      %th
        Article
      %th
        Tags
      %th
        Created At
      %th
        Actions
  - @articles.each do |article|
    %tr
      %th
        = article.title
      %th
        - article.tags.each do |tag|
          = link_to tag, articles_path(search: tag)
      %th
        = article.created_at.strftime("%B %d")
      %th
        = article.draft ? link_to( 'Publish',admin_article_path(article, article: { draft: false }), method: :put, class: 'btn btn-xs btn-default') : link_to( 'Make Draft',admin_article_path(article, article: { draft: true }), method: :put, class: 'btn btn-xs btn-default')
        = link_to 'Archive', admin_article_path(article, article: { archived: false } ), method: :put, class: 'btn btn-xs btn-default'
        = link_to 'Delete', admin_article_path(article), method: :delete, class: 'btn btn-xs btn-default'
        = link_to 'Edit', edit_admin_article_path(article), class: 'btn btn-xs btn-default'

Version data entries

10 entries across 9 versions & 1 rubygems

Version Path
pages_cms-0.2.3 app/views/pages_cms/admin/articles/index.html.haml
pages_cms-0.2.2 app/views/pages_cms/admin/articles/index.html.haml
pages_cms-0.2.1 app/views/pages_cms/admin/articles/index.html.haml
pages_cms-0.2.0 app/views/pages_cms/admin/articles/index.html.haml
pages_cms-0.1.1 test/dummy/app/views/pages_cms/admin/articles/index.html.haml
pages_cms-0.1.1 app/views/pages_cms/admin/articles/index.html.haml
pages_cms-0.1.0 app/views/pages_cms/admin/articles/index.html.haml
pages_cms-0.0.3 app/views/pages_cms/admin/articles/index.html.haml
pages_cms-0.0.2 app/views/pages_cms/admin/articles/index.html.haml
pages_cms-0.0.1 app/views/pages_cms/admin/articles/index.html.haml