<commit_before><?
// Make help 
$help = (!empty($item) && $uri = $item->getUriAttribute()) ? 
	'If "Draft", this content will be accessible via it\'s <a href="'.$uri.'">URI</a> but not in lists.' : 
	'If "Draft", this content will be completely inaccessible.';

// Check if they have permission
if (!app('decoy.auth')->can('publish', $controller)) {
	echo Former::note('Status', 'Draft')->blockHelp($help);
	return;
}

// Redner radios
echo Former::radios('visible', 'Status')->inline()->radios(array(
	'Published' => array('value' => '1', 'checked' => empty($item) ? true : $item->visible == 1),
	'Draft' => array('value' => false, 'checked' => empty($item) ? false : $item->visible != 1),
))->blockHelp($help);<commit_msg>Show the real published status when user doesn't have permission to publish<commit_after><?
// Make help 
$help = (!empty($item) && $uri = $item->getUriAttribute()) ? 
	'If "Draft", this content will be accessible via it\'s <a href="'.$uri.'">URI</a> but not in lists.' : 
	'If "Draft", this content will be completely inaccessible.';

// Check if they have permission
if (!app('decoy.auth')->can('publish', $controller)) {
	$status =  $item && $item->visible ? 'Published' : 'Draft';
	echo Former::note('Status', $status)->blockHelp($help);
	return;
}

// Redner radios
echo Former::radios('visible', 'Status')->inline()->radios(array(
	'Published' => array('value' => '1', 'checked' => empty($item) ? true : $item->visible == 1),
	'Draft' => array('value' => false, 'checked' => empty($item) ? false : $item->visible != 1),
))->blockHelp($help);
{'fraction_non_alphanumeric': 0.22724379376193507, 'fraction_numerical': 0.0038192234245703373, 'mean_word_length': 5.093023255813954, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 36, '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': '5205836', 'n_tokens_mistral': 516, 'n_tokens_neox': 501, 'n_words': 143}