Use snake_case for method names

This commit is contained in:
rubenwardy
2023-06-19 21:27:49 +01:00
parent 16f93b3e13
commit 45ed12ddf0
53 changed files with 390 additions and 387 deletions

View File

@@ -68,7 +68,7 @@
</tr>
</table>
{% if current_user.rank.atLeast(current_user.rank.MODERATOR) %}
{% if current_user.rank.at_least(current_user.rank.MODERATOR) %}
<a class="btn btn-secondary float-right" href="{{ url_for('admin.audit', username=user.username) }}">
{{ _("View All") }}
</a>
@@ -81,7 +81,7 @@
<h3>{{ _("Account Deletion and Deactivation") }}</h3>
{% if current_user.rank.atLeast(current_user.rank.ADMIN) %}
{% if current_user.rank.at_least(current_user.rank.ADMIN) %}
<a class="btn btn-danger" href="{{ url_for('users.delete', username=user.username) }}">
{{ _("Delete or Deactivate") }}</a>
{% else %}

View File

@@ -36,7 +36,7 @@
name="deactivate" value="{{ _('Deactivate') }}"
{% endif %}
class="btn btn-danger" />
{% if not can_delete and current_user.rank.atLeast(current_user.rank.ADMIN) %}
{% if not can_delete and current_user.rank.at_least(current_user.rank.ADMIN) %}
<input type="submit" name="delete" value="{{ _('Delete Anyway') }}" class="btn btn-danger ml-3" />
{% endif %}
</div>

View File

@@ -39,7 +39,7 @@
<p class="text-danger">{{ _("Doesn't have password") }}</p>
{% endif %}
{% if not user.rank.atLeast(current_user.rank) %}
{% if not user.rank.at_least(current_user.rank) %}
<h3>{{ _("Ban") }}</h3>
{% if user.ban %}
<p>

View File

@@ -28,8 +28,8 @@
{{ _("Report") }}
</a>
{% if current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.MODERATOR) %}
{% if not user.rank.atLeast(current_user.rank) %}
{% if current_user.is_authenticated and current_user.rank.at_least(current_user.rank.MODERATOR) %}
{% if not user.rank.at_least(current_user.rank) %}
<a class="btn btn-secondary float-right mr-3" href="{{ url_for('users.modtools', username=user.username) }}">
<i class="fas fa-user-shield mr-1"></i>
{{ _("Moderator Tools") }}
@@ -164,7 +164,7 @@
</div>
</div>
{% endfor %}
{% if current_user == user or (current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.ADMIN)) %}
{% if current_user == user or (current_user.is_authenticated and current_user.rank.at_least(current_user.rank.ADMIN)) %}
{% for medal in medals_locked %}
{% set value = medal.progress[0] %}
{% set target = medal.progress[1] %}
@@ -202,7 +202,7 @@
{{ _("Create package") }}
</a>
{% endif %}
{% if current_user == user or (current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.EDITOR)) %}
{% if current_user == user or (current_user.is_authenticated and current_user.rank.at_least(current_user.rank.EDITOR)) %}
<a class="float-right btn btn-sm btn-secondary mr-2"
href="{{ url_for('todo.tags', author=user.username) }}">
{{ _("View list of tags") }}