reviser.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <div class='formulaire_spip formulaire_#FORM' id='formulaire_reviser_#ENV{_objet}_#ENV{_id_objet}'>
  2. <h3 class='titrem'>[(#CHEMIN_IMAGE{revision-24.png}|balise_img{'',cadre-icone})]<:revisions:titre_revisions:></h3>
  3. [<p class="reponse_formulaire reponse_formulaire_ok none">(#ENV**{message_ok})</p>]
  4. [<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV**{message_erreur})</p>]
  5. <form action="#ENV{action}#formulaire_configurer_contenu_forums" method="post"><div>
  6. [(#ACTION_FORMULAIRE{#ENV{action}})]
  7. <ul>
  8. <li class='editer haut editer_id_version[ (#ENV**{erreurs}|table_valeur{id_version}|oui)erreur]'>
  9. <label style="display:block"><:revisions:label_choisir_id_version:></label>
  10. [<span class='erreur_message'>(#ENV**{erreurs}|table_valeur{id_version})</span>]
  11. <div class="choix">
  12. <B_v>
  13. <table class="spip diff-versions">
  14. <thead>
  15. <tr class="row_first">
  16. <th class="id">#</th>
  17. <th class="version"></th>
  18. <th class="diff"></th>
  19. <th class="date">Date</th>
  20. <th class="auteur">Auteur</th>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. <BOUCLE_v(VERSIONS){objet=#ENV{_objet}}{id_objet=#ENV{_id_objet}}{!par id_version}>
  25. <tr>
  26. <td class="id"><label for="id_version_#ENV{_objet}_#ENV{_id_objet}_#ID_VERSION">#ID_VERSION</label></td>
  27. <td class="version">[(#COMPTEUR_BOUCLE|<{#TOTAL_BOUCLE}|oui)<input type="radio" class="radio" name="id_version" id="id_version_#ENV{_objet}_#ENV{_id_objet}_#ID_VERSION" value="#ID_VERSION" onchange="check_diff();" [(#ENV{id_version}|=={#ID_VERSION}|oui)checked="checked"] />]</td>
  28. <td class="diff">[(#COMPTEUR_BOUCLE|>{1}|oui)<input type="radio" class="radio" name="id_diff" id="id_diff_#ENV{_objet}_#ENV{_id_objet}_#ID_VERSION" value="#ID_VERSION" onchange="check_version();" [(#ENV{id_diff}|=={#ID_VERSION}|oui)checked="checked"] />]</td>
  29. <td class="date">[(#DATE|date_relative)]</td>
  30. <td class="auteur"><BOUCLE_aut(AUTEURS){id_auteur}{si #ID_AUTEUR|is_numeric}{tout}>#NOM</BOUCLE_aut>#ID_AUTEUR<//B_aut></td>
  31. </tr>
  32. </BOUCLE_v>
  33. </tbody>
  34. </table>
  35. </B_v>
  36. </div>
  37. </li>
  38. </ul>
  39. <p class='boutons'><span class="image_loading"></span><input class='submit' type="submit" name="ok" value="<:revisions:bouton_comparer:>"/></p>
  40. </div></form>
  41. </div>
  42. <script type="text/javascript">/*<![CDATA[*/
  43. function check_diff(){
  44. var v=jQuery('input[name=id_version]:checked');
  45. var d=jQuery('input[name=id_diff]:checked');
  46. if (!d.length || parseInt(d.attr('value'))>=parseInt(v.attr('value')))
  47. v.parents('tr').next('tr').find('input[name=id_diff]').attr('checked','checked');
  48. }
  49. function check_version(){
  50. var v=jQuery('input[name=id_version]:checked');
  51. var d=jQuery('input[name=id_diff]:checked');
  52. if (!v.length || parseInt(d.attr('value'))>=parseInt(v.attr('value')))
  53. d.parents('tr').prev('tr').find('input[name=id_version]').attr('checked','checked');
  54. }
  55. /*]]>*/</script>