Dotclear


Ignore:
Timestamp:
09/24/13 09:37:38 (12 years ago)
Author:
Dsls
Branch:
default
Message:
  • Restored previous available pages actions
  • strenghened code in actions (especially if no selection in secondary action page)
  • isolated pages plugin classes, more readable now
  • Made terms more generic in tags behaviors ("selection" instead of "entries")
Location:
inc/admin/actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/actions/class.dcaction.php

    r2048 r2055  
    4444     protected $cb_title; 
    4545      
     46     /** @var string title for caller page title */ 
     47     protected $caller_title; 
     48      
    4649    /** 
    4750     * Class constructor 
     
    6669          $this->from = new ArrayObject($_POST); 
    6770          $this->field_entries = 'entries'; 
     71          $this->caller_title = __('Entries'); 
    6872     } 
    6973      
     
    194198     } 
    195199 
     200 
    196201     /** 
    197202     * getRedirection - returns redirection URL 
     
    237242     } 
    238243 
     244     /** 
     245     * getCallerTitle - returns current form URI, if any 
     246     * 
     247     * @access public 
     248      * 
     249     * @return string the form URI 
     250     */ 
     251     public function getCallerTitle() { 
     252          return $this->caller_title; 
     253     } 
     254      
    239255     /** 
    240256     * getAction - returns current action, if any 
     
    275291               } catch (Exception $e) { 
    276292                    $this->error($e); 
     293                    return true; 
    277294               } 
    278295          } 
  • inc/admin/actions/class.dcactionposts.php

    r2048 r2055  
    1919          'selected','month','lang','sortby','order','page','nb'); 
    2020          $this->loadDefaults(); 
    21           $core->callBehavior('adminPostsActionsPage',$core,$this); 
    2221     } 
    2322 
     
    2625          // to be setup first 
    2726          dcDefaultPostActions::adminPostsActionsPage($this->core,$this); 
     27          $this->core->callBehavior('adminPostsActionsPage',$this->core,$this); 
     28 
    2829     } 
    2930      
     
    4849               array( 
    4950                    html::escapeHTML($this->core->blog->name) => '', 
    50                     __('Entries') => $this->getRedirection(array(),true), 
     51                    $this->getCallerTitle() => $this->getRedirection(array(),true), 
    5152                    '<span class="page-title">'.__('Entries actions').'</span>' => '' 
    5253               )) 
     
    216217                         array( 
    217218                              html::escapeHTML($core->blog->name) => '', 
    218                               __('Entries') => $ap->getRedirection(array(),true), 
    219                               '<span class="page-title">'.__('Change category for entries').'</span>' => '' 
     219                              $ap->getCallerTitle() => $ap->getRedirection(array(),true), 
     220                              '<span class="page-title">'.__('Change category for this selection').'</span>' => '' 
    220221               ))); 
    221222               # categories list 
     
    286287                         array( 
    287288                              html::escapeHTML($core->blog->name) => '', 
    288                               __('Entries') => $ap->getRedirection(array(),true), 
    289                               '<span class="page-title">'.__('Change author for entries').'</span>' => '')), 
     289                              $ap->getCallerTitle() => $ap->getRedirection(array(),true), 
     290                              '<span class="page-title">'.__('Change author for this selection').'</span>' => '')), 
    290291                         dcPage::jsLoad('js/jquery/jquery.autocomplete.js'). 
    291292                         '<script type="text/javascript">'."\n". 
     
    297298 
    298299               echo 
    299                '<form action="posts_actions.php" method="post">'. 
     300               '<form action="'.$ap->getRedirection(array(),true).'" method="post">'. 
    300301               $ap->getCheckboxes(). 
    301302               '<p><label for="new_auth_id" class="classic">'.__('New author (author ID):').'</label> '. 
     
    327328                         array( 
    328329                              html::escapeHTML($core->blog->name) => '', 
    329                               __('Entries') => $ap->getRedirection(array(),true), 
    330                               '<span class="page-title">'.__('Change language for entries').'</span>' => '' 
     330                              $ap->getCallerTitle() => $ap->getRedirection(array(),true), 
     331                              '<span class="page-title">'.__('Change language for this selection').'</span>' => '' 
    331332               ))); 
    332333               # lang list 
     
    347348                
    348349               echo 
    349                '<form action="posts_actions.php" method="post">'. 
     350               '<form action="'.$ap->getRedirection(array(),true).'" method="post">'. 
    350351               $ap->getCheckboxes(). 
    351352                
Note: See TracChangeset for help on using the changeset viewer.

Sites map