diff options
| author | Nick Palmer <nick@sluggardy.net> | 2007-04-05 21:21:04 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2007-04-05 21:21:04 +0000 |
| commit | eff3066d15180477a842ca9595eaf2525f10b435 (patch) | |
| tree | b2230bb4bd29abbc2f587ae24075dac82c0fd19d /templates | |
| parent | 16f093924f550889173b5cfaeb0e7aee50ea12d1 (diff) | |
| download | calendar-eff3066d15180477a842ca9595eaf2525f10b435.tar.gz calendar-eff3066d15180477a842ca9595eaf2525f10b435.tar.bz2 calendar-eff3066d15180477a842ca9595eaf2525f10b435.zip | |
Add support for new ajax popups in the calendar.
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin_calendar.tpl | 7 | ||||
| -rw-r--r-- | templates/calendar.tpl | 21 | ||||
| -rw-r--r-- | templates/calendar_box.tpl | 4 |
3 files changed, 23 insertions, 9 deletions
diff --git a/templates/admin_calendar.tpl b/templates/admin_calendar.tpl index 9f67f5c..e20aaa0 100644 --- a/templates/admin_calendar.tpl +++ b/templates/admin_calendar.tpl @@ -41,6 +41,13 @@ {html_checkboxes name="calendar_user_prefs" values="y" checked=`$settings.calendar_user_prefs` labels=false id=calendar_user_prefs} {formhelp note="Allow users to set their own calendar preferences."} {/forminput} + + {formlabel label="Ajax Popups" for="calendar_ajax_popups"} + {forminput} + {html_checkboxes name="calendar_ajax_popups" values="y" checked=`$settings.calendar_ajax_popups` labels=false id=calendar_ajax_popups} + {formhelp note="Use ajax for calendar popups. This saves page load time and bandwidth at the expense of requiring javascript."} + {/forminput} + </div> {/if} diff --git a/templates/calendar.tpl b/templates/calendar.tpl index 314f1e7..786b62b 100644 --- a/templates/calendar.tpl +++ b/templates/calendar.tpl @@ -1,4 +1,4 @@ -{* $Header: /cvsroot/bitweaver/_bit_calendar/templates/calendar.tpl,v 1.44 2007/04/05 18:33:12 nickpalmer Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_calendar/templates/calendar.tpl,v 1.45 2007/04/05 21:21:04 nickpalmer Exp $ *} {strip} {if !$gBitSystem->isFeatureActive( 'site_help_popup' )} {popup_init src="`$smarty.const.UTIL_PKG_URL`javascript/libs/overlib.js"} @@ -8,8 +8,8 @@ <div class="header"> <h1>{tr}Calendar{/tr}</h1> </div> - <div class="body"> + <script type="text/javascript">/*<![CDATA[*/ show_spinner('spinner'); /*]]>*/</script> {jstabs} {jstab title="Calendar"} {* this is used to keep stuff like sort_mode persistent in all links on this page *} @@ -30,9 +30,10 @@ {foreach from=$time.items item=item} {assign var=over value=$item.over} <div class="cal{$item.content_type_guid}"> - <a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$item.content_id}"> - <img style="padding:0px 4px;" src="{biticon ipackage="icons" iname="list-add" iexplain="Detailed Information" url=true}" title="{tr}Detailed Information{/tr}" {popup fullhtml="1" text=$over|escape:"javascript"|escape:"html"} /> {$item.title|escape|default:"?"} - </a> + <a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$item.content_id}"> + {capture assign=itemurl}{$smarty.const.CALENDAR_PKG_URL}box.php?content_id={$item.content_id}{/capture} + <img style="padding:0px 4px;" src="{biticon ipackage="icons" iname="list-add" iexplain="Detailed Information" url=true}" title="{tr}Detailed Information{/tr}" {if $gBitSystem->isFeatureActive('calendar_ajax_popups')}{popup fullhtml="1" target=$itemurl}{else}{popup fullhtml="1" text=$over|escape:"javascript"|escape:"html"}{/if} /> {$item.title|escape|default:"?"} + </a> </div> {/foreach} </td> @@ -55,10 +56,11 @@ {if $day.day|cal_date_format:"%m" eq $navigation.focus_month or $smarty.session.calendar.view_mode eq "week"} {foreach from=$day.items item=item} {assign var=over value=$item.over} + {capture assign=itemurl}{$smarty.const.CALENDAR_PKG_URL}box.php?content_id={$item.content_id}{/capture} <div class="cal{$item.content_type_guid}" style="float:left;width:50%;"> <a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$item.content_id}"> - <img style="padding:0px 4px;" src="{biticon ipackage="icons" iname="list-add" iexplain="Detailed Information" url=true}" title="{tr}Detailed Information{/tr}" {popup fullhtml="1" text=$over|escape:"javascript"|escape:"html"} /> {$item.title|escape|default:"?"} - </a> + <img style="padding:0px 4px;" src="{biticon ipackage="icons" iname="list-add" iexplain="Detailed Information" url=true}" title="{tr}Detailed Information{/tr}" {if $gBitSystem->isFeatureActive('calendar_ajax_popups')}{popup fullhtml="1" target=$itemurl}{else}{popup fullhtml="1" text=$over|escape:"javascript"|escape:"html"}{/if} /> {$item.title|escape|default:"?"} + </a> </div> {/foreach} {else} @@ -99,10 +101,11 @@ {* - Cell Content - *} {foreach from=$day.items item=item} {assign var=over value=$item.over} + {capture assign=itemurl}{$smarty.const.CALENDAR_PKG_URL}box.php?content_id={$item.content_id}{/capture} <div class="cal{$item.content_type_guid}"> <a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$item.content_id}"> - <img style="padding:0px 4px;" src="{biticon ipackage="icons" iname="list-add" iexplain="Detailed Information" url=true}" title="{tr}Detailed Information{/tr}" {popup fullhtml="1" text=$over|escape:"javascript"|escape:"html"} /> {$item.title|escape|truncate:$trunc:"..."|default:"?"} - </a> + <img style="padding:0px 4px;" src="{biticon ipackage="icons" iname="list-add" iexplain="Detailed Information" url=true}" title="{tr}Detailed Information{/tr}" {if $gBitSystem->isFeatureActive('calendar_ajax_popups')}{popup fullhtml="1" target=$itemurl}{else}{popup fullhtml="1" text=$over|escape:"javascript"|escape:"html"}{/if} /> {$item.title|escape|truncate:$trunc:"..."|default:"?"} + </a> </div> {/foreach} {else} diff --git a/templates/calendar_box.tpl b/templates/calendar_box.tpl index e434f8a..f72bdf2 100644 --- a/templates/calendar_box.tpl +++ b/templates/calendar_box.tpl @@ -1,5 +1,6 @@ {strip} <div class="calendar popup box"> +{if $cellHash.content_id} <h3>{$cellHash.title|escape}</h3> {if $cellHash.content_type_guid == 'bitevents' && $gBitSystem->isPackageActive('events')} <div class="center"> @@ -15,5 +16,8 @@ <strong>{tr}Last modified{/tr}</strong>: {displayname login=$cellHash.modifier_user real_name=$cellHash.modifier_real_name}<br />{$cellHash.last_modified|cal_date_format:"%Y-%m-%d - %H:%M %Z"} </div> {/if} +{else} +<div class=error>{tr}No such content.{/tr}</div> +{/if} </div> {/strip} |
