Changeset 2924 for branches/2.0/admin


Ignore:
Timestamp:
Dec 6, 2008, 3:31:02 AM (15 years ago)
Author:
patdenice
Message:

merge -c2923 from trunk to branch 2.0.

  • Add a "Bound Template" column for template extensions.
Location:
branches/2.0/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/admin/extend_for_templates.php

    r2713 r2924  
    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  }
  • branches/2.0/admin/template/goto/default-layout.css

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

    r2531 r2924  
    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}
Note: See TracChangeset for help on using the changeset viewer.