mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 02:10:37 +02:00
Frontend Improvements
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
if (isset($errors['blocks_exists'])) echo ' <span style="color:red">'.$errors['blocks_exists'].'</span>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<?php
|
||||
|
@@ -13,8 +13,6 @@
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<?php if(Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
|
||||
<br>
|
||||
|
@@ -15,8 +15,6 @@
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
|
||||
<br>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<h2><?php echo __('New Snippet', 'snippets'); ?></h2>
|
||||
<br />
|
||||
<br>
|
||||
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
|
||||
@@ -9,26 +9,30 @@
|
||||
|
||||
<?php echo (Form::hidden('csrf', Security::token())); ?>
|
||||
|
||||
<?php echo (Form::label('name', __('Name', 'snippets'))); ?>
|
||||
<?php echo (Form::label('name', __('Name', 'snippets'))); ?>
|
||||
<div class="input-group">
|
||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'form-control error-field' : 'form-control'))); ?><span class="input-group-addon">.snippet.php</span>
|
||||
</div>
|
||||
|
||||
<div class="input-append">
|
||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'input-xxlarge error-field' : 'input-xxlarge'))); ?><span class="add-on">.snippet.php</span>
|
||||
</div>
|
||||
<?php
|
||||
if (isset($errors['snippets_empty_name'])) echo ' <span style="color:red">'.$errors['snippets_empty_name'].'</span>';
|
||||
if (isset($errors['snippets_exists'])) echo ' <span style="color:red">'.$errors['snippets_exists'].'</span>';
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (isset($errors['snippets_empty_name'])) echo ' <span style="color:red">'.$errors['snippets_empty_name'].'</span>';
|
||||
if (isset($errors['snippets_exists'])) echo ' <span style="color:red">'.$errors['snippets_exists'].'</span>';
|
||||
?>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
echo (
|
||||
Form::label('content', __('Snippet content', 'snippets')).
|
||||
Form::textarea('content', $content, array('style' => 'width:100%;height:400px;', 'class'=>'source-editor'))
|
||||
);
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo (
|
||||
Html::br(2).
|
||||
Form::label('content', __('Snippet content', 'snippets')).
|
||||
Form::textarea('content', $content, array('style' => 'width:100%;height:400px;', 'class'=>'source-editor')).
|
||||
Html::br(2).
|
||||
Form::submit('add_snippets_and_exit', __('Save and Exit', 'snippets'), array('class' => 'btn')).Html::nbsp(2).
|
||||
Form::submit('add_snippets_and_exit', __('Save and Exit', 'snippets'), array('class' => 'btn btn-primary')).Html::nbsp(2).
|
||||
Form::submit('add_snippets', __('Save', 'snippets'), array('class' => 'btn')).
|
||||
Form::close()
|
||||
);
|
||||
|
||||
?>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<h2><?php echo __('Edit Snippet', 'snippets'); ?></h2>
|
||||
<br />
|
||||
<br>
|
||||
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
<?php echo (Form::label('name', __('Name', 'snippets'))); ?>
|
||||
|
||||
<div class="input-append">
|
||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'input-xxlarge error-field' : 'input-xxlarge'))); ?><span class="add-on">.snippet.php</span>
|
||||
<div class="input-group">
|
||||
<?php echo (Form::input('name', $name, array('class' => (isset($errors['snippets_empty_name']) || isset($errors['snippets_exists'])) ? 'form-control error-field' : 'form-control'))); ?><span class="input-group-addon">.snippet.php</span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@@ -27,10 +27,11 @@
|
||||
if (isset($errors['snippets_exists'])) echo ' <span style="color:red">'.$errors['snippets_exists'].'</span>';
|
||||
?>
|
||||
|
||||
<br>
|
||||
|
||||
<?php
|
||||
|
||||
echo (
|
||||
Html::br(2).
|
||||
Form::label('content', __('Snippet content', 'snippets')).
|
||||
Form::textarea('content', Html::toText($content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor')).
|
||||
Html::br(2).
|
||||
@@ -40,6 +41,6 @@
|
||||
);
|
||||
|
||||
} else {
|
||||
echo '<div class="message-error">'.__('This snippet does not exist').'</div>';
|
||||
echo '<div class="message-error">'.__('This snippet does not exist', 'snippets').'</div>';
|
||||
}
|
||||
?>
|
||||
|
@@ -1,16 +1,22 @@
|
||||
<h2><?php echo __('Snippets', 'snippets'); ?></h2>
|
||||
<br />
|
||||
<div>
|
||||
<div class="pull-left">
|
||||
<h2><?php echo __('Snippets', 'snippets'); ?></h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<br>
|
||||
<?php
|
||||
echo (
|
||||
Html::anchor(__('Create New Snippet', 'snippets'), 'index.php?id=snippets&action=add_snippet', array('title' => __('Create New Snippet', 'snippets'), '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 Snippet', 'snippets'), 'index.php?id=snippets&action=add_snippet', array('title' => __('Create New Snippet', 'snippets'), 'class' => 'btn btn-small')). Html::nbsp(3)
|
||||
);
|
||||
?>
|
||||
|
||||
<br /><br />
|
||||
|
||||
<!-- Snippets_list -->
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
@@ -24,20 +30,21 @@
|
||||
<tr>
|
||||
<td><?php echo basename($snippet, '.snippet.php'); ?></td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
<div class="btn-toolbar">
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<?php echo Html::anchor(__('Edit', 'snippets'), 'index.php?id=snippets&action=edit_snippet&filename='.basename($snippet, '.snippet.php'), 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', 'snippets'), 'index.php?id=snippets&action=edit_snippet&filename='.basename($snippet, '.snippet.php'), 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', 'snippets'), 'javascript:;', array('title' => __('View Embed Code', 'snippets'), 'onclick' => '$.monstra.snippets.showEmbedCodes("'.basename($snippet, '.snippet.php').'");')); ?></li>
|
||||
</ul>
|
||||
<?php echo Html::anchor(__('Delete', 'snippets'),
|
||||
'index.php?id=snippets&action=delete_snippet&filename='.basename($snippet, '.snippet.php').'&token='.Security::token(),
|
||||
array('class' => 'btn btn-actions btn-small btn-actions-default', 'onclick' => "return confirmDelete('".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php')))."')"));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo Html::anchor(__('Delete', 'snippets'),
|
||||
'index.php?id=snippets&action=delete_snippet&filename='.basename($snippet, '.snippet.php').'&token='.Security::token(),
|
||||
array('class' => 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php')))."')"));
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user