A copyright violation detector running on Wikimedia Cloud Services https://tools.wmflabs.org/copyvios/
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 

78 rindas
3.9 KiB

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