summaryrefslogtreecommitdiffstats
path: root/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_tabular.php
blob: e4e50bbb60dc3389dcbe4cea1be73afee028a923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php $hs = $this->getParameterValue('list.hide', array()) ?>
<?php foreach ($this->getColumns('list.display') as $column): ?>
<?php if (in_array($column->getName(), $hs)) continue ?>
<?php $credentials = $this->getParameterValue('list.fields.'.$column->getName().'.credentials') ?>
<?php if ($credentials): $credentials = str_replace("\n", ' ', var_export($credentials, true)) ?>
    [?php if ($sf_user->hasCredential(<?php echo $credentials ?>)): ?]
<?php endif; ?>
  <?php
    $user_params = $this->getParameterValue('list.fields.'.$column->getName().'.params');
    $user_params = is_array($user_params) ? sfToolkit::stringToArray($user_params) : $user_params;
  ?>
  <?php if ($column->isLink()): ?>
  
  <?php $editcredentials = $this->getParameterValue('list.object_actions.edit.credentials'); ?>
  <?php if($editcredentials): $editcredentials = str_replace("\n", ' ', var_export($editcredentials, true)); ?>
    [?php if ($sf_user->hasCredential(<?php echo $editcredentials ?>)): ?]
  <?php endif; ?>
  [?php echo tag('td', <?php echo var_export($user_params, true) ?>, true) ?][?php echo link_to(<?php echo $this->getColumnListTag($column) ?> ? <?php echo $this->getColumnListTag($column) ?> : __('-'), '<?php echo $this->getModuleName() ?>/edit?<?php echo $this->getPrimaryKeyUrlParams() ?>) ?]</td>
<?php if ($editcredentials): ?>
    [?php else: ?]
  [?php echo tag('td', <?php echo var_export($user_params, true) ?>, true) ?][?php echo <?php echo $this->getColumnListTag($column) ?> ?]</td>
    [?php endif; ?]
<?php endif; ?>
<?php else: ?>
  [?php echo tag('td', <?php echo var_export($user_params, true) ?>, true) ?][?php echo <?php echo $this->getColumnListTag($column) ?> ?]</td>
  <?php endif; ?>
<?php if ($credentials): ?>
    [?php endif; ?]
<?php endif; ?>
<?php endforeach; ?>