Dotclear


Ignore:
Timestamp:
09/17/18 16:46:35 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Harmonize scripts used to display entries/comments/trackbacks content in lists - Spam content is displayed as HTML code only, meta key may be used to display other content HTML code (meta key = cmd key on MacOS, windows key on Windows, ...) - Server errors are now basically reported (more info in console log, as timeout, offline, …) to the user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post.php

    r3874 r3878  
    498498        $comment_url = $core->adminurl->get("admin.comment", ['id' => $rs->comment_id]); 
    499499 
    500         $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 
     500        $img       = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 
     501        $sts_class = ''; 
    501502        switch ($rs->comment_status) { 
    502503            case 1: 
    503504                $img_status = sprintf($img, __('Published'), 'check-on.png'); 
     505                $sts_class  = 'sts-online'; 
    504506                break; 
    505507            case 0: 
    506508                $img_status = sprintf($img, __('Unpublished'), 'check-off.png'); 
     509                $sts_class  = 'sts-offline'; 
    507510                break; 
    508511            case -1: 
    509512                $img_status = sprintf($img, __('Pending'), 'check-wrn.png'); 
     513                $sts_class  = 'sts-pending'; 
    510514                break; 
    511515            case -2: 
    512516                $img_status = sprintf($img, __('Junk'), 'junk.png'); 
     517                $sts_class  = 'sts-junk'; 
    513518                break; 
    514519        } 
    515520 
    516521        echo 
    517         '<tr class="line' . ($rs->comment_status != 1 ? ' offline' : '') . '"' . 
     522        '<tr class="line ' . ($rs->comment_status != 1 ? ' offline ' : '') . $sts_class . '"' . 
    518523        ' id="c' . $rs->comment_id . '">' . 
    519524 
Note: See TracChangeset for help on using the changeset viewer.

Sites map