Sha256: c99122b193e1f071d45eff940fe3b508fbf25a710d2807bf80b1e01fdd9c0edd

Contents?: true

Size: 1.63 KB

Versions: 5

Compression:

Stored size: 1.63 KB

Contents

<h1>Listing Pages</h1>

<table class='table table-striped'>
	<thead>
  <tr>
	    <th><%= t 'activerecord.attributes.pages.title' %></th>
	    <th><%= t 'activerecord.attributes.pages.description' %></th>
			<th><%= t 'pages.author'.capitalize %></th>
			<th><%= t 'activerecord.attributes.pages.for_blog' %>?</th>
			<th><%= t 'pages.published'.capitalize %></th>
	    <th>Actions</th>
	  </tr>
	</thead>
	
	<tbody>
		<% @pages.each do |page| %>
		  <tr>
		    <td><%= link_to page.title, page %></td>
		    <td><%= truncate page.description, length: 55, separator: ' ...' %></td>
				<td><%= page.author.name %></td>
				<td>
					<%= page.for_blog? ? "<span class=\"label label-success\">✓</span>".html_safe : "<span class=\"label label-important\">X</span>".html_safe %>
					<%= link_to 'toggle', toggle_for_blog_page_path(page), class: 'btn btn-mini', method: :post %>
				</td>
				<td>
					<% if page.published_at %>
						<span class="label label-success">✓</span> <%= link_to 'unpublish', unpublish_page_path(page), class: 'btn btn-mini', method: :post %>
					<% else %>
					  <span class="label label-important">X</span> <%= link_to 'publish', publish_page_path(page), class: 'btn btn-mini btn-primary', method: :post %>
					<% end -%>
				</td>
		    <td><%= link_to t('edit'), edit_page_path(page), class: 'btn btn-mini' %>
					<%= link_to t('delete'), page, method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-mini btn-danger' %></td>
		  </tr>
		<% end %>
	</tbody>
</table>

<%= will_paginate @pages %>

<%= link_to t('pages.create_new').capitalize, new_page_path, class: 'btn btn-primary' %>

<%= render 'shared/admin_sidebar' %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tkh_content-0.1.8 app/views/pages/index.html.erb
tkh_content-0.1.7 app/views/pages/index.html.erb
tkh_content-0.1.6 app/views/pages/index.html.erb
tkh_content-0.1.5 app/views/pages/index.html.erb
tkh_content-0.1.4 app/views/pages/index.html.erb