1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-08 06:06:53 +02:00
This commit is contained in:
metal_gvc
2014-02-08 13:27:19 +02:00
26 changed files with 1814 additions and 3095 deletions

View File

@@ -1,10 +1,11 @@
Monstra 2.4.0, 2014-xx-xx Monstra 2.4.0, 2014-xx-xx
------------------------ ------------------------
- Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens. - Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens.
- Update Twitter Bootstrap to 3.0.3 - Update Twitter Bootstrap to 3.1.0
- Admin: New Modern User Interface - Admin: New Modern User Interface
- Site: New default theme - Site: New default theme
- W3 layout fixes - W3 layout fixes
- Idiorm Updated to 1.4.1
- Filesmanager plugin: added ability to create & rename directories. - Filesmanager plugin: added ability to create & rename directories.
- Responsive Chocolat Lightbox instead of TB Lightbox - Responsive Chocolat Lightbox instead of TB Lightbox
- Blog Plugin as a part of Monstra CMS - Blog Plugin as a part of Monstra CMS

View File

@@ -82,6 +82,9 @@ if (Request::post('login_submit')) {
} }
} }
} }
Notification::set('error', $login_error);
} }
// Errors // Errors
@@ -117,13 +120,13 @@ if (Request::post('reset_password_submit')) {
$mail->AddReplyTo(Option::get('system_email')); $mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']); $mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name)); $mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/users/views/emails/layout_email') $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url) ->assign('site_url', $site_url)
->assign('site_name', $site_name) ->assign('site_name', $site_name)
->assign('user_id', $user['id']) ->assign('user_id', $user['id'])
->assign('user_login', $user['login']) ->assign('user_login', $user['login'])
->assign('new_hash', $new_hash) ->assign('new_hash', $new_hash)
->assign('view', 'reset_password_email') ->assign('email_template', 'reset-password')
->render()); ->render());
$mail->Send(); $mail->Send();

View File

