Guest User

Untitled

a guest
Jan 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. <!-- if count(movies) > 0 -->
  2. <!-- render "item", movies --> # TODO: Render array as `partial :collection` in rails
  3. <!-- else -->
  4. No movies given
  5. <!-- end -->
  6.  
  7.  
  8. <!-- for movie in movies --> # TODO: for loop
  9. <!-- render "item", movie -->
  10. <!-- else --> # TODO: else block for a loop
  11. No movies given
  12. <!-- end -->
  13.  
  14. <!-- template "item", item --> # TODO: template defined with argument
  15. <li itemscope itemtype="/movies" itemprop="movie" itemid="{id}"> # TODO: attribute interpolation
  16. <h2 itemprop="title"></h2> # binding via microdata
  17.  
  18. <dl>
  19. <!-- if present(filename) --> # widget itemscope creates local variable scope
  20. <dt>Filename:</dt>
  21. <dd itemprop="filename"></dd>
  22. <!-- end -->
  23. <!-- if present(item.length_in_seconds) --> # full variable path may be used too
  24. <dt>Length:</dt>
  25. <dd itemprop="length_in_seconds">
  26. {pluralize(item.length_in_seconds, "second")} # binding via interpolation
  27. </dd>
  28. <!-- end -->
  29.  
  30. <dt>Media pools:</dt>
  31. <!-- if present(media_pools) -->
  32. <dd>
  33. <ul class="tags">
  34. <!-- for pool in media_pools -->
  35. <li itemprop="media_pools">
  36. <a href="/media_pools/{id}"> # id points to the nearest model in the chain, so it's pool.id
  37. {pool.title}
  38. </a>
  39. </li>
  40. <!-- end -->
  41. </ul>
  42. </dd>
  43. <!-- else -->
  44. <dd class="visible">
  45. <span class="empty">Not on air</span>
  46. <a class="icon add" href="/movies/{id}/edit" transport="xhr" target="& ! item :replace()">
  47. Assign pool
  48. </a>
  49. </dd>
  50. <!-- end -->
  51. </dl>
  52. <!-- end -->
Add Comment
Please, Sign In to add comment