Dotclear

Changeset 2072:783d0619e389 for plugins


Ignore:
Timestamp:
09/24/13 21:01:48 (12 years ago)
Author:
Dsls
Branch:
default
Message:

Handled in-plugin / out-plugin action pages display (dcPage.open vs direct html), tag_posts.php now works with new actions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/tags/tag_posts.php

    r1912 r2072  
    6161} 
    6262 
    63 # Actions combo box 
    64 $combo_action = array(); 
    65 if ($core->auth->check('publish,contentadmin',$core->blog->id)) 
    66 { 
    67      $combo_action[__('Status')] = array( 
    68           __('Publish') => 'publish', 
    69           __('Unpublish') => 'unpublish', 
    70           __('Schedule') => 'schedule', 
    71           __('Mark as pending') => 'pending' 
    72      ); 
     63$posts_actions_page = new dcPostsActionsPage($core,'plugin.php',array('p'=>'tags', 'm'=>'tag_posts', 'tag'=> $tag)); 
     64 
     65if ($posts_actions_page->process()) { 
     66     return; 
    7367} 
    74 $combo_action[__('Mark')] = array( 
    75      __('Mark as selected') => 'selected', 
    76      __('Mark as unselected') => 'unselected' 
    77 ); 
    78 $combo_action[__('Change')] = array(__('Change category') => 'category'); 
    79 if ($core->auth->check('admin',$core->blog->id)) 
    80 { 
    81      $combo_action[__('Change')] = array_merge($combo_action[__('Change')], 
    82           array(__('Change author') => 'author')); 
    83 } 
    84 if ($core->auth->check('delete,contentadmin',$core->blog->id)) 
    85 { 
    86      $combo_action[__('Delete')] = array(__('Delete') => 'delete'); 
    87 } 
    88  
    89 # --BEHAVIOR-- adminPostsActionsCombo 
    90 $core->callBehavior('adminPostsActionsCombo',array(&$combo_action)); 
    9168 
    9269?> 
     
    153130     echo '<h3>'.sprintf(__('List of entries with the tag “%s”'),html::escapeHTML($tag)).'</h3>'; 
    154131     $post_list->display($page,$nb_per_page, 
    155      '<form action="posts_actions.php" method="post" id="form-entries">'. 
     132     '<form action="plugin.php" method="post" id="form-entries">'. 
    156133      
    157134     '%s'. 
     
    161138      
    162139     '<p class="col right"><label for="action" class="classic">'.__('Selected entries action:').'</label> '. 
    163      form::combo('action',$combo_action). 
     140     form::combo('action',$posts_actions_page->getCombo()). 
    164141     '<input type="submit" value="'.__('OK').'" /></p>'. 
    165142     form::hidden('post_type',''). 
    166      form::hidden('redir',$p_url.'&amp;m=tag_posts&amp;tag='. 
    167           str_replace('%','%%',rawurlencode($tag)).'&amp;page='.$page). 
     143     form::hidden('p','tags'). 
     144     form::hidden('m','tag_posts'). 
     145     form::hidden('tag',$tag). 
    168146     $core->formNonce(). 
    169147     '</div>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map