<commit_before>{% extends '_layouts/cp' %}
{% import "_includes/forms" as forms %}

{% set title = 'DashCols' | t %}

{% block content %}

	<nav id="dashCols-sections">
		<ul>
		{% for item in layoutTabs %}
			<li><a href="{{ item.url }}" class="btn{% if item.active %} active{% endif %}">{{ item.label }}</a></li>
		{% endfor %}
		</ul>
	</nav>

	<div id="dashCols-sectionEdit">
		<form method="post" accept-charset="UTF-8" data-saveshortcut="1">

			{% include "_includes/fieldlayoutdesigner" with {
				fieldLayout : layout.getFieldLayout(),
				customizableTabs : false,
				pretendTabName : 'Columns' | t
			} only %}

			<hr />

			{% if hiddenFields is defined %}
			<h3>Hide/show default fields</h3>
			<table class="dashCols-defaultFields data fullwidth collapsible">
				<tbody>
					{% for hiddenFieldKey,hiddenFieldValue in hiddenFields %}
					<tr>
						<td class="dashCols-switch thin">
							<div class="dashCols-defaultField">
								{{ forms.lightswitch({
									id: hiddenFieldKey,
									name: 'hiddenFields[' ~ hiddenFieldKey ~ ']',
									on : hiddenFieldKey in layout.hiddenFields ? false : true,
								}) }}
							</div>
						</td>
						<td class="dashCols-fieldName"><label for="{{ hiddenFieldKey }}">{{ hiddenFieldValue }}</label></td>
					</tr>
					{% endfor %}
				</tbody>
			</table>
			<hr />
			{% endif %}

			<div class="dashCols-buttons">
				<input type="submit" class="btn submit" value="{{ 'Save' | t }}" />
			</div>

			<input type="hidden" name="action" value="dashCols/layouts/saveLayout">
			{% if sectionId is defined %}
				<input type="hidden" name="sectionId" value="{{ sectionId }}" />
				<input type="hidden" name="redirect" value="{{ url( 'entries/' ~ section.handle ) }}" />
			{% elseif categoryGroupId is defined %}
				<input type="hidden" name="categoryGroupId" value="{{ categoryGroupId }}" />
				<input type="hidden" name="redirect" value="{{ url( 'categories/' ~ section.handle ) }}" />
			{% elseif listingHandle is defined %}
				<input type="hidden" name="listingHandle" value="{{ listingHandle }}" />
				<input type="hidden" name="redirect" value="{{ url( 'entries/' ~ listingHandle ) }}" />
			{% endif %}
			{% if layout.id %}<input type="hidden" name="layoutId" value="{{ layout.id }}" />{% endif %}

		</form>
	</div>

{% endblock %}<commit_msg>Fixed minor issue with redirect to All entries listing<commit_after>{% extends '_layouts/cp' %}
{% import "_includes/forms" as forms %}

{% set title = 'DashCols' | t %}

{% block content %}

	<nav id="dashCols-sections">
		<ul>
		{% for item in layoutTabs %}
			<li><a href="{{ item.url }}" class="btn{% if item.active %} active{% endif %}">{{ item.label }}</a></li>
		{% endfor %}
		</ul>
	</nav>

	<div id="dashCols-sectionEdit">
		<form method="post" accept-charset="UTF-8" data-saveshortcut="1">

			{% include "_includes/fieldlayoutdesigner" with {
				fieldLayout : layout.getFieldLayout(),
				customizableTabs : false,
				pretendTabName : 'Columns' | t
			} only %}

			<hr />

			{% if hiddenFields is defined %}
			<h3>Hide/show default fields</h3>
			<table class="dashCols-defaultFields data fullwidth collapsible">
				<tbody>
					{% for hiddenFieldKey,hiddenFieldValue in hiddenFields %}
					<tr>
						<td class="dashCols-switch thin">
							<div class="dashCols-defaultField">
								{{ forms.lightswitch({
									id: hiddenFieldKey,
									name: 'hiddenFields[' ~ hiddenFieldKey ~ ']',
									on : hiddenFieldKey in layout.hiddenFields ? false : true,
								}) }}
							</div>
						</td>
						<td class="dashCols-fieldName"><label for="{{ hiddenFieldKey }}">{{ hiddenFieldValue }}</label></td>
					</tr>
					{% endfor %}
				</tbody>
			</table>
			<hr />
			{% endif %}

			<div class="dashCols-buttons">
				<input type="submit" class="btn submit" value="{{ 'Save' | t }}" />
			</div>

			<input type="hidden" name="action" value="dashCols/layouts/saveLayout">
			{% if sectionId is defined %}
				<input type="hidden" name="sectionId" value="{{ sectionId }}" />
				<input type="hidden" name="redirect" value="{{ url( 'entries/' ~ section.handle ) }}" />
			{% elseif categoryGroupId is defined %}
				<input type="hidden" name="categoryGroupId" value="{{ categoryGroupId }}" />
				<input type="hidden" name="redirect" value="{{ url( 'categories/' ~ section.handle ) }}" />
			{% elseif listingHandle is defined %}
				<input type="hidden" name="listingHandle" value="{{ listingHandle }}" />
				<input type="hidden" name="redirect" value="{{ url( 'entries/' ~ listingHandle == 'entries' ? '' : listingHandle ) }}" />
			{% endif %}
			{% if layout.id %}<input type="hidden" name="layoutId" value="{{ layout.id }}" />{% endif %}

		</form>
	</div>

{% endblock %}
{'fraction_non_alphanumeric': 0.19268962603000211, 'fraction_numerical': 0.001690259877456159, 'mean_word_length': 3.403720930232558, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, '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': '5816163', 'n_tokens_mistral': 1898, 'n_tokens_neox': 1477, 'n_words': 358}