<commit_before><?php
	$years = get_terms("course_year");
	$periods = get_terms("course_period");
?>

<nav class="box side-nav">

	<h2>Filter</h2>

	<form action="" method="get" id="courses-form">
		<fieldset id="periods-field">
			<ul class="list">
				<li>
					<label><input value="-1" name="course_period" type="radio" checked /> Alla perioder</label>
				</li>
				<?php foreach($periods as $period) : ?>
				<li>
					<label><input 
							value="<?php echo $period->term_id;?>" 
							name="course_period" 
							type="radio" /> <?php echo $period->name;?></label>
				</li>
				<?php endforeach;?>
			</ul>
		</fieldset>

		<fieldset id="years-field">
			<ul class="list">
				<li>
					<label><input value="-1" name="course_year" type="radio" checked /> Alla årskurser</label>
				</li>
				<?php foreach($years as $year) : ?>
				<li>
					<label><input 
							value="<?php echo $year->term_id;?>" 
							name="course_year" 
							type="radio" /> <?php echo $year->name;?></label>
				</li>
				<?php endforeach;?>
			</ul>
		</fieldset>

	</form>
</nav><commit_msg>Add text for missing periods and years in course sidebar<commit_after><?php
	$years = get_terms("course_year");
	$periods = get_terms("course_period");
?>

<nav class="box side-nav">

	<form action="" method="get" id="courses-form">
		<h2 class="form-title">Filter</h2>

		<?php if($periods) : ?>
		<fieldset id="periods-field">
			<ul class="list">
				<li>
					<label><input value="-1" name="course_period" type="radio" checked /> Alla perioder</label>
				</li>
				<?php foreach($periods as $period) : ?>
				<li>
					<label><input 
							value="<?php echo $period->term_id;?>" 
							name="course_period" 
							type="radio" /> <?php echo $period->name;?></label>
				</li>
				<?php endforeach;?>
			</ul>
		</fieldset>

		<?php else : ?>

		<p class="no-content">Inga läsperioder inlagda</p>

		<?php endif;?>


		<?php if($years) : ?>

		<fieldset id="years-field">
			<ul class="list">
				<li>
					<label><input value="-1" name="course_year" type="radio" checked /> Alla årskurser</label>
				</li>
				<?php foreach($years as $year) : ?>
				<li>
					<label><input 
							value="<?php echo $year->term_id;?>" 
							name="course_year" 
							type="radio" /> <?php echo $year->name;?></label>
				</li>
				<?php endforeach;?>
			</ul>
		</fieldset>

		<?php else : ?>

		<p class="no-content">Inga årskurser inlagda</p>

		<?php endif;?>

	</form>
</nav>
{'fraction_non_alphanumeric': 0.21425661914460284, 'fraction_numerical': 0.003258655804480652, 'mean_word_length': 3.113902847571189, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 107, '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': '465405', 'n_tokens_mistral': 1130, 'n_tokens_neox': 897, 'n_words': 187}