mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-09 06:37:01 +02:00
Email Templates Plugin - Updates #2
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
@@ -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 (
|
||||||
|
@@ -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>
|
||||||
|
@@ -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 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>
|
|
Reference in New Issue
Block a user