<commit_before><?php
$underscoredPluginName = Inflector::underscore($plugin);
$header = <<<EOF
<?php
\$this->viewVars['title_for_layout'] = __d('$underscoredPluginName', '$pluralHumanName');
\$this->extend('/Common/admin_edit');

\$this->Html
	->addCrumb('', '/admin', array('icon' => 'home'))
	->addCrumb(__d('$underscoredPluginName', '${pluralHumanName}'), array('action' => 'index'));

if (\$this->action == 'admin_edit') {
	\$this->Html->addCrumb(\$this->data['$modelClass']['$displayField'], '/' . \$this->request->url);
	\$this->viewVars['title_for_layout'] = '$pluralHumanName: ' . \$this->data['$modelClass']['$displayField'];
} else {
	\$this->Html->addCrumb(__d('croogo', 'Add'), '/' . \$this->request->url);
}

echo \$this->Form->create('{$modelClass}');

?>\n
EOF;
echo $header;

$primaryTab = strtolower(Inflector::slug($singularHumanName, '-'));

?>
<div class="<?php echo $pluralVar; ?> row-fluid">
	<div class="span8">
		<ul class="nav nav-tabs">
		<?php echo "<?php\n"; ?>
		<?php echo "\techo \$this->Croogo->adminTab(__d('$underscoredPluginName', '$singularHumanName'), '#$primaryTab');\n"; ?>
		<?php echo "\techo \$this->Croogo->adminTabs();\n"; ?>
		<?php echo "?>\n"; ?>
		</ul>

		<div class="tab-content">
			<div id='<?php echo $primaryTab; ?>' class="tab-pane">
<?php
				echo "\t\t\t<?php\n";
				echo "\t\t\t\techo \$this->Form->input('{$primaryKey}');\n";
				echo "\t\t\t\t\$this->Form->inputDefaults(array('label' => false, 'class' => 'span10'));\n";
				foreach ($fields as $field) {
					if ($field == $primaryKey) {
						continue;
					} elseif (!in_array($field, array('created', 'modified', 'updated'))) {
						$fieldLabel = Inflector::humanize($field);
						echo <<<EOF
				echo \$this->Form->input('{$field}', array(
					'label' => '$fieldLabel',
				));\n
EOF;
					}
				}
				if (!empty($associations['hasAndBelongsToMany'])) {
					foreach ($associations['hasAndBelongsToMany'] as $assocName => $assocData) {
						echo "\t\t\t\techo \$this->Form->input('{$assocName}');\n";
					}
				}

			echo "\t\t\t?>\n";
?>
			</div>
<?php
			echo "\t\t\t<?php echo \$this->Croogo->adminTabs(); ?>\n";
?>
		</div>

	</div>

	<div class="span4">
	<?php
		echo <<<EOF
<?php
		echo \$this->Html->beginBox(__d('croogo', 'Publishing')) .
			\$this->Form->button(__d('croogo', 'Apply'), array('name' => 'apply')) .
			\$this->Form->button(__d('croogo', 'Save'), array('class' => 'btn btn-primary')) .
			\$this->Html->link(__d('croogo', 'Cancel'), array('action' => 'index'), array('class' => 'btn btn-danger')) .
			\$this->Html->endBox();
		?>\n
EOF;
	?>
	</div>

</div>
<?php echo "<?php echo \$this->Form->end(); ?>\n"; ?><commit_msg>Template: Call CroogoHelper::adminBoxes() by default<commit_after><?php
$underscoredPluginName = Inflector::underscore($plugin);
$header = <<<EOF
<?php
\$this->viewVars['title_for_layout'] = __d('$underscoredPluginName', '$pluralHumanName');
\$this->extend('/Common/admin_edit');

\$this->Html
	->addCrumb('', '/admin', array('icon' => 'home'))
	->addCrumb(__d('$underscoredPluginName', '${pluralHumanName}'), array('action' => 'index'));

if (\$this->action == 'admin_edit') {
	\$this->Html->addCrumb(\$this->data['$modelClass']['$displayField'], '/' . \$this->request->url);
	\$this->viewVars['title_for_layout'] = '$pluralHumanName: ' . \$this->data['$modelClass']['$displayField'];
} else {
	\$this->Html->addCrumb(__d('croogo', 'Add'), '/' . \$this->request->url);
}

echo \$this->Form->create('{$modelClass}');

?>\n
EOF;
echo $header;

$primaryTab = strtolower(Inflector::slug($singularHumanName, '-'));

?>
<div class="<?php echo $pluralVar; ?> row-fluid">
	<div class="span8">
		<ul class="nav nav-tabs">
		<?php echo "<?php\n"; ?>
		<?php echo "\techo \$this->Croogo->adminTab(__d('$underscoredPluginName', '$singularHumanName'), '#$primaryTab');\n"; ?>
		<?php echo "\techo \$this->Croogo->adminTabs();\n"; ?>
		<?php echo "?>\n"; ?>
		</ul>

		<div class="tab-content">
			<div id='<?php echo $primaryTab; ?>' class="tab-pane">
<?php
				echo "\t\t\t<?php\n";
				echo "\t\t\t\techo \$this->Form->input('{$primaryKey}');\n";
				echo "\t\t\t\t\$this->Form->inputDefaults(array('label' => false, 'class' => 'span10'));\n";
				foreach ($fields as $field) {
					if ($field == $primaryKey) {
						continue;
					} elseif (!in_array($field, array('created', 'modified', 'updated'))) {
						$fieldLabel = Inflector::humanize($field);
						echo <<<EOF
				echo \$this->Form->input('{$field}', array(
					'label' => '$fieldLabel',
				));\n
EOF;
					}
				}
				if (!empty($associations['hasAndBelongsToMany'])) {
					foreach ($associations['hasAndBelongsToMany'] as $assocName => $assocData) {
						echo "\t\t\t\techo \$this->Form->input('{$assocName}');\n";
					}
				}

			echo "\t\t\t?>\n";
?>
			</div>
<?php
			echo "\t\t\t<?php echo \$this->Croogo->adminTabs(); ?>\n";
?>
		</div>

	</div>

	<div class="span4">
	<?php
		echo <<<EOF
<?php
		echo \$this->Html->beginBox(__d('croogo', 'Publishing')) .
			\$this->Form->button(__d('croogo', 'Apply'), array('name' => 'apply')) .
			\$this->Form->button(__d('croogo', 'Save'), array('class' => 'btn btn-primary')) .
			\$this->Html->link(__d('croogo', 'Cancel'), array('action' => 'index'), array('class' => 'btn btn-danger')) .
			\$this->Html->endBox();

		echo \$this->Croogo->adminBoxes();
		?>\n
EOF;
	?>
	</div>

</div>
<?php echo "<?php echo \$this->Form->end(); ?>\n"; ?>
{'fraction_non_alphanumeric': 0.27479224376731304, 'fraction_numerical': 0.0014773776546629731, 'mean_word_length': 4.263362487852284, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 173, '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': '4323966', 'n_tokens_mistral': 2274, 'n_tokens_neox': 1997, 'n_words': 336}