Merged changes from main branch up to 2.1.3.
[fa-stable.git] / includes / ui / db_pager_view.inc
index 4367dc98539a06bf1c42c692e31549773bd2b022..ce3ae3ddf6cc2ad184829e339e752a60df747db6 100644 (file)
@@ -14,12 +14,11 @@ 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]);
+               $link_text = set_icon($icon, $link_text);
 
        $href = $path_to_root . $url;
-       return "<a href='$href'$link[1]>" . $link[0] . "</a>";
+       return "<a href='$href'>" . $link_text . "</a>";
 }
 
 function navi_button($name, $value, $enabled=true, $icon = false) {
@@ -104,9 +103,9 @@ function display_db_pager(&$pager) {
                    case 'time':
                          label_cell($cell, "width=40"); break;
                    case 'date':
-                         label_cell(sql2date($cell), "align='center' width=50"); break;
+                         label_cell(sql2date($cell), "align='center' nowrap"); break;
                    case 'dstamp':      // time stamp displayed as date
-                         label_cell(sql2date(substr($cell, 0, 10)), "align='center'"); break;
+                         label_cell(sql2date(substr($cell, 0, 10)), "align='center' nowrap"); break;
                    case 'tstamp':      // time stamp - FIX user format
                          label_cell(sql2date(substr($cell, 0, 10)).
                          ' '. substr($cell, 10), "align='center'"); break;
@@ -153,37 +152,6 @@ function display_db_pager(&$pager) {
                end_row();
        }
 
-       //end_table();
-       //start_table("$table_style align='center' class='navibar' width=100%");
-       /*
-       start_row("class='navibar'");
-       $colspan = count($pager->columns);
-        if($pager->rec_count) {
-               $from = ($pager->curr_page-1)*$pager->page_len+1;
-               $to = $from + $pager->page_len - 1;
-               if ($to > $pager->rec_count)
-                 $to = $pager->rec_count;
-               $all = $pager->rec_count;
-               $lcols = ($colspan > 4 ? 3 : 2);
-               label_cell(sprintf( _('Records %d-%d of %d'), $from, $to, $all),
-                       "colspan=$lcols class='navibar' style='border:none'");
-               //echo "<td colspan=".($pager->columns -.$lcols)." style='border:none'>";
-               echo "<td colspan=".($colspan-3)." style='border:none'>";
-               $but_pref = $pager->name.'_page_';
-           start_table("align='right'");
-               start_row();
-               echo navi_button_cell($but_pref.'first', _('First'), $pager->first_page, 'right');
-               echo navi_button_cell($but_pref.'prev', _('Prev'), $pager->prev_page,'right');
-               echo navi_button_cell($but_pref.'next', _('Next'), $pager->next_page,'right');
-               echo navi_button_cell($but_pref.'last', _('Last'), $pager->last_page, 'right');
-               end_row(); 
-               end_table();    
-               echo "</td>";
-       } else {
-         label_cell( _('No records'), "colspan=$colspan class='navibar'");
-       }
-       end_row();
-       */
        start_row("class='navibar'");
        $colspan = count($pager->columns);
         if($pager->rec_count) {