Commit d0bfabc0 authored by mose's avatar mose

[MOD] calendars: added options to choose what is displayed in popup and what is not

parent 3631bb9d
......@@ -44,11 +44,11 @@
{foreach key=id item=cal from=$calendars}
<tr class="{cycle}">
<td>{$id}</td>
<td><a class="tablename" href="tiki-calendar.php?calIds[]={$id}">{$cal.name}</a></td>
<td>{$cal.customlocations}</td>
<td>{$cal.customparticipants}</td>
<td>{$cal.customcategories}</td>
<td>{$cal.customlanguages}</td>
<td><a class="tablename" href="tiki-calendar.php?calIds[]={$id}">{$cal.name}</a>{if $cal.show_calname eq 'y'} v{/if}</td>
<td>{$cal.customlocations}{if $cal.show_location eq 'y'} v{/if}</td>
<td>{$cal.customparticipants}{if $cal.show_participants eq 'y'} v{/if}</td>
<td>{$cal.customcategories}{if $cal.show_category eq 'y'} v{/if}</td>
<td>{$cal.customlanguages}{if $cal.show_language eq 'y'} v{/if}</td>
<td>{$cal.custompriorities}</td>
<td>{$cal.customsubscription}</td>
<td>{$cal.personal}</td>
......@@ -100,31 +100,46 @@ src='pics/icons/key.png' border='0' width='16' height='16' alt='{tr}permissions{
{if $tiki_p_view_categories eq 'y'}
{include file=categorize.tpl}
{/if}
<tr class="formcolor"><td>{tr}Name{/tr}:</td><td><input type="text" name="name" value="{$name|escape}" /></td></tr>
<tr class="formcolor"><td>{tr}Description{/tr}:</td><td><textarea name="description" rows="5" wrap="virtual" style="width:100%;">{$description|escape}</textarea></td></tr>
<tr class="formcolor"><td>{tr}Name{/tr}:</td><td><input type="text" name="name" value="{$name|escape}" />
{tr}Show in popup box{/tr}
<input type="checkbox" name="show[calname]" value="on"{if $show_calname eq 'y'} checked="checked"{/if} />
</td></tr>
<tr class="formcolor"><td>{tr}Description{/tr}:</td><td><textarea name="description" rows="5" wrap="virtual" style="width:100%;">{$description|escape}</textarea>
<br />
{tr}Show in popup box{/tr}
<input type="checkbox" name="show[description]" value="on"{if $show_description eq 'y'} checked="checked"{/if} />
</td></tr>
<tr class="formcolor"><td>{tr}Custom Locations{/tr}:</td><td>
<select name="customlocations">
<option value='y' {if $customlocations eq 'y'}selected="selected"{/if}>{tr}yes{/tr}</option>
<option value='n' {if $customlocations eq 'n'}selected="selected"{/if}>{tr}no{/tr}</option>
</select>
{tr}Show in popup box{/tr}
<input type="checkbox" name="show[location]" value="on"{if $show_location eq 'y'} checked="checked"{/if} />
</td></tr>
<tr class="formcolor"><td>{tr}Custom Participants{/tr}:</td><td>
<select name="customparticipants">
<option value='y' {if $customparticipants eq 'y'}selected="selected"{/if}>{tr}yes{/tr}</option>
<option value='n' {if $customparticipants eq 'n'}selected="selected"{/if}>{tr}no{/tr}</option>
</select>
{tr}Show in popup box{/tr}
<input type="checkbox" name="show[participants]" value="on"{if $show_participants eq 'y'} checked="checked"{/if} />
</td></tr>
<tr class="formcolor"><td>{tr}Custom Categories{/tr}:</td><td>
<select name="customcategories">
<option value='y' {if $customcategories eq 'y'}selected="selected"{/if}>{tr}yes{/tr}</option>
<option value='n' {if $customcategories eq 'n'}selected="selected"{/if}>{tr}no{/tr}</option>
</select>
{tr}Show in popup box{/tr}
<input type="checkbox" name="show[category]" value="on"{if $show_category eq 'y'} checked="checked"{/if} />
</td></tr>
<tr class="formcolor"><td>{tr}Custom Languages{/tr}:</td><td>
<select name="customlanguages">
<option value='y' {if $customlanguages eq 'y'}selected="selected"{/if}>{tr}yes{/tr}</option>
<option value='n' {if $customlanguages eq 'n'}selected="selected"{/if}>{tr}no{/tr}</option>
</select>
{tr}Show in popup box{/tr}
<input type="checkbox" name="show[language]" value="on"{if $show_language eq 'y'} checked="checked"{/if} />
</td></tr>
{if $feature_newsletters eq 'y'}
<tr class="formcolor"><td>{tr}Custom Subscription List{/tr}:</td><td>
......
<div class='opaque'>
<div class='box-title'>{$cellhead}
{if $custompriorities eq 'y'}{if $cellprio}<span class='calprio{$cellprio}' id='calprio'>{$cellprio}</span>{/if}{/if}
{if $show_priority eq 'y' and $custompriorities eq 'y' and $cellprio}<span class='calprio{$cellprio}' id='calprio'>{$cellprio}</span>{/if}
{if $calendar_sticky_popup eq "y" and $cellid}&nbsp;<a onmouseover="javascript:cClick()" title="{tr}close{/tr}">{html_image file='img/icons/close.gif' alt="{tr}close{/tr}"}</a>{/if}
</div>
{if $cellcalname}<div class='box-title'><b>{$cellcalname}</b></div>{/if}
{if $show_calname eq 'y' and $cellcalname}<div class='box-title'><b>{$cellcalname}</b></div>{/if}
{if $cellid}
<div style="text-align:right" class='box-title'>
......@@ -20,10 +20,12 @@ alt="{tr}zoom{/tr}" /></a>&nbsp;{/if}{if $cellmodif eq "y"}<a href="{$cellurl}"
</div>
{/if}
{if $customlocations eq 'y'}{if $celllocation}<div class='box-title'><b>{$celllocation}</b></div>{/if}{/if}
{if $customcategories eq 'y'}{if $cellcategory}<div class='box-title'><b>{$cellcategory}</b></div>{/if}{/if}
{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}
<div class='box-data'>
<b>{$cellname}</b><br />
{$celldescription}
<b>{$cellname}</b>
{if $show_description eq 'y'}
<br />{$celldescription}
{/if}
</div>
</div>
......@@ -36,7 +36,7 @@
{/if}
{/if}
<table>
<table width="100%">
<tr><td>
<table class="normal">
{if $edit}
......@@ -203,7 +203,7 @@
</div>
</td>
<td>
<td align="right" style="text-align:right;">
<div style="display:{if $calendar.custompriorities eq 'y'}block{else}none{/if};width:120px;padding:4px;border:1px solid #888;text-align:center;" id="calprio">
{tr}Priority{/tr}<br />
{if $edit}
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_calendars.php,v 1.26 2006-12-03 02:34:26 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-admin_calendars.php,v 1.27 2006-12-05 10:26:09 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,9 +46,18 @@ 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');
foreach ($extra as $ex) {
if (isset($_REQUEST['show'][$ex]) and $_REQUEST['show'][$ex] == 'on') {
$options["show_$ex"] = 'y';
} else {
$options["show_$ex"] = 'n';
}
}
$_REQUEST["calendarId"] = $calendarlib->set_calendar($_REQUEST["calendarId"],$user,$_REQUEST["name"],$_REQUEST["description"],$customflags,$options);
if ($_REQUEST['personal'] == 'y') {
$userlib->assign_object_permission("Registered", $_REQUEST["calendarId"], "calendar", "tiki_p_view_calendar");
$userlib->assign_object_permission("Registered", $_REQUEST["calendarId"], "calendar", "tiki_p_view_events");
$userlib->assign_object_permission("Registered", $_REQUEST["calendarId"], "calendar", "tiki_p_add_events");
$userlib->assign_object_permission("Registered", $_REQUEST["calendarId"], "calendar", "tiki_p_change_events");
}
......@@ -86,6 +95,12 @@ if ($_REQUEST["calendarId"]) {
$info["customcategories"] = 'n';
$info["custompriorities"] = 'n';
$info["customsubscription"] = '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["user"] = "$user";
$info["personal"] = 'n';
$info["startday"] = '25200';
......@@ -101,6 +116,12 @@ $smarty->assign('customparticipants', $info["customparticipants"]);
$smarty->assign('customcategories', $info["customcategories"]);
$smarty->assign('custompriorities', $info["custompriorities"]);
$smarty->assign('customsubscription', $info["customsubscription"]);
$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('calendarId', $_REQUEST["calendarId"]);
$smarty->assign('personal', $info["personal"]);
$smarty->assign('startday', $info["startday"]);
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/tiki-calendar.php,v 1.59 2006-12-05 07:22:17 mose Exp $
// $Header: /cvsroot/tikiwiki/tiki/tiki-calendar.php,v 1.60 2006-12-05 10:26:09 mose Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
......@@ -252,19 +252,26 @@ for ($i = 0; $i <= $numberofweeks; $i++) {
foreach ($listevents["$dday"] as $le) {
$le['modifiable'] = in_array($le['calendarId'], $modifiable)? "y": "n";
$le['visible'] = in_array($le['calendarId'], $visible)? "y": "n";
$lec = $infocals['data']["{$le['calendarId']}"];
$leday["{$le['time']}$e"] = $le;
$smarty->assign_by_ref('cellhead', $le["head"]);
$smarty->assign_by_ref('cellprio', $le["prio"]);
$smarty->assign_by_ref('cellcalname', $le["calname"]);
$smarty->assign_by_ref('celllocation', $le["location"]);
$smarty->assign_by_ref('cellcategory', $le["category"]);
$smarty->assign_by_ref('cellname', $le["name"]);
$smarty->assign_by_ref('cellurl', $le["url"]);
$smarty->assign_by_ref('cellid', $le["calitemId"]);
$smarty->assign('cellhead', $le["head"]);
$smarty->assign('cellprio', $le["prio"]);
$smarty->assign('cellcalname', $le["calname"]);
$smarty->assign('celllocation', $le["location"]);
$smarty->assign('cellcategory', $le["category"]);
$smarty->assign('cellname', $le["name"]);
$smarty->assign('cellurl', $le["url"]);
$smarty->assign('cellid', $le["calitemId"]);
$smarty->assign('celldescription', $tikilib->parse_data($le["description"]));
$smarty->assign_by_ref('cellmodif', $le['modifiable']);
$smarty->assign_by_ref('cellmodif', $le['modifiable']);
$smarty->assign('cellmodif', $le['modifiable']);
$smarty->assign('cellvisible', $le['visible']);
$smarty->assign('show_calname', $lec['show_calname']);
$smarty->assign('show_description', $lec['show_description']);
$smarty->assign('show_location', $lec['show_location']);
$smarty->assign('show_category', $lec['show_category']);
$smarty->assign('show_language', $lec['show_language']);
$smarty->assign('show_participants', $lec['show_participants']);
$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