1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-13 00:24:27 +02:00

Add Monstra from HG Commit 683dcb70c4cc

This commit is contained in:
Awilum
2012-09-25 19:09:50 +03:00
parent d2db42b2bb
commit 4a5fea5f5b
251 changed files with 35026 additions and 0 deletions

View File

@@ -0,0 +1,133 @@
<div class="row-fluid">
<div class="span12">
<h2><?php echo __('New page', 'pages'); ?></h2>
<br />
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<?php if (isset($errors['pages_empty_name']) or isset($errors['pages_exists'])) $error_class1 = 'error'; else $error_class1 = ''; ?>
<?php if (isset($errors['pages_empty_title'])) $error_class2 = 'error'; else $error_class2 = ''; ?>
<?php
echo (
Form::open(null, array('class' => 'form-horizontal'))
);
?>
<?php echo (Form::hidden('csrf', Security::token())); ?>
<?php
echo (
Form::label('page_name', __('Name (slug)', 'pages'))
);
?>
<?php
echo (
Form::input('page_name', $post_name, array('class' => 'span6'))
);
if (isset($errors['pages_empty_name'])) echo Html::nbsp(3).'<span style="color:red">'.$errors['pages_empty_name'].'</span>';
if (isset($errors['pages_exists'])) echo Html::nbsp(3).'<span style="color:red">'.$errors['pages_exists'].'</span>';
?>
<?php
echo (
Html::br(2).
Form::label('page_title', __('Title', 'pages'))
);
?>
<?php
echo (
Form::input('page_title', $post_title, array('class' => 'span6'))
);
if (isset($errors['pages_empty_title'])) echo Html::nbsp(3).'<span style="color:red">'.$errors['pages_empty_title'].'</span>';
?>
<?php
echo (
Html::br(2).
Form::label('page_description', __('Description', 'pages')).
Form::input('page_description', $post_description, array('class' => 'span8')).
Html::br(2).
Form::label('page_keywords', __('Keywords', 'pages')).
Form::input('page_keywords', $post_keywords, array('class' => 'span8'))
);
?>
<br /><br />
<?php Action::run('admin_editor', array(Html::toText($post_content))); ?>
<br />
<div class="row-fluid">
<div class="span4">
<?php
echo (
Form::label('pages', __('Parent', 'pages')).
Form::select('pages', $pages_array, $parent_page)
);
?>
</div>
<div class="span4">
<?php
echo (
Form::label('templates', __('Template', 'pages')).
Form::select('templates', $templates_array, $post_template)
);
?>
</div>
<div class="span4">
<?php
echo (
Form::label('status', __('Status', 'pages')).
Form::select('status', $status_array, 'published')
);
?>
</div>
</div>
<hr>
<div class="row-fluid">
<div class="span8">
<?php
echo (
Form::label(__('Published on', 'pages'), __('Published on', 'pages')).
Form::input('year', $date[0], array('class' => 'input-mini')). ' ' .
Form::input('month', $date[1], array('class' => 'input-mini')). ' ' .
Form::input('day', $date[2], array('class' => 'input-mini')). ' <span style="color:gray;">@</span> '.
Form::input('minute', $date[3], array('class' => 'input-mini')). ' : '.
Form::input('second', $date[4], array('class' => 'input-mini'))
);
?>
</div>
<div class="span3">
<?php
echo (
Form::label('robots', __('Search Engines Robots', 'pages')).
'no Index'.Html::nbsp().Form::checkbox('robots_index', 'index', $post_robots_index).Html::nbsp(2).
'no Follow'.Html::nbsp().Form::checkbox('robots_follow', 'follow', $post_robots_follow)
);
?>
</div>
</div>
<hr>
<?php
echo (
Form::submit('add_page_and_exit', __('Save and exit', 'pages'), array('class' => 'btn')).Html::nbsp(2).
Form::submit('add_page', __('Save', 'pages'), array('class' => 'btn')).
Form::close()
);
?>
</div>
</div>