@@ -49,14 +49,20 @@ a.btn-expand {
padding-right:4px; padding-right:4px;
} }
.login-footer,
.login-footer a {
color:#777;
font-size:12px;
}
footer { footer {
margin-top: 40px; margin-top: 40px;
} }
footer, footer,
footer a { footer a {
color:#333; color:#777;
font-size:10px; font-size:12px;
} }
footer span { footer span {
@@ -92,6 +98,20 @@ footer span {
padding-left: 0; padding-left: 0;
} }
/* Admin Form */
.form-signin {
width: 400px;
}
.form-signin {
margin-top: 40px;
}
.form-signin .administration-area,
.form-signin .reset-password-area {
margin-top: 40px;
}
/* Dropdown Menu */ /* Dropdown Menu */
.dropdown-menu .divider { .dropdown-menu .divider {
background-color: #555454; background-color: #555454;
@@ -108,6 +128,10 @@ footer span {
} }
/* Navbar */ /* Navbar */
.navbar-inverse .navbar-nav > li > a {
color: #eee;
}
.navbar-inverse { .navbar-inverse {
background: #222; background: #222;
} }
@@ -182,10 +206,15 @@ a.navbar-brand {
.badge, .badge,
.label, .label,
.input-group-addon, .input-group-addon,
.alert,
.tooltip,
.tooltip-inner,
code { code {
border-radius: 0px; border-radius: 0px;
} }
.badge, .badge,
.tooltip,
.tooltip-inner,
.label { .label {
font-weight: normal; font-weight: normal;
text-shadow: none; text-shadow: none;

View File

@@ -59,13 +59,18 @@
</head> </head>
<body class="login-body"> <body class="login-body">
<?php
// Monstra Notifications
Notification::get('success') AND Alert::success(Notification::get('success'));
Notification::get('warning') AND Alert::warning(Notification::get('warning'));
Notification::get('error') AND Alert::error(Notification::get('error'));
?>
<div class="container form-signin"> <div class="container form-signin">
<div style="text-align:center;"><a class="brand" href="<?php echo Option::get('siteurl'); ?>/admin"><img src="<?php echo Option::get('siteurl'); ?>/public/assets/img/monstra-logo.png" height="27" width="171" alt="monstra" /></a></div> <div class="text-center"><a class="brand" href="<?php echo Option::get('siteurl'); ?>/admin"><img src="<?php echo Option::get('siteurl'); ?>/public/assets/img/monstra-logo-256px.png" alt="monstra" /></a></div>
<div class="administration-area"> <div class="administration-area well">
<hr>
<div> <div>
<h2 class="text-center"><?php echo __('Administration', 'system'); ?></h2><br>
<form method="post"> <form method="post">
<div class="form-group"> <div class="form-group">
<label><?php echo __('Username', 'users'); ?></label> <label><?php echo __('Username', 'users'); ?></label>
@@ -75,19 +80,15 @@
<label><?php echo __('Password', 'users'); ?></label> <label><?php echo __('Password', 'users'); ?></label>
<input class="form-control" name="password" type="password" /> <input class="form-control" name="password" type="password" />
</div> </div>
<div class="form-group"> <div class="form-group">
<?php if (isset($login_error) && $login_error !== '') { ?><div class="alert alert-error"><?php echo $login_error; ?></div><?php } ?>
<input type="submit" name="login_submit" class="btn btn-primary" value="<?php echo __('Log In', 'users'); ?>" /> <input type="submit" name="login_submit" class="btn btn-primary" value="<?php echo __('Log In', 'users'); ?>" />
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="reset-password-area"> <div class="reset-password-area well">
<hr>
<div> <div>
<h2 style="text-align:center;"><?php echo __('Reset Password', 'users'); ?></h2><br>
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<form method="post"> <form method="post">
<div class="form-group"> <div class="form-group">
<label><?php echo __('Username', 'users'); ?></label> <label><?php echo __('Username', 'users'); ?></label>
@@ -110,24 +111,28 @@
} }
?> ?>
<div class="form-group"> <div class="form-group">
<input type="submit" name="reset_password_submit" class="btn btn-primary" value="<?php echo __('Send New Password', 'users')?>" /> <input type="submit" name="reset_password_submit" class="btn btn-primary" value="<?php echo __('Get New Password', 'users')?>" />
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<hr>
<div>
<div class="text-center">
<a class="small-grey-text" href="<?php echo Option::get('siteurl'); ?>"><?php echo __('< Back to Website', 'system');?></a> -
<a class="small-grey-text reset-password-btn" href="javascript:;"><?php echo __('Forgot your password? >', 'system');?></a>
<a class="small-grey-text administration-btn" href="javascript:;"><?php echo __('Administration >', 'system');?></a>
</div>
</div>
</div> </div>
<div class="text-center"> <div class="login-footer">
<span class="small-grey-text">© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
<div class="text-center">
<a href="<?php echo Option::get('siteurl'); ?>"><?php echo __('Back to Website', 'system');?></a> -
<a class="reset-password-btn" href="javascript:;"><?php echo __('Forgot your password ?', 'system');?></a>
<a class="administration-btn" href="javascript:;"><?php echo __('Log in', 'system');?></a>
</div>
<div class="text-center">
<span>© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
</div>
</div> </div>
</body> </body>
</html> </html>

View File

@@ -39,12 +39,17 @@
// Select Monstra language // Select Monstra language
if (Request::get('language')) { if (Request::get('language')) {
if (Request::get('action') && Request::get('action') == 'install') {
$action = '?action=install';
} else {
$action = '';
}
if (in_array(Request::get('language'), $languages_array)) { if (in_array(Request::get('language'), $languages_array)) {
if (Option::update('language', Request::get('language'))) { if (Option::update('language', Request::get('language'))) {
Request::redirect($site_url); Request::redirect($site_url.$action);
} }
} else { } else {
Request::redirect($site_url); Request::redirect($site_url.$action);
} }
} }
@@ -105,6 +110,8 @@
// Installation done :) // Installation done :)
header("location: index.php?install=done"); header("location: index.php?install=done");
} else {
Notification::setNow('errors', $errors);
} }
} }
?> ?>
@@ -119,6 +126,7 @@
<link rel="shortcut icon" href="<?php echo $site_url; ?>/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="<?php echo $site_url; ?>/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="<?php echo $site_url; ?>/public/assets/css/bootstrap.css" media="all" type="text/css" /> <link rel="stylesheet" href="<?php echo $site_url; ?>/public/assets/css/bootstrap.css" media="all" type="text/css" />
<link rel="stylesheet" href="<?php echo $site_url; ?>/admin/themes/default/css/default.css" media="all" type="text/css" /> <link rel="stylesheet" href="<?php echo $site_url; ?>/admin/themes/default/css/default.css" media="all" type="text/css" />
<style> <style>
.install-body { .install-body {
@@ -129,7 +137,7 @@
.install-languages { .install-languages {
margin: 20px auto 20px; margin: 20px auto 20px;
text-align: center; text-align: center;
width: 390px; width: 600px;
} }
.install-block, .install-block,
@@ -165,14 +173,24 @@
.error { .error {
color:#8E0505; color:#8E0505;
padding-top: 5px;
padding-bottom: 5px;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
} }
.ok { .ok {
color:#00853F; color:#00853F;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
} }
.warn { .warn {
color: #F74C18; color: #F74C18;
padding-top: 5px;
padding-bottom: 5px;
} }
.install-languages a { .install-languages a {
@@ -204,12 +222,17 @@
opacity: 1.0; opacity: 1.0;
} }
.continue {
width: 100%;
}
</style> </style>
<script type="text/javascript" src="<?php echo $site_url; ?>/public/assets/js/jquery.min.js"></script> <script src="<?php echo $site_url; ?>/public/assets/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $site_url; ?>/public/assets/js/bootstrap.min.js"></script> <script src="<?php echo $site_url; ?>/public/assets/js/bootstrap.min.js"></script>
</head> </head>
<body class="install-body"> <body class="install-body">
<?php <?php
if (version_compare(PHP_VERSION, "5.2.3", "<")) { if (version_compare(PHP_VERSION, "5.2.3", "<")) {
$errors['php'] = 'error'; $errors['php'] = 'error';
@@ -264,13 +287,36 @@
<div class="text-center"><a class="brand" href="<?php echo Html::toText($site_url); ?>"><img src="<?php echo $site_url; ?>/public/assets/img/monstra-logo-256px.png" alt="Monstra"></a></div> <div class="text-center"><a class="brand" href="<?php echo Html::toText($site_url); ?>"><img src="<?php echo $site_url; ?>/public/assets/img/monstra-logo-256px.png" alt="Monstra"></a></div>
<div class="install-languages"> <div class="install-languages">
<?php
if (Request::get('action') && Request::get('action') == 'install') {
$action = '&action=install';
} else {
$action = '';
}
?>
<?php foreach ($languages_array as $lang_code) { ?> <?php foreach ($languages_array as $lang_code) { ?>
<a data-placement="top" data-toggle="tooltip" class="language-link<?php if (Option::get('language') == $lang_code) echo ' language-link-current';?>" title="<?php echo I18n::$locales[$lang_code]; ?>" href="<?php echo $site_url.'/?language=' . $lang_code; ?>"><img src="<?php echo $site_url; ?>/public/assets/img/flags/<?php echo $lang_code?>.png" alt="<?php echo $lang_code?>"></a> <a data-placement="top" data-toggle="tooltip" class="language-link<?php if (Option::get('language') == $lang_code) echo ' language-link-current';?>" title="<?php echo I18n::$locales[$lang_code]; ?>" href="<?php echo $site_url.'/?language=' . $lang_code.$action; ?>"><img src="<?php echo $site_url; ?>/public/assets/img/flags/<?php echo $lang_code?>.png" alt="<?php echo $lang_code?>"></a>
<?php } ?> <?php } ?>
</div> </div>
<div class="install-block well"> <div class="install-block <?php if(Request::get('action') && Request::get('action') == 'install') { ?><?php } else { ?> hide <?php } ?>">
<form action="install.php" method="post">
<ul class="list-unstyled">
<?php
// Monstra Notifications
if (Notification::get('errors') && count(Notification::get('errors') > 0)) {
foreach (Notification::get('errors') as $error) {
?>
<li class="error alert alert-danger"><?php echo $error; ?></li>
<?php
}
}
?>
</ul>
<div class="well">
<form action="install.php?action=install" method="post">
<input type="hidden" name="php" value="<?php echo $errors['php']; ?>"> <input type="hidden" name="php" value="<?php echo $errors['php']; ?>">
<input type="hidden" name="simplexml" value="<?php echo $errors['simplexml']; ?>"> <input type="hidden" name="simplexml" value="<?php echo $errors['simplexml']; ?>">
<input type="hidden" name="mod_rewrite" value="<?php echo $errors['mod_rewrite']; ?>"> <input type="hidden" name="mod_rewrite" value="<?php echo $errors['mod_rewrite']; ?>">
@@ -402,66 +448,66 @@
<input type="submit" class="btn btn-primary" name="install_submit" value="<?php echo __('Install', 'system'); ?>" /> <input type="submit" class="btn btn-primary" name="install_submit" value="<?php echo __('Install', 'system'); ?>" />
</div> </div>
</form> </form>
</div>
</div> </div>
<p class="text-center monstra-says"><strong><?php echo __('...Monstra says...', 'system'); ?></strong></p> <div class="monstra-dialog <?php if(Request::get('action') && Request::get('action') == 'install') { ?>hide<?php } ?>">
<div class="monstra-dialog well">
<ul class="list-unstyled"> <ul class="list-unstyled">
<?php <?php
if (version_compare(PHP_VERSION, "5.2.0", "<")) { if (version_compare(PHP_VERSION, "5.2.0", "<")) {
echo '<li class="error">'.__('PHP 5.2 or greater is required', 'system').'</li>'; echo '<li class="error alert alert-danger">'.__('PHP 5.2 or greater is required', 'system').'</li>';
} else { } else {
echo '<li class="ok">'.__('PHP Version', 'system').' '.PHP_VERSION.'</li>'; echo '<li class="ok alert alert-success">'.__('PHP Version', 'system').' '.PHP_VERSION.'</li>';
} }
if (in_array('SimpleXML', $php_modules)) { if (in_array('SimpleXML', $php_modules)) {
echo '<li class="ok">'.__('Module SimpleXML is installed', 'system').'</li>'; echo '<li class="ok alert alert-success">'.__('Module SimpleXML is installed', 'system').'</li>';
} else { } else {
echo '<li class="error">'.__('SimpleXML module is required', 'system').'</li>'; echo '<li class="error alert alert-danger">'.__('SimpleXML module is required', 'system').'</li>';
} }
if (in_array('dom', $php_modules)) { if (in_array('dom', $php_modules)) {
echo '<li class="ok">'.__('Module DOM is installed', 'system').'</li>'; echo '<li class="ok alert alert-success">'.__('Module DOM is installed', 'system').'</li>';
} else { } else {
echo '<li class="error">'.__('Module DOM is required', 'system').'</li>'; echo '<li class="error alert alert-danger">'.__('Module DOM is required', 'system').'</li>';
} }
if (function_exists('apache_get_modules')) { if (function_exists('apache_get_modules')) {
if ( ! in_array('mod_rewrite',apache_get_modules())) { if ( ! in_array('mod_rewrite',apache_get_modules())) {
echo '<li class="error">'.__('Apache Mod Rewrite is required', 'system').'</li>'; echo '<li class="error alert alert-danger">'.__('Apache Mod Rewrite is required', 'system').'</li>';
} else { } else {
echo '<li class="ok">'.__('Module Mod Rewrite is installed', 'system').'</li>'; echo '<li class="ok alert alert-success">'.__('Module Mod Rewrite is installed', 'system').'</li>';
} }
} else { } else {
echo '<li class="ok">'.__('Module Mod Rewrite is installed', 'system').'</li>'; echo '<li class="ok alert alert-success">'.__('Module Mod Rewrite is installed', 'system').'</li>';
} }
foreach ($dir_array as $dir) { foreach ($dir_array as $dir) {
if (is_writable($dir.'/')) { if (is_writable($dir.'/')) {
echo '<li class="ok">'.__('Directory: <b> :dir </b> writable', 'system', array(':dir' => $dir)).'</li>'; echo '<li class="ok alert alert-success">'.__('Directory: <b> :dir </b> writable', 'system', array(':dir' => $dir)).'</li>';
} else { } else {
echo '<li class="error">'.__('Directory: <b> :dir </b> not writable', 'system', array(':dir' => $dir)).'</li>'; echo '<li class="error alert alert-danger">'.__('Directory: <b> :dir </b> not writable', 'system', array(':dir' => $dir)).'</li>';
} }
} }
if (is_writable(__FILE__)) { if (is_writable(__FILE__)) {
echo '<li class="ok">'.__('Install script writable', 'system').'</li>'; echo '<li class="ok alert alert-success">'.__('Install script writable', 'system').'</li>';
} else { } else {
echo '<li class="error">'.__('Install script not writable', 'system').'</li>'; echo '<li class="error alert alert-danger">'.__('Install script not writable', 'system').'</li>';
} }
if (is_writable('sitemap.xml')) { if (is_writable('sitemap.xml')) {
echo '<li class="ok">'.__('Sitemap file writable', 'system').'</li>'; echo '<li class="ok alert alert-success">'.__('Sitemap file writable', 'system').'</li>';
} else { } else {
echo '<li class="error">'.__('Sitemap file not writable', 'system').'</li>'; echo '<li class="error alert alert-danger">'.__('Sitemap file not writable', 'system').'</li>';
} }
if (is_writable('.htaccess')) { if (is_writable('.htaccess')) {
echo '<li class="ok">'.__('Main .htaccess file writable', 'system').'</li>'; echo '<li class="ok alert alert-success">'.__('Main .htaccess file writable', 'system').'</li>';
} else { } else {
echo '<li class="error">'.__('Main .htaccess file not writable', 'system').'</li>'; echo '<li class="error alert alert-danger">'.__('Main .htaccess file not writable', 'system').'</li>';
} }
if (isset($errors['sitename'])) echo '<li class="error">'.$errors['sitename'].'</li>'; if (isset($errors['sitename'])) echo '<li class="error">'.$errors['sitename'].'</li>';
@@ -472,16 +518,24 @@
if (isset($errors['email_valid'])) echo '<li class="error">'.$errors['email_valid'].'</li>'; if (isset($errors['email_valid'])) echo '<li class="error">'.$errors['email_valid'].'</li>';
?> ?>
</ul> </ul>
<a href="install.php?action=install" class="btn btn-primary continue">Continue</a>
</div> </div>
<div class="install-block-footer"> <div class="install-block-footer login-footer">
<div class="text-center"> <div class="text-center">
<span class="small-grey-text">© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span> <span>© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$('.language-link').tooltip(); $('.language-link').tooltip();
$(document).ready(function() {
$('.continue').click(function() {
$('.monstra-dialog').addClass('hide');
$('.install-block').removeClass('hide');
});
});
</script> </script>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@@ -46,6 +46,10 @@ $().ready(function(){$('[name=create_backup]').click(function(){$(this).button('
<td><?php echo Number::byteFormat(filesize(ROOT . DS . 'backups' . DS . $backup)); ?></td> <td><?php echo Number::byteFormat(filesize(ROOT . DS . 'backups' . DS . $backup)); ?></td>
<td> <td>
<div class="pull-right"> <div class="pull-right">
<?php echo Html::anchor(__('Restore', 'backup'),
'',
array('class' => 'btn btn-primary'));
?>
<?php echo Html::anchor(__('Delete', 'backup'), <?php echo Html::anchor(__('Delete', 'backup'),
'index.php?id=backup&delete_file='.$backup.'&token='.Security::token(), 'index.php?id=backup&delete_file='.$backup.'&token='.Security::token(),
array('class' => 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete backup: :backup', 'backup', array(':backup' => Date::format($name, 'F jS, Y - g:i A')))."')")); array('class' => 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete backup: :backup', 'backup', array(':backup' => Date::format($name, 'F jS, Y - g:i A')))."')"));

View File

@@ -0,0 +1,2 @@
Options -Indexes
Allow from all

View File

@@ -48,11 +48,11 @@ class EmailsAdmin extends Backend
} }
$email_template_content = File::getContent($email_templates_path.Request::get('filename').'.email.php'); $content = File::getContent($email_templates_path.Request::get('filename').'.email.php');
// Display view // Display view
View::factory('box/emails/views/backend/edit') View::factory('box/emails/views/backend/edit')
->assign('email_template_content', Text::toHtml($email_template_content)) ->assign('content', $content)
->display(); ->display();
break; break;

View File

@@ -1,7 +1,7 @@
<h2><?php echo __('Edit Email Template', 'emails'); ?></h2> <h2><?php echo __('Edit Email Template', 'emails'); ?></h2>
<br> <br>
<?php <?php
if ($email_template_content !== null) { if ($content !== null) {
echo (Form::open()); echo (Form::open());
echo (Form::hidden('csrf', Security::token())); echo (Form::hidden('csrf', Security::token()));
echo (Form::hidden('email_template_name', Request::get('filename'))); echo (Form::hidden('email_template_name', Request::get('filename')));
@@ -15,7 +15,7 @@ if ($email_template_content !== null) {
echo ( echo (
Form::label('content', __('Email template content', 'emails')). Form::label('content', __('Email template content', 'emails')).
Form::textarea('content', Html::toText($email_template_content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor form-control')) Form::textarea('content', Html::toText($content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor form-control'))
); );
echo ( echo (

View File

@@ -2,6 +2,14 @@
<div class="pull-left"> <div class="pull-left">
<h2><?php echo __('Emails', 'emails'); ?></h2> <h2><?php echo __('Emails', 'emails'); ?></h2>
</div> </div>
<div class="pull-right">
<br>
<?php
echo (
Html::anchor(__('Edit Layout', 'emails'), 'index.php?id=emails&action=edit_email_template&filename=layout', array('title' => __('Edit Layout', 'emails'), 'class' => 'btn btn-primary'))
);
?>
</div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
@@ -16,16 +24,18 @@
</thead> </thead>
<tbody> <tbody>
<?php if (count($email_templates_list) != 0) foreach ($email_templates_list as $email_template) { ?> <?php if (count($email_templates_list) != 0) foreach ($email_templates_list as $email_template) { ?>
<tr> <?php if ($email_template != 'layout.email.php') { ?>
<td><?php echo basename($email_template, '.email.php'); ?></td> <tr>
<td> <td><?php echo basename($email_template, '.email.php'); ?></td>
<div class="pull-right"> <td>
<div class="btn-group"> <div class="pull-right">
<?php echo Html::anchor(__('Edit', 'emails'), 'index.php?id=emails&action=edit_email_template&filename='.basename($email_template, '.email.php'), array('class' => 'btn btn-primary')); ?> <div class="btn-group">
</div> <?php echo Html::anchor(__('Edit', 'emails'), 'index.php?id=emails&action=edit_email_template&filename='.basename($email_template, '.email.php'), array('class' => 'btn btn-primary')); ?>
</div> </div>
</td> </div>
</tr> </td>
</tr>
<?php } ?>
<?php } ?> <?php } ?>
</tbody> </tbody>
</table> </table>

View File

@@ -1,22 +1 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <?php include STORAGE . DS . 'emails' . DS . 'layout.email.php'; ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<style type="text/css">
<?php include 'inc.css'; ?>
</style>
</head>
<body>
<table class="body">
<tr>
<td class="center" align="center" valign="top">
<center>
<?php include STORAGE . DS . 'emails' . DS . $email_template . '.email.php'; ?>
</center>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,2 @@
Options -Indexes
Allow from all

View File

@@ -10,15 +10,11 @@
} }
.upload-area-dragenter { .upload-area-dragenter {
border: 2px solid #ff85A1 !important; border: 2px dashed #428bca !important;
} }
.upload-area-drop { .upload-area-drop {
border: 2px dotted #0B85A1; border: 2px dashed #428bca;
}
.upload-area-dragover {
border: 2px dotted #0B85A1;
} }
.upload-progress { .upload-progress {
@@ -43,3 +39,14 @@
.upload-file-pholder { .upload-file-pholder {
padding-top: 5px; padding-top: 5px;
} }
.file-size-max-upload {
color: #ccc;
text-decoration: none;
}
.file-size-max-upload:hover {
color: #ccc;
cursor: default;
text-decoration: none;
}

View File

@@ -12,25 +12,26 @@
); );
?> ?>
<div class="col-md-10"> <div class="col-md-10">
<div class="fileupload fileupload-new fileupload-controls" data-provides="fileupload">
<button class="btn btn-default btn-file"><span class="fileupload-new"><?php echo __('Select file', 'filesmanager'); ?></span><span class="fileupload-exists"><?php echo __('Change', 'filesmanager'); ?></span><input type="file" name="file" /></button>
<?php
echo (
Form::submit('upload_file', __('Upload', 'filesmanager'), array('class' => 'btn btn-primary')).
Form::close()
)
?>
<span class="fileupload-preview"></span>
<a href="#" class="close fileupload-exists" data-dismiss="fileupload">×</a>
<div class="fileinput fileinput-new pull-left" data-provides="fileinput">
<span class="btn btn-default btn-file"><span class="fileinput-new"><?php echo __('Select file', 'filesmanager'); ?></span><span class="fileinput-exists"><?php echo __('Change', 'filesmanager'); ?></span><input type="file" name="file"></span>
<?php
echo (
Form::submit('upload_file', __('Upload', 'filesmanager'), array('class' => 'btn btn-primary')).
Form::close()
)
?>
<span class="fileinput-filename"></span>
<a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">&times;</a>
</div> </div>
<div id="uploadArea" class="upload-area"> <div id="uploadArea" class="upload-area">
<div id="fuProgress" class="upload-progress"></div> <div id="fuProgress" class="upload-progress"></div>
<div id="fuPlaceholder" class="upload-file-pholder"><?php echo __('Drop File Here', 'filesmanager'); ?></div> <div id="fuPlaceholder" class="upload-file-pholder"><?php echo __('Drop File Here', 'filesmanager'); ?></div>
</div> </div>
<div id="fileInfo" class="upload-file-info"></div> <div id="fileInfo" class="upload-file-info"></div>
<div class="btn btn-link"> <div class="btn btn-link file-size-max-upload">
Maximum upload file size: <?php echo $upload_max_filesize; ?> <?php echo __('Maximum upload file size: :upload_max_filesize', 'pages', array(':upload_max_filesize' => $upload_max_filesize)); ?>
</div> </div>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">

View File

@@ -17,7 +17,7 @@ function checkMonstraVersion()
var current_monstra_version = "'.Monstra::VERSION.'"; var current_monstra_version = "'.Monstra::VERSION.'";
var stable_monstra_version = data.version; var stable_monstra_version = data.version;
if (current_monstra_version < stable_monstra_version) { if (current_monstra_version < stable_monstra_version) {
$("#update-monstra").addClass("alert").html("'.__("Published a new version of the :monstra", "system", array(":monstra" => "<a target='_blank' href='http://monstra.org/download'>Monstra</a>")).'"); $("#update-monstra").addClass("alert alert-info").html("'.__("Published a new version of the :monstra", "system", array(":monstra" => "<a target='_blank' href='http://monstra.org/download'>Monstra</a>")).'");
} }
} }
); );

View File

@@ -298,7 +298,7 @@ class Users extends Frontend
$mail->AddReplyTo(Option::get('system_email')); $mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']); $mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your new password for :site_name', 'users', array(':site_name' => $site_name)); $mail->Subject = __('Your new password for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/users/views/emails/email_layout') $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url) ->assign('site_url', $site_url)
->assign('site_name', $site_name) ->assign('site_name', $site_name)
->assign('user_id', $user['id']) ->assign('user_id', $user['id'])
@@ -312,7 +312,7 @@ class Users extends Frontend
Notification::set('success', __('New password has been sent', 'users')); Notification::set('success', __('New password has been sent', 'users'));
// Redirect to password-reset page // Redirect to password-reset page
Request::redirect(Site::url().'/users/password-reset'); Request::redirect(Site::url().'/users/login');
} }
} }
@@ -347,7 +347,7 @@ class Users extends Frontend
$mail->AddReplyTo(Option::get('system_email')); $mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']); $mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name)); $mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/users/views/emails/layout_email') $mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url) ->assign('site_url', $site_url)
->assign('site_name', $site_name) ->assign('site_name', $site_name)
->assign('user_id', $user['id']) ->assign('user_id', $user['id'])

