mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-06 05:07:49 +02:00
Frontend Improvements
This commit is contained in:
@@ -9,24 +9,24 @@
|
||||
|
||||
<?php echo (Form::hidden('csrf', Security::token())); ?>
|
||||
|
||||
<?php echo (Form::label('name', __('Name', 'blocks'))); ?>
|
||||
<div class="form-group">
|
||||
<?php echo (Form::label('name', __('Name', 'blocks'))); ?>
|
||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?>
|
||||
<?php
|
||||
if (isset($errors['blocks_empty_name'])) echo ' <span style="color:red">'.$errors['blocks_empty_name'].'</span>';
|
||||
if (isset($errors['blocks_exists'])) echo ' <span style="color:red">'.$errors['blocks_exists'].'</span>';
|
||||
?>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'input-xxlarge error-field' : 'input-xxlarge'))); ?>
|
||||
|
||||
<?php
|
||||
if (isset($errors['blocks_empty_name'])) echo ' <span style="color:red">'.$errors['blocks_empty_name'].'</span>';
|
||||
if (isset($errors['blocks_exists'])) echo ' <span style="color:red">'.$errors['blocks_exists'].'</span>';
|
||||
?>
|
||||
|
||||
<br /><br />
|
||||
<?php
|
||||
|
||||
Action::run('admin_editor', array(Html::toText($content)));
|
||||
|
||||
echo (
|
||||
Html::br().
|
||||
Form::submit('add_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn')).Html::nbsp(2).
|
||||
Form::submit('add_blocks', __('Save', 'blocks'), array('class' => 'btn')).
|
||||
Form::submit('add_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn btn-primary')).Html::nbsp(2).
|
||||
Form::submit('add_blocks', __('Save', 'blocks'), array('class' => 'btn btn-default')).
|
||||
Form::close()
|
||||
);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<h2><?php echo __('Edit Block', 'blocks'); ?></h2>
|
||||
<br />
|
||||
<br>
|
||||
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
|
||||
@@ -9,31 +9,29 @@
|
||||
if (isset($errors['blocks_empty_name']) or isset($errors['blocks_exists'])) $error_class = 'error'; else $error_class = '';
|
||||
|
||||
echo (Form::open());
|
||||
|
||||
echo (Form::hidden('csrf', Security::token()));
|
||||
|
||||
echo (Form::hidden('blocks_old_name', Request::get('filename')));
|
||||
|
||||
?>
|
||||
|
||||
<?php echo (Form::label('name', __('Name', 'blocks'))); ?>
|
||||
|
||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'input-xxlarge error-field' : 'input-xxlarge'))); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo (Form::label('name', __('Name', 'blocks'))); ?>
|
||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['blocks_empty_name']) || isset($errors['blocks_exists'])) ? 'form-control error-field' : 'form-control'))); ?>
|
||||
<?php
|
||||
if (isset($errors['blocks_empty_name'])) echo ' <span style="color:red">'.$errors['blocks_empty_name'].'</span>';
|
||||
if (isset($errors['blocks_exists'])) echo ' <span style="color:red">'.$errors['blocks_exists'].'</span>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<br /><br />
|
||||
<br>
|
||||
<?php
|
||||
|
||||
Action::run('admin_editor', array(Html::toText($content)));
|
||||
|
||||
echo (
|
||||
Html::br().
|
||||
Form::submit('edit_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn default')).Html::nbsp(2).
|
||||
Form::submit('edit_blocks', __('Save', 'blocks'), array('class' => 'btn default')). Html::nbsp().
|
||||
Form::submit('edit_blocks_and_exit', __('Save and Exit', 'blocks'), array('class' => 'btn btn-primary')).Html::nbsp(2).
|
||||
Form::submit('edit_blocks', __('Save', 'blocks'), array('class' => 'btn btn-default')). Html::nbsp().
|
||||
Form::close()
|
||||
);
|
||||
|
||||
|
@@ -1,15 +1,23 @@
|
||||
<h2><?php echo __('Blocks', 'blocks'); ?></h2>
|
||||
<br />
|
||||
<div>
|
||||
<div class="pull-left">
|
||||
<h2><?php echo __('Blocks', 'blocks'); ?></h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<br>
|
||||
<?php
|
||||
echo (
|
||||
Html::anchor(__('Create New Block', 'blocks'), 'index.php?id=blocks&action=add_block', array('title' => __('Create New Block', 'blocks'), 'class' => 'btn btn-primary')). Html::nbsp(3)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<?php if(Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
|
||||
<?php
|
||||
echo (
|
||||
Html::anchor(__('Create New Block', 'blocks'), 'index.php?id=blocks&action=add_block', array('title' => __('Create New Block', 'blocks'), 'class' => 'btn default btn-small')). Html::nbsp(3)
|
||||
);
|
||||
?>
|
||||
|
||||
<br /><br />
|
||||
<br>
|
||||
|
||||
<!-- Blocks_list -->
|
||||
<table class="table table-bordered">
|
||||
@@ -24,20 +32,21 @@
|
||||
<tr>
|
||||
<td><?php echo basename($block, '.block.html'); ?></td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
<div class="btn-toolbar">
|
||||
<div class="pull-right">
|
||||
<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 btn-small')); ?>
|
||||
<a class="btn dropdown-toggle btn-actions btn-small" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php echo Html::anchor(__('Edit', 'blocks'), 'index.php?id=blocks&action=edit_block&filename='.basename($block, '.block.html'), array('class' => 'btn btn-primary')); ?>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><?php echo Html::anchor(__('View Embed Code', 'blocks'), 'javascript:;', array('title' => __('View Embed Code', 'blocks'), 'onclick' => '$.monstra.blocks.showEmbedCodes("'.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 btn-small btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')"));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?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-danger', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')"));
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user