View File

@@ -0,0 +1,171 @@
<div class="row-fluid">
<div class="span12">
<h2>
<?php
if (Request::get('name') == 'error404') {
echo __('Edit 404 page', 'pages');
} else {
echo __('Edit page', 'pages');
}
?>
</h2>
<br />
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<?php if (isset($errors['pages_empty_name'])) $error_class1 = 'error'; else $error_class1 = ''; ?>
<?php if (isset($errors['pages_exists'])) $error_class1 = 'error'; else $error_class1 = ''; ?>
<?php if (isset($errors['pages_empty_title'])) $error_class2 = 'error'; else $error_class2 = ''; ?>
<?php
echo (
Form::open(null, array('class' => 'form-horizontal'))
);
?>
<?php echo (Form::hidden('csrf', Security::token())); ?>
<?php
echo (
Form::hidden('page_old_name', Request::get('name'))
);
if (Request::get('name') !== 'error404') {
echo (
Form::label('page_name', __('Name (slug)', 'pages'))
);
}
?>
<?php
if (Request::get('name') == 'error404') {
echo Form::hidden('page_name', $slug_to_edit);
} else {
echo (
Form::input('page_name', $slug_to_edit, array('class' => 'span6'))
);
}
if (isset($errors['pages_empty_name'])) echo Html::nbsp(3).'<span style="color:red">'.$errors['pages_empty_name'].'</span>';
if (isset($errors['pages_exists'])) echo Html::nbsp(3).'<span style="color:red">'.$errors['pages_exists'].'</span>';
?>
<?php
echo (
Html::br(2).
Form::label('page_title', __('Title', 'pages'))
);
?>
<?php
echo (
Form::input('page_title', $title_to_edit, array('class' => 'span6'))
);
if (isset($errors['pages_empty_title'])) echo Html::nbsp(3).'<span style="color:red">'.$errors['pages_empty_title'].'</span>';
?>
<?php
echo (
Html::br(2).
Form::label('page_description', __('Description', 'pages')).
Form::input('page_description', $description_to_edit, array('class' => 'span8')).
Html::br(2).
Form::label('page_keywords', __('Keywords', 'pages')).
Form::input('page_keywords', $keywords_to_edit, array('class' => 'span8')).
Form::hidden('old_parent', $page['parent']).
Form::hidden('page_id', $page['id'])
);
?>
<br /><br />
<?php Action::run('admin_editor', array(Html::toText($to_edit))); ?>
<br />
<div class="row-fluid">
<?php
if (Request::get('name') == 'error404') {
echo Form::hidden('pages', $parent_page);
} else {
?>
<div class="span4">
<?php
echo (
Form::label('pages', __('Parent', 'pages')).
Form::select('pages', $pages_array, $parent_page)
);
?>
</div>
<?php } ?>
<?php if (Request::get('name') != 'error404') { ?>
<div class="span4">
<?php } else { ?>
<div>
<?php } ?>
<?php
echo (
Form::label('templates', __('Template', 'pages')).
Form::select('templates', $templates_array, $template)
);
?>
</div>
<?php
if(Request::get('name') == 'error404') {
echo Form::hidden('status', $status);
} else {
?>
<div class="span4">
<?php
echo (
Form::label('status', __('Status', 'pages')).
Form::select('status', $status_array, $status)
);
?>
</div>
<?php } ?>
</div>
<hr>
<div class="row-fluid">
<div class="span8">
<?php
echo (
Form::label(__('Published on', 'pages'), __('Published on', 'pages')).
Form::input('year', $date[0], array('class' => 'input-mini')). ' ' .
Form::input('month', $date[1], array('class' => 'input-mini')). ' ' .
Form::input('day', $date[2], array('class' => 'input-mini')). ' @ '.
Form::input('minute', $date[3], array('class' => 'input-mini')). ' : '.
Form::input('second', $date[4], array('class' => 'input-mini'))
);
?>
</div>
<div class="span3">
<?php
echo (
Form::label('robots', __('Search Engines Robots', 'pages')).
'no Index'.Html::nbsp().Form::checkbox('robots_index', 'index', $post_robots_index).Html::nbsp(2).
'no Follow'.Html::nbsp().Form::checkbox('robots_follow', 'follow', $post_robots_follow)
);
?>
</div>
</div>
<hr>
<?php
echo (
Form::submit('edit_page_and_exit', __('Save and exit', 'pages'), array('class' => 'btn')).Html::nbsp(2).
Form::submit('edit_page', __('Save', 'pages'), array('class' => 'btn')).
Form::close()
);
?>
</div>
</div>

