attachments.tx 855 B

12345678910111213
  1. Attachments: Add assets which may be referred to by ID in posts via $post.attachments[$attachment_number] in a <a href="https://metacpan.org/pod/Text::Xslate::Syntax::Kolon">Kolon Tag</a>.<br />
  2. <select class="cooltext" multiple name="attachments" id="<: $post.id :>-attachments" style="display:none;" >
  3. : for $post.attachments -> $att {
  4. <option value="<: $att :>" selected id="<: $post.id :>-<: $~att :>-attachment-option">Attachment <: $~att :></option>
  5. : }
  6. </select>
  7. <div id="content-attachments-<: $post.id :>">
  8. : for $post.attachments -> $att {
  9. Attachment <: $~att :>:
  10. <br /><input type="file" class="cooltext attachment" id="<: $post.id :>-<: $~att :>-attachment" value="<: $att :>"></input>
  11. : }
  12. </div>
  13. <button style="float:right;" onclick="addAttachment('<: $post.id :>'); return false;" class="coolbutton" >New Attachment</button>