A copyright violation detector running on Wikimedia Cloud Services https://tools.wmflabs.org/copyvios/
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

settings.mako 3.8 KiB

před 12 roky
před 12 roky
před 12 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <%include file="/support/header.mako" args="environ=environ, title='Settings'"/>\
  2. <%namespace module="toolserver.settings" import="main"/>\
  3. <% bot, cookies, langs, projects = main(environ, headers) %>
  4. <h1>Settings</h1>
  5. <p>This page contains some configurable options for this Toolserver site. Settings are saved as cookies. You can view and delete all cookies generated by this site at the bottom of this page.</p>
  6. <h2>Options</h2>
  7. <form action="${environ['PATH_INFO']}" method="post">
  8. <input type="hidden" name="action" value="set">
  9. <table>
  10. <tr>
  11. <td>Default site:</td>
  12. <td>
  13. <tt>http://</tt>
  14. <select name="lang">
  15. <% selected_lang = cookies["EarwigDefaultLang"].value if "EarwigDefaultLang" in cookies else bot.wiki.get_site().lang %>
  16. % for code, name in langs:
  17. % if code == selected_lang:
  18. <option value="${code}" selected="selected">${name}</option>
  19. % else:
  20. <option value="${code}">${name}</option>
  21. % endif
  22. % endfor
  23. </select>
  24. <tt>.</tt>
  25. <select name="project">
  26. <% selected_project = cookies["EarwigDefaultProject"].value if "EarwigDefaultProject" in cookies else bot.wiki.get_site().project %>
  27. % for code, name in projects:
  28. % if code == selected_project:
  29. <option value="${code}" selected="selected">${name}</option>
  30. % else:
  31. <option value="${code}">${name}</option>
  32. % endif
  33. % endfor
  34. </select>
  35. <tt>.org</tt>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td>Background:</td>
  40. </tr>
  41. <tr>
  42. <td><button type="submit">Save</button></td>
  43. </tr>
  44. </table>
  45. </form>
  46. <h2>Cookies</h2>
  47. % if cookies:
  48. <table>
  49. % for cookie in cookies.itervalues():
  50. <tr>
  51. <td><b><tt>${cookie.key | h}</tt></b></td>
  52. <td><tt>${cookie.value | h}</tt></td>
  53. <td>
  54. <form action="${environ['PATH_INFO']}" method="post">
  55. <input type="hidden" name="action" value="delete">
  56. <input type="hidden" name="cookie" value="${cookie.key | h}">
  57. <button type="submit">Delete</button>
  58. </form>
  59. </td>
  60. </tr>
  61. % endfor
  62. <tr>
  63. <td>
  64. <form action="${environ['PATH_INFO']}" method="post">
  65. <input type="hidden" name="action" value="delete">
  66. <input type="hidden" name="all" value="1">
  67. <button type="submit">Delete all</button>
  68. </form>
  69. </td>
  70. </tr>
  71. </table>
  72. % else:
  73. <p>No cookies!</p>
  74. % endif
  75. <%include file="/support/footer.mako" args="environ=environ"/>