Changeset 1339

Show
Ignore:
Timestamp:
01/25/08 02:37:54 (6 months ago)
Author:
auno
Message:

Added status comments filter for working magnifier icon on edit screen. BugzID:66382

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-29/lib/MT/App/CMS.pm

    r1334 r1339  
    1119111191    }; 
    1119211192 
     11193    my %terms; 
     11194    my $filter_col = $app->param('filter'); 
     11195    if ( $filter_col && ( my $val = $app->param('filter_val') ) ) { 
     11196        if ( $filter_col eq 'status' ) { 
     11197            if ( $val eq 'approved' ) { 
     11198                $terms{junk_status} = 1; 
     11199            } 
     11200            elsif ( $val eq 'pending' ) { 
     11201                $terms{junk_status} = 0; 
     11202            } 
     11203            elsif ( $val eq 'junk' ) { 
     11204                $terms{junk_status} = -1; 
     11205            } 
     11206            else { 
     11207                $terms{junk_status} = [ 0, 1 ]; 
     11208            } 
     11209        } 
     11210    } 
     11211 
    1119311212    my %param; 
    1119411213    my $blog_id = $app->param('blog_id'); 
     
    1121211231            args   => { sort => 'created_on', direction => 'descend' }, 
    1121311232            params => \%param, 
     11233            terms    => \%terms, 
    1121411234        } 
    1121511235    ); 
  • branches/release-29/tmpl/cms/edit_comment.tmpl

    r1212 r1339  
    109109        </mt:if> 
    110110        </mt:if> 
    111         <a title="<__trans phrase="View all comments with this status">" href="<mt:var name="script_url">?__mode=list_comments&amp;blog_id=<mt:var name="blog_id">&amp;<mt:if name="is_junk">tab=junk<mt:else>filter=status&amp;filter_val=<mt:if name="comment_approved">approved</mt:if><mt:if name="comment_pending">pending</mt:if></mt:if>"><img alt="" src="<mt:var name="static_uri">images/filter.gif" width="8" height="8" border="0" /></a> 
     111        <a title="<__trans phrase="View all comments with this status">" href="<mt:var name="script_url">?__mode=list_comments&amp;blog_id=<mt:var name="blog_id">&amp;filter=status&amp;filter_val=<mt:if name="comment_approved">approved</mt:if><mt:if name="comment_pending">pending</mt:if><mt:if name="is_junk">junk</mt:if>"><img alt="" src="<mt:var name="static_uri">images/filter.gif" width="8" height="8" border="0" /></a> 
    112112 
    113113        <mt:if name="junk_log_loop"> 
  • branches/release-29/tmpl/cms/list_comment.tmpl

    r1309 r1339  
    113113    var fld = getByID('filter-col'); 
    114114    if (fld) { 
    115         if (choice == 'newentry') 
     115        if (choice == 'status') 
    116116            fld.selectedIndex = 0; 
    117         else if (choice == 'oldentry') 
    118             fld.selectedIndex = 1; 
    119         else if (choice == 'status') 
    120             fld.selectedIndex = 2; 
    121         else if (choice == 'commenter') 
    122             fld.selectedIndex = 3; 
    123117        col_span = getByID("filter-text-col"); 
    124118        if (fld.selectedIndex > -1 && col_span) 
     
    179173                        <__trans phrase="[_1] on entries created more than [_2] days ago" params="<$mt:var name="object_label_plural"$>%%<mt:var name="filter_val">"> 
    180174                        <mt:else> 
    181                         <__trans phrase="[_1] where [_2] [_3]" params='<$mt:var name="object_label_plural"$>%%<span id="filter-text-col">&nbsp;</span>%%<span id="filter-text-val"></span>'> 
     175                        <__trans phrase="[_1] where [_2] is [_3]" params='<$mt:var name="object_label_plural"$>%%<span id="filter-text-col">&nbsp;</span>%%<span id="filter-text-val"></span>'> 
    182176                        </mt:if> 
    183177                    </mt:if> 
     
    185179                <a href="<mt:var name="script_url">?__mode=<mt:var name="mode"><mt:if name="blog_id">&amp;blog_id=<mt:var name="blog_id"></mt:if><mt:if name="is_power_edit">&amp;is_power_edit=1</mt:if>">[ <__trans phrase="Remove filter"> ]</a> 
    186180                </mt:if> 
     181        <div id="filter-select" class="page-title" style="display: none"> 
     182            <!-- start filter form --> 
     183                <select id="filter-col" name="filter" onchange="setFilterCol(this.options[this.selectedIndex].value);enableFilterButton(this)"> 
     184                    <option value="status"><__trans phrase="status"></option> 
     185                </select> 
     186                <__trans phrase="is"> 
     187                <span id="filter-status" style="display: none"> 
     188                    <select id="status-val" name="filter_val" onchange="enableFilterButton()"> 
     189                        <option value="approved"><__trans phrase="approved"></option> 
     190                        <option value="pending"><__trans phrase="pending"></option> 
     191                        <option value="junk"><__trans phrase="spam"></option> 
     192                    </select> 
     193                </span> 
     194        </div> 
    187195            </mt:unless> 
    188196                </div>