Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Commit

Permalink
Prettified links to other models.
Browse files Browse the repository at this point in the history
  • Loading branch information
loic-sharma committed Jun 25, 2012
1 parent 9f6c9c9 commit 7ff4762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion views/templates/views/index.php
Expand Up @@ -22,7 +22,7 @@
<?php foreach($fields as $field => $type): ?>
<?php if($type != 'boolean'): ?>
<?php if(strpos($field, '_id') !== false && in_array($model = substr($field, 0, -3), $belongs_to)): ?>
<td><a href="<?php echo '<?php'; ?> echo URL::to('<?php echo Str::plural($model); ?>/view/'.$<?php echo $singular; ?>->id); ?>"><?php echo '<?php'; ?> echo $<?php echo $singular; ?>-><?php echo $field; ?>; ?></a></td>
<td><a href="<?php echo '<?php'; ?> echo URL::to('<?php echo Str::plural($model); ?>/view/'.$<?php echo $singular; ?>->id); ?>"><?php echo ucwords(str_replace('_', ' ', $model)); ?> #<?php echo '<?php'; ?> echo $<?php echo $singular; ?>-><?php echo $field; ?>; ?></a></td>
<?php else: ?>
<td><?php echo '<?php'; ?> echo $<?php echo $singular; ?>-><?php echo $field; ?>; ?></td>
<?php endif; ?>
Expand Down

0 comments on commit 7ff4762

Please sign in to comment.