series.tx 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. :if ( !$post.addpost ) {
  2. :if ( $tiled ) {
  3. <a href="<: $post.local_href :>" class="tile">
  4. : if ($post.is_video) {
  5. <video preload="none" class="responsive" controls poster="<: $post.preview :>" >
  6. <source src="<: $post.href :>" type="<: $post.content_type :>" />
  7. Your browser does not support the video tag.
  8. </video>
  9. : } else {
  10. <div class="responsive preview" style="background-image:url(<: $post.preview :>)"></div>
  11. : }
  12. <p class="midtitle"><: $post.title :></p>
  13. </a>
  14. : } else {
  15. : include "post_title.tx";
  16. : include "post_tags.tx";
  17. : if ( !$post.video_href && !$post.is_image && !$post.is_video && !$post.is_profile && $post.preview ) {
  18. <div style="background-image:url(<: $post.preview :>);" class="responsive preview"></div>
  19. : }
  20. : if( $post.data ) {
  21. <div class="postData" id="postData-<: $post.id :>">
  22. <: render_it($post.data) | mark_raw :>
  23. </div>
  24. : }
  25. : }
  26. : }
  27. : if ( $can_edit ) {
  28. : include "edit_head.tx";
  29. <form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
  30. Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
  31. URL *<br /><input required class="cooltext" type="text" name="local_href" placeholder="/someurl" value="<: $post.local_href :>" />
  32. ACL name *<br /><input required class="cooltext" type="text" name="aclname" value="<: $post.aclname :>" />
  33. <!-- Only meaningful when the child type draws its posts from a directory; see Trog::DataSource::DirIndex. -->
  34. Directory to index<br /><input class="cooltext" type="text" name="directory" placeholder="assets/downloads" value="<: $post.directory :>" />
  35. <label for="<: $post.id :>-tiled">Tile Display?<input id="<: $post.id :>-tiled" class="coolcb" type="checkbox" name="tiled" value="1" <: if ( $post.tiled ) { "checked" } :> /></label>
  36. <br />
  37. Content Template *<br />
  38. <select required class="cooltext" name="child_form">
  39. : for $forms -> $form {
  40. <option value="<: $form :>" <: if ( $post.child_form == $form ) { :>selected<: } :> ><: $form :></option>
  41. : }
  42. </select>
  43. Header<br />
  44. <select class="cooltext" name="header">
  45. <option value="">none</option>
  46. : for $headers -> $header {
  47. <option value="<: $header :>" <: if ( $post.header == $header ) { :>selected<: } :> ><: $header :></option>
  48. : }
  49. </select>
  50. Footer<br />
  51. <select class="cooltext" name="footer">
  52. <option value="">none</option>
  53. : for $footers -> $footer {
  54. <option value="<: $footer :>" <: if ( $post.footer == $footer ) { :>selected<: } :> ><: $footer :></option>
  55. : }
  56. </select>
  57. <input type="hidden" name="callback" value="Trog::Routes::HTML::series" />
  58. : include "preview.tx";
  59. : include "visibility.tx";
  60. : include "acls.tx";
  61. : include "tags.tx";
  62. : include "aliases.tx";
  63. : include "form_common.tx";
  64. </form>
  65. : include "edit_foot.tx";
  66. : }