<h1><?php echo $this->translate('mailtemplate.title.view_list'); ?></h1>

<h2><?php echo $this->translate('mailtemplate.caption.common'); ?></h2>
<table class="def" border="0" cellpadding="0" cellspacing="0" summary="<?php echo $this->translate('mailtemplate.caption.common'); ?>">
<tr>
<!-- <th>ID</th> -->
<th><?php echo $this->translate('mailtemplate.label.name'); ?></th>
<th><?php echo $this->translate('mailtemplate.label.mail_from'); ?></th>
<th><?php echo $this->translate('mailtemplate.label.subject'); ?></th>
<th></th>

<?php
$count = 0;
foreach ($this->common_tamplates as $mailtemplate) :
$class = ($count % 2 == 0) ? "color" : ""; $count++;
?>
<tr class="<?php echo $class; ?>">
<!-- <td><?php echo $this->escape($mailtemplate['id']); ?></td> -->
<td>
<a href="<?php echo $this->appPath('controller'); ?>/view_detail/service_id/<?php echo $this->service['id']; ?>/mailtemplate_id/<?php echo $this->escape($mailtemplate['id']); ?>">
<?php echo $this->escape($mailtemplate['name']); ?>
</a>
</td>
<td><?php echo $this->escape($mailtemplate['mail_from']); ?></td>
<td><?php echo $this->escape($mailtemplate['subject']); ?></td>
<td>
<?php if($this->can_modify_common) : ?>
<a href="<?php echo $this->appPath('controller'); ?>/modify_input/service_id/<?php echo $this->service['id']; ?>/mailtemplate_id/<?php echo $this->escape($mailtemplate['id']); ?>"><?php echo $this->translate('common.operation.modify'); ?></a>
&nbsp;/&nbsp;
<? endif; ?>
<a href="<?php echo $this->appPath('controller'); ?>/copy/service_id/<?php echo $this->service['id']; ?>/mailtemplate_id/<?php echo $this->escape($mailtemplate['id']); ?>"><?php echo $this->translate('mailtemplate.operation.copy'); ?></a>
<?php if($this->can_modify_common) : ?>
&nbsp;/&nbsp;
<a href="<?php echo $this->appPath('controller'); ?>/delete_confirm/service_id/<?php echo $this->service['id']; ?>/mailtemplate_id/<?php echo $this->escape($mailtemplate['id']); ?>"><?php echo $this->translate('common.operation.delete'); ?></a>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</table>

<h2><?php echo $this->translate('mailtemplate.caption.personal'); ?>&nbsp;&nbsp;[<?php echo $this->escape($this->service['name']); ?>]</h2>
<table border="0" cellpadding="0" cellspacing="0" summary="<?php echo $this->translate('caption.mailtemplate.personal'); ?>&nbsp;&nbsp;[<?php echo $this->escape($this->service['name']); ?>]" class="def">
<tr>
<!-- <th>ID</th> -->
<th><?php echo $this->translate('mailtemplate.label.name'); ?></th>
<th><?php echo $this->translate('mailtemplate.label.mail_from'); ?></th>
<th><?php echo $this->translate('mailtemplate.label.subject'); ?></th>
<th></th>

<?php
$count = 0;
foreach ($this->enable_templates as $mailtemplate) :
$class = ($count % 2 == 0) ? "color" : ""; $count++;
?>
<tr class="<?php echo $class; ?>">
<!-- <td><?php echo $this->escape($mailtemplate['id']); ?></td> -->
<td>
<a href="<?php echo $this->appPath('controller'); ?>/view_detail/mailtemplate_id/<?php echo $this->escape($mailtemplate['id']); ?>">
<?php echo $this->escape($mailtemplate['name']); ?>
</a>
</td>
<td><?php echo $this->escape($mailtemplate['mail_from']); ?></td>
<td><?php echo $this->escape($mailtemplate['subject']); ?></td>
<td>
<a href="<?php echo $this->appPath('controller'); ?>/modify_input/mailtemplate_id/<?php echo $this->escape($mailtemplate['id']); ?>"><?php echo $this->translate('common.operation.modify'); ?></a>
&nbsp;/&nbsp;
<a href="<?php echo $this->appPath('controller'); ?>/copy/service_id/<?php echo $this->service['id']; ?>/mailtemplate_id/<?php echo $this->escape($mailtemplate['id']); ?>"><?php echo $this->translate('mailtemplate.operation.copy'); ?></a>
&nbsp;/&nbsp;
<a href="<?php echo $this->appPath('controller'); ?>/delete_confirm/mailtemplate_id/<?php echo $this->escape($mailtemplate['id']); ?>"><?php echo $this->translate('common.operation.delete'); ?></a>
</td>
</tr>
<?php endforeach; ?>
</table>

<a href="<?php echo $this->appPath('controller'); ?>/create_input/service_id/<?php echo $this->service['id']; ?>"><?php echo $this->translate('common.operation.create'); ?></a>
