public static function ViewWritePanels()
{
global $mf_domain;
$customWritePanels = RCCWP_CustomWritePanel::GetCustomWritePanels(TRUE);
?>
<div class="wrap">
<form action="<?php
echo RCCWP_ManagementPage::GetCustomWritePanelGenericUrl('import-write-panel');
?>
" method="post" id="posts-filter" name="ImportWritePanelForm" enctype="multipart/form-data">
<h2><?php
_e('Custom Write Panel', $mf_domain);
?>
</h2>
<p id="post-search">
<input id="import-write-panel-file" name="import-write-panel-file" type="file" />
<input id="overwrite-existing" name="overwrite-existing" type="checkbox"/> Overwrite existing panel
<a href="#none" class="button-secondary" style="display:inline" onclick="document.ImportWritePanelForm.submit();"><?php
_e('Import a Write Panel', $mf_domain);
?>
</a>
<a href="<?php
echo RCCWP_ManagementPage::GetCustomWritePanelGenericUrl('create-custom-write-panel');
?>
" class="button-secondary" style="display:inline">+ <?php
_e('Create a Write Panel', $mf_domain);
?>
</a>
</p>
</form>
<br class="clear"/>
<table cellpadding="3" cellspacing="3" width="100%" class="widefat">
<thead>
<tr>
<th scope="col" width="40%"><?php
_e('Name (Order)', $mf_domain);
?>
</th>
<th width="10%"><?php
_e('Id', $mf_domain);
?>
</th>
<th width="10%"><?php
_e('Type', $mf_domain);
?>
</th>
<th width="40%" colspan="4" style="text-align:center"><?php
_e('Actions', $mf_domain);
?>
</th>
</tr>
</thead>
<tbody>
<?php
foreach ($customWritePanels as $panel) {
?>
<tr>
<td><?php
echo $panel->name;
if ($panel->name != '_Global') {
echo ' <span style="color: #999;">(' . $panel->display_order . ')</span>';
}
?>
</td>
<td><?php
echo $panel->id;
?>
</td>
<td><?php
echo ucwords($panel->type);
if ($panel->single != 1) {
echo ' <sup class="multiple" title="Multiple Posts/Pages">[+]</sup>';
}
?>
</td>
<td><a href="<?php
echo RCCWP_ManagementPage::GetCustomWritePanelGenericUrl('view-custom-write-panel', $panel->id);
?>
" ><?php
_e('Edit Fields/Groups', $mf_domain);
?>
</a></td>
<td><?php
if ($panel->name != '_Global') {
?>
<a href="<?php
echo RCCWP_ManagementPage::GetCustomWritePanelGenericUrl('edit-custom-write-panel', $panel->id);
?>
" ><?php
_e('Edit Write Panel', $mf_domain);
?>
</a> <?php
}
?>
</td>
<td><?php
if ($panel->name != '_Global') {
?>
<a href="<?php
echo RCCWP_ManagementPage::GetCustomWritePanelGenericUrl('edit-custom-write-panel', $panel->id);
?>
" >
<a href="<?php
echo wp_nonce_url(RCCWP_ManagementPage::GetCustomWritePanelGenericUrl('export-custom-write-panel', $panel->id), 'export-custom-write-panel');
?>
" ><?php
_e('Export', $mf_domain);
?>
</a><?php
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<br />
</div>
<?php
}