edit.mak 1.6KB

1234567891011121314151617181920212223242526272829303132
  1. <%namespace name="TIM" file="tracim.templates.pod"/>
  2. <%def name="title()"></%def>
  3. <%def name="FORM(file)">
  4. <form role="form" method="POST" action="${tg.url('/workspaces/{}/folders/{}/files/{}?_method=PUT'.format(file.workspace.id, file.parent.id, file.id))}">
  5. <div class="modal-header">
  6. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">${_('Close')}</span></button>
  7. <h4 class="modal-title" id="myModalLabel">${TIM.ICO(32, 'mimetypes/text-html')} ${_('Edit file')}</h4>
  8. </div>
  9. <div class="modal-body">
  10. <div class="form-group">
  11. <label for="file-title">${_('Title')}</label>
  12. <input name="label" type="text" class="form-control" id="file-title" placeholder="${_('Title')}" value="${file.label}">
  13. </div>
  14. <div class="form-group">
  15. <label for="file-content">${_('Description')}</label>
  16. <textarea id="file-content-textarea" name="comment" class="form-control pod-rich-textarea" id="file-content" placeholder="${_('Write here the file content')}">${file.content}</textarea>
  17. </div>
  18. </div>
  19. <div class="modal-footer">
  20. <span class="pull-right" style="margin-top: 0.5em;">
  21. <button id="file-save-button" type="submit" class="btn btn-small btn-success" title="${_('Validate')}"><i class="fa fa-check"></i> ${_('Validate')}</button>
  22. </span>
  23. </div>
  24. ${TIM.TINYMCE_INIT_SCRIPT('#file-content-textarea')}
  25. </form>
  26. </%def>
  27. ${FORM(result.item)}