khanat-opennel-code/code/ryzom/tools/server/www/webtt/app/views/translations/view.ctp

91 lines
3.6 KiB
PHP

<div class="translations view">
<h2><?php __('Translation');?></h2>
<dl><?php $i = 0; $class = ' class="altrow"';?>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $translation['Translation']['id']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Identifier'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $this->Html->link($translation['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $translation['Identifier']['id'])); ?>
[<?php echo $translation['Identifier']['reference_string']; ?>]
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Translation Text'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $translation['Translation']['translation_text']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('User'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $this->Html->link($translation['User']['name'], array('controller' => 'users', 'action' => 'view', $translation['User']['id'])); ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $translation['Translation']['created']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $translation['Translation']['modified']; ?>
&nbsp;
</dd>
</dl>
</div>
<div class="actions">
<h3><?php __('Actions'); ?></h3>
<ul>
<li><?php echo $this->Html->link(__('Edit Translation', true), array('action' => 'edit', $translation['Translation']['id'])); ?> </li>
<li><?php echo $this->Html->link(__('List Translations', true), array('action' => 'index')); ?> </li>
<li style="padding-left: 10px"><?php echo $this->Html->link(__('New Translation', true), array('action' => 'add')); ?> </li>
<li><br></li>
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
<li><br></li>
<li><?php echo $this->Html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
<li><br></li>
<li><?php echo $this->Html->link(__('List Votes', true), array('controller' => 'votes', 'action' => 'index')); ?> </li>
</ul>
</div>
<div class="related">
<h3><?php __('Related Votes');?></h3>
<?php if (!empty($translation['Vote'])):?>
<table cellpadding = "0" cellspacing = "0">
<tr>
<th><?php __('Id'); ?></th>
<th><?php __('Translation Id'); ?></th>
<th><?php __('User Id'); ?></th>
<th><?php __('Created'); ?></th>
<th><?php __('Modified'); ?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($translation['Vote'] as $vote):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $vote['id'];?></td>
<td><?php echo $vote['translation_id'];?></td>
<td><?php echo $vote['user_id'];?></td>
<td><?php echo $vote['created'];?></td>
<td><?php echo $vote['modified'];?></td>
<td class="actions">
<?php echo $this->Html->link(__('View', true), array('controller' => 'votes', 'action' => 'view', $vote['id'])); ?>
<?php echo $this->Html->link(__('Edit', true), array('controller' => 'votes', 'action' => 'edit', $vote['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<div class="actions">
<ul>
<li><?php echo $this->Html->link(__('New Vote', true), array('controller' => 'votes', 'action' => 'add'));?> </li>
</ul>
</div>
</div>