Sha256: 0b5c88f18a1987a2d57a51ef0196730ad1fff6154d2c97717e4d1ee61cfa5f81

Contents?: true

Size: 1.67 KB

Versions: 17

Compression:

Stored size: 1.67 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="label label-success"><span class="glyphicon glyphicon-ok"></span></span>
					<% else %>
						<span class="label label-info"><span class="glyphicon glyphicon-remove"></span></span>
					<% end %>
				</td>
				<td>
					<% if page.published_at %>
						<span class="label label-success"><span class="glyphicon glyphicon-ok"></span></span><%= link_to t('pages.unpublish'), unpublish_page_path(page), class: 'btn btn-xs btn-default', method: :post %>
					<% else %>
					  <span class="label label-info"><span class="glyphicon glyphicon-remove"></span></span><%= link_to t('pages.publish'), publish_page_path(page), class: 'btn btn-xs btn-default', method: :post %>
					<% end -%>
				</td>
		    <td>
		    	<%= link_to t('edit'), edit_page_path(page), class: 'btn btn-xs btn-default' %><%= link_to t('delete'), page, method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-xs btn-danger' %>
		    </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

17 entries across 17 versions & 1 rubygems

Version Path
tkh_content-0.9.18 app/views/pages/index.html.erb
tkh_content-0.9.17 app/views/pages/index.html.erb
tkh_content-0.9.16 app/views/pages/index.html.erb
tkh_content-0.9.15 app/views/pages/index.html.erb
tkh_content-0.9.14 app/views/pages/index.html.erb
tkh_content-0.9.13 app/views/pages/index.html.erb
tkh_content-0.9.12 app/views/pages/index.html.erb
tkh_content-0.9.11 app/views/pages/index.html.erb
tkh_content-0.9.10 app/views/pages/index.html.erb
tkh_content-0.9.9 app/views/pages/index.html.erb
tkh_content-0.9.8 app/views/pages/index.html.erb
tkh_content-0.9.7 app/views/pages/index.html.erb
tkh_content-0.9.6 app/views/pages/index.html.erb
tkh_content-0.9.5 app/views/pages/index.html.erb
tkh_content-0.9.4 app/views/pages/index.html.erb
tkh_content-0.9.3 app/views/pages/index.html.erb
tkh_content-0.9.2 app/views/pages/index.html.erb