Le repo des sources pour le site web des JM2L
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

82 lines
2.9 KiB

  1. # -*- coding: utf-8 -*-
  2. <%inherit file="jm2l:templates/layout.mako"/>
  3. <%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
  4. <%def name="jsAddOn()">
  5. <script src="/js/jm2l.js"></script>
  6. <script src="/vendor/ckeditor/ckeditor.js"></script>
  7. <script src="/vendor/select2/js/select2.js"></script>
  8. <script src="/vendor/datepicker/bootstrap-datepicker.js"></script>
  9. <script type="text/javascript">
  10. var checkout = $('#due_date').datepicker({
  11. format: "dd/mm/yyyy"
  12. })
  13. .on('changeDate', function(ev) {
  14. checkout.hide();
  15. }).data('datepicker');
  16. </script>
  17. </%def>
  18. <%def name="cssAddOn()">
  19. <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload.css">
  20. <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui.css">
  21. <link rel="stylesheet" href="/css/jm2l.css" />
  22. <link rel="stylesheet" href="/vendor/select2/css/select2.css" type="text/css" media="screen" />
  23. <link rel="stylesheet" href="/vendor/datepicker/datepicker.css" type="text/css" media="screen" />
  24. <!-- CSS adjustments for browsers with JavaScript disabled -->
  25. <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
  26. <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
  27. </%def>
  28. <div class="row-fluid">
  29. <div class="span10 offset1">
  30. <a class="btn" href="${request.route_path('list_task', year=year, _anchor=area)}">
  31. <i class="icon-arrow-left"></i> Retour à la liste
  32. </a>
  33. % if 'uid' in form._fields.keys():
  34. <a class="btn btn-danger btn-mini pull-right" onclick="return confirm_click();" href="${request.route_path('action_task', year=year, action='delete', task_id=form.uid.data)}">
  35. <i class="icon-remove icon-white"></i> Supprimer cette tâche
  36. </a>
  37. %endif
  38. % if 'uid' in form._fields.keys():
  39. <h3>Editer une tâche</h3>
  40. % else:
  41. <h3>Ajouter une tâche</h3>
  42. %endif
  43. <%
  44. DicForm = {
  45. 'name': {'PlaceHolder':u"Nom de la tâche", "FieldStyle":"width:90%;" },
  46. 'area_uid': {"FieldStyle":"width:16em;", 'ContainerStyle':"float:left;" },
  47. 'closed_by': {"FieldStyle":"width:16em;", 'ContainerStyle':"float:left;" },
  48. 'due_date': {'PlaceHolder':u"27/11/2017", "FieldStyle":"width:8em;"},
  49. 'description': {'PlaceHolder':u"Description", "FieldStyle":"width:95%;min-height:150px;", "ckeditor":"1" },
  50. }
  51. %>
  52. % if 'uid' in form._fields.keys():
  53. <form action="/${year}/Staff/tasks/${form.uid.data}" method="post">
  54. ${form.uid()}
  55. %else:
  56. <form action="/${year}/Staff/tasks" method="post">
  57. %endif
  58. ${helpers.DisplayForm(form, DicForm)}
  59. <br>
  60. <div class="center">
  61. <button type="submit" class="btn btn-large btn-primary" />
  62. <i class="icon-ok icon-white"></i> Enregistrer
  63. </button>
  64. </div>
  65. </form>
  66. % if 'uid' in form._fields.keys():
  67. <div class="center">
  68. ${helpers.uploader("tasks", form.uid.data, u"une pièce jointe" )}
  69. </div>
  70. %endif
  71. </div>
  72. </div>