/**
 * Displays a pretty show button.
 *
 * @package    Reditype
 * @subpackage helper
 * @author     Piers Warmers <*****@*****.**>
 * @param      string $target
 * @return     string
 */
function rt_button_show($target)
{
    return rt_ui_button('show', $target, 'search');
}
    ?>
</td>
      <td><?php 
    echo $versions[2][$name];
    ?>
</td>
    </tr>
    <?php 
}
?>
      <tr>
        <td>&nbsp;</td>
        <td>
          <ul class="rt-admin-tools">
            <li><?php 
echo rt_ui_button('revert', 'rtShopCategoryAdmin/Revert?id=' . $rt_shop_category->getId() . '&revert_to=' . $version_1, 'arrowrefresh-1-e');
?>
</li>
          </ul>
        <td>
          <ul class="rt-admin-tools">
            <li><?php 
echo rt_ui_button('revert', 'rtShopCategoryAdmin/Revert?id=' . $rt_shop_category->getId() . '&revert_to=' . $version_2, 'arrowrefresh-1-e');
?>
</li>
          </ul>
        </td>
      </tr>
  </tbody>
</table>
          <li><?php 
    echo rt_button_show(url_for('rtShopCategoryAdmin/show?id=' . $rt_shop_category->getId()));
    ?>
</li>
          <li><?php 
    echo rt_button_edit(url_for('rtShopCategoryAdmin/edit?id=' . $rt_shop_category->getId()));
    ?>
</li>
          <li><?php 
    echo rt_button_delete(url_for('rtShopCategoryAdmin/delete?id=' . $rt_shop_category->getId()));
    ?>
</li>
          <?php 
    if ($rt_shop_category->getNode()->isRoot()) {
        ?>
          <li><?php 
        echo rt_ui_button(__('tree'), 'rtShopCategoryAdmin/tree' . '?root=' . $rt_shop_category->getRootId(), 'arrow-1-e');
        ?>
</li>
          <?php 
    }
    ?>
        </ul>
      </td>
    </tr>
    <?php 
}
?>
  </tbody>
</table>
        <td><?php 
    echo $version->title;
    ?>
</td>
        <td><?php 
    echo $version->updated_at;
    ?>
</td>
        <td><input type="radio" name="version1" value="<?php 
    echo $version->version;
    ?>
" /></td>
        <td><input type="radio" name="version2" value="<?php 
    echo $version->version;
    ?>
" /></td>
        <td>
          <ul class="rt-admin-tools">
            <li><?php 
    echo rt_ui_button('revert', 'rtSnippetAdmin/Revert?id=' . $rt_snippet->getId() . '&revert_to=' . $version->version, 'arrowrefresh-1-e');
    ?>
</li>
          </ul>
        </td>
      <?php 
}
?>
    </tbody>
  </table>
</form>
          <li><?php 
    echo rt_button_show(url_for('rtSitePageAdmin/show?id=' . $rt_site_page->getId()));
    ?>
</li>
          <li><?php 
    echo rt_button_edit(url_for('rtSitePageAdmin/edit?id=' . $rt_site_page->getId()));
    ?>
</li>
          <li><?php 
    echo rt_button_delete(url_for('rtSitePageAdmin/delete?id=' . $rt_site_page->getId()));
    ?>
</li>
          <?php 
    if ($rt_site_page->getNode()->isRoot()) {
        ?>
          <li><?php 
        echo rt_ui_button(__('tree'), 'rtSitePageAdmin/tree' . '?root=' . $rt_site_page->getRootId(), 'arrow-1-e');
        ?>
</li>
          <?php 
    }
    ?>
        </ul>
      </td>
    </tr>
    <?php 
}
?>
  </tbody>
</table>
    <tbody>
      <?php 
foreach ($roots as $i => $root) {
    ?>
      <tr>
        <td class="sf_admin_text sf_admin_list_td_<?php 
    echo $field;
    ?>
"><?php 
    echo $root->{$field};
    ?>
</td>
        <td>
          <ul class="rt-admin-tools">
            <li><?php 
    echo rt_ui_button(__('Open this tree'), $sf_request->getParameter('module') . '/' . $sf_request->getParameter('action') . '?root=' . $root->id, 'arrow-1-e');
    ?>
</li>
          </ul>
        </td>
      </tr>
      <?php 
}
?>
    </tbody>
  </table>

<?php 
echo javascript_tag();
?>
$(document).ready(function(e){
        <td><?php 
    echo $version->title;
    ?>
</td>
        <td><?php 
    echo $version->updated_at;
    ?>
</td>
        <td><input type="radio" name="version1" value="<?php 
    echo $version->version;
    ?>
" /></td>
        <td><input type="radio" name="version2" value="<?php 
    echo $version->version;
    ?>
" /></td>
        <td>
          <ul class="rt-admin-tools">
            <li><?php 
    echo rt_ui_button('revert', 'rtWikiPageAdmin/Revert?id=' . $rt_wiki_page->getId() . '&revert_to=' . $version->version, 'arrowrefresh-1-e');
    ?>
</li>
          </ul>
        </td>
      <?php 
}
?>
    </tbody>
  </table>
</form>
        <td><?php 
    echo $version->title;
    ?>
</td>
        <td><?php 
    echo $version->updated_at;
    ?>
</td>
        <td><input type="radio" name="version1" value="<?php 
    echo $version->version;
    ?>
" /></td>
        <td><input type="radio" name="version2" value="<?php 
    echo $version->version;
    ?>
" /></td>
        <td>
          <ul class="rt-admin-tools">
            <li><?php 
    echo rt_ui_button('revert', 'rtBlogPageAdmin/Revert?id=' . $k_person->getId() . '&revert_to=' . $version->version, 'arrowrefresh-1-e');
    ?>
</li>
          </ul>
        </td>
      <?php 
}
?>
    </tbody>
  </table>
</form>
        <td><?php 
    echo $version->title;
    ?>
</td>
        <td><?php 
    echo $version->updated_at;
    ?>
</td>
        <td><input type="radio" name="version1" value="<?php 
    echo $version->version;
    ?>
" /></td>
        <td><input type="radio" name="version2" value="<?php 
    echo $version->version;
    ?>
" /></td>
        <td>
          <ul class="rt-admin-tools">
            <li><?php 
    echo rt_ui_button('revert', 'rtShopProductAdmin/Revert?id=' . $rt_shop_product->getId() . '&revert_to=' . $version->version, 'arrowrefresh-1-e');
    ?>
</li>
          </ul>
        </td>
      <?php 
}
?>
    </tbody>
  </table>
</form>
    ?>
</td>
    </tr>
    <?php 
}
?>
      <tr>
        <td>&nbsp;</td>
        <td>
          <ul class="rt-admin-tools">
            <li><?php 
echo rt_ui_button('revert', 'rtSitePageAdmin/Revert?id=' . $rt_site_page->getId() . '&revert_to=' . $version_1, 'arrowrefresh-1-e');
?>
</li>
          </ul>
        <td>
          <ul class="rt-admin-tools">
            <li><?php 
echo rt_ui_button('revert', 'rtSitePageAdmin/Revert?id=' . $rt_site_page->getId() . '&revert_to=' . $version_2, 'arrowrefresh-1-e');
?>
</li>
          </ul>
        </td>
      </tr>
  </tbody>
</table>

<?php 
slot('rt-tools');
include_partial('rtAdmin/standard_modal_tools', array('show_route_handle' => 'rt_site_page_show', 'object' => $rt_site_page));
end_slot();