| |
|
1 |
# |
| |
|
2 |
# Copyright (C) 2001, 2002 OpenForce, Inc. |
| |
|
3 |
# |
| |
|
4 |
# This file is part of dotLRN. |
| |
|
5 |
# |
| |
|
6 |
# dotLRN is free software; you can redistribute it and/or modify it under the |
| |
|
7 |
# terms of the GNU General Public License as published by the Free Software |
| |
|
8 |
# Foundation; either version 2 of the License, or (at your option) any later |
| |
|
9 |
# version. |
| |
|
10 |
# |
| |
|
11 |
# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY |
| |
|
12 |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| |
|
13 |
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| |
|
14 |
# details. |
| |
|
15 |
# |
| |
|
16 |
|
| |
|
17 |
ad_library { |
| |
|
18 |
|
| |
|
19 |
Procedures to support the "list" calendar portlet. This is the |
| |
|
20 |
"wide" calendar with the navigation widget and helpful links. Not |
| |
|
21 |
to be confused with the (regular, narrow) calendar portlet that is titled |
| |
|
22 |
"Day Summary" by default. |
| |
|
23 |
|
| |
|
24 |
@creation-date Oct 26 2001 |
| |
|
25 |
@author arjun@openforce.net |
| |
|
26 |
@cvs-id $Id$ |
| |
|
27 |
} |
| |
|
28 |
|
| |
|
29 |
namespace eval calendar_list_portlet { |
| |
|
30 |
|
| |
|
31 |
ad_proc -private my_package_key { |
| |
|
32 |
} { |
| |
|
33 |
return "calendar-portlet" |
| |
|
34 |
} |
| |
|
35 |
|
| |
|
36 |
ad_proc -private get_my_name { |
| |
|
37 |
} { |
| |
|
38 |
return "calendar_list_portlet" |
| |
|
39 |
} |
| |
|
40 |
|
| |
|
41 |
ad_proc -public get_pretty_name { |
| |
|
42 |
} { |
| |
|
43 |
return "Schedule" |
| |
|
44 |
} |
| |
|
45 |
|
| |
|
46 |
ad_proc -public link { |
| |
|
47 |
} { |
| |
|
48 |
return "" |
| |
|
49 |
} |
| |
|
50 |
|
| |
|
51 |
ad_proc -public add_self_to_page { |
| |
|
52 |
{-portal_id:required} |
| |
|
53 |
{-page_name ""} |
| |
|
54 |
{-calendar_id:required} |
| |
|
55 |
} { |
| |
|
56 |
Adds a "list" calendar PE to the given portal |
| |
|
57 |
|
| |
|
58 |
@param portal_id The page to add self to |
| |
|
59 |
@param calendar_id The new calendar_id to add |
| |
|
60 |
|
| |
|
61 |
@return element_id The new element's id |
| |
|
62 |
} { |
| |
|
63 |
return [portal::add_element_or_append_id \ |
| |
|
64 |
-portal_id $portal_id \ |
| |
|
65 |
-page_name $page_name \ |
| |
|
66 |
-portlet_name [get_my_name] \ |
| |
|
67 |
-pretty_name [get_pretty_name] \ |
| |
|
68 |
-value_id $calendar_id \ |
| |
|
69 |
-key calendar_id] |
| |
|
70 |
} |
| |
|
71 |
|
| |
|
72 |
ad_proc -public remove_self_from_page { |
| |
|
73 |
portal_id |
| |
|
74 |
calendar_id |
| |
|
75 |
} { |
| |
|
76 |
Removes a "list" calendar PE from the given page or |
| |
|
77 |
a calendar_id from its params |
| |
|
78 |
} { |
| |
|
79 |
portal::remove_element_or_remove_id \ |
| |
|
80 |
-portal_id $portal_id \ |
| |
|
81 |
-portlet_name [get_my_name] \ |
| |
|
82 |
-key calendar_id \ |
| |
|
83 |
-value_id $calendar_id |
| |
|
84 |
} |
| |
|
85 |
|
| |
|
86 |
ad_proc -public show { |
| |
|
87 |
cf |
| |
|
88 |
} { |
| |
|
89 |
} { |
| |
|
90 |
portal::show_proc_helper \ |
| |
|
91 |
-package_key [my_package_key] \ |
| |
|
92 |
-config_list $cf \ |
| |
|
93 |
-template_src "calendar-list-portlet" |
| |
|
94 |
} |
| |
|
95 |
|
| |
|
96 |
} |