<commit_before>{% extends "layouts" ~ DIR ~ "default.twig" %}

{% block title %}{{ "Manage Tags" | translate("tags") }}{% endblock %}

{% block content %}
<h2>{{ "Manage Tags" | translate("tags") }}</h2>
<table>
<thead> 
<tr class="head">
<th class="tag_name name main">{{ "Name" | translate("tags") }}</th>
<th class="tag_count value">{{ "Posts Tagged" | translate("tags") }}</th>
<th class="controls" colspan="2">{{ "Controls" | translate }}</th>
</tr>   
</thead>
<tbody> 
{% for tag in tag_cloud %}
<tr>
<td class="tag_name name main">
<a class="tag" href="{{ url('manage_tags/query/' ~ (tag.clean | url_encode)) }}" title="{{ tag.title }}">{{ tag.name }}</a>
</td>
<td class="tag_count value">
{{ tag.popularity }}
</td>
<td class="controls">
{% if visitor.group.can("edit_post") %}
<a class="tag_edit_link edit_link" href="{{ url('rename_tag/clean/' ~ (tag.clean | url_encode)) }}"><img src="{{ site.chyrp_url }}/admin/images/icons/edit.svg" alt="{{ 'edit' | translate }}"></a>
{% endif %}
</td>
<td class="controls">
{% if visitor.group.can("edit_post") %}
<a class="tag_delete_link delete_link" href="{{ url('delete_tag/clean/' ~ (tag.clean | url_encode)) }}"><img src="{{ site.chyrp_url }}/admin/images/icons/delete.svg" alt="{{ 'delete' | translate }}"></a>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td class="placeholder"><span class="sub">{{ "(none)" | translate }}</span></td>
</tr>
{% endfor %}
</tbody>
</table>
<h2>{{ GET.query is not empty ? "Search Results" | translate : "Posts" | translate }}</h2>
<form action="{{ url('bulk_tag') }}" method="post" accept-charset="UTF-8" data-toggler="tag_toggler">
<table class="interactive">
<thead>
<tr class="head">
<th class="toggler" id="tag_toggler"></th>
<th class="post_title title">{{ "Post" | translate }}</th>
<th class="post_tags list main">{{ "Tags" | translate("tags") }}</th>
<th class="controls">{{ "Controls" | translate }}</th>
</tr>
</thead>
<tbody>
{% for post in posts.paginated %}
<tr class="post">
<td class="checkbox">
<input type="checkbox" name="post[{{ loop.index0 }}]" value="{{ post.id }}" id="post_checkbox_{{ post.id }}">
</td>
<td class="post_title title">
<a class="edit_tag" href="{{ post.url() }}">{{ post.title() | striptags | oneof("[Untitled]" | translate) | truncate(40, "&hellip;", true) }}</a>
</td>
<td class="post_tags list main">
{% for name, clean in post.tags %}
<a class="tag" href="{{ url('manage_tags/query/' ~ (clean | url_encode)) }}">{{ name }}</a>
{% endfor %}
</td>
<td class="controls"><commit_msg>Tags module: changes to manage_tags.twig<commit_after>{% extends "layouts" ~ DIR ~ "default.twig" %}

{% block title %}{{ "Manage Tags" | translate("tags") }}{% endblock %}

{% block content %}
<h2>{{ "Manage Tags" | translate("tags") }}</h2>
<table>
<thead> 
<tr class="head">
<th class="tag_name name main">{{ "Name" | translate("tags") }}</th>
<th class="tag_count value">{{ "Posts Tagged" | translate("tags") }}</th>
<th class="controls" colspan="2">{{ "Controls" | translate }}</th>
</tr>   
</thead>
<tbody> 
{% for tag in tag_cloud %}
<tr>
<td class="tag_name name main">
<a class="tag" href="{{ url('manage_tags/query/' ~ (tag.clean | url_encode)) }}" title="{{ tag.title }}">{{ tag.name }}</a>
</td>
<td class="tag_count value">
{{ tag.popularity }}
</td>
<td class="controls">
{% if visitor.group.can("edit_post") %}
<a class="tag_edit_link edit_link" href="{{ url('rename_tag/clean/' ~ (tag.clean | url_encode)) }}"><img src="{{ site.chyrp_url }}/admin/images/icons/edit.svg" alt="{{ 'edit' | translate }}"></a>
{% endif %}
</td>
<td class="controls">
{% if visitor.group.can("edit_post") %}
<a class="tag_delete_link delete_link" href="{{ url('delete_tag/clean/' ~ (tag.clean | url_encode)) }}"><img src="{{ site.chyrp_url }}/admin/images/icons/delete.svg" alt="{{ 'delete' | translate }}"></a>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td class="placeholder"><span class="sub">{{ "(none)" | translate }}</span></td>
</tr>
{% endfor %}
</tbody>
</table>
<h2>{{ GET.query is not empty ? "Search Results" | translate : "Posts" | translate }}</h2>
<form action="{{ url('bulk_tag') }}" method="post" accept-charset="UTF-8" data-toggler="tag_toggler">
<table class="interactive">
<thead>
<tr class="head">
<th class="toggler" id="tag_toggler"></th>
<th class="post_title title main">{{ "Post" | translate }}</th>
<th class="post_tags list">{{ "Tags" | translate("tags") }}</th>
<th class="controls">{{ "Controls" | translate }}</th>
</tr>
</thead>
<tbody>
{% for post in posts.paginated %}
<tr class="post">
<td class="checkbox">
<input type="checkbox" name="post[{{ loop.index0 }}]" value="{{ post.id }}" id="post_checkbox_{{ post.id }}">
</td>
<td class="post_title title main">
<a class="edit_tag" href="{{ post.url() }}">{{ post.title() | striptags | oneof("[Untitled]" | translate) | truncate(40, "&hellip;", true) }}</a>
</td>
<td class="post_tags list">
{% for name, clean in post.tags %}
<a class="tag" href="{{ url('manage_tags/query/' ~ (clean | url_encode)) }}">{{ name }}</a>
{% endfor %}
</td>
<td class="controls">
{'fraction_non_alphanumeric': 0.2622495536599881, 'fraction_numerical': 0.0035707200952192026, 'mean_word_length': 5.758713136729223, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 0, '>': 143, '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': '2127289', 'n_tokens_mistral': 1900, 'n_tokens_neox': 1815, 'n_words': 453}