Sha256: 914880e051cf69af1fce80b070ef0007fbe88d6a93efff5769c5e1f79fbf04b8

Contents?: true

Size: 1.66 KB

Versions: 3

Compression:

Stored size: 1.66 KB

Contents

<%= render 'tab_admin_menu' %>

<%= will_paginate @pages, inner_window: 2 %>

<table class='table table-striped'>
	<thead>
  	<tr>
	    <th><%= t 'activerecord.attributes.pages.title' %></th>
			<th><%= t 'pages.author' %></th>
			<th><%= t 'activerecord.attributes.pages.for_the_blog' %>?</th>
			<th><%= t 'pages.published' %></th>
	    <th><%= t('actions') %></th>
	  </tr>
	</thead>

	<tbody>
		<% @pages.each do |page| %>
		  <tr>
		    <td><%= link_to page.title, page %></td>
				<td><%= page.author.name %></td>
				<td>
					<% if page.for_blog? %>
						<span class="glyphicon glyphicon-ok"></span>
					<% else %>
						<span class="glyphicon glyphicon-remove"></span>
					<% end %>
				</td>
				<td>
					<% if page.published_at %>
						<span class="glyphicon glyphicon-ok"></span>&nbsp;<%= link_to t('pages.unpublish'), unpublish_page_path(page), class: 'btn btn-xs btn-default', method: :post %>
					<% else %>
					  <span class="glyphicon glyphicon-remove"></span>&nbsp;<%= link_to t('pages.publish'), publish_page_path(page), class: 'btn btn-xs btn-default', method: :post %>
					<% end -%>
				</td>
		    <td>
		    	<%= link_to "<span class='glyphicon glyphicon-pencil'></span>".html_safe, edit_page_path(page), class: 'btn btn-xs btn-default', title: t('edit') %><%= link_to "<span class='glyphicon glyphicon-trash'></span>".html_safe, page, method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-xs btn-danger', title: t('delete') %>
		    </td>
		  </tr>
		<% end %>
	</tbody>
</table>

<%= will_paginate @pages, inner_window: 2 %>

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

<%= render 'shared/admin_sidebar' %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tkh_content-0.10.10 app/views/pages/index.html.erb
tkh_content-0.10.9 app/views/pages/index.html.erb
tkh_content-0.10.8 app/views/pages/index.html.erb