<commit_before>%rebase base title="Administrar", filter="", username=username, userisadmin=userisadmin, version=version

<h2>Usuários</h2>
<form method="post" action="/admin/save-new-user" enctype="multipart/form-data">
	<input type="text" name="username" size="30">
	<input type="submit" name="submit" value="novo usuário">
</form>
<p>
<table>
	<th>usuário</th><th>nome</th><th>e-mail</th><th>administrador</th><th>ações</th>
	%for user in users:
		<tr>
			<td> {{user['username']}} </td>
			<td> {{user['name']}} </td>
			<td> {{user['email']}} </td>
			<td>
				%if user['is_admin']:
					sim
				%else:
					não
				%end
			</td>
			<td>
				<a href="/admin/edit-user/{{user['username']}}">editar</a> 
				%if username != user['username']:
					<a href="/admin/remove-user/{{user['username']}}">excluir</a>
					<a href="/admin/force-new-password/{{user['username']}}">forçar nova senha</a>
					%if user['is_admin']:
						<a href="/admin/change-user-admin-status/{{user['username']}}/0">retirar admin</a>
					%else:
						<a href="/admin/change-user-admin-status/{{user['username']}}/1">tornar admin</a>
					%end
				%end
			</td>
		</tr>
	%end
</table>

<h2>Funcionalidades ativas</h2>
<form method="post" action="/admin/save-features" enctype="multipart/form-data">
	<input type="checkbox" name="features" {{ "checked=1" if "timetrack" in features else "" }} value="timetrack">Cronômetro de tempo
	<br>
	<input type="checkbox" name="features" {{ "checked=1" if "adminonly" in features else "" }} value="adminonly">Restrição de tickets para administradores
	<br>
	<input type="checkbox" name="features" {{ "checked=1" if "fileattach" in features else "" }} value="fileattach">Arquivos anexos
	<br>
	<input type="checkbox" name="features" {{ "checked=1" if "dependency" in features else "" }} value="dependency">Dependências entre tickets
	<br>
	<input type="checkbox" name="features" {{ "checked=1" if "datedue" in features else "" }} value="datedue">Data de previsão de solução

	<p>

	<input type="submit" name="submit" value="salvar funcionalidades">
</form>

<h2>Configurações</h2>
<form method="post" action="/admin/save-config" enctype="multipart/form-data">
	<input type="text" size="40" name="mail.smtp" value="{{ config['mail.smtp'] }}">
	<tt>mail.smtp</tt> (Servidor SMTP para envio de e-mail)
	<p>

	<input type="text" size="40" name="file.maxsize" value="{{ config['file.maxsize'] }}">
	<tt>file.maxsize</tt> (Tamanho máximo em bytes de arquivos anexos)
	<p>

	<input type="submit" name="submit" value="salvar configurações">
</form>
<commit_msg>melhora descrição de funcionalidade<commit_after>%rebase base title="Administrar", filter="", username=username, userisadmin=userisadmin, version=version

<h2>Usuários</h2>
<form method="post" action="/admin/save-new-user" enctype="multipart/form-data">
	<input type="text" name="username" size="30">
	<input type="submit" name="submit" value="novo usuário">
</form>
<p>
<table>
	<th>usuário</th><th>nome</th><th>e-mail</th><th>administrador</th><th>ações</th>
	%for user in users:
		<tr>
			<td> {{user['username']}} </td>
			<td> {{user['name']}} </td>
			<td> {{user['email']}} </td>
			<td>
				%if user['is_admin']:
					sim
				%else:
					não
				%end
			</td>
			<td>
				<a href="/admin/edit-user/{{user['username']}}">editar</a> 
				%if username != user['username']:
					<a href="/admin/remove-user/{{user['username']}}">excluir</a>
					<a href="/admin/force-new-password/{{user['username']}}">forçar nova senha</a>
					%if user['is_admin']:
						<a href="/admin/change-user-admin-status/{{user['username']}}/0">retirar admin</a>
					%else:
						<a href="/admin/change-user-admin-status/{{user['username']}}/1">tornar admin</a>
					%end
				%end
			</td>
		</tr>
	%end
</table>

<h2>Funcionalidades ativas</h2>
<form method="post" action="/admin/save-features" enctype="multipart/form-data">
	<input type="checkbox" name="features" {{ "checked=1" if "timetrack" in features else "" }} value="timetrack">Tempo trabalhado
	<br>
	<input type="checkbox" name="features" {{ "checked=1" if "adminonly" in features else "" }} value="adminonly">Restrição de tickets para administradores
	<br>
	<input type="checkbox" name="features" {{ "checked=1" if "fileattach" in features else "" }} value="fileattach">Arquivos anexos
	<br>
	<input type="checkbox" name="features" {{ "checked=1" if "dependency" in features else "" }} value="dependency">Dependências entre tickets
	<br>
	<input type="checkbox" name="features" {{ "checked=1" if "datedue" in features else "" }} value="datedue">Data de previsão de solução

	<p>

	<input type="submit" name="submit" value="salvar funcionalidades">
</form>

<h2>Configurações</h2>
<form method="post" action="/admin/save-config" enctype="multipart/form-data">
	<input type="text" size="40" name="mail.smtp" value="{{ config['mail.smtp'] }}">
	<tt>mail.smtp</tt> (Servidor SMTP para envio de e-mail)
	<p>

	<input type="text" size="40" name="file.maxsize" value="{{ config['file.maxsize'] }}">
	<tt>file.maxsize</tt> (Tamanho máximo em bytes de arquivos anexos)
	<p>

	<input type="submit" name="submit" value="salvar configurações">
</form>

{'fraction_non_alphanumeric': 0.2123035125169804, 'fraction_numerical': 0.007374345041723268, 'mean_word_length': 5.187274909963985, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 141, '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': '4465056', 'n_tokens_mistral': 2054, 'n_tokens_neox': 1876, 'n_words': 390}