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

{% block title %} admin edit resource {% endblock %}

{% block tinymce %}
<script type="text/javascript" src="/lib/js/modules/tinymce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init(tinyInit);
</script>	
{% endblock %}

{% block content %}
{% with m.rsc[id] as r %}
  {% with r.is_editable as is_editable %}
	<div id="content" class="zp-85">
		<div class="block clearfix">

			{% if not is_editable %}
				<h2>
					You are not allowed to edit the {{ m.rsc[r.category_id].title|lower }} “{{ r.title|striptags }}”
				</h2>
			{% else %}
				<p class="admin-chapeau">editing:
					<span class="right" style="text-align: right">
						Modified {{ r.modified|timesince }}.<br/>
						By {{ m.rsc[r.modifier_id].title }}.
					</span>
				</p>
				<h2>{{ r.title|striptags|default:"<em>untitled</em>" }}
					<span>{{ m.rsc[r.category_id].title|lower }} <a href="#category">change</a></span>
				</h2>
			{% endif %}	
<commit_msg>Show the title of the to-be-edited resource in the <title/><commit_after>{% extends "admin_base.tpl" %}

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

{% block tinymce %}
<script type="text/javascript" src="/lib/js/modules/tinymce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init(tinyInit);
</script>	
{% endblock %}

{% block content %}
{% with m.rsc[id] as r %}
  {% with r.is_editable as is_editable %}
	<div id="content" class="zp-85">
		<div class="block clearfix">

			{% if not is_editable %}
				<h2>
					You are not allowed to edit the {{ m.rsc[r.category_id].title|lower }} “{{ r.title|striptags }}”
				</h2>
			{% else %}
				<p class="admin-chapeau">editing:
					<span class="right" style="text-align: right">
						Modified {{ r.modified|timesince }}.<br/>
						By {{ m.rsc[r.modifier_id].title }}.
					</span>
				</p>
				<h2>{{ r.title|striptags|default:"<em>untitled</em>" }}
					<span>{{ m.rsc[r.category_id].title|lower }} <a href="#category">change</a></span>
				</h2>
			{% endif %}	

{'fraction_non_alphanumeric': 0.21215090641842235, 'fraction_numerical': 0.005879470847623714, 'mean_word_length': 3.5580357142857144, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 46, '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': '240818', 'n_tokens_mistral': 917, 'n_tokens_neox': 759, 'n_words': 150}