Skip to content

Instantly share code, notes, and snippets.

@slywalker
Created March 6, 2010 02:46
Show Gist options
  • Save slywalker/323458 to your computer and use it in GitHub Desktop.
Save slywalker/323458 to your computer and use it in GitHub Desktop.
<div class="posts view">
<h2><?php __('Post');?></h2>
<dl><?php $i = 0; $class = ' class="altrow"';?>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $post['Post']['id']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Title'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $post['Post']['title']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Body'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $post['Post']['body']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $post['Post']['created']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $post['Post']['modified']; ?>
&nbsp;
</dd>
</dl>
</div>
<div class="actions">
<ul>
<li><?php echo $html->link(__('Edit Post', true), array('action' => 'edit', $post['Post']['id'])); ?> </li>
<li><?php echo $html->link(__('Delete Post', true), array('action' => 'delete', $post['Post']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $post['Post']['id'])); ?> </li>
<li><?php echo $html->link(__('List Posts', true), array('action' => 'index')); ?> </li>
<li><?php echo $html->link(__('New Post', true), array('action' => 'add')); ?> </li>
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment