Changeset 1339
- Timestamp:
- 01/25/08 02:37:54 (6 months ago)
- Files:
-
- branches/release-29/lib/MT/App/CMS.pm (modified) (2 diffs)
- branches/release-29/tmpl/cms/edit_comment.tmpl (modified) (1 diff)
- branches/release-29/tmpl/cms/list_comment.tmpl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-29/lib/MT/App/CMS.pm
r1334 r1339 11191 11191 }; 11192 11192 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 11193 11212 my %param; 11194 11213 my $blog_id = $app->param('blog_id'); … … 11212 11231 args => { sort => 'created_on', direction => 'descend' }, 11213 11232 params => \%param, 11233 terms => \%terms, 11214 11234 } 11215 11235 ); branches/release-29/tmpl/cms/edit_comment.tmpl
r1212 r1339 109 109 </mt:if> 110 110 </mt:if> 111 <a title="<__trans phrase="View all comments with this status">" href="<mt:var name="script_url">?__mode=list_comments&blog_id=<mt:var name="blog_id">& <mt:if name="is_junk">tab=junk<mt:else>filter=status&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&blog_id=<mt:var name="blog_id">&filter=status&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> 112 112 113 113 <mt:if name="junk_log_loop"> branches/release-29/tmpl/cms/list_comment.tmpl
r1309 r1339 113 113 var fld = getByID('filter-col'); 114 114 if (fld) { 115 if (choice == ' newentry')115 if (choice == 'status') 116 116 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;123 117 col_span = getByID("filter-text-col"); 124 118 if (fld.selectedIndex > -1 && col_span) … … 179 173 <__trans phrase="[_1] on entries created more than [_2] days ago" params="<$mt:var name="object_label_plural"$>%%<mt:var name="filter_val">"> 180 174 <mt:else> 181 <__trans phrase="[_1] where [_2] [_3]" params='<$mt:var name="object_label_plural"$>%%<span id="filter-text-col"> </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"> </span>%%<span id="filter-text-val"></span>'> 182 176 </mt:if> 183 177 </mt:if> … … 185 179 <a href="<mt:var name="script_url">?__mode=<mt:var name="mode"><mt:if name="blog_id">&blog_id=<mt:var name="blog_id"></mt:if><mt:if name="is_power_edit">&is_power_edit=1</mt:if>">[ <__trans phrase="Remove filter"> ]</a> 186 180 </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> 187 195 </mt:unless> 188 196 </div>