View File

@@ -0,0 +1,91 @@
<div class="row-fluid">
<div class="span12">
<h2><?php echo __('Pages', 'pages'); ?></h2>
<br />
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<?php
echo (
Html::anchor(__('Create new page', 'pages'), 'index.php?id=pages&action=add_page', array('title' => __('Create new page', 'pages'), 'class' => 'btn default btn-small')). Html::nbsp(3).
Html::anchor(__('Edit 404 page', 'pages'), 'index.php?id=pages&action=edit_page&name=error404', array('title' => __('Create new page', 'pages'), 'class' => 'btn default btn-small'))
);
?>
<br /><br />
<table class="table table-bordered">
<thead>
<tr>
<td><?php echo __('Name', 'pages'); ?></td>
<td><?php echo __('Author', 'pages'); ?></td>
<td><?php echo __('Status', 'pages'); ?></td>
<td><?php echo __('Date', 'pages'); ?></td>
<td width="40%"><?php echo __('Actions', 'pages'); ?></td>
</tr>
</thead>
<tbody>
<?php
if (count($pages) != 0) {
foreach ($pages as $page) {
if ($page['parent'] != '') { $dash = Html::arrow('right').'&nbsp;&nbsp;'; } else { $dash = ""; }
?>
<?php if ($page['parent'] == '') $parent_style=''; else $parent_style = ''; ?>
<?php if ($page['slug'] != 'error404') { ?>
<tr>
<td>
<?php
if ($page['parent'] != '') {
$parent = $page['parent'].'/';
} else {
$parent = '';
}
?>
<?php
if ($page['parent'] != '') echo '&nbsp;';
?>
<?php echo $dash.Html::anchor(Html::toText($page['title']), $site_url.$parent.$page['slug'], array('target' => '_blank')); ?>
</td>
<td>
<?php echo $page['author']; ?>
</td>
<td>
<?php echo $page['status']; ?>
</td>
<td>
<?php echo Date::format($page['date'], "j.n.Y"); ?>
</td>
<td>
<div class="btn-toolbar">
<div class="btn-group">
<?php echo Html::anchor(__('Edit', 'pages'), 'index.php?id=pages&action=edit_page&name='.$page['slug'], 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">
<?php if ($page['parent'] == '') { ?>
<li><a href="index.php?id=pages&action=add_page&parent_page=<?php echo $page['slug']; ?>" title="<?php echo __('Create new page', 'pages'); ?>"><?php echo __('Add', 'pages'); ?></a></li>
<?php } ?>
<li><?php echo Html::anchor(__('Clone', 'pages'), 'index.php?id=pages&action=clone_page&name='.$page['slug'], array('title' => __('Clone', 'pages'))); ?></li>
</ul>
<?php echo Html::anchor(__('Delete', 'pages'),
'index.php?id=pages&action=delete_page&name='.$page['slug'],
array('class' => 'btn btn-actions btn-actions-default', 'onclick' => "return confirmDelete('".__("Delete page: :page", 'pages', array(':page' => Html::toText($page['title'])))."')"));
?>
</div>
</div>
</td>
</tr>
<?php } ?>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>