<commit_before>{% extends "admin_base.tpl" %}

{% block title %}Recipients for “{{ m.rsc[id].title }}”{% endblock %}

{% block content %}
	<div id="content" class="zp-85">
		<div class="block clearfix">

		<h2>Recipients for “{{ m.rsc[id].title }}”</h2>

	{% if not m.rsc[id].is_editable %}
		<p>You are not allowed to view or edit the recipients list. You need to have edit permission on the mailing list to change and view the recipients.</p>
		
		{% button text="cancel" action={redirect back} %}
	{% else %}

		{% button text="Add recipient" title="Add a new recipient." postback={dialog_recipient_add id=id} %}
		{% button text="Download all" title="Download list of all active recipients." action={growl text="Downloading active recipients list. Check your download window."} action={redirect dispatch="mailinglist_export" id=id} %}
		{% button text="Upload file" title="Upload a list of recipients." action={dialog_open template="_dialog_mailinglist_recipients_upload.tpl" id=id} %}

		<hr class="clear" />
		<p>All recipients of the mailing list. You can upload or download this list, which must be a file with one e-mail address per line. <br/><a href="{% url admin_edit_rsc id=id %}">Edit the mailing list &raquo;</a></p>
		{% with m.search.paged[{mailinglist_recipients id=id pagelen=150}] as recipients %}
			{% pager result=recipients dispatch="mailinglist_recipients" id=id qargs %}
			{% for list in recipients|vsplit_in:3 %}
				<div class="zp-30">
					<h3 class="above-list ">Recipients</h3>
					<ul class="short-list">
						<li class="headers clearfix">
							<span class="zp-10">Act</span>
							<span class="zp-70">Email</span>
							<span class="zp-20">Actions</span>
						</li>
					{% for rcpt_id, email, is_enabled in list %}
						<li id="recipient-{{rcpt_id}}">
							<a href="#" class="clearfix">
								<span class="zp-10"><input id="{{ #enabled.rcpt_id }}" title="Check to activate the e-mail address." type="checkbox" value="{{ rcpt_id }}" {% if is_enabled %}checked="checked"{% endif %} /></span>
								<span class="zp-70">{{ email|escape|default:"-" }}</span>
								<span class="zp-20">
									{% button text="delete" title="Remove this recipient. No undo possible." postback={recipient_delete recipient_id=rcpt_id} %}
								</span><commit_msg>Mailinglist: fix paging on admin recipients page.<commit_after>{% extends "admin_base.tpl" %}

{% block title %}Recipients for “{{ m.rsc[id].title }}”{% endblock %}

{% block content %}
	<div id="content" class="zp-85">
		<div class="block clearfix">

		<h2>Recipients for “{{ m.rsc[id].title }}”</h2>

	{% if not m.rsc[id].is_editable %}
		<p>You are not allowed to view or edit the recipients list. You need to have edit permission on the mailing list to change and view the recipients.</p>
		
		{% button text="cancel" action={redirect back} %}
	{% else %}

		{% button text="Add recipient" title="Add a new recipient." postback={dialog_recipient_add id=id} %}
		{% button text="Download all" title="Download list of all active recipients." action={growl text="Downloading active recipients list. Check your download window."} action={redirect dispatch="mailinglist_export" id=id} %}
		{% button text="Upload file" title="Upload a list of recipients." action={dialog_open template="_dialog_mailinglist_recipients_upload.tpl" id=id} %}

		<hr class="clear" />
		<p>All recipients of the mailing list. You can upload or download this list, which must be a file with one e-mail address per line. <br/><a href="{% url admin_edit_rsc id=id %}">Edit the mailing list &raquo;</a></p>
		{% with m.search.paged[{mailinglist_recipients id=id pagelen=150 page=q.page}] as recipients %}
			{% pager result=recipients dispatch="admin_mailinglist_recipients" id=id qargs %}
			{% for list in recipients|vsplit_in:3 %}
				<div class="zp-30">
					<h3 class="above-list ">Recipients</h3>
					<ul class="short-list">
						<li class="headers clearfix">
							<span class="zp-10">Act</span>
							<span class="zp-70">Email</span>
							<span class="zp-20">Actions</span>
						</li>
					{% for rcpt_id, email, is_enabled in list %}
						<li id="recipient-{{rcpt_id}}">
							<a href="#" class="clearfix">
								<span class="zp-10"><input id="{{ #enabled.rcpt_id }}" title="Check to activate the e-mail address." type="checkbox" value="{{ rcpt_id }}" {% if is_enabled %}checked="checked"{% endif %} /></span>
								<span class="zp-70">{{ email|escape|default:"-" }}</span>
								<span class="zp-20">
									{% button text="delete" title="Remove this recipient. No undo possible." postback={recipient_delete recipient_id=rcpt_id} %}
								</span>
{'fraction_non_alphanumeric': 0.16551724137931034, 'fraction_numerical': 0.010344827586206896, 'mean_word_length': 4.202914798206278, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1565041', 'n_tokens_mistral': 1820, 'n_tokens_neox': 1452, 'n_words': 428}