Created
December 9, 2011 18:33
-
-
Save silentworks/1452729 to your computer and use it in GitHub Desktop.
Twig and Slim integration task index file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block content %} | |
<h1>Tasks</h1> | |
<ul> | |
<?php foreach ($tasks as $task): ?> | |
<li><a href="<?php echo Slim::getInstance()->urlFor('task_edit', array('id' => $task->id)); ?>"><?php echo $task->name; ?></a> <a href="<?php echo Slim::getInstance()->urlFor('task_delete', array('id' => $task->id)); ?>">Delete</a></li> | |
<?php endforeach; ?> | |
</ul> | |
<form action="<?php echo Slim::getInstance()->urlFor('task_new'); ?>" method="post"> | |
<input type="submit" value="Add Task" /> | |
</form> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment