<?php /* Smarty version 2.6.26, created on 2017-04-13 01:16:13
         compiled from /home3/bargaip4/public_html/gevimmo/plugins/androidConnect/admin/android_listing_types.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'cat', '/home3/bargaip4/public_html/gevimmo/plugins/androidConnect/admin/android_listing_types.tpl', 8, false),array('function', 'rlHook', '/home3/bargaip4/public_html/gevimmo/plugins/androidConnect/admin/android_listing_types.tpl', 127, false),)), $this); ?>
<!-- android listing types tpl -->

<?php if ($_GET['action'] == 'edit'): ?>

	<?php $this->assign('sPost', $_POST); ?>

	<!-- edit type -->
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'm_block_start.tpl') : smarty_modifier_cat($_tmp, 'm_block_start.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<form action="<?php echo $this->_tpl_vars['rlBaseC']; ?>
action=<?php if ($_GET['action'] == 'add'): ?>add<?php elseif ($_GET['action'] == 'edit'): ?>edit&amp;key=<?php echo $_GET['key']; ?>
<?php endif; ?>" method="post">
		<input type="hidden" name="submit" value="1" />
	
		<input type="hidden" name="fromPost" value="1" />
	
		<table class="form">
		<tr>
			<td class="name"><?php echo $this->_tpl_vars['lang']['name']; ?>
</td>
			<td class="field"><b><?php echo $this->_tpl_vars['type_info']['name']; ?>
</b></td>
		</tr>
		<tr>
			<td class="name"><?php echo $this->_tpl_vars['lang']['android_type_icon']; ?>
</td>
			<td class="field">
				<?php $_from = $this->_tpl_vars['icons']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['icon']):
?>
					<div style="display: inline-block;*display: inline;*zoom: 1;text-align: center;">
						<label>
							<div style="background: #43494a;width: 42px;height: 34px;border-radius: 3px;padding-top: 8px;margin-bottom: 4px;">
								<img src="<?php echo @RL_PLUGINS_URL; ?>
androidConnect/static/icon_<?php echo $this->_tpl_vars['icon']; ?>
.png" />
							</div>
							<div><input value="<?php echo $this->_tpl_vars['icon']; ?>
" <?php if ($this->_tpl_vars['sPost']['icon'] == $this->_tpl_vars['icon']): ?>checked="checked"<?php endif; ?> type="radio" name="icon" /></div>
						</label>
					</div>
				<?php endforeach; endif; unset($_from); ?>
			</td>
		</tr>
		<tr>
			<td class="name"><span class="red">*</span><?php echo $this->_tpl_vars['lang']['status']; ?>
</td>
			<td class="field">
				<select name="status">
					<option value="active" <?php if ($this->_tpl_vars['sPost']['status'] == 'active'): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lang']['active']; ?>
</option>
					<option value="approval" <?php if ($this->_tpl_vars['sPost']['status'] == 'approval'): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lang']['approval']; ?>
</option>
				</select>
			</td>
		</tr>
		<tr>
			<td></td>
			<td class="field">
				<input class="button" type="submit" value="<?php if ($_GET['action'] == 'edit'): ?><?php echo $this->_tpl_vars['lang']['edit']; ?>
<?php else: ?><?php echo $this->_tpl_vars['lang']['add']; ?>
<?php endif; ?>" />
			</td>
		</tr>
		</table>
	</form>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'm_block_end.tpl') : smarty_modifier_cat($_tmp, 'm_block_end.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<!-- edit type end -->
	
<?php else: ?>

	<!-- listing types grid -->
	<div id="grid"></div>
	<script type="text/javascript">//<![CDATA[
	var listingTypesGrid;
	
	<?php echo '
	$(document).ready(function(){
		
		listingTypesGrid = new gridObj({
			key: \'listingTypes\',
			id: \'grid\',
			ajaxUrl: rlPlugins + \'androidConnect/admin/android_listing_types.inc.php?q=ext\',
			defaultSortField: \'name\',
			title: lang[\'ext_listing_types_manager\'],
			fields: [
				{name: \'name\', mapping: \'name\', type: \'string\'},
				{name: \'Android_position\', mapping: \'Android_position\', type: \'int\'},
				{name: \'Status\', mapping: \'Android_status\'},
				{name: \'Key\', mapping: \'Key\'}
			],
			columns: [
				{
					header: lang[\'ext_name\'],
					dataIndex: \'name\',
					width: 50,
					id: \'rlExt_item_bold\'
				},{
					header: lang[\'ext_position\'],
					dataIndex: \'Android_position\',
					width: 10,
					editor: new Ext.form.NumberField({
						allowBlank: false,
						allowDecimals: false
					}),
					renderer: function(val){
						return \'<span ext:qtip="\'+lang[\'ext_click_to_edit\']+\'">\'+val+\'</span>\';
					}
				},{
					header: lang[\'ext_status\'],
					dataIndex: \'Status\',
					fixed: true,
					width: 100,
					editor: new Ext.form.ComboBox({
						store: [
							[\'active\', lang[\'ext_active\']],
							[\'approval\', lang[\'ext_approval\']]
						],
						displayField: \'value\',
						valueField: \'key\',
						typeAhead: true,
						mode: \'local\',
						triggerAction: \'all\',
						selectOnFocus:true
					})
				},{
					header: lang[\'ext_actions\'],
					width: 70,
					fixed: true,
					dataIndex: \'Key\',
					sortable: false,
					renderer: function(data, ext, row) {
						var out = "<center>";
						out += "<a href=\'"+rlUrlHome+"index.php?controller="+controller+"&action=edit&key="+data+"\'><img class=\'edit\' ext:qtip=\'"+lang[\'ext_edit\']+"\' src=\'"+rlUrlHome+"img/blank.gif\' /></a>";
						out += "</center>";
						
						return out;
					}
				}
			]
		});
		
		'; ?>
<?php echo rlHook::load(array('name' => 'apTplListingTypesGrid'), $this);?>
<?php echo '
		
		listingTypesGrid.init();
		grid.push(listingTypesGrid.grid);
		
	});
	'; ?>

	//]]>
	</script>
	<!-- listing types grid end -->
	
<?php endif; ?>

<!-- android listing types tpl end -->