1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-11 23:54:10 +02:00

Blocks Plugin: view embed code feature added.

This commit is contained in:
Awilum
2012-11-11 22:08:02 +02:00
parent bd963f8e9b
commit 1d24f81280
10 changed files with 73 additions and 9 deletions

View File

@@ -14,21 +14,48 @@
<!-- Blocks_list -->
<table class="table table-bordered">
<thead>
<tr><td><?php echo __('Blocks', 'blocks'); ?></td><td width="40%"><?php echo __('Actions', 'blocks'); ?></td></tr>
<tr>
<td><?php echo __('Blocks', 'blocks'); ?></td>
<td width="40%"><?php echo __('Actions', 'blocks'); ?></td>
</tr>
</thead>
<tbody>
<?php if (count($blocks_list) != 0) foreach ($blocks_list as $block) { ?>
<tr>
<td><?php echo basename($block, '.block.html'); ?></td>
<td>
<?php echo Html::anchor(__('Edit', 'blocks'), 'index.php?id=blocks&action=edit_block&filename='.basename($block, '.block.html'), array('class' => 'btn btn-actions')); ?>
<?php echo Html::anchor(__('Delete', 'blocks'),
'index.php?id=blocks&action=delete_block&filename='.basename($block, '.block.html').'&token='.Security::token(),
array('class' => 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')"));
?>
<td><?php echo basename($block, '.block.html'); ?></td>
<td>
<div class="btn-toolbar">
<div class="btn-group">
<?php echo Html::anchor(__('Edit', 'blocks'), 'index.php?id=blocks&action=edit_block&filename='.basename($block, '.block.html'), array('class' => 'btn btn-actions')); ?>
<a class="btn dropdown-toggle btn-actions" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><?php echo Html::anchor(__('View Embed Code', 'blocks'), 'javascript:;', array('title' => __('View Embed Code', 'blocks'), 'onclick' => 'embedCodes("'.basename($block, '.block.html').'");')); ?></li>
</ul>
<?php echo Html::anchor(__('Delete', 'blocks'),
'index.php?id=blocks&action=delete_block&filename='.basename($block, '.block.html').'&token='.Security::token(),
array('class' => 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')"));
?>
</div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<!-- /Blocks_list -->
<!-- /Blocks_list -->
<div id="embedCodes" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3><?php echo __('Embed Code', 'blocks'); ?></h3>
</div>
<div class="modal-body">
<p>
<b><?php echo __('Shortcode', 'blocks'); ?></b><br>
<code id="shortcode"></code>
<br> <br>
<b><?php echo __('PHP Code', 'blocks'); ?></b><br>
<code id="phpcode"></code>
</p>
</div>
</div>