From ab9be1d2bfedf205eab7a9d399ef22ee14117f53 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 19 May 2010 02:32:01 +0000 Subject: add RTx::Calendar 0.07 --- rt/share/html/Prefs/Elements/CalendarFeed | 68 +++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 rt/share/html/Prefs/Elements/CalendarFeed (limited to 'rt/share/html/Prefs/Elements') diff --git a/rt/share/html/Prefs/Elements/CalendarFeed b/rt/share/html/Prefs/Elements/CalendarFeed new file mode 100644 index 000000000..46893435e --- /dev/null +++ b/rt/share/html/Prefs/Elements/CalendarFeed @@ -0,0 +1,68 @@ +<%args> +$Search => undef +$Object => undef +$HiddenField => undef + + +<&| /Widgets/TitleBox, title => $title &> + +% if ($FeedText) { +

<%$FeedText%>

+% } else { +This feed will show tickets with due date find with query:
+"<%$Search->SubValue('Query')%>". +% } + +% if ($ICalURL) { +

Your can paste this url in your calendar : <%$link%>

+ + + + + +
+
+ + +
+
+
+ + +
+
+% } else { + +

+ + +
+% } + + + +<%init> +my $title; +my $ICalURL; +my $Id; +my $FeedText; +my $link; + +if ($Object) { + $title = loc('Feed for "') . ($Search->Description || loc('Unnamed search')) . '" search'; + $HiddenField = "SavedSearch-" . $Search->Id; + $ICalURL = $Search->FirstAttribute('ICalURL'); + $Id = $session{CurrentUser}->Id . "@" . $Search->Id; + $title .= " (disabled)" unless $ICalURL; +} else { + $title = loc('Feed for default calendar'); + $HiddenField = "Private"; + $ICalURL = $session{CurrentUser}->UserObj->FirstAttribute('ICalURL'); + $Id = $session{CurrentUser}->Id; + $FeedText = "This feed will show yours and Nobody's tasks with due date."; +} + +$link = $RT::WebURL . "NoAuth/Calendar/" . $Id . "/" . $ICalURL->Content + if $ICalURL; + + \ No newline at end of file -- cgit v1.2.1