mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-09 23:56:26 +02:00
Snippets Plugin: layout fixes.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<h2><?php echo __('New snippet', 'snippets'); ?></h2>
|
||||
<h2><?php echo __('New Snippet', 'snippets'); ?></h2>
|
||||
<br />
|
||||
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
@ -14,7 +14,7 @@
|
||||
<?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-xlarge error-field' : 'input-xlarge'))); ?><span class="add-on">.snippet.php</span>
|
||||
<?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
|
||||
@ -28,7 +28,7 @@
|
||||
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')).Html::nbsp(2).
|
||||
Form::submit('add_snippets', __('Save', 'snippets'), array('class' => 'btn')).
|
||||
Form::close()
|
||||
);
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h2><?php echo __('Edit snippet', 'snippets'); ?></h2>
|
||||
<h2><?php echo __('Edit Snippet', 'snippets'); ?></h2>
|
||||
<br />
|
||||
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
@ -20,7 +20,7 @@
|
||||
<?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-xlarge error-field' : 'input-xlarge'))); ?><span class="add-on">.snippet.php</span>
|
||||
<?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
|
||||
@ -35,7 +35,7 @@
|
||||
Form::label('content', __('Snippet content', 'snippets')).
|
||||
Form::textarea('content', Html::toText($content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor')).
|
||||
Html::br(2).
|
||||
Form::submit('edit_snippets_and_exit', __('Save and exit', 'snippets'), array('class' => 'btn default')).Html::nbsp(2).
|
||||
Form::submit('edit_snippets_and_exit', __('Save and Exit', 'snippets'), array('class' => 'btn default')).Html::nbsp(2).
|
||||
Form::submit('edit_snippets', __('Save', 'snippets'), array('class' => 'btn default')). Html::nbsp().
|
||||
Form::close()
|
||||
);
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<?php
|
||||
echo (
|
||||
Html::anchor(__('Create new snippet', 'snippets'), 'index.php?id=snippets&action=add_snippet', array('title' => __('Create new snippet', 'snippets'), 'class' => 'btn default btn-small')). Html::nbsp(3)
|
||||
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)
|
||||
);
|
||||
?>
|
||||
|
||||
@ -14,26 +14,31 @@
|
||||
<!-- Snippets_list -->
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr><td><?php echo __('Snippets', 'snippets'); ?></td><td width="40%"><?php echo __('Actions', 'snippets'); ?></td></tr>
|
||||
<tr>
|
||||
<th><?php echo __('Snippets', 'snippets'); ?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (count($snippets_list) != 0) foreach ($snippets_list as $snippet) { ?>
|
||||
<tr>
|
||||
<td><?php echo basename($snippet, '.snippet.php'); ?></td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
<div class="btn-toolbar">
|
||||
<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')); ?>
|
||||
<a class="btn dropdown-toggle btn-actions" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
|
||||
<?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">
|
||||
<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', 'onclick' => "return confirmDelete('".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php')))."')"));
|
||||
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>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
Reference in New Issue
Block a user