Better layout in big forms
[fa-stable.git] / includes / ui / db_pager_view.inc
index d44902417dcc99e3910def8b7e4a131229b96bfa..d0c50ad1bc2b6ab047746027778c3da5e8a30a91 100644 (file)
@@ -1,10 +1,22 @@
 <?php
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU Affero General Public License,
+       AGPL, as published by the Free Software Foundation, either version 
+       3 of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
 //--------------------------------------------------------------------------------------------------
-function pager_link($link_text, $url)
+function pager_link($link_text, $url, $icon=false)
 {
        global $path_to_root;
        
        $link = access_string($link_text);
+       if (user_graphic_links() && $icon)
+               $link[0] = set_icon($icon, $link[0]);
 
        $href = $path_to_root . $url;
        return "<a href='$href'$link[1]>" . $link[0] . "</a>";
@@ -89,8 +101,10 @@ function display_db_pager(&$pager) {
                   }
 
                   switch($coltype) { // format column
+                   case 'time':
+                         label_cell($cell, "width=40"); break;
                    case 'date':
-                         label_cell(sql2date($cell), "align='center'"); break;
+                         label_cell(sql2date($cell), "align='center' width=50"); break;
                    case 'dstamp':      // time stamp displayed as date
                          label_cell(sql2date(substr($cell, 0, 10)), "align='center'"); break;
                    case 'tstamp':      // time stamp - FIX user format