4 $SearchType => 'Ticket'
8 <& /Elements/Header, Title => $title &>
11 <&| /Widgets/TitleBox, title => loc('ICal Feeds (ics)') &>
13 <&| /Widgets/TitleBox, title => 'Help' &>
15 <h3>displaying reminders :</h3>
16 <p>If you want to have reminders in a search you need to go in the <a
17 href="<%$RT::WebPath%>/Search/Edit.html"><%loc("Edit Query")%></a> tab
18 of the <%loc("query builder")%> and add something like that :
21 AND ( Type = 'ticket' OR Type = 'reminder' )
25 <h3>displaying other kind of dates :</h3>
26 <p>By default RTx::Calendar display Due and Starts dates. You can
27 select other kind of events you want with the <%loc("Display
28 Columns")%> section in the <a
29 href="<%$RT::WebPath%>/Search/Build.html"><%loc("Query
30 Builder")%></a>. The following one will display the two latter and
34 '<small>__Due__</small>',
35 '<small>__Starts__</small>',
36 '<small>__LastUpdated__</small>'
40 <h3>changing the default query :</h3>
41 <p>You can change the default Query of Calendar.html and MyCalendar
42 portlet by saving a query with the name <code>calendar</code> in the
43 <a href="<%$RT::WebPath%>/Search/Build.html"><%loc("Query
48 <& /Prefs/Elements/CalendarFeed &>
50 % # only allow this part if
55 % # I'm quite sure the loop isn't usefull but...
56 % my @Objects = $session{CurrentUser}->UserObj;
57 % for my $object (@Objects) {
58 % next unless ref($object) eq 'RT::User' && $object->id == $session{'CurrentUser'}->Id;
59 % my @searches = $object->Attributes->Named('SavedSearch');
60 % for my $search (@searches) {
61 % next if ($search->SubValue('SearchType')
62 % && $search->SubValue('SearchType') ne $SearchType);
64 <& /Prefs/Elements/CalendarFeed, Object => $object, Search => $search &>
68 % unless ($search_count) {
70 <&| /Widgets/TitleBox, title => loc('Private Search ICal feeds')
71 , title_class=> 'inverse'
72 , color => "#993333" &>
74 You can add private ICal feeds by saving new queries in <a
75 href="<%$RT::WebPath . '/Search/Build.html'%>">the Query Builder</a>
81 %#<&| /Widgets/TitleBox, title => loc('Private Search ICal feeds')
82 %# , title_class=> 'inverse'
83 %# , color => "#993333" &>
85 %#<%loc('Private search ICal feeds disabled. To enable them, ask your admin for "[_1]" and "[_2]" rights',
86 %# loc('CreateSavedSearch'),
87 %# loc('LoadSavedSearch') )%>
96 use RT::SavedSearches;
98 my $title = loc("Calendar Prefs");
102 if $session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch',
103 Object=> $RT::System );
107 if ($HiddenField && $HiddenField eq 'Private') {
108 $object = $session{CurrentUser}->UserObj;
109 } elsif ($AllowSearch and $HiddenField and my ($SearchId) = $HiddenField =~ m/SavedSearch\-(\d+)/) {
110 $object = $session{CurrentUser}->Attributes->WithId($SearchId);
113 if (defined $ChangeURL) {
114 my @args = $object->SetAttribute(Name => 'ICalURL', Content => Digest::SHA::sha1_base64(time));
115 } elsif (defined $ResetURL) {
116 my @args = $object->DeleteAttribute('ICalURL');