Ejemplo n.º 1
0
    function ViewModules()
    {
        global $flutter_domain;
        $customWriteModules = RCCWP_CustomWriteModule::GetCustomModules();
        ?>
<script type='text/javascript' src='../../wp-includes/js/thickbox/thickbox.js'></script>
<link rel='stylesheet' href='../../wp-includes/js/thickbox/thickbox.css' type='text/css' media='all' />



		<div class="wrap">
		
		<form action="<?php 
        echo RCCWP_ManagementPage::GetCustomWriteModuleGenericUrl('import-module');
        ?>
" method="post"  id="posts-filter" name="ImportModuleForm" enctype="multipart/form-data">
			<h2><?php 
        _e('Modules');
        ?>
</h2>
			<p id="post-search">					
				<input id="import-module-file" name="import-module-file" type="file" /> 
				<a href="#none" class="button-secondary" style="display:inline" onclick="document.ImportModuleForm.submit();"><?php 
        _e('Import a Module', $flutter_domain);
        ?>
</a>
				<a href="<?php 
        echo RCCWP_ManagementPage::GetCustomWriteModuleGenericUrl('create-custom-write-module');
        ?>
" class="button-secondary" style="display:inline">+ <?php 
        _e('Create a Module', $flutter_domain);
        ?>
</a>
			</p>	
		</form>

		<br class="clear"/>
		<table cellpadding="3" cellspacing="3" width="100%" class="widefat">
		<thead>
		<tr>
			<th scope="col" width="70%"><?php 
        _e('Name');
        ?>
</th>
			<th scope="col" colspan="2" ><?php 
        _e('Actions');
        ?>
</th>
		</tr>
		</thead>
		<tbody>
		<?php 
        foreach ($customWriteModules as $module) {
            $class = $class == '' ? 'alternate' : '';
            ?>
		<tr class="<?php 
            echo $class;
            ?>
">
			<td><?php 
            echo $module->name;
            ?>
</td>
			<td><a href="<?php 
            echo RCCWP_ManagementPage::GetCustomWriteModuleEditUrl($module->id);
            ?>
" class="edit"><?php 
            _e('Edit');
            ?>
</a></td>
			<td><a href="<?php 
            echo FLUTTER_URI . "RCCWP_ExportModule.php?custom-write-module-id={$module->id}";
            ?>
&amp;TB_iframe=true&amp;height=500&amp;width=700" class="thickbox" title='Export Module'><?php 
            _e('Export', $flutter_domain);
            ?>
</a></td>
		</tr>
		<?php 
        }
        ?>
		</tbody>
		</table>

		<form style="display:none" id="do_export" name="do_export" action="<?php 
        echo FLUTTER_URI . "RCCWP_ExportModule.php";
        ?>
" method="post" >
			<input type="text" name="write_panels"/>
			<input type="text" name="custom-write-module-id"/>
		</form>	
		
		</div>
		<?php 
    }