docItem.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template name="docItem">
  2. <div class="container top-margin">
  3. <div class="row">
  4. <div class="col-md-12">
  5. {{> docMeta }}
  6. </div>
  7. </div>
  8. <div class="row">
  9. <div class="col-md-12">
  10. {{> editingUsers }}
  11. </div>
  12. </div>
  13. <div class="row">
  14. <div class="col-md-6">
  15. {{> editor}}
  16. </div>
  17. <div class="col-md-6">
  18. {{> viewer }}
  19. </div>
  20. </div>
  21. {{> insertCommentForm }}
  22. </div><!-- end of docItem container -->
  23. </template>
  24. <template name="editor">
  25. <h2>doc id: {{ docid }}</h2>
  26. {{> sharejsCM docid=docid onRender=config id="editor" mode="javascript" }}
  27. </template>
  28. <template name="viewer">
  29. <iframe id="viewer_iframe">
  30. </iframe>
  31. </template>
  32. <template name="docMeta">
  33. {{#with document }}
  34. <span class="h1">{{> editableText collection="documents" field="title" }}</span>
  35. {{#if canEdit }}
  36. <div class="checkbox">
  37. <label>
  38. <input type="checkbox" class="js-tog-private" checked="{{ isPrivate }}"/>Private
  39. </label>
  40. </div>
  41. {{/if}}
  42. {{/with}}
  43. </template>
  44. <template name="editingUsers">
  45. Editors:
  46. {{#each users }}
  47. <span class="label label-success">{{firstname}}</span>
  48. {{/each}}
  49. </template>
  50. <template name="insertCommentForm2">
  51. {{> quickForm collection="Comments" id="insertCommentForm" type="method" meteormethod="addComment" }}
  52. </template>
  53. <template name="insertCommentForm">
  54. {{#autoForm collection="Comments" id="insertCommentForm" type="method" meteormethod="addComment" }}
  55. <fieldset>
  56. <legend>Comment</legend>
  57. {{> afQuickField name="title" }}
  58. {{> afQuickField name="body" rows=6 value="starter text" }}
  59. {{> afQuickField name="docid" value=docid type="hidden" }}
  60. </fieldset>
  61. <button type="submit" class="btn btn-primary">Insert</button>
  62. {{/autoForm}}
  63. </template>