mirror of
				https://github.com/sb745/NyaaV3.git
				synced 2025-10-31 16:05:46 +02:00 
			
		
		
		
	 16814d6eb7
			
		
	
	
		16814d6eb7
		
	
	
	
	
		
			
			* Add trusted application functionality This lets users apply for trusted status, given certain minimum requirements. Moderators can then review the applications, giving a recommendation, and administrators can accept or reject them. If an application is accepted or rejected, the user receives an e-mail about it. Markdown images are not rendered in applications to prevent browsers from sending automatic requests to untrusted webservers. Users who have had their application rejected cannot re-apply for a set amount of days. * minor fixes
		
			
				
	
	
		
			54 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {% extends "layout.html" %}
 | |
| {% macro render_filter_tab(name) %}
 | |
| 	<li class="nav-item{% if list_filter == name %} active{% endif %}">
 | |
| 		<a class="nav-link{% if list_filter == name %} active{% endif %}" href="{{ url_for('admin.trusted', list_filter=name) }}">
 | |
| 			{% if name %}
 | |
| 				{{ name.capitalize() }}
 | |
| 			{% else %}
 | |
| 				Open
 | |
| 			{% endif %}
 | |
| 		</a>
 | |
| 	</li>
 | |
| {% endmacro %}
 | |
| {% block title %}Trusted Applications :: {{ config.SITE_NAME }}{% endblock %}
 | |
| {% block body %}
 | |
| <ul class="nav nav-tabs" role="tablist">
 | |
| 	{{ render_filter_tab(None) }}
 | |
| 	{{ render_filter_tab('new') }}
 | |
| 	{{ render_filter_tab('reviewed') }}
 | |
| 	{{ render_filter_tab('closed') }}
 | |
| </ul>
 | |
| <div class="table">
 | |
| 	<table class="table table-bordered table-hover table-striped table-condensed">
 | |
| 		<caption>List of {{ list_filter or 'open' }} applications</caption>
 | |
| 		<thead>
 | |
| 			<tr>
 | |
| 				<th scope="col">#</th>
 | |
| 				<th scope="col">Submitter</th>
 | |
| 				<th scope="col">Submitted on</th>
 | |
| 				<th scope="col">Status</th>
 | |
| 				<th scope="col"></th>
 | |
| 			</tr>
 | |
| 		</thead>
 | |
| 		<tbody>
 | |
| 			{% for app in apps.items %}
 | |
| 			<tr class="reports-row">
 | |
| 				<td>{{ app.id }}</td>
 | |
| 				<td>
 | |
| 					<a href="{{ url_for('users.view_user', user_name=app.submitter.username) }}">
 | |
| 						{{ app.submitter.username }}
 | |
| 					</a>
 | |
| 				</td>
 | |
| 				<td data-timestamp="{{ app.created_utc_timestamp | int }}">{{ app.created_time.strftime('%Y-%m-%d %H:%M') }}</td>
 | |
| 				<td>{{ app.status.name.capitalize() }}</td>
 | |
| 				<td><a class="btn btn-primary btn-sm" style="width:100%" href="{{ url_for('admin.trusted_application', app_id=app.id) }}" role="button">View</a></td>
 | |
| 			</tr>
 | |
| 			{% endfor %}
 | |
| 		</tbody>
 | |
| 	</table>
 | |
| </div>
 | |
| <div class=pagination>
 | |
| 	{% from "bootstrap/pagination.html" import render_pagination %}
 | |
| 	{{ render_pagination(apps) }}
 | |
| </div>
 | |
| {% endblock %}
 |