Skip to content

Instantly share code, notes, and snippets.

@itsbth
Created February 2, 2012 21:20
Show Gist options
  • Select an option

  • Save itsbth/1725851 to your computer and use it in GitHub Desktop.

Select an option

Save itsbth/1725851 to your computer and use it in GitHub Desktop.
Uploaded by UploadToGist for Sublime Text 2
window.TPL ||= {}
TPL.screenshot_form = (id) ->
"""
<div class="screenshot" data-id="#{id}">
<div class="control-group string required"><label class="string required" for="dupe_screenshots_attributes_#{id}_file"><abbr title="required">*</abbr> Image</label><div class="controls"><input class="string required" id="dupe_screenshots_attributes_#{id}_file" name="dupe[screenshots_attributes][#{id}][file]" size="50" type="text"></div></div>
<input id="dupe_screenshots_attributes_#{id}_file_cache" name="dupe[screenshots_attributes][#{id}][file_cache]" type="hidden">
<div class="control-group string required"><label class="string required" for="dupe_screenshots_attributes_#{id}_description"><abbr title="required">*</abbr> Description</label><div class="controls"><input class="string required" id="dupe_screenshots_attributes_#{id}_description" name="dupe[screenshots_attributes][#{id}][description]" size="50" type="text"><p class="help-block"><span class="delete">
<a class="delete" href="#">Delete</a> this screenshot.
</span>
<span class="undo">
Deleted... <a class="undo" href="#">undo</a>.
</span>
</p></div></div>
<input id="dupe_screenshots_attributes_#{id}__destroy" name="dupe[screenshots_attributes][#{id}][_destroy]" type="hidden">
</div>
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment