Dotclear


Ignore:
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • admin/js/filter-controls.js

    r0 r2128  
    11$(function() { 
    2      var c = $('#filter-control'); 
    3      c.css('display','inline'); 
    4      $('#filters-form').hide(); 
    5      c.click(function() { 
    6           $('#filters-form').show(); 
    7           $(this).hide(); 
     2      
     3     $filtersform = $('#filters-form'); 
     4     $filtersform.before('<p><a id="filter-control" class="form-control" href="?" style="display:inline">'+dotclear.msg.filter_posts_list+'</a></p>') 
     5      
     6     if( dotclear.msg.show_filters == 'false' ) { 
     7          $filtersform.hide(); 
     8     } else { 
     9          $('#filter-control') 
     10               .addClass('open') 
     11               .text(dotclear.msg.cancel_the_filter); 
     12     } 
     13      
     14     $('#filter-control').click(function() { 
     15          if( $(this).hasClass('open') ) { 
     16               if( dotclear.msg.show_filters == 'true' ) { 
     17                    return true; 
     18               } else { 
     19                    $filtersform.hide(); 
     20                    $(this).removeClass('open') 
     21                            .text(dotclear.msg.filter_posts_list); 
     22               } 
     23          } else { 
     24               $filtersform.show(); 
     25               $(this).addClass('open') 
     26                       .text(dotclear.msg.cancel_the_filter); 
     27          } 
    828          return false; 
    929     }); 
  • admin/posts.php

    r2048 r2133  
    210210     /* DISPLAY 
    211211     -------------------------------------------------------- */ 
    212      $starting_script = dcPage::jsLoad('js/_posts_list.js'); 
    213      if (!$show_filters) { 
    214           $starting_script .= dcPage::jsLoad('js/filter-controls.js'); 
    215      } 
    216  
    217      dcPage::open(__('Entries'),$starting_script, 
     212 
     213     dcPage::open(__('Entries'), 
     214          dcPage::jsLoad('js/_posts_list.js'). 
     215          dcPage::jsLoad('js/filter-controls.js'). 
     216          '<script type="text/javascript">'."\n". 
     217          "//<![CDATA["."\n". 
     218          dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true':'false')."\n". 
     219          dcPage::jsVar('dotclear.msg.filter_posts_list',__('Filter posts list'))."\n". 
     220          dcPage::jsVar('dotclear.msg.cancel_the_filter',__('Cancel the filter'))."\n". 
     221          "//]]>". 
     222          "</script>", 
    218223          dcPage::breadcrumb( 
    219224               array( 
     
    230235     { 
    231236          echo 
    232           '<p class="top-add"><a class="button add" href="post.php">'.__('New entry').'</a></p>'; 
    233            
    234           if (!$show_filters) { 
    235                echo '<p><a id="filter-control" class="form-control" href="#">'. 
    236                __('Filter posts list').'</a></p>'; 
    237           } 
    238            
    239           echo 
     237          '<p class="top-add"><a class="button add" href="post.php">'.__('New entry').'</a></p>'. 
    240238          '<form action="posts.php" method="get" id="filters-form">'. 
    241           '<h3 class="hidden">'.__('Filter posts list').'</h3>'. 
    242  
     239          '<h3 class="out-of-screen-if-js">'.__('Filters and display options').'</h3>'. 
     240      
    243241          '<div class="table">'. 
    244242          '<div class="cell">'. 
     
    301299          $core->formNonce(). 
    302300          '</div>'. 
    303           '</form>' 
     301          '</form>', 
     302          $show_filters 
    304303          ); 
    305304     } 
  • admin/style/default.css

    r2053 r2133  
    12991299     color: #000; 
    13001300     } 
     1301a.form-control.open { 
     1302     background: url(../images/hide.png) no-repeat 4px center; 
     1303     } 
    13011304#filters-form { 
    13021305     border: 1px dashed #999; 
  • inc/admin/lib.pager.php

    r2008 r2131  
    151151class adminPostList extends adminGenericList 
    152152{ 
    153      public function display($page,$nb_per_page,$enclose_block='') 
     153     public function display($page,$nb_per_page,$enclose_block='',$filter=false) 
    154154     { 
    155155          if ($this->rs->isEmpty()) 
    156156          { 
    157                echo '<p><strong>'.__('No entry').'</strong></p>'; 
     157               if( $filter ) { 
     158                    echo '<p><strong>'.__('No entry matches the filter').'</strong></p>'; 
     159               } else { 
     160                    echo '<p><strong>'.__('No entry').'</strong></p>'; 
     161               } 
    158162          } 
    159163          else 
     
    166170                    } 
    167171               } 
    168                $html_block = 
     172               $html_block  =  
    169173               '<div class="table-outer">'. 
    170                '<table><caption class="hidden">'.__('Entries list').'</caption><tr>'. 
     174               '<table class="clear">'; 
     175                
     176               if( $filter ) { 
     177                    $html_block .= '<caption>'.sprintf(__('List of %s entries match the filter.'), $this->rs_count).'</caption>'; 
     178               } else { 
     179                    $html_block .= '<caption class="hidden">'.__('Entries list').'</caption>'; 
     180               } 
     181                          
     182               $html_block .= '<tr>'. 
    171183               '<th colspan="2" class="first">'.__('Title').'</th>'. 
    172184               '<th scope="col">'.__('Date').'</th>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map