Created
March 1, 2012 23:48
-
-
Save rehanift/1954089 to your computer and use it in GitHub Desktop.
SML Stories Application Example
This file contains 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
{% contest name:"stories-example" %} | |
{% partial name:"entry-form" %} | |
{% contest_form %} | |
<div> | |
<label> | |
Name: | |
<input type="text" name="registration[name]"/> | |
</label> | |
</div> | |
<div> | |
<label> | |
Story: | |
<textarea name="submission[story]"></textarea> | |
</label> | |
</div> | |
<input type="submit" /> | |
{% endcontest_form %} | |
{% endpartial %} | |
{% partial name:"success-view" %} | |
Thank you for your submission! | |
{% endpartial %} | |
{% contest_form_link entry_form_partial:"entry-form" success_partial:"success-view" %} | |
Share your story | |
{% endcontest_form_link %} | |
<h3>Other user stories</h3> | |
{% for entry in contest.contest_entries %} | |
<p>{{ entry.registration.name }} said {{ entry.submission.story }}</p> | |
{% endfor %} | |
{% endcontest %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment