Changeset 4437


Ignore:
Timestamp:
12/07/09 04:01:10 (10 years ago)
Author:
LucMorizur
Message:

[Event Cats] Implement help banner

Location:
extensions/event_cats
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/autolog_entries.inc.php

    r4421 r4437  
    223223} 
    224224 
     225$template->assign('ec_help_banner1', l10n('ec_help_banner1_entries')); 
    225226$template->assign('ec_ap_ok',  defined('ADD_PAGES_TABLE')); 
    226227$template->assign('comment_tooltip', (read_ec_conf('comment_display') == '0')); 
  • extensions/event_cats/admin/autolog_new.inc.php

    r4436 r4437  
    8989/****************************************************************************/ 
    9090 
     91$template->assign('ec_help_banner1', l10n('ec_help_banner1_new')); 
     92$template->assign('ec_help_banner2', l10n('ec_help_banner2_new')); 
     93 
    9194$template->assign('ec_is_creation', ( 
    9295  $ec_default_action == 'duplicate_entry_submit' or 
  • extensions/event_cats/admin/config.inc.php

    r4421 r4437  
    7171foreach ($ec_conf_default as $k => $v) { $ec_conf2[$k] = $ec_conf[$i]; $i++; } 
    7272$template->assign('ec_conf', $ec_conf2); 
     73$template->assign('ec_help_banner1', l10n('ec_help_banner1_config')); 
    7374 
    7475?> 
  • extensions/event_cats/admin/duplication.inc.php

    r4421 r4437  
    7272$ec_conf2['duplic_display'] = read_ec_conf('duplic_display'); 
    7373$template->assign('ec_conf', $ec_conf2); 
     74$template->assign('ec_help_banner1', l10n('ec_help_banner1_duplication')); 
    7475 
    7576?> 
  • extensions/event_cats/admin/evntcats_admin.php

    r4436 r4437  
    7676// If needed, stores in the DB that acknowledgement message has been displayed 
    7777if ($ec_howto = (read_ec_conf('howto') == '0')) change_ec_conf('howto', '1'); 
     78 
     79// If needed, stores in the DB whether help banner must be displayed or not 
     80if (isset($_POST['ec_help_banner_onoff2'])) 
     81 $_POST['ec_help_banner_onoff'] = $_POST['ec_help_banner_onoff2']; 
     82if (isset($_POST['ec_help_banner2_onoff'])) 
     83 $_POST['ec_help_banner_onoff'] = $_POST['ec_help_banner2_onoff']; 
     84if ( 
     85  isset($_POST['ec_help_banner_onoff']) and 
     86  $_POST['ec_help_banner_onoff'] != read_ec_conf('in_help_display') 
     87) change_ec_conf('in_help_display', $_POST['ec_help_banner_onoff']); 
    7888 
    7989build_ec_lists(); // in evntcats_main_funcs.php 
     
    378388 ($ec_howto and (count($page['errors']) ==0 and count($page['infos']) == 0))); 
    379389 
     390$template->assign('ec_help_banner_OK', (read_ec_conf('in_help_display') == '1')); 
     391 
    380392$template->assign('EVNTCATS_PATH',EVNTCATS_PATH); 
    381393$template->assign('RACINE_URL',ROOT_URL); 
  • extensions/event_cats/admin/template/autolog_entries.tpl

    r4421 r4437  
    55{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'} 
    66 
    7 {* <!-- Whether plugin Additionnal Pages is active or not --> *} 
     7{* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *} 
    88<div style = "text-align:right; font-style:italic;"> 
     9  <span id = "ec_help_banner2"> 
     10    {'Help banner'|@translate}&nbsp; 
     11    <label for = "ec_help_banner2_1" onclick = "ec_mark_help('ec_help_banner_1');"> 
     12      <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_1"/> 
     13      {'Banner on'|@translate} 
     14    </label> 
     15    &nbsp; 
     16    <label for = "ec_help_banner2_0" onclick = "ec_mark_help('ec_help_banner_0');"> 
     17      <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_0"/> 
     18      {'Banner off'|@translate} 
     19    </label> 
     20    &nbsp;&#151;&nbsp; 
     21  </span> 
    922  {if $ec_ap_ok} 
    1023    {'Additional Pages active'|@translate} 
     
    1831    </script> 
    1932  {/if} 
    20 </div> 
     33</div><span id = "ec_help_ban"></span> 
     34<script type = "text/javascript"><!-- 
     35  document.getElementById('ec_help_banner2').style.display = "none"; 
     36//--></script> 
    2137 
    2238{* <!-- Form to view codes --> *} 
  • extensions/event_cats/admin/template/autolog_new.tpl

    r4421 r4437  
    55{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'} 
    66 
    7 {* <!-- Whether plugin Additionnal Pages is active or not --> *} 
     7{* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *} 
    88<div style = "text-align:right; font-style:italic;"> 
     9  <span id = "ec_help_banner2"> 
     10    {'Help banner'|@translate}&nbsp; 
     11    <label for = "ec_help_banner2_1" onclick = "ec_mark_help('ec_help_banner_1');"> 
     12      <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_1"/> 
     13      {'Banner on'|@translate} 
     14    </label> 
     15    &nbsp; 
     16    <label for = "ec_help_banner2_0" onclick = "ec_mark_help('ec_help_banner_0');"> 
     17      <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_0"/> 
     18      {'Banner off'|@translate} 
     19    </label> 
     20    &nbsp;&#151;&nbsp; 
     21  </span> 
    922  {if $ec_ap_ok} 
    1023    {'Additional Pages active'|@translate} 
     
    1831    </script> 
    1932  {/if} 
    20 </div> 
     33</div><span id = "ec_help_ban"></span> 
     34<script type = "text/javascript"><!-- 
     35  document.getElementById('ec_help_banner2').style.display = "none"; 
     36//--></script> 
    2137 
    2238{* <!-- Parameters list --> *} 
  • extensions/event_cats/admin/template/config.tpl

    r4421 r4437  
    55{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'} 
    66 
    7 {* <!-- Whether plugin Additionnal Pages is active or not --> *} 
     7{* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *} 
    88<div style = "text-align:right; font-style:italic;"> 
     9  <span id = "ec_help_banner2"> 
     10    {'Help banner'|@translate}&nbsp; 
     11    <label for = "ec_help_banner2_1" onclick = "ec_mark_help('ec_help_banner_1');"> 
     12      <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_1"/> 
     13      {'Banner on'|@translate} 
     14    </label> 
     15    &nbsp; 
     16    <label for = "ec_help_banner2_0" onclick = "ec_mark_help('ec_help_banner_0');"> 
     17      <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_0"/> 
     18      {'Banner off'|@translate} 
     19    </label> 
     20    &nbsp;&#151;&nbsp; 
     21  </span> 
    922  {if $ec_ap_ok} 
    1023    {'Additional Pages active'|@translate} 
     
    1831    </script> 
    1932  {/if} 
    20 </div> 
     33</div><span id = "ec_help_ban"></span> 
     34<script type = "text/javascript"><!-- 
     35  document.getElementById('ec_help_banner2').style.display = "none"; 
     36//--></script> 
    2137 
    2238<form action = "" method = "post" class = "titrePage" name = "ec_gen_conf" onsubmit = "return ec_check_submit();"> 
     
    135151          {'In a row'|@translate} 
    136152        </label> 
     153      </td> 
     154      <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> {* <!-- sorry :-\ --> *} 
     155      <td style = "text-align:right; font-weight:bold;"> 
     156        {'Help banner'|@translate}&nbsp;&nbsp; 
     157      </td> 
     158      <td> 
     159        <label for = "ec_2help_banner_1_id"> 
     160          <input type = "radio" name = "ec_help_banner_onoff2" value = "1" id = "ec_2help_banner_1_id" 
     161            onclick = "ec_mark_help('ec_help_banner_1');" 
     162          /> 
     163          {'Banner on'|@translate} 
     164        </label><br /> 
     165        <label for = "ec_2help_banner_0_id"> 
     166          <input type = "radio" name = "ec_help_banner_onoff2" value = "0" id = "ec_2help_banner_0_id" 
     167            onclick = "ec_mark_help('ec_help_banner_0');" 
     168          /> 
     169          {'Banner off'|@translate} 
     170        </label> 
     171      </td> 
    137172    <tr><td>&nbsp;</td><td>&nbsp;</td></tr> 
    138173  </table> 
     
    148183<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/config.js"></script> 
    149184<script type = "text/javascript"><!-- 
     185  ec_help_in_config = true; 
    150186  ec_JS_message                                               = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}"; 
    151187  ec_selected_action                                          = "{$ec_conf.unknown_code}"; 
  • extensions/event_cats/admin/template/duplication.tpl

    r4421 r4437  
    44 
    55{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'} 
     6 
     7{* <!-- For help banner --> *} 
     8<div style = "text-align:right; font-style:italic;" id = "ec_help_banner2"> 
     9  {'Help banner'|@translate}&nbsp; 
     10  <label for = "ec_help_banner2_1" onclick = "ec_mark_help('ec_help_banner_1');"> 
     11    <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_1"/> 
     12    {'Banner on'|@translate} 
     13  </label> 
     14  &nbsp; 
     15  <label for = "ec_help_banner2_0" onclick = "ec_mark_help('ec_help_banner_0');"> 
     16    <input type = "radio" name = "ec_help_banner2_onoff" id = "ec_help_banner2_0"/> 
     17    {'Banner off'|@translate} 
     18  </label> 
     19</div><span id = "ec_help_ban" style = "display:none;"></span> 
     20<script type = "text/javascript"><!-- 
     21  document.getElementById('ec_help_banner2').style.display = "none"; 
     22//--></script> 
    623 
    724<!-- Aknowledgement ---------------------------------------------------------- 
  • extensions/event_cats/admin/template/footer.inc.tpl

    r4421 r4437  
    44 
    55{* <!-- Common Event Cats admin pages footer --> *} 
     6 
     7{* <!-- For help banner --> *} 
     8<script type = "text/javascript"><!-- 
     9  ec_mark_help(''); 
     10//--></script> 
    611 
    712{* <!-- Debug displays --> *} 
  • extensions/event_cats/admin/template/header.inc.tpl

    r4421 r4437  
    2727  </p> 
    2828{/if} 
     29 
     30{* <!-- Help banner --> *} 
     31<span id = "ec_help_banner0"> 
     32  <hr width = 100% size = 1 /> 
     33  <div style = "text-align:right; font-style:italic;"> 
     34    {'Help banner'|@translate}&nbsp; 
     35    <label for = "ec_help_banner_1" onclick = "ec_mark_help('ec_help_banner_1');"> 
     36      <input type = "radio" name = "ec_help_banner_onoff" value = "1" id = "ec_help_banner_1"/> 
     37      {'Banner on'|@translate} 
     38    </label> 
     39    &nbsp; 
     40    <label for = "ec_help_banner_0" onclick = "ec_mark_help('ec_help_banner_0');"> 
     41      <input type = "radio" name = "ec_help_banner_onoff" value = "0" id = "ec_help_banner_0"/> 
     42      {'Banner off'|@translate} 
     43    </label> 
     44  </div> 
     45  <span id = "ec_help_banner1" style = "text-align:left; display:block;"></span> 
     46  <hr width = 100% size = 1 /> 
     47</span> 
     48 
     49{* <!-- JavaScript functions --> *} 
     50<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/header.js"></script> 
     51<script type = "text/javascript"><!-- 
     52  document.getElementById('ec_help_banner0').style.display = "none"; 
     53  ec_help_banner_OK = {if $ec_help_banner_OK}true{else}false{/if}; 
     54  ec_help_banner[1] = "{$ec_help_banner1}"; 
     55  ec_help_banner[2] = "{$ec_help_banner2}"; 
     56//--></script> 
     57 
  • extensions/event_cats/include/ec_conf.inc.php

    r4421 r4437  
    5050// the DB at the same time. 
    5151 
     52//---------------------------------------------------------------------------- 
     53// The following lines allow to change the number of configuration items, the 
     54// default values they can have, and also their possible other values, very 
     55// quickly. 
     56 
     57// Gives configuration items names and default values. Only strings. 
    5258$ec_conf_default = array( // PLUGIN CONFIGURATION ($ec_conf) : 
    5359                          // --------------------------------- 
     
    8490  'comment_display'       // the way the comment is displayed in "entries" 
    8591    => '0',               // tab : 0, as tooltip ; 1, on a line under code 
     92                          //  
     93  'in_help_display'       // whether the help banner is displayed. 
     94    => '1',               // 0: not displayed ; 1 : displayed (surprising !) 
    8695); 
    8796 
     97// Gives possible values. In case values cannot be predicted, just provide an 
     98// empty array : array() . 
    8899$ec_conf_possible_values = array( 
    89100  'activated'          => array('0', '1'), 
     
    95106  'unknown_code'       => array('0', '1', '2'), 
    96107  'unknown_code_ap_id' => array(), 
    97   'comment_display'    => array('0', '1') 
     108  'comment_display'    => array('0', '1'), 
     109  'in_help_display'    => array('0', '1'), 
    98110); 
     111 
     112// Once these lines have been updated, you don't need to change anything 
     113// else. Everything is managed by the code ; the only effect being that 
     114// existing configuration values in the DB are reset to their default 
     115// values -- normally not a harmful effect. 
     116//---------------------------------------------------------------------------- 
    99117 
    100118$ec_conf_index = array_flip(array_keys($ec_conf_default)); 
  • extensions/event_cats/language/fr_FR/plugin.lang.php

    r4436 r4437  
    129129$lang['ec_act_cat_miss']           = "Catégorie ?"; 
    130130 
     131// Help banner 
     132$lang['Help banner']               = 'Bandeau d\'aide'; 
     133$lang['Banner on']                 = 'activé'; 
     134$lang['Banner off']                = 'désactivé'; 
     135 
    131136 
    132137// +-------------------------------------------------------------------------+ 
     
    196201                                 // %1$s : image id, %2$s : category id 
    197202 
     203// Help banner 
     204$lang['ec_help_banner1_entries']   = ''; 
     205 
    198206unset($t_ap1, $t_ap2); 
    199207 
Note: See TracChangeset for help on using the changeset viewer.