<!-- MODULE: list-pages -->

<?php quick_help(txt('list-pages', 'quick-help: list-pages')); ?>

<?php if(!defined('master_script')) die();

/**
 * Backend template
 *
 * @category   Module (list-pages)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-05-16
 */

	if(!isset($module_settings["list-pages"]["show sort headlines"])) $module_settings["list-pages"]["show sort headlines"] = 1;
	if(!isset($module_settings["list-pages"]["show info pages"])) $module_settings["list-pages"]["show info pages"] = 1;
	if(!isset($module_settings["list-pages"]["sort by"])) $module_settings["list-pages"]["sort by"] = 'none';
	if(!isset($module_settings["list-pages"]["sort ascending"])) $module_settings["list-pages"]["sort ascending"] = 1;
	if(!isset($module_settings['list-pages']['categories'])) $module_settings['list-pages']['categories'] = array();
	
?>

<form accept-charset="utf-8" method="post" action="index.php?backend=edit-content&amp;page=<?php echo $_GET['page']; ?>&amp;module-to-edit=<?php echo $_GET['module-to-edit']; ?>&amp;module-position=<?php echo $_GET['module-position']; ?>" onsubmit="return this.confirm">
	<?php include($system_data['folder']['modules'] . 'module-properties/backend-template.tpl'); ?>
	
	<!-- Settings -->
	<h4><?php echo txt('list-pages', 'title: list-pages'); ?></h4>
	
	<div class="column">
		<p>
			<label><?php echo txt('list-pages', 'Sortierung'); ?>:</label>
			<select name="sort_by" size="1">
				<option value="none" <?php if($module_settings["list-pages"]["sort by"] == 'none') echo 'selected="selected"'; ?> ><?php echo txt('list-pages', 'Keine (wie Position im Menü)'); ?></option>
				<option value="category" <?php if($module_settings["list-pages"]["sort by"] == 'category') echo 'selected="selected"'; ?> ><?php echo txt('list-pages', 'Kategorie (alphabetisch)'); ?></option>
				<option value="date" <?php if($module_settings["list-pages"]["sort by"] == 'date') echo 'selected="selected"'; ?> ><?php echo txt('list-pages', 'Datum (entsprechend Datumsformat)'); ?></option>
				<option value="initial" <?php if($module_settings["list-pages"]["sort by"] == 'initial') echo 'selected="selected"'; ?> ><?php echo txt('list-pages', 'Alphabetisch'); ?></option>
			</select>
		</p>

		<p>
		    <label for="categories"><?php echo txt('list-pages', 'Kategorie (ID)'); ?>:</label>
		    <input type="text" name="categories" id="categories" value="<?php echo strlen(intval(implode('', $module_settings['list-pages']['categories']))) != 10 ? '' : intval(implode('', $module_settings['list-pages']['categories'])); ?>">
		</p>

		<?php connector('list-pages left'); ?>
    </div>
		
	<div class="column last-column">
	    <p>
	    	<input type="checkbox" id="sort_ascending" name="sort_ascending" <?php echo ($module_settings["list-pages"]["sort ascending"] == 1 ? 'checked="checked"' : ''); ?>>
			<label class="checkbox" for="sort_ascending"><?php echo txt('list-pages', 'Aufsteigend sortieren'); ?></label>
		</p>
	
	    <p>
	    	<input type="checkbox" id="show_sort_headlines" name="show_sort_headlines" <?php echo ($module_settings["list-pages"]["show sort headlines"] == 1 ? 'checked="checked"' : ''); ?>>
	    	<label class="checkbox" for="show_sort_headlines"><?php echo txt('list-pages', 'Überschriften anzeigen'); ?></label>
	    </p>
	    
	    <p>
	    	<input type="checkbox" id="show_info_pages" name="show_info_pages" <?php echo ($module_settings["list-pages"]["show info pages"] == 1 ? 'checked="checked"' : ''); ?>>
	    	<label class="checkbox" for="show_info_pages"><?php echo txt('list-pages', 'Infoseiten anzeigen'); ?></label>
	    </p>
	    
	    <?php connector('list-pages right'); ?>
    </div>
    
    <!-- Save -->
	<input name="save_list_pages" type="hidden">
	<input id="save" name="save_content" type="submit" value="<?php echo txt('list-pages', 'Speichern'); ?>">
	<input id="delete" name="delete_content" type="submit" value="<?php echo txt('list-pages', 'Löschen'); ?>" onclick="this.form.confirm = window.confirm('<?php echo txt('list-pages', 'Soll das Inhaltselement wirklich gelöscht werden?'); ?>')">
</form>