|
|
@@ -9,64 +9,64 @@ |
|
|
|
% endif |
|
|
|
<h1>Settings</h1> |
|
|
|
<p>This page contains some configurable options for the copyvio detector. Settings are saved as cookies. You can view and delete all cookies generated by this site at the bottom of this page.</p> |
|
|
|
<div id="settings-form"> |
|
|
|
<form action="${environ['PATH_INFO']}" method="post"> |
|
|
|
<input type="hidden" name="action" value="set"/> |
|
|
|
<table> |
|
|
|
<form action="${environ['PATH_INFO']}" method="post"> |
|
|
|
<table> |
|
|
|
<tr> |
|
|
|
<td>Default site:</td> |
|
|
|
<td> |
|
|
|
<tt>http://</tt> |
|
|
|
<select name="lang"> |
|
|
|
<% selected_lang = cookies["CopyviosDefaultLang"].value if "CopyviosDefaultLang" in cookies else bot.wiki.get_site().lang %>\ |
|
|
|
% for code, name in langs: |
|
|
|
% if code == selected_lang: |
|
|
|
<option value="${code | h}" selected="selected">${name}</option> |
|
|
|
% else: |
|
|
|
<option value="${code | h}">${name}</option> |
|
|
|
% endif |
|
|
|
% endfor |
|
|
|
</select> |
|
|
|
<tt>.</tt> |
|
|
|
<select name="project"> |
|
|
|
<% selected_project = cookies["CopyviosDefaultProject"].value if "CopyviosDefaultProject" in cookies else bot.wiki.get_site().project %>\ |
|
|
|
% for code, name in projects: |
|
|
|
% if code == selected_project: |
|
|
|
<option value="${code | h}" selected="selected">${name}</option> |
|
|
|
% else: |
|
|
|
<option value="${code | h}">${name}</option> |
|
|
|
% endif |
|
|
|
% endfor |
|
|
|
</select> |
|
|
|
<tt>.org</tt> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<% |
|
|
|
background_options = [ |
|
|
|
("plain", "Use a plain tiled background (default)."), |
|
|
|
("potd", 'Use the current <a href="//commons.wikimedia.org/">Wikimedia Commons</a> <a href="//commons.wikimedia.org/wiki/Commons:Picture_of_the_day">Picture of the Day</a>, unfiltered. Certain POTDs may be unsuitable as backgrounds due to their aspect ratio or subject matter (generally portraits do not work well).'), |
|
|
|
("list", 'Randomly select from <a href="http://commons.wikimedia.org/wiki/User:The_Earwig/POTD">a subset of previous Commons Pictures of the Day</a> that work well as widescreen backgrounds, refreshed daily.'), |
|
|
|
] |
|
|
|
selected = cookies["CopyviosBackground"].value if "CopyviosBackground" in cookies else "plain" |
|
|
|
%>\ |
|
|
|
% for i, (value, desc) in enumerate(background_options): |
|
|
|
<tr> |
|
|
|
<td>Default site:</td> |
|
|
|
% if i == 0: |
|
|
|
<td>Background:</td> |
|
|
|
% else: |
|
|
|
<td> </td> |
|
|
|
% endif |
|
|
|
<td> |
|
|
|
<tt>http://</tt> |
|
|
|
<select name="lang"> |
|
|
|
<% selected_lang = cookies["CopyviosDefaultLang"].value if "CopyviosDefaultLang" in cookies else bot.wiki.get_site().lang %>\ |
|
|
|
% for code, name in langs: |
|
|
|
% if code == selected_lang: |
|
|
|
<option value="${code | h}" selected="selected">${name}</option> |
|
|
|
% else: |
|
|
|
<option value="${code | h}">${name}</option> |
|
|
|
% endif |
|
|
|
% endfor |
|
|
|
</select> |
|
|
|
<tt>.</tt> |
|
|
|
<select name="project"> |
|
|
|
<% selected_project = cookies["CopyviosDefaultProject"].value if "CopyviosDefaultProject" in cookies else bot.wiki.get_site().project %>\ |
|
|
|
% for code, name in projects: |
|
|
|
% if code == selected_project: |
|
|
|
<option value="${code | h}" selected="selected">${name}</option> |
|
|
|
% else: |
|
|
|
<option value="${code | h}">${name}</option> |
|
|
|
% endif |
|
|
|
% endfor |
|
|
|
</select> |
|
|
|
<tt>.org</tt> |
|
|
|
<input type="radio" name="background" value="${value}" ${'checked="checked"' if value == selected else ''} /> ${desc} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<% |
|
|
|
background_options = [ |
|
|
|
("plain", "Use a plain tiled background (default)."), |
|
|
|
("potd", 'Use the current <a href="//commons.wikimedia.org/">Wikimedia Commons</a> <a href="//commons.wikimedia.org/wiki/Commons:Picture_of_the_day">Picture of the Day</a>, unfiltered. Certain POTDs may be unsuitable as backgrounds due to their aspect ratio or subject matter (generally portraits do not work well).'), |
|
|
|
("list", 'Randomly select from <a href="http://commons.wikimedia.org/wiki/User:The_Earwig/POTD">a subset of previous Commons Pictures of the Day</a> that work well as widescreen backgrounds, refreshed daily.'), |
|
|
|
] |
|
|
|
selected = cookies["CopyviosBackground"].value if "CopyviosBackground" in cookies else "plain" |
|
|
|
%>\ |
|
|
|
% for i, (value, desc) in enumerate(background_options): |
|
|
|
<tr> |
|
|
|
% if i == 0: |
|
|
|
<td>Background:</td> |
|
|
|
% else: |
|
|
|
<td> </td> |
|
|
|
% endif |
|
|
|
<td> |
|
|
|
<input type="radio" name="background" value="${value}" ${'checked="checked"' if value == selected else ''} /> ${desc} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
% endfor |
|
|
|
<tr> |
|
|
|
<td><button type="submit">Save</button></td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
% endfor |
|
|
|
<tr> |
|
|
|
<td> |
|
|
|
<input type="hidden" name="action" value="set"/> |
|
|
|
<button type="submit">Save</button> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</form> |
|
|
|
<h2>Cookies</h2> |
|
|
|
% if cookies: |
|
|
|
<table> |
|
|
|