Changeset 1091


Ignore:
Timestamp:
Mar 21, 2006, 11:58:59 PM (19 years ago)
Author:
rub
Message:

[NBM] Step 3: Layout Model

o Rename mailtousers.php on notification_by_mail.php
o Deactivate temporary function on notification_by_mail.php
o First design layout, no function activated, it's only a model

Location:
trunk
Files:
3 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r1082 r1091  
    7777    'U_SITES'=> $link_start.'remote_site',
    7878    'U_MAINTENANCE'=> $link_start.'maintenance',
    79     'U_MAILTOUSERS'=> $link_start.'mailtousers',
     79    'U_NOTIFICATION_BY_MAIL'=> $link_start.'notification_by_mail',
    8080    'U_CONFIG_GENERAL'=> $conf_link.'general',
    8181    'U_CONFIG_COMMENTS'=> $conf_link.'comments',
  • trunk/admin/notification_by_mail.php

    r1088 r1091  
    2828
    2929// +-----------------------------------------------------------------------+
    30 // | include
     30// | include                                                               |
    3131// +-----------------------------------------------------------------------+
    3232
     
    4848
    4949// +-----------------------------------------------------------------------+
    50 // | functions
     50// | functions                                                             |
    5151// +-----------------------------------------------------------------------+
    5252/*
     
    253253
    254254// +-----------------------------------------------------------------------+
    255 // | Main
     255// | Main                                                                  |
    256256// +-----------------------------------------------------------------------+
    257257update_data_user_mail_notification();
    258 send_all_user_mail_notification();
    259 
    260 
    261 // +-----------------------------------------------------------------------+
    262 // |                        template initialization                        |
    263 // +-----------------------------------------------------------------------+
    264 
    265 $title = l10n('nbm_Send mail to users');
    266 
    267 // +-----------------------------------------------------------------------+
    268 // |                        infos & errors display                         |
     258//send_all_user_mail_notification();
     259
     260if (!isset($_GET['mode']))
     261{
     262  $page['mode'] = 'send';
     263}
     264else
     265{
     266  $page['mode'] = $_GET['mode'];
     267}
     268
     269// +-----------------------------------------------------------------------+
     270// | template initialization                                               |
     271// +-----------------------------------------------------------------------+
     272$template->set_filenames(
     273  array(
     274    'double_select' => 'admin/double_select.tpl',
     275    'notification_by_mail'=>'admin/notification_by_mail.tpl'
     276    )
     277  );
     278
     279$base_url = get_root_url().'admin.php';
     280
     281$template->assign_vars(
     282  array(
     283    'U_TABSHEET_TITLE' => l10n('nbm_'.$page['mode'].'_mode'),
     284    'U_HELP' => add_url_param(get_root_url().'/popuphelp.php', 'page=notification_by_mail'),
     285    'U_PARAM_MODE' => add_url_param($base_url.get_query_string_diff(array('mode')), 'mode=param'),
     286    'U_SUBSCRIBE_MODE' => add_url_param($base_url.get_query_string_diff(array('mode')), 'mode=subscribe'),
     287    'U_SEND_MODE' => add_url_param($base_url.get_query_string_diff(array('mode')), 'mode=send'),
     288    'F_ACTION'=> $base_url.get_query_string_diff(array())
     289    ));
     290
     291switch ($page['mode'])
     292{
     293  case 'param' :
     294  {
     295    $template->assign_block_vars(
     296      $page['mode'],
     297      array(
     298        //'HISTORY_YES'=>$history_yes
     299        ));
     300    break;
     301  }
     302  case 'subscribe' :
     303  {
     304    $template->assign_block_vars(
     305      $page['mode'],
     306      array(
     307        //'HISTORY_YES'=>$history_yes
     308        ));
     309
     310    $template->assign_vars(
     311      array(
     312        'L_CAT_OPTIONS_TRUE' => l10n('nbm_subscribe_col'),
     313        'L_CAT_OPTIONS_FALSE' => l10n('nbm_unsubscribe_col')
     314        )
     315      );
     316
     317
     318/*    $template->assign_block_vars(
     319      $blockname,
     320      array('SELECTED'=>$selected,
     321            'VALUE'=>$category['id'],
     322            'OPTION'=>$option
     323        ));*/
     324    $template->assign_block_vars(
     325      'category_option_true',
     326      array('SELECTED'=>'',
     327            'VALUE'=>'rub',
     328            'OPTION'=>'rub [rub@phpwebgallery.net]'
     329        ));
     330
     331    break;
     332  }
     333  case 'send' :
     334  {
     335    $template->assign_block_vars(
     336      $page['mode'],
     337      array(
     338        //'HISTORY_YES'=>$history_yes
     339        ));
     340
     341    $template->assign_vars(
     342      array(
     343        'L_CAT_OPTIONS_TRUE' => l10n('nbm_send_col'),
     344        'L_CAT_OPTIONS_FALSE' => l10n('nbm_nosend_col')
     345        )
     346      );
     347
     348
     349/*    $template->assign_block_vars(
     350      $blockname,
     351      array('SELECTED'=>$selected,
     352            'VALUE'=>$category['id'],
     353            'OPTION'=>$option
     354        ));*/
     355    $template->assign_block_vars(
     356      'category_option_true',
     357      array('SELECTED'=>' selected="selected"',
     358            'VALUE'=>'rub',
     359            'OPTION'=>'rub [2006-03-20 23:35:23]'
     360        ));
     361
     362    break;
     363  }
     364}
     365
     366// +-----------------------------------------------------------------------+
     367// | infos & errors display                                                |
    269368// +-----------------------------------------------------------------------+
    270369
     
    291390echo '</pre>';
    292391*/
     392
     393// +-----------------------------------------------------------------------+
     394// | Sending html code                                                     |
     395// +-----------------------------------------------------------------------+
     396$template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
     397$template->assign_var_from_handle('ADMIN_CONTENT', 'notification_by_mail');
     398
    293399?>
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r1085 r1091  
    254254$lang['nbm_User %s [%s] added.'] = 'User %s [%s] added.';
    255255$lang['nbm_item_notification'] = 'Notification';
     256$lang['nbm_param_mode'] = 'Parameter';
     257$lang['nbm_subscribe_mode'] = 'Subscribe';
     258$lang['nbm_send_mode'] = 'Send';
     259$lang['nbm_title_param'] = 'Parameters';
     260$lang['nbm_send_detailed_content'] = 'Send detailed content';
     261$lang['nbm_complementary_mail_content'] = 'Complementary mail content';
     262$lang['nbm_title_subscribe'] = 'Subscribe/unscribe users';
     263$lang['nbm_warning_subscribe_unsubcribe'] = 'Warning, subscribe or unscribe send mails to users [Not Implemented]';
     264$lang['nbm_subscribe_col'] = 'Subscribed';
     265$lang['nbm_unsubscribe_col'] = 'Unsubcribed';
     266$lang['nbm_title_send'] = 'Select sendings';
     267$lang['nbm_send_submit'] = 'Send';
     268$lang['nbm_send_col'] = 'To send';
     269$lang['nbm_nosend_col'] = 'No to send';
    256270$lang['no_write_access'] = 'no write access';
    257271$lang['order_by'] = 'order by';
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r1085 r1091  
    254254$lang['nbm_User %s [%s] added.'] = 'Utilisateur %s [%s] ajouté.';
    255255$lang['nbm_item_notification'] = 'Notification';
     256$lang['nbm_param_mode'] = 'Paramètrage';
     257$lang['nbm_subscribe_mode'] = 'Inscription';
     258$lang['nbm_send_mode'] = 'Envoi';
     259$lang['nbm_title_param'] = 'Paramètres';
     260$lang['nbm_send_detailed_content'] = 'Envoi d\'un contenu détaillé';
     261$lang['nbm_complementary_mail_content'] = 'Contenu complémentaire au mail';
     262$lang['nbm_title_subscribe'] = 'Inscrire/desinscrire les utilisateurs';
     263$lang['nbm_warning_subscribe_unsubcribe'] = 'Attention, l\'inscription ou la desincription entraine l\'envoi de mails aux utilisateurs concernés [Fonction non implementée]';
     264$lang['nbm_subscribe_col'] = 'Inscrits';
     265$lang['nbm_unsubscribe_col'] = 'Non Inscrits';
     266$lang['nbm_title_send'] = 'Sélection des envois';
     267$lang['nbm_send_submit'] = 'Envoyer';
     268$lang['nbm_send_col'] = 'A envoyer';
     269$lang['nbm_nosend_col'] = 'A ne pas envoyer';
    256270$lang['no_write_access'] = 'pas d\'accès en écriture';
    257271$lang['order_by'] = 'trier selon';
  • trunk/template/yoga/admin.tpl

    r1083 r1091  
    1919        <li><a href="{U_CAT_UPDATE}">{lang:update}</a></li>
    2020        <li><a href="{U_MAINTENANCE}">{lang:Maintenance}</a></li>
    21         <li><a href="{U_MAILTOUSERS}">{lang:nbm_item_notification}</a></li>
     21        <li><a href="{U_NOTIFICATION_BY_MAIL}">{lang:nbm_item_notification}</a></li>
    2222      </ul>
    2323    </dd>
Note: See TracChangeset for help on using the changeset viewer.