mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 02:10:37 +02:00
Monstra Library: basic core improvments
This commit is contained in:
@@ -5,12 +5,10 @@
|
||||
|
||||
<?php if (isset($errors['snippets_empty_name']) or isset($errors['snippets_exists'])) $error_class = 'error'; else $error_class = ''; ?>
|
||||
|
||||
|
||||
<?php echo (Form::open(null, array('class' => 'form-horizontal'))); ?>
|
||||
|
||||
<?php echo (Form::hidden('csrf', Security::token())); ?>
|
||||
|
||||
|
||||
<?php echo (Form::label('name', __('Name', 'snippets'))); ?>
|
||||
|
||||
<div class="input-append">
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
|
||||
<?php
|
||||
if ($content !== null) {
|
||||
if ($content !== null) {
|
||||
|
||||
if (isset($errors['snippets_empty_name']) or isset($errors['snippets_exists'])) $error_class = 'error'; else $error_class = '';
|
||||
|
||||
@@ -16,9 +16,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>
|
||||
@@ -39,8 +38,8 @@
|
||||
Form::submit('edit_snippets', __('Save', 'snippets'), array('class' => 'btn default')). Html::nbsp().
|
||||
Form::close()
|
||||
);
|
||||
|
||||
|
||||
} else {
|
||||
echo '<div class="message-error">'.__('This snippet does not exist').'</div>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@@ -4,9 +4,9 @@
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
|
||||
<?php
|
||||
echo (
|
||||
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 />
|
||||
@@ -22,7 +22,7 @@
|
||||
<tbody>
|
||||
<?php if (count($snippets_list) != 0) foreach ($snippets_list as $snippet) { ?>
|
||||
<tr>
|
||||
<td><?php echo basename($snippet, '.snippet.php'); ?></td>
|
||||
<td><?php echo basename($snippet, '.snippet.php'); ?></td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
<div class="btn-toolbar">
|
||||
@@ -31,7 +31,7 @@
|
||||
<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">
|
||||
<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>
|
||||
</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')))."')"));
|
||||
@@ -60,4 +60,4 @@
|
||||
<code id="phpcode"></code>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user