diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-05-08 01:13:13 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-05-08 01:13:13 +0000 |
commit | a2087d46d2ddf577151b072f7bbce58fea735050 (patch) | |
tree | 5e8176ea74d35465908a0e4cd1959840635917aa /template | |
parent | 5dbad41e2e125b6a55e85c5588d96b68f6486ef4 (diff) |
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.
git-svn-id: http://piwigo.org/svn/trunk@2334 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'template')
-rw-r--r-- | template/yoga/admin/plugins_list.tpl | 15 | ||||
-rw-r--r-- | template/yoga/month_calendar.tpl | 14 |
2 files changed, 24 insertions, 5 deletions
diff --git a/template/yoga/admin/plugins_list.tpl b/template/yoga/admin/plugins_list.tpl index 8276cd359..abba01861 100644 --- a/template/yoga/admin/plugins_list.tpl +++ b/template/yoga/admin/plugins_list.tpl @@ -18,9 +18,22 @@ <td>{'Actions'|@translate}</td> </tr> </thead> +{html_head} {*add the style to html head for strict standard compliance*} +<style type="text/css"> +TABLE.table2 TR TD.pluginState {ldelim} + padding-left:16px; +} +TABLE.table2 TR TD.active {ldelim} + background: url({$ROOT_URL}{$themeconf.admin_icon_dir}/plugin_active.gif) no-repeat center left +} +TABLE.table2 TR TD.inactive {ldelim} + background: url({$ROOT_URL}{$themeconf.admin_icon_dir}/plugin_inactive.gif) no-repeat center left +} +</style> +{/html_head} {foreach from=$plugins item=plugin name=plugins_loop} <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}"> - <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}"> + <td class="pluginState{if not empty($plugin.STATE)} {$plugin.STATE}{/if}"> {$plugin.NAME} </td> <td>{$plugin.VERSION}</td> diff --git a/template/yoga/month_calendar.tpl b/template/yoga/month_calendar.tpl index 34f035915..410824b23 100644 --- a/template/yoga/month_calendar.tpl +++ b/template/yoga/month_calendar.tpl @@ -36,7 +36,13 @@ {/foreach} </tr> </thead> - +{html_head} {*add the style to html head for strict standard compliance*} +<style type="text/css"> +TABLE.calMonth TBODY TD, TABLE.calMonth TBODY TD DIV.calImg {ldelim} + width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px; +} +</style> +{/html_head} {foreach from=$chronology_calendar.month_view.weeks item=week} <tr> {foreach from=$week item=day} @@ -44,16 +50,16 @@ {if isset($day.IMAGE)} <td class="calDayCellFull"> <div class="calBackDate">{$day.DAY}</div><div class="calForeDate">{$day.DAY}</div> - <div class="calImg" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;"> + <div class="calImg"> <a href="{$day.U_IMG_LINK}"> <img style="{$day.IMAGE_STYLE}" src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$pwg->l10n_dec('%d element','%d elements', $day.NB_ELEMENTS)}" /> </a> </div> {else} - <td class="calDayCellEmpty" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;">{$day.DAY} + <td class="calDayCellEmpty">{$day.DAY} {/if} {else} - <td class="calDayCellBlank" style="width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;"> + <td class="calDayCellBlank"> {/if} </td> {/foreach} {*day in week*} |