Revize 1507
Přidáno uživatelem David Raška před více než 12 roky(ů)
freenetis/branches/testing/application/i18n/cs_CZ/texts.php | ||
---|---|---|
'absolute majority' => 'Absolutní většina',
|
||
'abstain' => 'Zdržet se',
|
||
'about sms' => 'Informace o SMS',
|
||
'about e-mail message' => 'Informace o e-mailové zprávě',
|
||
'access control list items' => 'Položky seznamu pro řízení přístupu',
|
||
'access control group of users has been successfully updated' => 'Přístupová skupina uživatelů byla úspěšně aktualizována.',
|
||
'access control groups of users' => 'Přístupové skupiny uživatelů',
|
||
... | ... | |
'show device' => 'Zobrazit zařízení',
|
||
'show device map' => 'Zobrazit mapu zařízení',
|
||
'show devices' => 'Zobrazit zařízení',
|
||
'show e-mail message' => 'Zobrazit e-mailovou zprávu',
|
||
'show form items' => 'Zobrazit položky formuláře',
|
||
'show help' => 'Zobrazit nápovědu',
|
||
'show interface' => 'Zobrazit rozhraní',
|
freenetis/branches/testing/application/controllers/email_queues.php | ||
---|---|---|
$grid->order_field('access_time')
|
||
->label('Time');
|
||
|
||
$grid->grouped_action_field()
|
||
->add_action()
|
||
$actions = $grid->grouped_action_field();
|
||
|
||
$actions->add_action()
|
||
->icon_action('show')
|
||
->url('email/show');
|
||
|
||
$actions->add_action()
|
||
->icon_action('mail_send')
|
||
->label('Send again')
|
||
->url('email_queues/send');
|
freenetis/branches/testing/application/controllers/email.php | ||
---|---|---|
status::success('Thank you for your error report');
|
||
url::redirect(url::base());
|
||
}
|
||
|
||
/**
|
||
* This function show message in database
|
||
*
|
||
* @author Roman Sevcik, David Raska
|
||
* @param integer $email_id
|
||
*/
|
||
public function show($email_id = null)
|
||
{
|
||
// access
|
||
if (!$this->acl_check_view('Settings_Controller', 'system'))
|
||
{
|
||
Controller::error(ACCESS);
|
||
}
|
||
|
||
if (!isset($email_id))
|
||
{
|
||
Controller::warning(PARAMETER);
|
||
}
|
||
|
||
$email = new Email_queue_Model($email_id);
|
||
|
||
if (!$email || !$email->id)
|
||
{
|
||
Controller::error(RECORD);
|
||
}
|
||
|
||
$email_info = $email->from . ' → ' . $email->to . ' (' . $email->access_time . ')';
|
||
|
||
$breadcrumbs = breadcrumbs::add()
|
||
->link('email_queues', 'E-mails')
|
||
->disable_translation()
|
||
->text($email_info);
|
||
|
||
$view = new View('main');
|
||
$view->title = __('Show e-mail message');
|
||
$view->content = new View('email/show');
|
||
$view->breadcrumbs = $breadcrumbs->html();
|
||
$view->content->headline = __('e-mail message');
|
||
$view->content->email = $email;
|
||
$view->render(true);
|
||
}
|
||
|
||
/**
|
||
* Adds message to the beginning of queue (will be send first)
|
||
*
|
||
* @author Michal Kliment
|
||
* @param type $from
|
||
* @param type $to
|
||
* @param type $subject
|
||
* @param type $body
|
||
* @return type
|
||
*/
|
||
public function push($from, $to, $subject, $body)
|
||
{
|
||
return $this->db->query("
|
||
INSERT INTO email_queues
|
||
SELECT
|
||
NULL, ?, ?, ?, ?, ?,
|
||
FROM_UNIXTIME(UNIX_TIMESTAMP(MIN(access_time))-1)
|
||
FROM email_queues
|
||
", array($from, $to, $subject, $body, self::STATE_NEW));
|
||
}
|
||
|
||
/**
|
||
* Callback for state of SMS message
|
||
*
|
||
* @param object $item
|
||
* @param string $name
|
||
*/
|
||
protected static function state($item, $name)
|
||
{
|
||
if ($item->state == Email_queue_Model::STATE_OK)
|
||
{
|
||
echo '<div style="color:green;">' . __('Sent') . '</div>';
|
||
}
|
||
elseif ($item->state == Email_queue_Model::STATE_NEW)
|
||
{
|
||
echo '<div style="color:grey;">' . __('Unsent') . '</div>';
|
||
}
|
||
elseif ($item->state == Email_queue_Model::STATE_FAIL)
|
||
{
|
||
echo '<b style="color:red;">' . __('Failed') . '</b>';
|
||
}
|
||
}
|
||
}
|
freenetis/branches/testing/application/views/email/show.php | ||
---|---|---|
<h2><?php echo __('Show e-mail message') ?></h2>
|
||
|
||
<br />
|
||
<table class="extended" style="margin-right:10px; width:360px;">
|
||
<tr>
|
||
<th colspan="2"><?php echo __('About e-mail message') ?></th>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('ID') ?></th>
|
||
<td><?php echo $email->id ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('Receiver') ?></th>
|
||
<td><?php echo $email->to ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('State') ?></th>
|
||
<td><?php echo $this->state($email, null) ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('Date and time') ?></th>
|
||
<td><?php echo $email->access_time ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('Subject') ?></th>
|
||
<td><?php echo $email->subject ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('Sender') ?></th>
|
||
<td><?php echo $email->from ?></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br />
|
||
<br />
|
||
|
||
<table class="extended" style="margin-right:10px; width:730px;">
|
||
<tr>
|
||
<th colspan="2"><?php echo __('Text') ?></th>
|
||
</tr>
|
||
<tr>
|
||
<td><div style='padding:1em'><?php echo $email->body ?></div></td>
|
||
</tr>
|
||
</table>
|
||
|
Také k dispozici: Unified diff
Upravy:
- #215: Pridana moznost zobrazeni tela e-mailu