Fixing link error in create office link.
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Sat, 19 May 2012 19:09:32 +0000 (21:09 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Sat, 19 May 2012 19:09:32 +0000 (21:09 +0200)
The current page was not correct.

apps/companyfront/modules/office/templates/indexSuccess.php

index bcd27ae..ca167a2 100644 (file)
@@ -27,7 +27,8 @@
   </div>
 <?php endif; ?>
 
-  <a href="<?php echo url_for('office/new?page='.$page.'&sort='.$sort) ?>" class="bt_green"><span class="bt_green_lft"></span><strong><?php echo __('Create new Office') ?></strong><span class="bt_green_r"></span></a>
-
-
-
+<?php if ($pager->haveToPaginate()): ?>
+    <a href="<?php echo url_for('office/new?page='.$pager->getPage().'&sort='.$sort) ?>" class="bt_green"><span class="bt_green_lft"></span><strong><?php echo __('Create new Office') ?></strong><span class="bt_green_r"></span></a>
+<?php else: ?>
+    <a href="<?php echo url_for('office/new?page=1'.'&sort='.$sort) ?>" class="bt_green"><span class="bt_green_lft"></span><strong><?php echo __('Create new Office') ?></strong><span class="bt_green_r"></span></a>
+<?php endif; ?>