Commit e7d5a342 authored by mose's avatar mose

[MOD] calendar: made url field optional

parent 117d4a16
......@@ -34,6 +34,7 @@
<td class="heading"><a class="tableheading" href="tiki-admin_calendars.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'customparticipants_desc'}customparticipants_asc{else}customparticipants_desc{/if}">{tr}participants{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_calendars.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'customcategories_desc'}customcategories_asc{else}customcategories_desc{/if}">{tr}cat{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_calendars.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'customlanguages_desc'}customlanguages_asc{else}customlanguages_desc{/if}">{tr}lang{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_calendars.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'customurl_desc'}customurl_asc{else}customurl_desc{/if}">{tr}url{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_calendars.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'custompriorities_desc'}custompriorities_asc{else}custompriorities_desc{/if}">{tr}prio{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_calendars.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'customsubscription_desc'}customsubscription_asc{else}customsubscription_desc{/if}">{tr}subscription{/tr}</a></td>
<td class="heading"><a class="tableheading" href="tiki-admin_calendars.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'personal_desc'}personal_asc{else}personal_desc{/if}">{tr}perso{/tr}</a></td>
......@@ -49,6 +50,7 @@
<td>{$cal.customparticipants}{if $cal.show_participants eq 'y'} +{/if}</td>
<td>{$cal.customcategories}{if $cal.show_category eq 'y'} +{/if}</td>
<td>{$cal.customlanguages}{if $cal.show_language eq 'y'} +{/if}</td>
<td>{$cal.customurl}{if $cal.show_url eq 'y'} +{/if}</td>
<td>{$cal.custompriorities}</td>
<td>{$cal.customsubscription}</td>
<td>{$cal.personal}</td>
......@@ -141,6 +143,14 @@ src='pics/icons/key.png' border='0' width='16' height='16' alt='{tr}permissions{
{tr}Show in popup box{/tr}
<input type="checkbox" name="show[language]" value="on"{if $show_language eq 'y'} checked="checked"{/if} />
</td></tr>
<tr class="formcolor"><td>{tr}Custom URL{/tr}:</td><td>
<select name="options[customurl]">
<option value='y' {if $customurl eq 'y'}selected="selected"{/if}>{tr}yes{/tr}</option>
<option value='n' {if $customurl eq 'n'}selected="selected"{/if}>{tr}no{/tr}</option>
</select>
{tr}Show in popup box{/tr}
<input type="checkbox" name="show[url]" value="on"{if $show_url eq 'y'} checked="checked"{/if} />
</td></tr>
{if $feature_newsletters eq 'y'}
<tr class="formcolor"><td>{tr}Custom Subscription List{/tr}:</td><td>
<select name="customsubscription">
......
......@@ -22,6 +22,7 @@ alt="{tr}zoom{/tr}" /></a>&nbsp;{/if}{if $cellmodif eq "y"}<a href="{$cellurl}"
{if $show_location eq 'y' and $customlocations eq 'y' and $celllocation}<div class='box-title'><b>{$celllocation}</b></div>{/if}
{if $show_category eq 'y' and $customcategories eq 'y' and $cellcategory}<div class='box-title'><b>{$cellcategory}</b></div>{/if}
{if $show_url eq 'y' and $customurl eq 'y' and $cellurl}<div class='box-title'><a href="{$cellurl|escape:'url'}" title="{$cellurl|escape:'url'}">{$url|truncate:32:'...'}</a></div>{/if}
<div class='box-data'>
<b>{$cellname}</b>
{if $show_description eq 'y'}
......
......@@ -76,7 +76,11 @@
<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex+1);"><img src="pics/icons/plus_small.png" height="8" width="11" border="0" align="left" /></a>
</td>
<td rowspan="2" style="border:0;padding-top:2px;">
{if $feature_jscalendar eq 'y'}
{jscalendar id="start" date=$calitem.start fieldname="save[date_start]" align="Bc" showtime='n'}
{else}
{html_select_date prefix="start_date_" time=$calitem.start}
{/if}
</td>
<td style="border:0;padding-top:2px;">
<a href="#" onclick="document.f.start_Hour.selectedIndex=(document.f.start_Hour.selectedIndex+1);"><img src="pics/icons/plus_small.png" height="8" width="11" border="0" align="left" /></a>
......@@ -109,7 +113,11 @@
<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex+1);"><img src="pics/icons/plus_small.png" height="8" width="11" border="0" align="left" /></a>
</td>
<td rowspan="2" style="border:0;">
{if $feature_jscalendar eq 'y'}
{jscalendar id="end" date=$calitem.end fieldname="save[date_end]" align="Bc" showtime='n'}
{else}
{html_select_date prefix="start_date_" time=$calitem.start}
{/if}
</td>
<td style="border:0;padding-top:2px;">
<a href="#" onclick="document.f.end_Hour.selectedIndex=(document.f.end_Hour.selectedIndex+1);"><img src="pics/icons/plus_small.png" height="8" width="11" border="0" align="left" /></a>
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_calendars.php,v 1.27 2006-12-05 10:26:09 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_calendars.php,v 1.28 2006-12-08 11:03:56 mose Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -46,7 +46,7 @@ if (isset($_REQUEST["save"])) {
$options = $_REQUEST['options'];
$options['startday'] = $_REQUEST['startday_Hour']*60*60 - 1;
$options['endday'] = $_REQUEST['endday_Hour']*60*60 - 1;
$extra = array('calname','description','location','description','language','category','participants');
$extra = array('calname','description','location','description','language','category','participants','url');
foreach ($extra as $ex) {
if (isset($_REQUEST['show'][$ex]) and $_REQUEST['show'][$ex] == 'on') {
$options["show_$ex"] = 'y';
......@@ -95,12 +95,14 @@ if ($_REQUEST["calendarId"]) {
$info["customcategories"] = 'n';
$info["custompriorities"] = 'n';
$info["customsubscription"] = 'n';
$info["customurl"] = 'n';
$info["show_calname"] = 'y';
$info["show_description"] = 'y';
$info["show_category"] = 'n';
$info["show_location"] = 'n';
$info["show_language"] = 'n';
$info["show_participants"] = 'n';
$info["show_url"] = 'n';
$info["user"] = "$user";
$info["personal"] = 'n';
$info["startday"] = '25200';
......@@ -116,12 +118,14 @@ $smarty->assign('customparticipants', $info["customparticipants"]);
$smarty->assign('customcategories', $info["customcategories"]);
$smarty->assign('custompriorities', $info["custompriorities"]);
$smarty->assign('customsubscription', $info["customsubscription"]);
$smarty->assign('customurl', $info["customurl"]);
$smarty->assign('show_calname', $info["show_calname"]);
$smarty->assign('show_description', $info["show_description"]);
$smarty->assign('show_category', $info["show_category"]);
$smarty->assign('show_location', $info["show_location"]);
$smarty->assign('show_language', $info["show_language"]);
$smarty->assign('show_participants', $info["show_participants"]);
$smarty->assign('show_url', $info["show_url"]);
$smarty->assign('calendarId', $_REQUEST["calendarId"]);
$smarty->assign('personal', $info["personal"]);
$smarty->assign('startday', $info["startday"]);
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-calendar.php,v 1.60 2006-12-05 10:26:09 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-calendar.php,v 1.61 2006-12-08 11:03:56 mose Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
......@@ -272,6 +272,7 @@ for ($i = 0; $i <= $numberofweeks; $i++) {
$smarty->assign('show_category', $lec['show_category']);
$smarty->assign('show_language', $lec['show_language']);
$smarty->assign('show_participants', $lec['show_participants']);
$smarty->assign('show_url', $lec['show_url']);
$leday["{$le['time']}$e"]["over"] = $smarty->fetch("tiki-calendar_box.tpl");
$e++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment