Redbeard / templates / _partials.html

{% macro render_field(field) %}
<fieldset>
	{% if field.errors %}
	<ul class="errors">
		{% for error in field.errors %}
		<li>{{ error }}</li>
		{% endfor %}
	</ul>
	{% endif %}
	{{ field.label }}
	{{ field(**kwargs)|safe }}
</fieldset>
{% endmacro %}

{% macro render_keyvalue(field1, field2) %}
<fieldset>
	{% if field1.errors or field2.errors %}
	<ul class="errors">
		{% for error in field1.errors %}
		<li>{{ error }}</li>
		{% endfor %}
		{% for error in field2.errors %}
		<li>{{ error }}</li>
		{% endfor %}
	</ul>
	{% endif %}
	<table>
		<thead>
			<tr>
				<th>{{ field1.label }}</th>
				<th>{{ field2.label }}</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>{{ field1|safe }}</td>
				<td>{{ field2(**kwargs)|safe }}</td>
			</tr>
		</tbody>
	</table>
</fieldset>
{% endmacro %}

{% macro key_list(key) %}
<li>
	<a href="{{ url_for('key', key=key) }}">{{ key }}</a>
</li>
{% endmacro %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.