Dotclear

Changeset 2135:35a0194cdafa


Ignore:
Timestamp:
09/27/13 20:16:29 (12 years ago)
Author:
Lepeltier kévin <kevin@…>
Branch:
Ticket #1548
Message:

Ticket #1548

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • admin/blogs.php

    r2107 r2135  
    6969/* DISPLAY 
    7070-------------------------------------------------------- */ 
    71 $starting_script = ''; 
    72 if (!$show_filters) { 
    73      $starting_script .= dcPage::jsLoad('js/filter-controls.js'); 
    74 } 
     71$starting_script  = dcPage::jsLoad('js/filter-controls.js'); 
     72$starting_script .= 
     73     '<script type="text/javascript">'."\n". 
     74     "//<![CDATA["."\n". 
     75     dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true':'false')."\n". 
     76     dcPage::jsVar('dotclear.msg.filter_posts_list',$form_filter_title)."\n". 
     77     dcPage::jsVar('dotclear.msg.cancel_the_filter',__('Cancel the filter'))."\n". 
     78     "//]]>". 
     79     "</script>"; 
     80 
     81$form_filter_title = __('Filter blogs list and display options'); 
     82 
    7583dcPage::open(__('List of blogs'),$starting_script, 
    7684     dcPage::breadcrumb( 
     
    8997     if ($core->auth->isSuperAdmin()) { 
    9098          echo '<p class="top-add"><a class="button add" href="blog.php">'.__('Create a new blog').'</a></p>'; 
    91      } 
    92       
    93      if (!$show_filters) { 
    94           echo '<p><a id="filter-control" class="form-control" href="#">'.__('Filter blogs list').'</a></p>'; 
    9599     } 
    96100      
     
    124128     if ($nb_blog == 0) 
    125129     { 
    126           echo '<p><strong>'.__('No blog').'</strong></p>'; 
     130          if( $show_filters ) { 
     131               echo '<p><strong>'.__('No blog matches the filter').'</strong></p>'; 
     132          } else { 
     133               echo '<p><strong>'.__('No blog').'</strong></p>'; 
     134          } 
    127135     } 
    128136     else 
     
    134142          echo 
    135143          '<div class="table-outer">'. 
    136           '<table class="clear"><caption class="hidden">'.__('Blogs list').'</caption><tr>'. 
     144          '<table class="clear">'; 
     145           
     146          if( $show_filters ) { 
     147               echo '<caption>'.sprintf(__('List of %s blogs match the filter.'), $nb_blog).'</caption>'; 
     148          } else { 
     149               echo '<caption class="hidden">'.__('Blogs list').'</caption>'; 
     150          } 
     151                     
     152          echo  
     153          '<tr>'. 
    137154          '<th scope="col" class="nowrap">'.__('Blog id').'</th>'. 
    138155          '<th scope="col">'.__('Blog name').'</th>'. 
  • admin/comments.php

    r1999 r2135  
    152152/* DISPLAY 
    153153-------------------------------------------------------- */ 
    154 $starting_script = dcPage::jsLoad('js/_comments.js'); 
    155 if (!$show_filters) { 
    156      $starting_script .= dcPage::jsLoad('js/filter-controls.js'); 
    157 } 
     154$starting_script  = dcPage::jsLoad('js/_comments.js'); 
     155$starting_script .= dcPage::jsLoad('js/filter-controls.js'); 
     156$starting_script .= 
     157     '<script type="text/javascript">'."\n". 
     158     "//<![CDATA["."\n". 
     159     dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true':'false')."\n". 
     160     dcPage::jsVar('dotclear.msg.filter_posts_list',$form_filter_title)."\n". 
     161     dcPage::jsVar('dotclear.msg.cancel_the_filter',__('Cancel the filter'))."\n". 
     162     "//]]>". 
     163     "</script>"; 
     164 
     165$form_filter_title = __('Filter comments, trackbacks list and display options'); 
    158166 
    159167dcPage::open(__('Comments and trackbacks'),$starting_script, 
     
    203211          echo '</form>'; 
    204212     } 
    205  
    206      # Filters 
    207      if (!$show_filters) { 
    208           echo '<p><a id="filter-control" class="form-control" href="#">'. 
    209           __('Filter comments and trackbacks list').'</a></p>'; 
    210      } 
    211213      
    212214     echo 
     
    269271     '</div>'. 
    270272      
    271      '</form>' 
     273     '</form>', 
     274     $show_filters 
    272275     ); 
    273276} 
  • admin/posts.php

    r2134 r2135  
    212212/* DISPLAY 
    213213-------------------------------------------------------- */ 
    214  
    215 dcPage::open(__('Entries'), 
    216      dcPage::jsLoad('js/_posts_list.js'). 
    217      dcPage::jsLoad('js/filter-controls.js'). 
     214$starting_script  = dcPage::jsLoad('js/_posts_list.js'); 
     215$starting_script .= dcPage::jsLoad('js/filter-controls.js'); 
     216$starting_script .= 
    218217     '<script type="text/javascript">'."\n". 
    219218     "//<![CDATA["."\n". 
    220219     dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true':'false')."\n". 
    221      dcPage::jsVar('dotclear.msg.filter_posts_list',__('Filter posts list'))."\n". 
     220     dcPage::jsVar('dotclear.msg.filter_posts_list',$form_filter_title)."\n". 
    222221     dcPage::jsVar('dotclear.msg.cancel_the_filter',__('Cancel the filter'))."\n". 
    223222     "//]]>". 
    224      "</script>", 
     223     "</script>"; 
     224 
     225$form_filter_title = __('Filter users list and display options'); 
     226 
     227dcPage::open(__('Entries'),$starting_script, 
    225228     dcPage::breadcrumb( 
    226229          array( 
     
    239242     '<p class="top-add"><a class="button add" href="post.php">'.__('New entry').'</a></p>'. 
    240243     '<form action="posts.php" method="get" id="filters-form">'. 
    241      '<h3 class="out-of-screen-if-js">'.__('Filters and display options').'</h3>'. 
     244     '<h3 class="out-of-screen-if-js">'.$form_filter_title.'</h3>'. 
    242245 
    243246     '<div class="table">'. 
  • admin/users.php

    r1912 r2135  
    8989/* DISPLAY 
    9090-------------------------------------------------------- */ 
    91 $starting_script = dcPage::jsLoad('js/_users.js'); 
    92 if (!$show_filters) { 
    93      $starting_script .= dcPage::jsLoad('js/filter-controls.js'); 
    94 } 
     91$starting_script  = dcPage::jsLoad('js/_users.js'); 
     92$starting_script .= dcPage::jsLoad('js/filter-controls.js'); 
     93$starting_script .= 
     94     '<script type="text/javascript">'."\n". 
     95     "//<![CDATA["."\n". 
     96     dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true':'false')."\n". 
     97     dcPage::jsVar('dotclear.msg.filter_posts_list',$form_filter_title)."\n". 
     98     dcPage::jsVar('dotclear.msg.cancel_the_filter',__('Cancel the filter'))."\n". 
     99     "//]]>". 
     100     "</script>"; 
     101 
     102$form_filter_title = __('Filter users list and display options'); 
    95103 
    96104dcPage::open(__('Users'),$starting_script, 
     
    112120      
    113121     echo 
    114      '<p class="top-add"><strong><a class="button add" href="user.php">'.__('New user').'</a></strong></p>'; 
    115       
    116      if (!$show_filters) { 
    117           echo '<p><a id="filter-control" class="form-control" href="#">'.__('Filter users list').'</a></p>'; 
    118      } 
    119       
    120      echo 
     122     '<p class="top-add"><strong><a class="button add" href="user.php">'.__('New user').'</a></strong></p>'. 
    121123     '<form action="users.php" method="get" id="filters-form">'. 
    122      '<h3 class="hidden">'.__('Filter users list').'</h3>'. 
     124     '<h3 class="out-of-screen-if-js">'.$form_filter_title.'</h3>'. 
    123125      
    124126     '<div class="table">'. 
     
    166168     '</p>'. 
    167169     '</div>'. 
    168      '</form>' 
     170     '</form>', 
     171     $show_filters 
    169172     ); 
    170173} 
  • inc/admin/lib.pager.php

    r2134 r2135  
    170170                    } 
    171171               } 
    172                $html_block  =  
     172               $html_block = 
    173173               '<div class="table-outer">'. 
    174                '<table class="clear">'; 
     174               '<table>'; 
    175175                
    176176               if( $filter ) { 
     
    374374class adminCommentList extends adminGenericList 
    375375{ 
    376      public function display($page,$nb_per_page,$enclose_block='') 
     376     public function display($page,$nb_per_page,$enclose_block='',$filter=false) 
    377377     { 
    378378          if ($this->rs->isEmpty()) 
    379379          { 
    380                echo '<p><strong>'.__('No comment').'</strong></p>'; 
     380               if( $filter ) { 
     381                    echo '<p><strong>'.__('No comments or trackbacks matches the filter').'</strong></p>'; 
     382               } else { 
     383                    echo '<p><strong>'.__('No comment').'</strong></p>'; 
     384               } 
    381385          } 
    382386          else 
     
    392396               $html_block = 
    393397               '<div class="table-outer">'. 
    394                '<table><caption class="hidden">'.__('Comments and trackbacks list').'</caption><tr>'. 
     398               '<table>'; 
     399                
     400               if( $filter ) { 
     401                    $html_block .= '<caption>'.sprintf(__('List of %s Comments or trackbacks match the filter.'), $this->rs_count).'</caption>'; 
     402               } else { 
     403                    $html_block .= '<caption class="hidden">'.__('Comments and trackbacks list').'</caption>'; 
     404               } 
     405                          
     406               $html_block .= '<tr>'. 
    395407               '<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>'. 
    396408               '<th scope="col">'.__('Author').'</th>'. 
     
    489501class adminUserList extends adminGenericList 
    490502{ 
    491      public function display($page,$nb_per_page,$enclose_block='') 
     503     public function display($page,$nb_per_page,$enclose_block='',$filter=false) 
    492504     { 
    493505          if ($this->rs->isEmpty()) 
    494506          { 
    495                echo '<p><strong>'.__('No user').'</strong></p>'; 
     507               if( $filter ) { 
     508                    echo '<p><strong>'.__('No user matches the filter').'</strong></p>'; 
     509               } else { 
     510                    echo '<p><strong>'.__('No user').'</strong></p>'; 
     511               } 
    496512          } 
    497513          else 
     
    501517               $html_block = 
    502518               '<div class="table-outer clear">'. 
    503                '<table><caption class="hidden">'.__('Users list').'</caption><tr>'. 
     519               '<table>'; 
     520                
     521               if( $filter ) { 
     522                    $html_block .= '<caption>'.sprintf(__('List of %s users match the filter.'), $this->rs_count).'</caption>'; 
     523               } else { 
     524                    $html_block .= '<caption class="hidden">'.__('Users list').'</caption>'; 
     525               } 
     526                          
     527               $html_block .= '<tr>'. 
    504528               '<th colspan="2" scope="col" class="first">'.__('Username').'</th>'. 
    505529               '<th scope="col">'.__('First Name').'</th>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map