<commit_before><?php // See http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination ?>

<?php if ($this->pageCount): ?>
	<div class="paginator">
		<!-- Previous page link -->
		<?php if (isset($this->previous)): ?>
			<span class="enabled" onclick="gotoPage(<?php echo $this->index . ',' . $this->previous; ?>)">&lt; Previous</span> |
		<?php else: ?>
			<span class="disabled">&lt; Previous</span> |
		<?php endif; ?>
		
		<!-- Numbered page links -->
		<?php foreach ($this->pagesInRange as $page): ?>
			<?php if ($page != $this->current): ?>
				<span class="enabled" onclick="gotoPage(<?php echo $this->index . ',' . $page; ?>)"><?php echo $page; ?></span> |
			<?php else: ?>
				<span class="currnet"><?php echo $page; ?></span> |
			<?php endif; ?>
		<?php endforeach; ?>
		
		<!-- Next page link -->
		<?php if (isset($this->next)): ?>
			<span class="enabled" onclick="gotoPage(<?php echo $this->index . ',' . $this->next; ?>)">Next &gt; </span>
		<?php else: ?>
			<span class="disabled">Next &gt;</span>
		<?php endif; ?>
		<form method="post" id="frmPaginator<?php echo $this->index; ?>" action="<?php echo $this->action; ?>" style="display: inline; ">
			<select id="pageSize" name="pageSize" onchange="gotoPage(<?php echo $this->index; ?>, 1);">
				<?php 
					foreach($this->pageSizes as $pageSize)
					{
						echo "<option " . ($this->itemCountPerPage == $pageSize) ? 'selected="selected"' : '' . ">$pageSize</option>";
					}
				?>
			</select>
			<?php $params = ($this->request) ? $this->request->getParams() : array(); ?>
			<?php if (count($params)): ?>
				<?php $ignore = array('submit', 'pageSize'); ?>
				<?php foreach ($params as $field => $value): ?>
					<?php if ($field != $this->pageFieldName && !in_array($field, $ignore)): ?>
						<input type="hidden" name="<?php echo $field; ?>" value="<?php echo $value; ?>"/>
					<?php endif; ?>
				<?php endforeach; ?>
			<?php endif; ?>
			<input type="hidden" id="page" name="<?php echo $this->pageFieldName; ?>" value="<?php echo $this->current; ?>"/>
		</form>
	</div>
<?php endif; ?>
	
<?php if ($this->index == 1 || $this->index == 2): ?>
	<script type="text/javascript">
	function gotoPage(index, page)
	{
		var frm = document.getElementById("frmPaginator" + index);
		frm.page.value = page;
		frm.submit();
	}
	</script>
<?php endif; ?>
<commit_msg>qnd: control page size combo box<commit_after><?php // See http://developer.yahoo.com/ypatterns/pattern.php?pattern=searchpagination ?>

<?php if ($this->pageCount): ?>
	<div class="paginator">
		<!-- Previous page link -->
		<?php if (isset($this->previous)): ?>
			<span class="enabled" onclick="gotoPage(<?php echo $this->index . ',' . $this->previous; ?>)">&lt; Previous</span> |
		<?php else: ?>
			<span class="disabled">&lt; Previous</span> |
		<?php endif; ?>
		
		<!-- Numbered page links -->
		<?php foreach ($this->pagesInRange as $page): ?>
			<?php if ($page != $this->current): ?>
				<span class="enabled" onclick="gotoPage(<?php echo $this->index . ',' . $page; ?>)"><?php echo $page; ?></span> |
			<?php else: ?>
				<span class="currnet"><?php echo $page; ?></span> |
			<?php endif; ?>
		<?php endforeach; ?>
		
		<!-- Next page link -->
		<?php if (isset($this->next)): ?>
			<span class="enabled" onclick="gotoPage(<?php echo $this->index . ',' . $this->next; ?>)">Next &gt; </span>
		<?php else: ?>
			<span class="disabled">Next &gt;</span>
		<?php endif; ?>
		<form method="post" id="frmPaginator<?php echo $this->index; ?>" action="<?php echo $this->action; ?>" style="display: inline; ">
			<select id="pageSize" name="pageSize" onchange="gotoPage(<?php echo $this->index; ?>, 1);">
				<?php 
					foreach($this->pageSizes as $pageSize)
					{
						echo "<option " . (($this->itemCountPerPage == $pageSize) ? 'selected="selected"' : '') . ">$pageSize</option>";
					}
				?>
			</select>
			<?php $params = ($this->request) ? $this->request->getParams() : array(); ?>
			<?php if (count($params)): ?>
				<?php $ignore = array('submit', 'pageSize'); ?>
				<?php foreach ($params as $field => $value): ?>
					<?php if ($field != $this->pageFieldName && !in_array($field, $ignore)): ?>
						<input type="hidden" name="<?php echo $field; ?>" value="<?php echo $value; ?>"/>
					<?php endif; ?>
				<?php endforeach; ?>
			<?php endif; ?>
			<input type="hidden" id="page" name="<?php echo $this->pageFieldName; ?>" value="<?php echo $this->current; ?>"/>
		</form>
	</div>
<?php endif; ?>
	
<?php if ($this->index == 1 || $this->index == 2): ?>
	<script type="text/javascript">
	function gotoPage(index, page)
	{
		var frm = document.getElementById("frmPaginator" + index);
		frm.page.value = page;
		frm.submit();
	}
	</script>
<?php endif; ?>

{'fraction_non_alphanumeric': 0.2423180037121056, 'fraction_numerical': 0.0012373685295937306, 'mean_word_length': 3.43327239488117, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 179, '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': '1210852', 'n_tokens_mistral': 1876, 'n_tokens_neox': 1597, 'n_words': 373}