WikiPageEdit.handlebars 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <div class="edit-content">
  2. <div class="edit-header">
  3. {{#if CAN.EDIT_TITLE}}
  4. {{#if content_is_locked}}
  5. <h1>{{title}}</h1>
  6. <input name="title" type="hidden" value="{{title}}">
  7. {{else}}
  8. <label for="title" class="screenreader-only">{{#t "title_label"}}Page Title{{/t}}</label>
  9. <input id="title" name="title" type="text" class="span4 title" value="{{title}}" maxlength="255" autofocus>
  10. {{/if}}
  11. {{else}}
  12. <h2>{{title}}</h2>
  13. {{/if}}
  14. {{#unless content_is_locked}}
  15. <div class="switch_views_container">
  16. <div class="help_dialog"></div>
  17. <a href="#" class="switch_views">
  18. {{#t "#editor.switch_editor_html"}}HTML Editor{{/t}}
  19. </a>
  20. <a href="#" class="switch_views" style="display:none;">
  21. {{#t "#editor.switch_editor_rich_text"}}Rich Content Editor{{/t}}
  22. </a>
  23. </div>
  24. {{/unless}}
  25. </div>
  26. {{#if content_is_locked}}
  27. {{{body}}}
  28. {{else}}
  29. <textarea id="wiki_page_body" rows="20" cols="40" name="body" class="body" aria-hidden="true"{{#unless PAGE_RIGHTS.update}} autofocus{{/unless}}>{{convertApiUserContent body forEditing=1}}</textarea>
  30. {{/if}}
  31. {{#if CAN.EDIT_ROLES}}
  32. <div class="control-group options">
  33. <label class="control-label"><strong>{{#t "options_label"}}Options{{/t}}</strong></label>
  34. <div class="controls">
  35. <label id="editing_roles_label" for="editing_roles">{{t "Can edit this page role selection"}}</label>
  36. <select id="editing_roles" aria-label="{{t "Can edit this page role selection"}}" name="editing_roles">
  37. {{#if SHOW.COURSE_ROLES}}
  38. <option value="teachers"{{#if IS.TEACHER_ROLE}} selected{{/if}}>{{#t "course_editing_roles.only_teachers"}}Only teachers{{/t}}</option>
  39. <option value="teachers,students"{{#if IS.STUDENT_ROLE}} selected{{/if}}>{{#t "course_editing_roles.teachers_and_students"}}Teachers and students{{/t}}</option>
  40. <option value="teachers,students,public"{{#if IS.ANYONE_ROLE}} selected{{/if}}>{{#t "course_editing_roles.anyone"}}Anyone{{/t}}</option>
  41. {{else}}
  42. <option value="members"{{#if IS.MEMBER_ROLE}} selected{{/if}}>{{#t "editing_roles.only_members"}}Only members{{/t}}</option>
  43. <option value="members,public"{{#if IS.ANYONE_ROLE}} selected{{/if}}>{{#t "editing_roles.anyone"}}Anyone{{/t}}</option>
  44. {{/if}}
  45. </select>
  46. </div>
  47. {{#if ENV.student_planner_enabled}}
  48. <div class="controls">
  49. <label for="student_planner_checkbox" class="checkbox">
  50. <input value="1" type="checkbox" id="student_planner_checkbox" name="student_planner_checkbox" {{checkedIf todo_date}} />
  51. {{#t}}Add to student to-do{{/t}}
  52. </label>
  53. <div id="todo_date_container">
  54. <label class="screenreader-only" for="todo_date" id="student_planner_accessible_label">
  55. {{#t}}Student Planner Date:{{/t}}
  56. {{datepickerScreenreaderPrompt}}
  57. </label>
  58. <input type="text"
  59. class="datetime_field input-medium"
  60. name="student_todo_at"
  61. id="todo_date"
  62. aria-labelledby="student_planner_accessible_label"
  63. {{! TODO: what would be the best way to get this formatted right? }}
  64. value="{{datetimeFormatted todo_date}}"
  65. data-tooltip='{"position":"top","force_position":"true"}'
  66. title="{{accessibleDateFormat}}"/>
  67. </div>
  68. </div>
  69. {{/if}}
  70. {{#if ENV.CONDITIONAL_RELEASE_SERVICE_ENABLED}}
  71. <div class="controls">
  72. <label class="checkbox" for="conditional_content">
  73. {{checkbox "assignment.set_assignment"
  74. id="conditional_content"
  75. class="element_toggler"
  76. checked=set_assignment}}
  77. {{#t}}Allow in mastery paths{{/t}}
  78. </label>
  79. </div>
  80. {{/if}}
  81. </div>
  82. {{/if}}
  83. </div>
  84. <div class="form-actions clearfix">
  85. <div>
  86. <label for="notify_of_update" class="checkbox clearfix pull-left" style="margin-top:5px">
  87. {{checkbox "notify_of_update"}}
  88. {{#t "notify_users_text"}}Notify users that this content has changed{{/t}}
  89. </label>
  90. <button class="btn cancel">{{#t "buttons.cancel"}}Cancel{{/t}}</button>
  91. {{#if CAN.PUBLISH_NOW}}
  92. <button class="btn btn-default save_and_publish">{{#t "buttons.save_and_publish"}}Save & Publish{{/t}}</button>
  93. {{/if}}
  94. <button class="btn btn-primary submit">{{#t "buttons.save"}}Save{{/t}}</button>
  95. </div>
  96. </div>