<commit_before>
<%def name="formatting()">
	<div class="formatting">
		<a target="_new" href="/page/formatting.html">${_("formatting hints")|n}</a>
	</div>
</%def>

<%def name="savebox(cancel_url)">
	<div class="savebox">
		<button type="submit"><img src="/img/icons/save.png"> 
			${_("Save")}</button>
		<span class="cancel">
			${_("or")} <a href="${cancel_url}">${_("cancel")}</a>
		</span>
	</div>
</%def>

<%def name="form_watch(entity)">
	<%
	watch = False
	if entity:
		watch = c.lib.watchlist.has_entity_watch(entity)
	%> 
	<input class="watch" type="checkbox" ${"checked='checked'" if watch else ''} name="watch"/>
	${_("Notify me of updates.")}
</%def>

<%def name="watch(entity, return_url)">
	%if c.user:
		<%
		watch = c.lib.watchlist.get_entity_watch(c.user, entity) 
		import urllib
		ret = urllib.urlencode({'ret': return_url})
		ref = urllib.urlencode({'ref': c.lib.watchlist.entity2ref(entity)})
		%>
		%if watch:
			<a class="button delete" href="/watch/delete?watch=${watch.id}&${ret}&${h.url_token()}"><img src='/img/mail.png' /> ${_("unwatch")}</a>
		%else:
			<a class="button edit" href="/watch/create?${ref}&${ret}&${h.url_token()}"><img src='/img/mail.png' /> ${_("watch")}</a>
		%endif
	%endif
</%def>

<%def name="delegation_sidebar(delegateable)">
	%if c.tile.can_vote:
	<div class="tile boxed">
		<div class="inner_boxed">
			<h4><img src="/img/icons/delegate_16.png" class="cd" /> ${_("Delegate voting")}</h4>
			<ul>
			<li style="list-style-image: url(/img/icons/delegate_to_16.png); padding-left: 5px;">
				%if not c.tile.has_delegated:
					%if c.tile.has_overridden:
						${_("You have voted yourself and not delegated voting.")}
						<a href="/page/faq.html#Whatisdelegatedvoting">${_("Info...")}</a>
					%else:
						${_("You have not delegated voting.")} 
						<a href="/delegation/create?scope=${delegateable.id}">${_("delegate")}</a> &middot;
						<a href="/page/faq.html#Whatisdelegatedvoting">${_("info...")}</a>
					%endif 
				%else:
					%if c.tile.has_overridden:
						${_("By voting yourself, you have overridden:")}
					%else:
						${_("You have delegated voting to:")}
					%endif
				%endif
			<ul>
				%for delegation in c.tile.delegations:
					<li>
					${h.user_link(delegation.agent)|n}
					&middot; ${_("on")} <a href="/d/${delegation.scope.id}">${delegation.scope.label}</a>
					&middot; <a href="/delegation/${delegation.id}">${_("review")}</a><commit_msg>[svn r660] remove broken link, fixes #124<commit_after>
<%def name="formatting()">
	<div class="formatting">
		<a target="_new" href="/page/formatting.html">${_("formatting hints")|n}</a>
	</div>
</%def>

<%def name="savebox(cancel_url)">
	<div class="savebox">
		<button type="submit"><img src="/img/icons/save.png"> 
			${_("Save")}</button>
		<span class="cancel">
			${_("or")} <a href="${cancel_url}">${_("cancel")}</a>
		</span>
	</div>
</%def>

<%def name="form_watch(entity)">
	<%
	watch = False
	if entity:
		watch = c.lib.watchlist.has_entity_watch(entity)
	%> 
	<input class="watch" type="checkbox" ${"checked='checked'" if watch else ''} name="watch"/>
	${_("Notify me of updates.")}
</%def>

<%def name="watch(entity, return_url)">
	%if c.user:
		<%
		watch = c.lib.watchlist.get_entity_watch(c.user, entity) 
		import urllib
		ret = urllib.urlencode({'ret': return_url})
		ref = urllib.urlencode({'ref': c.lib.watchlist.entity2ref(entity)})
		%>
		%if watch:
			<a class="button delete" href="/watch/delete?watch=${watch.id}&${ret}&${h.url_token()}"><img src='/img/mail.png' /> ${_("unwatch")}</a>
		%else:
			<a class="button edit" href="/watch/create?${ref}&${ret}&${h.url_token()}"><img src='/img/mail.png' /> ${_("watch")}</a>
		%endif
	%endif
</%def>

<%def name="delegation_sidebar(delegateable)">
	%if c.tile.can_vote:
	<div class="tile boxed">
		<div class="inner_boxed">
			<h4><img src="/img/icons/delegate_16.png" class="cd" /> ${_("Delegate voting")}</h4>
			<ul>
			<li style="list-style-image: url(/img/icons/delegate_to_16.png); padding-left: 5px;">
				%if not c.tile.has_delegated:
					%if c.tile.has_overridden:
						${_("You have voted yourself and not delegated voting.")}
					%else:
						${_("You have not delegated voting.")} 
						<a href="/delegation/create?scope=${delegateable.id}">${_("delegate")}</a>
					%endif 
				%else:
					%if c.tile.has_overridden:
						${_("By voting yourself, you have overridden:")}
					%else:
						${_("You have delegated voting to:")}
					%endif
				%endif
			<ul>
				%for delegation in c.tile.delegations:
					<li>
					${h.user_link(delegation.agent)|n}
					&middot; ${_("on")} <a href="/d/${delegation.scope.id}">${delegation.scope.label}</a>
					&middot; <a href="/delegation/${delegation.id}">${_("review")}</a>
{'fraction_non_alphanumeric': 0.2368365404948192, 'fraction_numerical': 0.004652146331148234, 'mean_word_length': 4.2555555555555555, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 99, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1193421', 'n_tokens_mistral': 2074, 'n_tokens_neox': 1821, 'n_words': 320}