Changeset 2923


Ignore:
Timestamp:
Dec 6, 2008, 3:28:54 AM (16 years ago)
Author:
patdenice
Message:
  • Add a "Bound Template" column for template extensions.
Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/extend_for_templates.php

    r2712 r2923  
    103103    'tags.tpl'                   => 'tags',
    104104    'upload.tpl'                 => 'upload',);
    105   $flip_templates = array_flip($eligible_templates);
     105
     106$flip_templates = array_flip($eligible_templates);
     107
     108$available_templates = array_merge(
     109  array('N/A' => '----------'),
     110  get_dirs(PHPWG_ROOT_PATH.'template'));
     111
    106112// +-----------------------------------------------------------------------+
    107113// |                            selected templates                         |
     
    119125    $url_keyword = $_POST['url'][$i];
    120126    if ($url_keyword == '----------') $url_keyword = 'N/A';
     127    $bound_tpl = $_POST['bound'][$i];
     128    if ($bound_tpl == '----------') $bound_tpl = 'N/A';
    121129    if ($handle != 'N/A')
    122130    {
    123       $replacements[$newtpl] = array($handle, $url_keyword);
     131      $replacements[$newtpl] = array($handle, $url_keyword, $bound_tpl);
    124132    }
    125133    $i++;
     
    151159foreach ($new_extensions as $file)
    152160{
    153   $tpl_extension[$file] = array('N/A', 'N/A');
     161  $tpl_extension[$file] = array('N/A', 'N/A', 'N/A');
    154162}
    155163
     
    168176  $handle = $conditions[0];
    169177  $url_keyword = $conditions[1];
     178  $bound_tpl = $conditions[2];
    170179  { 
    171180  $template->append('extents',
    172181    array(
    173       'replacer'      => $file,
    174       'url_parameter' => $relevant_parameters,
    175       'original_tpl'  => array_keys($eligible_templates),
    176       'selected_tpl'  => $flip_templates[$handle],
    177       'selected_url'  => $url_keyword,)
     182      'replacer'       => $file,
     183      'url_parameter'  => $relevant_parameters,
     184      'original_tpl'   => array_keys($eligible_templates),
     185      'bound_tpl'          => $available_templates,
     186      'selected_tpl'   => $flip_templates[$handle],
     187      'selected_url'   => $url_keyword,
     188      'selected_bound' => $bound_tpl,)
    178189      );
    179190  }
  • trunk/admin/template/goto/default-layout.css

    r2675 r2923  
    88}
    99
    10 TABLE.table2 TD {
     10TABLE.table2 TD, TABLE.table2 TH {
    1111        padding: 0 5px;
    1212}
  • trunk/admin/template/goto/extend_for_templates.tpl

    r2531 r2923  
    1010      <th>{'Original templates'|@translate}</th>
    1111      <th>{'Optional URL keyword'|@translate}</th>
     12      <th>{'Bound template'|@translate}</th>
    1213    </tr>
    1314    {foreach from=$extents item=tpl name=extent_loop}
     
    2324        {html_options name=url[] output=$tpl.url_parameter values=$tpl.url_parameter selected=$tpl.selected_url}
    2425      </td>
     26      <td>
     27        {html_options name=bound[] output=$tpl.bound_tpl values=$tpl.bound_tpl selected=$tpl.selected_bound}
     28      </td>
    2529    </tr>
    2630    {/foreach}
  • trunk/include/template.class.php

    r2790 r2923  
    187187        $handle = $value[0];
    188188        $param = $value[1];
     189        $tpl = $value[2];
    189190      }
    190191      elseif (is_string($value))
     
    192193        $handle = $value;
    193194        $param = 'N/A';
     195        $tpl = 'N/A';
    194196      }
    195197      else
     
    199201
    200202      if ((stripos(implode('/',array_flip($_GET)), $param) > 0 or $param == 'N/A')
     203        and (preg_match('/'.preg_quote($tpl,'/').'$/', $this->get_template_dir()) or $tpl == 'N/A')
    201204        and (!isset($this->extents[$handle]) or $overwrite)
    202205        and file_exists($dir . $filename))
  • trunk/language/de_DE/admin.lang.php

    r2880 r2923  
    645645$lang['%d photo was deleted'] = '%d Foto wurde gelöscht';
    646646$lang['%d photos were deleted'] = '%d Fotos wurden gelöscht';
     647/* TODO */ $lang['Bound template'] = 'Bound template';
    647648?>
  • trunk/language/de_DE/help/extend_for_templates.html

    r2715 r2923  
    6565class="pwgScreen">index.php? /<strong> most_visited</strong></span></p>
    6666 
    67 <p>Advanced-User nutzen werden Dauerlinks als <strong>optional URL
    68    Keyword</strong>.</p>
     67<p>Advanced-User nutzen werden Dauerlinks als <strong>optional URL Keyword</strong>.</p>
     68
     69<!-- TODO -->
     70<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
    6971
    7072<h3>Wie kann ich deaktivieren meine "replacers"?</h3>
  • trunk/language/en_UK/admin.lang.php

    r2880 r2923  
    645645$lang['%d photo was deleted'] = '%d photo was deleted';
    646646$lang['%d photos were deleted'] = '%d photos were deleted';
     647$lang['Bound template'] = 'Bound template';
    647648?>
  • trunk/language/en_UK/help/extend_for_templates.html

    r2434 r2923  
    6565  class="pwgScreen">index.php?/<strong>most_visited</strong></span></p>
    6666 
    67 <p>Advanced users will use permalinks as <strong>optional URL
    68   keyword</strong>. </p>
     67<p>Advanced users will use permalinks as <strong>optional URL keyword</strong>. </p>
     68
     69<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
     70
    6971<h3>How can I deactivate my "replacers"?</h3>
    7072<ul>
  • trunk/language/es_ES/admin.lang.php

    r2880 r2923  
    642642$lang['%d photo was deleted'] = '%d foto ha sido suprimida';
    643643$lang['%d photos were deleted'] = '%d fotos han sido suprimidas';
     644/* TODO */ $lang['Bound template'] = 'Bound template';
    644645?>
  • trunk/language/es_ES/help/extend_for_templates.html

    r2566 r2923  
    7171<p>Los usuarios avanzados utilizarán el permalinks (permaliens, lazos permanentes) como strong> parámetro facultativo del URL </strong>. </p>
    7272
     73<!-- TODO -->
     74<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
     75
    7376<h3>¿ Cómo puedo desactivar mi "sustitutos"?</h3>
    7477<ul>
  • trunk/language/fr_FR/admin.lang.php

    r2880 r2923  
    644644$lang['%d photo was deleted'] = '%d photo a été supprimée';
    645645$lang['%d photos were deleted'] = '%d photos ont été supprimées';
     646$lang['Bound template'] = 'Template rattaché';
    646647?>
  • trunk/language/fr_FR/help/extend_for_templates.html

    r2439 r2923  
    6868<strong>paramètre facultatif de l'URL</strong>. </p>
    6969
     70<p>Si vous sélectionnez un <strong>Template rattaché</strong> alors les remplacements ne seront réalisés que sur ce template.</p>
     71
    7072<h3>Comment puis-je désactiver mes "replacers"?</h3>
    7173<ul>
  • trunk/language/it_IT/admin.lang.php

    r2887 r2923  
    644644$lang['%d photo was deleted'] = '%d foto cancellata';
    645645$lang['%d photos were deleted'] = '%d foto cancellate';
     646/* TODO */ $lang['Bound template'] = 'Bound template';
    646647?>
  • trunk/language/it_IT/help/extend_for_templates.html

    r2887 r2923  
    6666<p>Gli utenti esperti useranno i permalinks come <strong>parametro facoltativo del URL</strong>. </p>
    6767
     68<!-- TODO -->
     69<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
     70
    6871<h3>Come posso disattivare mio "rimpiazzante"?</h3>
    6972<ul>
  • trunk/language/nl_NL/admin.lang.php

    r2880 r2923  
    640640/* TODO */ $lang['%d photo was deleted'] = '%d photo was deleted';
    641641/* TODO */ $lang['%d photos were deleted'] = '%d photos were deleted';
     642/* TODO */ $lang['Bound template'] = 'Bound template';
    642643?>
  • trunk/language/nl_NL/help/extend_for_templates.html

    r2439 r2923  
    6565  class="pwgScreen">index.php?/<strong>most_visited</strong></span></p>
    6666 
    67 <p>Advanced users will use permalinks as <strong>optional URL
    68   keyword</strong>. </p>
     67<p>Advanced users will use permalinks as <strong>optional URL keyword</strong>. </p>
     68
     69<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
     70
    6971<h3>How can I deactivate my "replacers"?</h3>
    7072<ul>
Note: See TracChangeset for help on using the changeset viewer.