Changeset 2334 for trunk/template/yoga


Ignore:
Timestamp:
May 8, 2008, 3:13:13 AM (17 years ago)
Author:
rvelices
Message:

2 template features:

  • added a {html_head} smarty block - allow any template file to add content just before </head> tag (handy for plugins and allows to move more presentation logic to tpls); the content is usually <style> or <link> which must appear inside html <head> tag
  • by config allow some language strings to be replaced during template compilation -> better performance. drawback: changes in the language file will not be propagated until template is recompiled.
Location:
trunk/template/yoga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/template/yoga/admin/plugins_list.tpl

    r2293 r2334  
    1919  </tr>
    2020</thead>
     21{html_head} {*add the style to html head for strict standard compliance*}
     22<style type="text/css">
     23TABLE.table2 TR TD.pluginState {ldelim}
     24  padding-left:16px;
     25}
     26TABLE.table2 TR TD.active {ldelim}
     27  background: url({$ROOT_URL}{$themeconf.admin_icon_dir}/plugin_active.gif) no-repeat center left
     28}
     29TABLE.table2 TR TD.inactive {ldelim}
     30  background: url({$ROOT_URL}{$themeconf.admin_icon_dir}/plugin_inactive.gif) no-repeat center left
     31}
     32</style>
     33{/html_head}
    2134{foreach from=$plugins item=plugin name=plugins_loop}
    2235        <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}">
    23         <td style="padding-left:16px; {if not empty($plugin.STATE)}background: url({$ROOT_URL}{$themeconf.admin_icon_dir}/plugin_{$plugin.STATE}.gif) no-repeat center left{/if}">
     36        <td class="pluginState{if not empty($plugin.STATE)} {$plugin.STATE}{/if}">
    2437                {$plugin.NAME}
    2538        </td>
  • trunk/template/yoga/month_calendar.tpl

    r2265 r2334  
    3737 </tr>
    3838 </thead>
    39 
     39{html_head} {*add the style to html head for strict standard compliance*}
     40<style type="text/css">
     41TABLE.calMonth TBODY TD, TABLE.calMonth TBODY TD DIV.calImg {ldelim}
     42  width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;
     43}
     44</style>
     45{/html_head}
    4046 {foreach from=$chronology_calendar.month_view.weeks item=week}
    4147 <tr>
     
    4551                        <td class="calDayCellFull">
    4652                                <div class="calBackDate">{$day.DAY}</div><div class="calForeDate">{$day.DAY}</div>
    47                                 <div class="calImg" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;">
     53                                <div class="calImg">
    4854                                        <a href="{$day.U_IMG_LINK}">
    4955                                                <img style="{$day.IMAGE_STYLE}" src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$pwg->l10n_dec('%d element','%d elements', $day.NB_ELEMENTS)}" />
     
    5157                                </div>
    5258                {else}
    53                         <td class="calDayCellEmpty" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;">{$day.DAY}
     59                        <td class="calDayCellEmpty">{$day.DAY}
    5460                {/if}
    5561        {else}
    56                 <td class="calDayCellBlank" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;">
     62                <td class="calDayCellBlank">
    5763        {/if}
    5864        </td>
Note: See TracChangeset for help on using the changeset viewer.