<commit_before>{{!-- Unique alerts/corrections system for dataset landing page - only shown when no-versions=true --}}
{{#if no-versions}}

	{{!-- Store whether dataset has correction and/or alerts --}}
	{{#each alerts}}
		{{#if_eq type "correction"}}
			{{#assign "has-corrections"}}
				true
			{{/assign}}
		{{/if_eq}}

		{{#if_eq type "alert"}}
			{{#assign "has-alerts"}}
				true
			{{/assign}}
		{{/if_eq}}
	{{/each}}

	{{!-- Show those alerts/corrections --}}
	{{#if alerts}}
		<div class="alert">
			<div class="wrapper">
				<div class="col-wrap">
					<div class="col">

						<div class="show-hide show-hide--dark js-show-hide">
							<div class="js-show-hide__title">
								<div class="alert--warning__icon">!</div>
								<h2 class="show-hide__title alert--warning__title">

									{{!-- Lots of 'if's to handle combinations of corrections or notices --}}
									{{#if_all has-corrections has-alerts}}
										Corrections and notices
									{{else}}
										{{#if has-corrections}}
											Correction{{#if_ne alerts 1}}s{{/if_ne}}
										{{else}}
											Notice{{#if_ne alerts 1}}s{{/if_ne}}
										{{/if}}
									{{/if_all}}
								</h2>
							</div>

							<div class="js-show-hide__content">
								{{> partials/notice}}
							</div>

						</div>
					</div>
				</div>
			</div>
		</div>
	{{/if}}

{{else}}

	{{#if_any description.latestRelease versions alerts (eq type "bulletin") (eq type "article") (eq type "compendium_landing_page") (endsWith (parentPath uri) "previous")}} {{!-- Must always show on bulletin & article for 'not latest release' alert or for 'previous versions' alert on dataset-landing-pages --}}
		{{#unless (eq type "timeseries")}} {{!-- Use a different type of alert block if it is a timeseries page --}}
			<div class="alert">
				<div class="wrapper">
					<div class="col-wrap">
						<div class="col">

							{{!-- Latest info --}}
							{{> partials/latest-release}}

							{{!-- Corrections & alerts --}}
							{{#if_any versions alerts}}
								<div class="show-hide show-hide--dark js-show-hide">
									<div class="js-show-hide__title">
										<div class="alert--warning__icon">!</div>

										<h2 class="show-hide__title alert--warning__title">
											{{!-- Lots of 'if's to handle plurals and combinations of corrections or notices --}}
											{{#if_all versions alerts}}
												Corrections and notices
											{{else}}
												{{#if versions}}
													Correction{{#if_ne versions.size 1}}s{{/if_ne}}
												{{else}}
													Notice{{#if_ne alerts.size 1}}s{{/if_ne}}
												{{/if}}
											{{/if_all}}
										</h2>
									</div>

									<div class="js-show-hide__content">
										{{> partials/correction}}
										{{> partials/notice}}
									</div>

								</div>
							{{/if_any}}
						</div>
					</div>
				</div>
			</div>

		{{else}}

			{{!-- Alert block for timeseries --}}
			{{#if versions.correctionNotice}}
				<div class="alert">
					<div class="wrapper">
						<div class="col-wrap">
							<div class="col">
								<div class="show-hide show-hide--dark js-show-hide">
									<div class="js-show-hide__title">
										<div class="alert--warning__icon">!</div>
										<h2 class="show-hide__title alert--warning__title">Correction</h2>
									</div>

									<div class="js-show-hide__content">
										<section class="show-hide__content alert--warning__content section__content--markdown">
											{{#each versions}}
												{{#if correctionNotice}}
													<p class="alert__date">{{df updateDate}}</p>
													{{md correctionNotice}}
													<a class="btn btn--primary margin-bottom-sm--3 margin-bottom-md--3 print--hide"
													   href="{{uri}}">View previous version</a>
												{{/if}}
											{{/each}}
										</section>
									</div>

								</div>
							</div>
						</div>
					</div>
				</div>
			{{/if}}
		{{/unless}}
	{{/if_any}}
{{/if}}<commit_msg>Fix corrections not showing on timeseries at all<commit_after>{{!-- Unique alerts/corrections system for dataset landing page - only shown when no-versions=true --}}
{{#if no-versions}}

	{{!-- Store whether dataset has correction and/or alerts --}}
	{{#each alerts}}
		{{#if_eq type "correction"}}
			{{#assign "has-corrections"}}
				true
			{{/assign}}
		{{/if_eq}}

		{{#if_eq type "alert"}}
			{{#assign "has-alerts"}}
				true
			{{/assign}}
		{{/if_eq}}
	{{/each}}

	{{!-- Show those alerts/corrections --}}
	{{#if alerts}}
		<div class="alert">
			<div class="wrapper">
				<div class="col-wrap">
					<div class="col">

						<div class="show-hide show-hide--dark js-show-hide">
							<div class="js-show-hide__title">
								<div class="alert--warning__icon">!</div>
								<h2 class="show-hide__title alert--warning__title">

									{{!-- Lots of 'if's to handle combinations of corrections or notices --}}
									{{#if_all has-corrections has-alerts}}
										Corrections and notices
									{{else}}
										{{#if has-corrections}}
											Correction{{#if_ne alerts 1}}s{{/if_ne}}
										{{else}}
											Notice{{#if_ne alerts 1}}s{{/if_ne}}
										{{/if}}
									{{/if_all}}
								</h2>
							</div>

							<div class="js-show-hide__content">
								{{> partials/notice}}
							</div>

						</div>
					</div>
				</div>
			</div>
		</div>
	{{/if}}

{{else}}

	{{#if_any description.latestRelease versions alerts (eq type "bulletin") (eq type "article") (eq type "compendium_landing_page") (endsWith (parentPath uri) "previous")}} {{!-- Must always show on bulletin & article for 'not latest release' alert or for 'previous versions' alert on dataset-landing-pages --}}
		{{#unless (eq type "timeseries")}} {{!-- Use a different type of alert block if it is a timeseries page --}}
			<div class="alert">
				<div class="wrapper">
					<div class="col-wrap">
						<div class="col">

							{{!-- Latest info --}}
							{{> partials/latest-release}}

							{{!-- Corrections & alerts --}}
							{{#if_any versions alerts}}
								<div class="show-hide show-hide--dark js-show-hide">
									<div class="js-show-hide__title">
										<div class="alert--warning__icon">!</div>

										<h2 class="show-hide__title alert--warning__title">
											{{!-- Lots of 'if's to handle plurals and combinations of corrections or notices --}}
											{{#if_all versions alerts}}
												Corrections and notices
											{{else}}
												{{#if versions}}
													Correction{{#if_ne versions.size 1}}s{{/if_ne}}
												{{else}}
													Notice{{#if_ne alerts.size 1}}s{{/if_ne}}
												{{/if}}
											{{/if_all}}
										</h2>
									</div>

									<div class="js-show-hide__content">
										{{> partials/correction}}
										{{> partials/notice}}
									</div>

								</div>
							{{/if_any}}
						</div>
					</div>
				</div>
			</div>

		{{else}}

			{{!-- Set whether there are any corrections --}}
			{{#each versions}}
				{{#if correctionNotice}}
					{{#assign "has-corrections"}}true{{/assign}}
				{{/if}}
			{{/each}}

			{{!-- Alert block for timeseries --}}
			{{#if has-corrections}}
				<div class="alert">
					<div class="wrapper">
						<div class="col-wrap">
							<div class="col">
								<div class="show-hide show-hide--dark js-show-hide">
									<div class="js-show-hide__title">
										<div class="alert--warning__icon">!</div>
										<h2 class="show-hide__title alert--warning__title">Correction</h2>
									</div>

									<div class="js-show-hide__content">
										<section class="show-hide__content alert--warning__content section__content--markdown">
											{{#each versions}}
												{{#if correctionNotice}}
													<p class="alert__date">{{df updateDate}}</p>
													{{md correctionNotice}}
													<a class="btn btn--primary margin-bottom-sm--3 margin-bottom-md--3 print--hide"
													   href="{{uri}}">View previous version</a>
												{{/if}}
											{{/each}}
										</section>
									</div>

								</div>
							</div>
						</div>
					</div>
				</div>
			{{/if}}
		{{/unless}}
	{{/if_any}}
{{/if}}
{'fraction_non_alphanumeric': 0.18426197458455523, 'fraction_numerical': 0.002932551319648094, 'mean_word_length': 2.108621344473984, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 131, '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': '1085645', 'n_tokens_mistral': 3997, 'n_tokens_neox': 2589, 'n_words': 602}