4 $SearchType => 'Ticket'
8 <& /Elements/Header, Title => $title &>
9 <& /User/Elements/Tabs,
10 current_tab => 'Prefs/Calendar.html',
14 <&| /Widgets/TitleBox, title => loc('ICal Feeds (ics)') &>
16 <&| /Widgets/TitleBox, title => 'Help' &>
18 <h3>displaying reminders :</h3>
19 <p>If you want to have reminders in a search you need to go in the <a
20 href="<%$RT::WebPath%>/Search/Edit.html"><%loc("Edit Query")%></a> tab
21 of the <%loc("query builder")%> and add something like that :
24 AND ( Type = 'ticket' OR Type = 'reminder' )
28 <h3>displaying other kind of dates :</h3>
29 <p>By default RTx::Calendar display Due and Starts dates. You can
30 select other kind of events you want with the <%loc("Display
31 Columns")%> section in the <a
32 href="<%$RT::WebPath%>/Search/Build.html"><%loc("Query
33 Builder")%></a>. The following one will display the two latter and
37 '<small>__Due__</small>',
38 '<small>__Starts__</small>',
39 '<small>__LastUpdated__</small>'
43 <h3>changing the default query :</h3>
44 <p>You can change the default Query of Calendar.html and MyCalendar
45 portlet by saving a query with the name <code>calendar</code> in the
46 <a href="<%$RT::WebPath%>/Search/Build.html"><%loc("Query
51 <& /Prefs/Elements/CalendarFeed &>
53 % # only allow this part if
58 % # I'm quite sure the loop isn't usefull but...
59 % my @Objects = $session{CurrentUser}->UserObj;
60 % for my $object (@Objects) {
61 % next unless ref($object) eq 'RT::User' && $object->id == $session{'CurrentUser'}->Id;
62 % my @searches = $object->Attributes->Named('SavedSearch');
63 % for my $search (@searches) {
64 % next if ($search->SubValue('SearchType')
65 % && $search->SubValue('SearchType') ne $SearchType);
67 <& /Prefs/Elements/CalendarFeed, Object => $object, Search => $search &>
71 % unless ($search_count) {
73 <&| /Widgets/TitleBox, title => loc('Private Search ICal feeds')
74 , title_class=> 'inverse'
75 , color => "#993333" &>
77 You can add private ICal feeds by saving new queries in <a
78 href="<%$RT::WebPath . '/Search/Build.html'%>">the Query Builder</a>
84 %#<&| /Widgets/TitleBox, title => loc('Private Search ICal feeds')
85 %# , title_class=> 'inverse'
86 %# , color => "#993333" &>
88 %#<%loc('Private search ICal feeds disabled. To enable them, ask your admin for "[_1]" and "[_2]" rights',
89 %# loc('CreateSavedSearch'),
90 %# loc('LoadSavedSearch') )%>
99 use RT::SavedSearches;
101 my $title = loc("Calendar Prefs");
105 if $session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch',
106 Object=> $RT::System );
110 if ($HiddenField eq 'Private') {
111 $object = $session{CurrentUser}->UserObj;
112 } elsif ($AllowSearch and my ($SearchId) = $HiddenField =~ m/SavedSearch\-(\d+)/) {
113 $object = $session{CurrentUser}->Attributes->WithId($SearchId);
116 if (defined $ChangeURL) {
117 my @args = $object->SetAttribute(Name => 'ICalURL', Content => Digest::SHA1::sha1_base64(time));
118 } elsif (defined $ResetURL) {
119 my @args = $object->DeleteAttribute('ICalURL');