<div class="cat_settings">
	<div>
		<p class="field"><?php echo __('Permissions :'); ?></p>
		<p class="field">
			<input name="<?php echo $i['id']; ?>[_checkboxes][]" type="hidden" value="cat_commentable">
			<input name="<?php echo $i['id']; ?>[parent_commentable]" type="hidden" value="<?php echo $i['parent_commentable']; ?>">
			<input<?php if (!$i['parent_commentable']) : ?> disabled<?php endif; ?><?php if ($i['commentable']) : ?> checked<?php endif; ?> id="allow_comments_<?php echo $i['id']; ?>" name="<?php echo $i['id']; ?>[cat_commentable]" type="checkbox">
			<label for="allow_comments_<?php echo $i['id']; ?>"><?php echo __('Autoriser les commentaires'); ?></label>
		</p>
		<p class="field">
			<input name="<?php echo $i['id']; ?>[_checkboxes][]" type="hidden" value="cat_votable">
			<input name="<?php echo $i['id']; ?>[parent_votable]" type="hidden" value="<?php echo $i['parent_votable']; ?>">
			<input<?php if (!$i['parent_votable']) : ?> disabled<?php endif; ?><?php if ($i['votable']) : ?> checked<?php endif; ?> id="allow_votes_<?php echo $i['id']; ?>" name="<?php echo $i['id']; ?>[cat_votable]" type="checkbox">
			<label for="allow_votes_<?php echo $i['id']; ?>"><?php echo __('Autoriser les votes'); ?></label>
		</p>
		<p class="field">
			<input name="<?php echo $i['id']; ?>[_checkboxes][]" type="hidden" value="cat_downloadable">
			<input name="<?php echo $i['id']; ?>[parent_downloadable]" type="hidden" value="<?php echo $i['parent_downloadable']; ?>">
			<input<?php if (!$i['parent_downloadable']) : ?> disabled<?php endif; ?><?php if ($i['downloadable']) : ?> checked<?php endif; ?> id="allow_download_<?php echo $i['id']; ?>" name="<?php echo $i['id']; ?>[cat_downloadable]" type="checkbox">
			<label for="allow_download_<?php echo $i['id']; ?>"><?php echo __('Autoriser le téléchargement des fichiers'); ?></label>
		</p>
		<p class="field">
			<input name="<?php echo $i['id']; ?>[_checkboxes][]" type="hidden" value="cat_uploadable">
			<input name="<?php echo $i['id']; ?>[parent_uploadable]" type="hidden" value="<?php echo $i['parent_uploadable']; ?>">
			<input<?php if (!$i['parent_uploadable']) : ?> disabled<?php endif; ?><?php if ($i['uploadable']) : ?> checked<?php endif; ?> id="allow_upload_<?php echo $i['id']; ?>" name="<?php echo $i['id']; ?>[cat_uploadable]" type="checkbox">
			<label for="allow_upload_<?php echo $i['id']; ?>"><?php echo __('Autoriser l\'ajout de fichiers'); ?></label>
		</p>
<?php if ($i['type'] == 'category') : ?>
		<p class="field">
			<input name="<?php echo $i['id']; ?>[_checkboxes][]" type="hidden" value="cat_creatable">
			<input name="<?php echo $i['id']; ?>[parent_creatable]" type="hidden" value="<?php echo $i['parent_creatable']; ?>">
			<input<?php if (!$i['parent_creatable']) : ?> disabled<?php endif; ?><?php if ($i['creatable']) : ?> checked<?php endif; ?> id="allow_create_<?php echo $i['id']; ?>" name="<?php echo $i['id']; ?>[cat_creatable]" type="checkbox">
			<label for="allow_create_<?php echo $i['id']; ?>"><?php echo __('Autoriser la création d\'albums'); ?></label>
		</p>
<?php endif; ?>
	</div>
	<div>
		<p class="field"><?php echo ($i['type'] == 'album') ? __('Ordre d\'affichage des fichiers :') : __('Ordre d\'affichage des catégories :'); ?></p>
<?php for ($n = 1; $n <= 3; $n++) : ?>
		<p class="field">
			<label for="sortby_<?php echo $i['id']; ?>_<?php echo $n ?>"><?php printf(__('Critère n°%s :'), $n); ?></label>
			<select id="sortby_<?php echo $i['id']; ?>_<?php echo $n ?>" class="block" name="<?php echo $i['id']; ?>[sortby_<?php echo $n; ?>]">
<?php foreach ($tpl['sortby_' . $i['type']] as &$s) : ?>
<?php if (($n == 1 && $s['value'] == 'none') || ($n > 1 && $s['value'] == 'default')) : continue; endif; ?>
				<option value="<?php echo $s['value']; ?>"<?php if ($s['value'] == (isset($num) ? $tpl['categories'][$num]['sortby_' . $n] : $tpl['category']['sortby_' . $n])) : ?> selected<?php endif; ?>><?php echo $s['text']; ?></option>
<?php endforeach; ?>
			</select>
			<select class="block" name="<?php echo $i['id']; ?>[orderby_<?php echo $n; ?>]">
<?php foreach ($tpl['orderby'] as &$o) : ?>
				<option value="<?php echo $o['value']; ?>"<?php if ($o['value'] == (isset($num) ? $tpl['categories'][$num]['orderby_' . $n] : $tpl['category']['orderby_' . $n])) : ?> selected<?php endif; ?>><?php echo $o['text']; ?></option>
<?php endforeach; ?>
			</select>
		</p>
<?php endfor; ?>
	</div>
</div>