View File

@@ -58,13 +58,20 @@ class CodeMirror
'); ');
if (Request::get('id') == 'themes' || Request::get('id') == 'snippets' || Request::get('id') == 'emails') { if (Request::get('id') == 'themes' || Request::get('id') == 'snippets' || Request::get('id') == 'emails') {
if (Request::get('id') == 'emails') {
$mode = 'xml';
} else {
$mode = 'htmlmixed';
}
echo ('<script> echo ('<script>
$(document).ready(function() { $(document).ready(function() {
var editor = CodeMirror.fromTextArea(document.getElementById("content"), { var editor = CodeMirror.fromTextArea(document.getElementById("content"), {
lineNumbers: false, lineNumbers: false,
matchBrackets: true, matchBrackets: true,
indentUnit: 4, indentUnit: 4,
mode: "htmlmixed", mode: "'.$mode.'",
indentWithTabs: true, indentWithTabs: true,
theme: "'.CodeMirror::$theme.'" theme: "'.CodeMirror::$theme.'"
}); });

View File

@@ -1,39 +1,3 @@
/*!
* Bootstrap v2.3.1-j6
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat, extended by @ArnoldDaniels.
*/
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
line-height: 0;
}
.clearfix:after {
clear: both;
}
.hide-text {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.input-block-level {
display: block;
width: 100%;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.btn-file { .btn-file {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
@@ -51,85 +15,76 @@
direction: ltr; direction: ltr;
cursor: pointer; cursor: pointer;
} }
.fileupload { .fileinput {
margin-bottom: 9px; margin-bottom: 9px;
display: inline-block;
} }
.fileupload .uneditable-input { .fileinput .uneditable-input {
display: inline-block; display: inline-block;
margin-bottom: 0px; margin-bottom: 0px;
vertical-align: middle; vertical-align: middle;
cursor: text; cursor: text;
} }
.fileupload .thumbnail { .fileinput .thumbnail {
overflow: hidden; overflow: hidden;
display: inline-block; display: inline-block;
margin-bottom: 5px; margin-bottom: 5px;
vertical-align: middle; vertical-align: middle;
text-align: center; text-align: center;
} }
.fileupload .thumbnail > img { .fileinput .thumbnail > img {
display: inline-block;
vertical-align: middle;
max-height: 100%; max-height: 100%;
} }
.fileupload .btn { .fileinput .btn {
vertical-align: middle; vertical-align: middle;
} }
.fileupload-exists .fileupload-new, .fileinput-exists .fileinput-new,
.fileupload-new .fileupload-exists { .fileinput-new .fileinput-exists {
display: none; display: none;
} }
.fileupload-exists { .fileinput-inline .fileinput-controls {
float:none;
}
.fileupload-inline .fileupload-controls {
display: inline; display: inline;
} }
.fileupload-new .input-append .btn-file { .fileinput .uneditable-input {
-webkit-border-radius: 0 3px 3px 0; white-space: normal;
-moz-border-radius: 0 3px 3px 0; }
.fileinput-new .input-group .btn-file {
border-radius: 0 4px 4px 0;
}
.fileinput-new .input-group .btn-file.btn-xs,
.fileinput-new .input-group .btn-file.btn-sm {
border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0;
} }
.thumbnail-borderless .thumbnail { .fileinput-new .input-group .btn-file.btn-lg {
border: none; border-radius: 0 6px 6px 0;
padding: 0;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
} }
.fileupload-new.thumbnail-borderless .thumbnail { .form-group.has-warning .fileinput .uneditable-input {
border: 1px solid #ddd; color: #c09853;
border-color: #faebcc;
} }
.control-group.warning .fileupload .uneditable-input { .form-group.has-warning .fileinput .fileinput-preview {
color: #a47e3c; color: #c09853;
border-color: #a47e3c;
} }
.control-group.warning .fileupload .fileupload-preview { .form-group.has-warning .fileinput .thumbnail {
color: #a47e3c; border-color: #faebcc;
} }
.control-group.warning .fileupload .thumbnail { .form-group.has-error .fileinput .uneditable-input {
border-color: #a47e3c;
}
.control-group.error .fileupload .uneditable-input {
color: #b94a48; color: #b94a48;
border-color: #b94a48; border-color: #ebccd1;
} }
.control-group.error .fileupload .fileupload-preview { .form-group.has-error .fileinput .fileinput-preview {
color: #b94a48; color: #b94a48;
} }
.control-group.error .fileupload .thumbnail { .form-group.has-error .fileinput .thumbnail {
border-color: #b94a48; border-color: #ebccd1;
} }
.control-group.success .fileupload .uneditable-input { .form-group.has-success .fileinput .uneditable-input {
color: #468847; color: #468847;
border-color: #468847; border-color: #d6e9c6;
} }
.control-group.success .fileupload .fileupload-preview { .form-group.has-success .fileinput .fileinput-preview {
color: #468847; color: #468847;
} }
.control-group.success .fileupload .thumbnail { .form-group.has-success .fileinput .thumbnail {
border-color: #468847; border-color: #d6e9c6;
} }

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

View File

@@ -1,6 +1,6 @@
/* =========================================================== /* ===========================================================
* bootstrap-fileupload.js j2 * Bootstrap: fileinput.js v3.0.0-p7
* http://jasny.github.com/bootstrap/javascript.html#fileupload * http://jasny.github.com/bootstrap/javascript.html#fileinput
* =========================================================== * ===========================================================
* Copyright 2012 Jasny BV, Netherlands. * Copyright 2012 Jasny BV, Netherlands.
* *
@@ -17,16 +17,15 @@
* limitations under the License. * limitations under the License.
* ========================================================== */ * ========================================================== */
!function ($) { +function ($) { "use strict";
"use strict"; // jshint ;_ var isIE = window.navigator.appName == 'Microsoft Internet Explorer'
/* FILEUPLOAD PUBLIC CLASS DEFINITION // FILEUPLOAD PUBLIC CLASS DEFINITION
* ================================= */ // =================================
var Fileupload = function (element, options) { var Fileupload = function (element, options) {
this.$element = $(element) this.$element = $(element)
this.type = this.$element.data('uploadtype') || (this.$element.find('.thumbnail').length > 0 ? "image" : "file")
this.$input = this.$element.find(':file') this.$input = this.$element.find(':file')
if (this.$input.length === 0) return if (this.$input.length === 0) return
@@ -39,131 +38,142 @@
this.$element.prepend(this.$hidden) this.$element.prepend(this.$hidden)
} }
this.$preview = this.$element.find('.fileupload-preview') this.$preview = this.$element.find('.fileinput-preview')
var height = this.$preview.css('height') var height = this.$preview.css('height')
if (this.$preview.css('display') != 'inline' && height != '0px' && height != 'none') this.$preview.css('line-height', height) if (this.$preview.css('display') != 'inline' && height != '0px' && height != 'none') this.$preview.css('line-height', height)
this.original = { this.original = {
'exists': this.$element.hasClass('fileupload-exists'), exists: this.$element.hasClass('fileinput-exists'),
'preview': this.$preview.html(), preview: this.$preview.html(),
'hiddenVal': this.$hidden.val() hiddenVal: this.$hidden.val()
} }
this.$remove = this.$element.find('[data-dismiss="fileupload"]')
this.$element.find('[data-trigger="fileupload"]').on('click.fileupload', $.proxy(this.trigger, this))
this.listen() this.listen()
} }
Fileupload.prototype = { Fileupload.prototype.listen = function() {
this.$input.on('change.bs.fileinput', $.proxy(this.change, this))
$(this.$input[0].form).on('reset.bs.fileinput', $.proxy(this.reset, this))
listen: function() { this.$element.find('[data-trigger="fileinput"]').on('click.bs.fileinput', $.proxy(this.trigger, this))
this.$input.on('change.fileupload', $.proxy(this.change, this)) this.$element.find('[data-dismiss="fileinput"]').on('click.bs.fileinput', $.proxy(this.clear, this))
$(this.$input[0].form).on('reset.fileupload', $.proxy(this.reset, this)) },
if (this.$remove) this.$remove.on('click.fileupload', $.proxy(this.clear, this))
},
change: function(e, invoked) {
if (invoked === 'clear') return
var file = e.target.files !== undefined ? e.target.files[0] : (e.target.value ? { name: e.target.value.replace(/^.+\\/, '') } : null)
if (!file) {
this.clear()
return
}
this.$hidden.val('')
this.$hidden.attr('name', '')
this.$input.attr('name', this.name)
if (this.type === "image" && this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match('image.*') : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") { Fileupload.prototype.change = function(e) {
var reader = new FileReader() if (e.target.files === undefined) e.target.files = e.target && e.target.value ? [ {name: e.target.value.replace(/^.+\\/, '')} ] : []
var preview = this.$preview if (e.target.files.length === 0) return
var element = this.$element
reader.onload = function(e) { this.$hidden.val('')
preview.html('<img src="' + e.target.result + '" ' + (preview.css('max-height') != 'none' ? 'style="max-height: ' + preview.css('max-height') + ';"' : '') + ' />') this.$hidden.attr('name', '')
element.addClass('fileupload-exists').removeClass('fileupload-new') this.$input.attr('name', this.name)
}
reader.readAsDataURL(file) var file = e.target.files[0]
} else {
this.$preview.text(file.name)
this.$element.addClass('fileupload-exists').removeClass('fileupload-new')
}
},
clear: function(e) { if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match('image.*') : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
this.$hidden.val('') var reader = new FileReader()
this.$hidden.attr('name', this.name) var preview = this.$preview
this.$input.attr('name', '') var element = this.$element
//ie8+ doesn't support changing the value of input with type=file so clone instead reader.onload = function(re) {
if (navigator.userAgent.match(/msie/i)){ var $img = $('<img>').attr('src', re.target.result)
var inputClone = this.$input.clone(true); e.target.files[0].result = re.target.result
this.$input.after(inputClone);
this.$input.remove(); element.find('.fileinput-filename').text(file.name)
this.$input = inputClone;
}else{ // if parent has max-height, using `(max-)height: 100%` on child doesn't take padding and border into account
this.$input.val('') if (preview.css('max-height') != 'none') $img.css('max-height', parseInt(preview.css('max-height'), 10) - parseInt(preview.css('padding-top'), 10) - parseInt(preview.css('padding-bottom'), 10) - parseInt(preview.css('border-top'), 10) - parseInt(preview.css('border-bottom'), 10))
preview.html($img)
element.addClass('fileinput-exists').removeClass('fileinput-new')
element.trigger('change.bs.fileinput', e.target.files)
} }
this.$preview.html('') reader.readAsDataURL(file)
this.$element.addClass('fileupload-new').removeClass('fileupload-exists') } else {
this.$element.find('.fileinput-filename').text(file.name)
if (e) { this.$preview.text(file.name)
this.$input.trigger('change', [ 'clear' ])
e.preventDefault()
}
},
reset: function(e) {
this.clear()
this.$hidden.val(this.original.hiddenVal) this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
this.$preview.html(this.original.preview)
if (this.original.exists) this.$element.addClass('fileupload-exists').removeClass('fileupload-new') this.$element.trigger('change.bs.fileinput')
else this.$element.addClass('fileupload-new').removeClass('fileupload-exists')
},
trigger: function(e) {
this.$input.trigger('click')
e.preventDefault()
} }
},
Fileupload.prototype.clear = function(e) {
if (e) e.preventDefault()
this.$hidden.val('')
this.$hidden.attr('name', this.name)
this.$input.attr('name', '')
//ie8+ doesn't support changing the value of input with type=file so clone instead
if (isIE) {
var inputClone = this.$input.clone(true);
this.$input.after(inputClone);
this.$input.remove();
this.$input = inputClone;
} else {
this.$input.val('')
}
this.$preview.html('')
this.$element.find('.fileinput-filename').text('')
this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
if (e !== false) {
this.$input.trigger('change')
this.$element.trigger('clear.bs.fileinput')
}
},
Fileupload.prototype.reset = function() {
this.clear(false)
this.$hidden.val(this.original.hiddenVal)
this.$preview.html(this.original.preview)
this.$element.find('.fileinput-filename').text('')
if (this.original.exists) this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
else this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
this.$element.trigger('reset.bs.fileinput')
},
Fileupload.prototype.trigger = function(e) {
this.$input.trigger('click')
e.preventDefault()
} }
/* FILEUPLOAD PLUGIN DEFINITION // FILEUPLOAD PLUGIN DEFINITION
* =========================== */ // ===========================
$.fn.fileupload = function (options) { $.fn.fileinput = function (options) {
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('fileupload') , data = $this.data('fileinput')
if (!data) $this.data('fileupload', (data = new Fileupload(this, options))) if (!data) $this.data('fileinput', (data = new Fileupload(this, options)))
if (typeof options == 'string') data[options]() if (typeof options == 'string') data[options]()
}) })
} }
$.fn.fileupload.Constructor = Fileupload $.fn.fileinput.Constructor = Fileupload
/* FILEUPLOAD DATA-API // FILEUPLOAD DATA-API
* ================== */ // ==================
$(document).on('click.fileupload.data-api', '[data-provides="fileupload"]', function (e) { $(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) {
var $this = $(this) var $this = $(this)
if ($this.data('fileupload')) return if ($this.data('fileinput')) return
$this.fileupload($this.data()) $this.fileinput($this.data())
var $target = $(e.target).closest('[data-dismiss="fileupload"],[data-trigger="fileupload"]'); var $target = $(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');
if ($target.length > 0) { if ($target.length > 0) {
$target.trigger('click.fileupload')
e.preventDefault() e.preventDefault()
$target.trigger('click.bs.fileinput')
} }
}) })
}(window.jQuery); }(window.jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<style type="text/css">
<?php include PLUGINS_BOX . '/emails/css/inc.css'; ?>
</style>
</head>
<body>
<table class="body">
<tr>
<td class="center" align="center" valign="top">
<center>
<?php include STORAGE . DS . 'emails' . DS . $email_template . '.email.php'; ?>
</center>
</td>
</tr>
</table>
</body>
</html>

2
storage/pages/4.page.txt Normal file
View File

@@ -0,0 +1,2 @@
&lt;p&gt;Welcome to Monstra Blog.&lt;br&gt;
This is your first post. Edit or delete it, then start blogging!&lt;/p&gt;