Dotclear


Ignore:
Timestamp:
09/30/13 21:16:20 (12 years ago)
Author:
Denis Jean-Chirstian <contact@…>
Branch:
dcRepo
Parents:
2174:6ed25e45a14e (diff), 2173:94520262a1b8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from default

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/maintenance/index.php

    r2166 r2175  
    2727$code = empty($_POST['code']) ? null : (integer) $_POST['code']; 
    2828$tab = empty($_REQUEST['tab']) ? '' : $_REQUEST['tab']; 
    29  
    30 // Save settings 
    31  
    32 if (!empty($_POST['settings'])) { 
    33  
    34      try { 
    35           $core->blog->settings->maintenance->put( 
    36                'plugin_message',  
    37                !empty($_POST['settings_plugin_message']),  
    38                'boolean',  
    39                'Display alert message of late tasks on plugin page',  
    40                true,  
    41                true 
    42           ); 
    43  
    44           foreach($tasks as $t) { 
    45                if (!empty($_POST['settings_recall_type']) && $_POST['settings_recall_type'] == 'all') { 
    46                     $ts = $_POST['settings_recall_time']; 
    47                } 
    48                else { 
    49                     $ts = empty($_POST['settings_ts_'.$t->id()]) ? 0 : $_POST['settings_ts_'.$t->id()]; 
    50                } 
    51                $core->blog->settings->maintenance->put( 
    52                     'ts_'.$t->id(),  
    53                     abs((integer) $ts),  
    54                     'integer',  
    55                     sprintf('Recall time for task %s', $t->id()),  
    56                     true,  
    57                     $t->blog() 
    58                ); 
    59           } 
    60            
    61           http::redirect($p_url.'&done=1&tab='.$tab.'#'.$tab); 
    62      } 
    63      catch(Exception $e) { 
    64           $core->error->add($e->getMessage()); 
    65      } 
    66 } 
    6729 
    6830// Get task object 
     
    287249          '</div>'; 
    288250     } 
    289  
    290      // Settings 
    291  
    292      echo  
    293      '<div id="settings" class="multi-part" title="'.__('Alert settings').'">'. 
    294      '<h3>'.__('Alert settings').'</h3>'. 
    295      '<form action="'.$p_url.'" method="post">'. 
    296  
    297      '<h4 class="pretty-title">'.__('Activation').'</h4>'. 
    298      '<p><label for="settings_plugin_message" class="classic">'. 
    299      form::checkbox('settings_plugin_message', 1, $core->blog->settings->maintenance->plugin_message). 
    300      __('Display alert messages on late tasks').'</label></p>'. 
    301  
    302      '<p class="info">'.sprintf( 
    303           __('You can place list of late tasks on your %s.'), 
    304           '<a href="preferences.php#user-favorites">'.__('Dashboard').'</a>' 
    305      ).'</p>'. 
    306  
    307      '<h4 class="pretty-title vertical-separator">'.__('Frequency').'</h4>'. 
    308  
    309      '<p class="vertical-separator">'.form::radio(array('settings_recall_type', 'settings_recall_all'), 'all').' '. 
    310      '<label class="classic" for="settings_recall_all">'. 
    311      '<strong>'.__('Use one recall time for all tasks').'</strong></label>'. 
    312  
    313      '<p class="field wide vertical-separator"><label for="settings_recall_time">'.__('Recall time for all tasks:').'</label>'. 
    314      form::combo('settings_recall_time', $combo_ts, 'seperate', 'recall-for-all'). 
    315      '</p>'. 
    316  
    317      '<p class="vertical-separator">'.form::radio(array('settings_recall_type', 'settings_recall_separate'), 'separate', 1).' '. 
    318      '<label class="classic" for="settings_recall_separate">'. 
    319      '<strong>'.__('Use one recall time per task').'</strong></label>'; 
    320  
    321      foreach($tasks as $t) 
    322      { 
    323           echo 
    324           '<div class="two-boxes">'. 
    325  
    326           '<p class="field wide"><label for="settings_ts_'.$t->id().'">'.$t->task().'</label>'. 
    327           form::combo('settings_ts_'.$t->id(), $combo_ts, $t->ts(), 'recall-per-task'). 
    328           '</p>'. 
    329  
    330           '</div>'; 
    331      } 
    332  
    333      echo  
    334      '<p class="field wide"><input type="submit" value="'.__('Save this settings').'" /> '. 
    335      form::hidden(array('tab'), 'settings'). 
    336      form::hidden(array('settings'), 1). 
    337      $core->formNonce().'</p>'. 
    338      '</form>'. 
    339      '</div>'; 
    340251} 
    341252 
  • plugins/maintenance/index.php

    r2163 r2175  
    9595          array( 
    9696               __('Plugins') => '', 
    97                '<span class="page-title">'.__('Maintenance').'</span>' => '' 
     97               __('Maintenance') => '' 
    9898          ) 
    9999     ). 
     
    121121               __('Plugins') => '', 
    122122               '<a href="'.$p_url.'">'.__('Maintenance').'</a>' => '', 
    123                '<span class="page-title">'.html::escapeHTML($task->name()).'</span>' => '' 
     123               html::escapeHTML($task->name())=> '' 
    124124          ) 
    125125     ); 
     
    155155          array( 
    156156               __('Plugins') => '', 
    157                '<span class="page-title">'.__('Maintenance').'</span>' => '' 
     157               __('Maintenance') => '' 
    158158          ) 
    159159     ); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map