Dotclear


Ignore:
Timestamp:
10/18/15 17:28:13 (10 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Children:
3126:19af5f62e940, 3129:6f41108168cf
Message:

Add class depending on status for posts, pages and comments, fixes #2135

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/pages/class.listpage.php

    r3089 r3118  
    7777     { 
    7878          $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 
     79          $sts_class = ''; 
    7980          switch ($this->rs->post_status) { 
    8081               case 1: 
    8182                    $img_status = sprintf($img,__('Published'),'check-on.png'); 
     83                    $sts_class = 'sts-online'; 
    8284                    break; 
    8385               case 0: 
    8486                    $img_status = sprintf($img,__('Unpublished'),'check-off.png'); 
     87                    $sts_class = 'sts-offline'; 
    8588                    break; 
    8689               case -1: 
    8790                    $img_status = sprintf($img,__('Scheduled'),'scheduled.png'); 
     91                    $sts_class = 'sts-scheduled'; 
    8892                    break; 
    8993               case -2: 
    9094                    $img_status = sprintf($img,__('Pending'),'check-wrn.png'); 
     95                    $sts_class = 'sts-pending'; 
    9196                    break; 
    9297          } 
     
    109114          } 
    110115 
    111           $res = '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'. 
     116          $res = '<tr class="line '.($this->rs->post_status != 1 ? 'offline ' : '').$sts_class.'"'. 
    112117          ' id="p'.$this->rs->post_id.'">'; 
    113118 
Note: See TracChangeset for help on using the changeset viewer.

Sites map