Changeset 4228


Ignore:
Timestamp:
Nov 7, 2009, 11:15:53 PM (11 years ago)
Author:
LucMorizur
Message:

[Event Cats] Begin duplication management

Location:
extensions/event_cats
Files:
8 edited

Legend:

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

    r4170 r4228  
    9898        case 1: // Category
    9999        case 3: // Image
    100           $url_end = ($ec_entry['forced'] == 'true') ? '' : '&cat='.$arg1;
     100          $url_end = ($ec_entry['forced'] == 'true') ? '' : '&cat='.$arg1;
    101101          $dspl =
    102102           l10n('ec_dspl_ok_cat_pre').
     
    107107          ;
    108108          if (is_in($ec_entry['action'], '_img_pb')) {
    109             $url_end.= ($url_end == '') ? '' : '&img='.$arg2;
     109            $url_end.= ($url_end == '') ? '' : '&img='.$arg2;
    110110            $page['errors'][] =
    111111             $ec_entry['code'].' : '.l10n('ec_image_miss');
     
    121121          }
    122122          elseif ($a == 3) { // Image
    123             $url_end.= ($url_end == '') ? '' : '&img='.$arg2;
     123            $url_end.= ($url_end == '') ? '' : '&img='.$arg2;
    124124            $t = mysql_fetch_row(pwg_query('
    125125             SELECT `name`, `file`
     
    140140        break;
    141141        case 2: // Additional Page
    142           $url_end = ($ec_entry['forced'] == 'true') ? '' : '&ap='.$arg2;
     142          $url_end = ($ec_entry['forced'] == 'true') ? '' : '&ap='.$arg2;
    143143          $dspl = ($ec_ap_ok) ?
    144144           l10n('ec_dspl_ok_ap_pre').
     
    176176       $ec_entry['code'].' : '.l10n('ec_add_page_miss');
    177177      if (is_in($ec_entry['action'], 'ec_ok')) {
    178         $url_end = ($ec_entry['forced'] == 'true') ? '' : '&ap='.$arg2;
     178        $url_end = ($ec_entry['forced'] == 'true') ? '' : '&ap='.$arg2;
    179179        $dspl = l10n('ec_dspl_ok_home');
    180180      }
     
    192192   
    193193    case 'ec_ok_cat_pb' :
    194       $url_end = ($ec_entry['forced'] == 'true') ? '' : '&cat='.$arg1;
     194      $url_end = ($ec_entry['forced'] == 'true') ? '' : '&cat='.$arg1;
    195195      $page['errors'][] =
    196196       $ec_entry['code'].' : '.l10n('ec_category_miss');
  • extensions/event_cats/admin/duplication.inc.php

    r4092 r4228  
    11<?php
    22
     3
     4
     5$template->assign('ec_conf', $ec_conf);
     6
    37?>
  • extensions/event_cats/admin/template/autolog_entries.js

    r4171 r4228  
    11/* Event Cats Javascript functions LucMorizur June - ... 2009 */
    2 
    3 /*
    4 déplacer les liens de test et de suppression en-dessous de la table (en-dessous du champ "URL"), éventuellement en les accompagnant des
    5 icônes ; et y rajouter le lien de modification (envoyer $_POST{['ec_act1'] = 'modify_entry_ask' et $_POST{['ec_entry_sel'] = <# entrée concernée>)
    6 */
    72
    83var ec_checked_line = -1;
     
    1914  }
    2015  else {
    21     t = document.getElementById('ec_url_id_' + ec_checked_line).innerHTML;
     16    t = document.getElementById('ec_url_id_' + ec_checked_line).href;
    2217    document.getElementById("selection-" + ec_checked_line).checked =
    2318     'checked';
  • extensions/event_cats/admin/template/autolog_entries.tpl

    r4181 r4228  
    5252          />
    5353          <label for = "selection-{$code_line.id}">{$code_line.id}</label>
    54           <label id = "ec_url_id_{$code_line.id}" style = "display:none;">{$code_line.code_URL}</label>
     54          <a id = "ec_url_id_{$code_line.id}" style = "display:none;" href = "{$code_line.code_URL}"></a>
    5555        </td>
    5656        <td><label for = "selection-{$code_line.id}" id = "ec_table_code_{$code_line.id}">{$code_line.Code}</label></td>
  • extensions/event_cats/admin/template/autolog_new.tpl

    r4181 r4228  
    204204        </label>
    205205      </td>
     206       
    206207      <td>
     208        <li>
     209          {* <!-- Index page --> *}
     210          <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');">
     211            <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" />
     212            {'ec_up_code_lbl_home'|@translate}
     213          </label>
     214         
     215          {* <!-- Access denied page (only when modifying an entry) --> *}
     216          {if !$ec_is_creation}
     217            <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');">
     218              <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" />
     219              {'ec_up_code_lbl_refused'|@translate}
     220            </label>
     221          {/if}
     222         
     223          {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *}
     224          <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');"
     225           {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if}
     226          >
     227            <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" />
     228            {'ec_up_code_lbl_img'|@translate}<br>
     229            <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6"
     230             size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');"
     231            />
     232            <span id = "ec_in_up_imgs_warn"></span>
     233          </label>
     234        </li>
    207235       
    208         {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
    209         <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');"
    210          {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if}
    211         >
    212           <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" />
    213           {'ec_up_code_lbl_aps'|@translate}<br>
    214           <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
    215             {html_options options=$ec_lists.add_pages}
    216           </select>
    217         </label>
    218        
    219         {* <!-- Category, provided at least one category is available --> *}
    220         <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');"
    221          {if count($ec_lists.categories) == 0} style = "display:none;" {/if}
    222         >
    223           <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id"
    224             onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;"
    225           />
    226           <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'ec_up_code_lbl_cats'|@translate}</span><br>
    227           <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;">
    228             {html_options options=$ec_lists.categories}
    229           </select>
    230         </label>
    231        
    232         {* <!-- Image, provided at least one category is available and at least one image is associated to one category --> *}
    233         <label class = "ec_block" for = "ec_in_up_imgs_id" onclick = "return ec_mark_action('ec_input_action_img');"
    234          {if $ec_no_assoc or count($ec_lists.categories) == 0} style = "display:none;" {/if}
    235         >
    236           <input type = "radio" name = "ec_input_action" value = "img" id = "ec_input_action_img" for = "ec_in_up_imgs_id" />
    237           {'ec_up_code_lbl_img'|@translate}<br>
    238           <input type = "text" name = "ec_in_up_img" id = "ec_in_up_imgs_id" maxlength = "6"
    239            size = "10" onblur = "ec_selected_img = this.value; ec_check_img_text();" onfocus = "return ec_mark_action('ec_input_action_img');"
    240           /><br>
    241           <span id = "ec_in_up_imgs_warn"></span>
    242         </label>
    243        
    244         {* <!-- Index page --> *}
    245         <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_home');">
    246           <input type = "radio" name = "ec_input_action" value = "home" id = "ec_input_action_home" />
    247           {'ec_up_code_lbl_home'|@translate}
    248         </label>
    249        
    250         {* <!-- Access denied page (only when modifying an entry) --> *}
    251         {if !$ec_is_creation}
    252           <label class = "ec_block" onclick = "return ec_mark_action('ec_input_action_refused');">
    253             <input type = "radio" name = "ec_input_action" value = "refused" id = "ec_input_action_refused" />
    254             {'ec_up_code_lbl_refused'|@translate}
    255           </label>
    256         {/if}
     236        <li>
     237          {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
     238          <label class = "ec_block" for = "ec_in_up_aps_id" onclick = "return ec_mark_action('ec_input_action_add_p');"
     239           {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if}
     240          >
     241            <input type = "radio" name = "ec_input_action" value = "add_p" id = "ec_input_action_add_p" for = "ec_in_up_aps_id" />
     242            {'ec_up_code_lbl_aps'|@translate}<br>
     243            <select class = "categoryList" name = "ec_in_up_aps" size="30" id = "ec_in_up_aps_id" onchange = "ec_selected_AP = this.value;" >
     244              {html_options options=$ec_lists.add_pages}
     245            </select>
     246          </label>
     247         
     248          {* <!-- Category, provided at least one category is available --> *}
     249          <label class = "ec_block" for = "ec_in_up_cats_id" onclick = "return ec_mark_action('ec_input_action_cat');"
     250           {if count($ec_lists.categories) == 0} style = "display:none;" {/if}
     251          >
     252            <input type = "radio" name = "ec_input_action" value = "cat" id = "ec_input_action_cat" for = "ec_in_up_cats_id"
     253              onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;"
     254            />
     255            <span onMouseover = "ec_chk_nover_cat = false;" onMouseout = "ec_chk_nover_cat = true;">{'ec_up_code_lbl_cats'|@translate}</span><br>
     256            <select class = "categoryList" name = "ec_in_up_cat" size = "30" id = "ec_in_up_cats_id" onchange = "ec_selected_cat = this.value;">
     257              {html_options options=$ec_lists.categories}
     258            </select>
     259          </label>
     260        </li>
    257261      </td>
    258262    </tr>
  • extensions/event_cats/admin/template/duplication.tpl

    r4157 r4228  
    66
    77<p>Bientôt disponible :-] !</p>
     8
     9<form class = "titrePage">
     10  <fieldset>
     11    <legend>{'ec_duplication_config'|@translate}</legend>
     12    <ul>
     13      <li>
     14        <label for = "ec_config_item_{$ec_key}">
     15          {$ec_key} : {$ec_item}
     16        </label><br>
     17      </li>
     18    </ul>
     19    <input class = "submit" type = "submit" name = "ec_duplic_conf_submit" value = "{'ec_dup_conf_submit_lbl'|@translate}" />
     20  </fieldset>
     21</form>
     22
     23{*
     24
     25<form action = "{$F_ACTION}" method = "post" id = "categoryPermissions">
     26
     27  <h4>{'Groups'|@translate}</h4>
     28
     29  <fieldset>
     30    <legend>{'Permission granted'|@translate}</legend>
     31    <ul>
     32      {foreach from=$group_granted_ids item=id}
     33      <li><label><input type = "checkbox" name = "deny_groups[]" value = "{$id}" /> {$all_groups[$id]}</label></li>
     34      {/foreach}
     35    </ul>
     36    <input class = "submit" type = "submit" name = "deny_groups_submit" value = "{'Deny selected groups'|@translate}" {$TAG_INPUT_ENABLED}/>
     37  </fieldset>
     38
     39  <fieldset>
     40    <legend>{'Permission denied'|@translate}</legend>
     41    <ul>
     42      {foreach from=$group_denied_ids item=id}
     43      <li><label><input type = "checkbox" name = "grant_groups[]" value = "{$id}"> {$all_groups[$id]}</label></li>
     44      {/foreach}
     45    </ul>
     46    <input class = "submit" type = "submit" name = "grant_groups_submit" value = "{'Grant selected groups'|@translate}" {$TAG_INPUT_ENABLED}/>
     47  </fieldset>
     48
     49  <h4>{'Users'|@translate}</h4>
     50
     51  <fieldset>
     52    <legend>{'Permission granted'|@translate}</legend>
     53    <ul>
     54      {foreach from=$user_granted_direct_ids item=id}
     55      <li><label><input type = "checkbox" name = "deny_users[]" value = "{$id}" /> {$all_users[$id]}</label></li>
     56      {/foreach}
     57    </ul>
     58    <input class = "submit" type = "submit" name = "deny_users_submit" value = "{'Deny selected users'|@translate}" {$TAG_INPUT_ENABLED}/>
     59  </fieldset>
     60
     61  <fieldset>
     62    <legend>{'Permission granted thanks to a group'|@translate}</legend>
     63    {if isset($user_granted_indirects) }
     64    <ul>
     65      {foreach from=$user_granted_indirects item=user_group}
     66      <li>{$user_group.USER} ({$user_group.GROUP})</li>
     67      {/foreach}
     68    </ul>
     69    {/if}
     70  </fieldset>
     71
     72  <fieldset>
     73    <legend>{'Permission denied'|@translate}</legend>
     74    <ul>
     75      {foreach from=$user_denied_ids item=id}
     76      <li><label><input type = "checkbox" name = "grant_users[]" value = "{$id}"> {$all_users[$id]}</label></li>
     77      {/foreach}
     78    </ul>
     79    <input class = "submit" type = "submit" name = "grant_users_submit" value = "{'Grant selected users'|@translate}" {$TAG_INPUT_ENABLED}/>
     80  </fieldset>
     81
     82</form>
     83
     84
     85*}
     86
     87
    888
    989{* <!-- JavaScript functions --> *}
  • extensions/event_cats/admin/template/header.inc.tpl

    r4092 r4228  
    44
    55{* <!-- Page title --> *}
    6 <div class = "titrePage" style="margin-top: -20px;">
     6<div class = "titrePage" style = "margin-top: -20px;">
    77  <h2>{'ec_admin_page_title'|@translate} {$EVNTCATS_VERSION}</h2>
    88</div>
     
    2424    <hr width = 75% size = 3 />
    2525  </p>
    26 {else}
    27   <br>
     26{* {else}
     27  <br> *}
    2828{/if}
  • extensions/event_cats/language/fr_FR/plugin.lang.php

    r4219 r4228  
    7272$lang['ec_up_code_lbl_home']      = 'Accueil';
    7373$lang['ec_up_code_lbl_refused']   = 'Accès refusé';
     74// Duplication
     75$lang['ec_duplication_config']    = 'Configuration';
     76$lang['ec_dup_conf_submit_lbl']   = 'Configuration';
    7477// JS checks
    7578$lang['ec_confirm_test']          = "Vraiment tester le code sélectionné ?\n\rCela terminera votre session d'administration.";
Note: See TracChangeset for help on using the changeset viewer.