Index: openacs-4/packages/xowiki/lib/portlets/calendar-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/portlets/calendar-portlet.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/lib/portlets/calendar-portlet.adp 19 Aug 2022 19:35:17 -0000 1.1.2.1 @@ -0,0 +1,5 @@ + + Index: openacs-4/packages/xowiki/lib/portlets/calendar-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/portlets/calendar-portlet.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/lib/portlets/calendar-portlet.tcl 19 Aug 2022 19:35:17 -0000 1.1.2.1 @@ -0,0 +1,18 @@ +ad_include_contract { + Calendar portlet +} { +} + +::xo::Page requireCSS "/resources/calendar/calendar.css" + +set date [dt_sysdate] +proc my_get_url_stub {args} { + return /dotlrn/calendar +} +set url_stub_callback "my_get_url_stub" + +# Local variables: +# mode: tcl +# tcl-indent-level: 2 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/xowiki/lib/portlets/forums-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/portlets/forums-portlet.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/lib/portlets/forums-portlet.adp 19 Aug 2022 19:35:17 -0000 1.1.2.1 @@ -0,0 +1,2 @@ + + Index: openacs-4/packages/xowiki/lib/portlets/forums-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/portlets/forums-portlet.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/lib/portlets/forums-portlet.tcl 19 Aug 2022 19:35:17 -0000 1.1.2.1 @@ -0,0 +1,23 @@ +ad_include_contract { + Show the forum portlets for the current user +} + +set portal_id [dotlrn::get_portal_id -user_id [ad_conn user_id]] +set config(shaded_p) f +set config(package_id) [::xo::dc list -prepare integer get_forum_ids { + select value + from portal_pages, + portal_element_map, + portal_element_parameters + where portal_id = :portal_id + and portal_pages.page_id = portal_element_map.page_id + and portal_element_parameters.element_id = portal_element_map.element_id + and portal_element_map.name = 'forums_portlet' + and key = 'package_id' +}] +set cf [array get config] +# Local variables: +# mode: tcl +# tcl-indent-level: 2 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/xowiki/lib/portlets/include.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/portlets/include.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/lib/portlets/include.tcl 19 Aug 2022 19:35:17 -0000 1.1.2.1 @@ -0,0 +1,17 @@ +ad_page_contract { + Portlet include +} { + __including_page + portlet +} + +#ns_log notice "--including_page= $__including_page, portlet=$portlet" +set content [$__including_page include $portlet] +#set header_stuff [::xo::Page header_stuff] +template::set_file [ad_file dirname $__adp_stub]/plain-include + +# Local variables: +# mode: tcl +# tcl-indent-level: 2 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/xowiki/lib/portlets/plain-include.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/portlets/plain-include.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/lib/portlets/plain-include.adp 19 Aug 2022 19:35:17 -0000 1.1.2.1 @@ -0,0 +1 @@ +@content;noquote@ Index: openacs-4/packages/xowiki/lib/portlets/portlet-skin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/portlets/portlet-skin.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/lib/portlets/portlet-skin.adp 19 Aug 2022 19:35:17 -0000 1.1.2.1 @@ -0,0 +1,6 @@ +
+@name@ +
+
+@content;noquote@ +
Index: openacs-4/packages/xowiki/lib/portlets/weblog-mini-calendar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/portlets/weblog-mini-calendar.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/lib/portlets/weblog-mini-calendar.adp 19 Aug 2022 19:35:17 -0000 1.1.2.1 @@ -0,0 +1,53 @@ + + + + + + + + +
+ + + + + + +
+ + #acs-kernel.common_previous# + + @curr_month@ @year@ + + #acs-kernel.common_next# + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
@days_of_week.day_short@
+ @days.count@ @days.day_number@ @days.day_number@
+ +
Index: openacs-4/packages/xowiki/lib/portlets/weblog-mini-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/lib/portlets/weblog-mini-calendar.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/lib/portlets/weblog-mini-calendar.tcl 19 Aug 2022 19:35:17 -0000 1.1.2.1 @@ -0,0 +1,205 @@ +ad_include_contract { + Weblog Mini Calendar Portlet Include +} { + __including_page:token,notnull + {summary:boolean false} + {noparens:boolean false} +} + +::xo::Page requireCSS "/resources/calendar/calendar.css" +set package_id [::xo::cc package_id] +set parent_id [$__including_page set parent_id] +set including_item_id [$__including_page set item_id] + +if {![info exists base_url] || $base_url eq ""} { + if {![info exists page]} { + set page [::$package_id get_parameter weblog_page] + } + set base_url [::$package_id pretty_link -parent_id $parent_id -path_encode false $page] +} + +set date [ns_queryget date] +if {$date eq ""} { + set date [dt_sysdate] +} + +array set message_key_array { + list #acs-datetime.List# + day #acs-datetime.Day# + week #acs-datetime.Week# + month #acs-datetime.Month# +} + +# Get the current month, day, and the first day of the month +ad_try { + dt_get_info $date +} on error {errorMsg} { + # if dt_get_info fails from the provided date, try it with the + # sysdate. + set date [dt_sysdate] + dt_get_info $date +} + +set now [clock scan $date] +set prev_mon [clock scan "1 month ago" -base $now] +set next_mon [clock scan "1 month" -base $now] + +set date_list [dt_ansi_to_list $date] +set year [util::trim_leading_zeros [lindex $date_list 0]] +set month [util::trim_leading_zeros [lindex $date_list 1]] +set day [util::trim_leading_zeros [lindex $date_list 2]] + +set months_list [dt_month_names] +set curr_month_idx [expr {[util::trim_leading_zeros [clock format $now -format "%m"]]-1}] +set curr_month [lindex $months_list $curr_month_idx ] + +set first_day_of_week [lc_get firstdayofweek] +set week_days [lc_get abday] +multirow create days_of_week day_short +for {set i 0} {$i < 7} {incr i} { + multirow append days_of_week [lindex $week_days [expr {($i + $first_day_of_week) % 7}]] +} + +set date_reference $year-$month-01 +set innersql "from xowiki_pagei p, cr_items ci \ + where ci.parent_id = :parent_id \ + and ci.item_id = p.item_id and ci.live_revision = p.page_id \ + and ci.content_type not in ('::xowiki::PageTemplate', '::xowiki::Form') \ + and ci.item_id != :including_item_id \ + and ci.publish_status <> 'production' " + +xo::dc foreach entries_this_month "select count(ci.item_id) as c, + [::xo::dc date_trunc day p.publish_date] as d \ + $innersql + and [::xo::dc date_trunc_expression month p.publish_date :date_reference] \ + group by [::xo::dc date_trunc day p.publish_date]" { + set entries([lindex $d 0]) $c + } + +# +# The following time range specifies the dates between the navigation +# arrows of the weblog mini calendar should be. Without a limitation, +# crawler will iterate over these pages until they reach infinite past +# or infinite future. +# +#set earliest_date "2006-01-1" +#set latest_date "1 year" +# +# Compute the available time range +# +set dates [db_list_of_lists get_dates "select min([::xo::dc date_trunc day p.publish_date]),max([::xo::dc date_trunc day p.publish_date]) $innersql"] +set earliest_date [::xo::db::tcl_date [lindex $dates 0 0] _] +set latest_date [::xo::db::tcl_date [lindex $dates 0 end] _] + +if {$prev_mon < [clock scan $earliest_date]} { + set prev_month_url "" +} else { + set prev_month [clock format $prev_mon -format "%Y-%m-%d"] + set prev_month_url [export_vars -base $base_url {{date $prev_month} page_num summary}] +} +if {$next_mon > [clock scan $latest_date]} { + set next_month_url "" +} else { + set next_month [clock format $next_mon -format "%Y-%m-%d"] + set next_month_url [export_vars -base $base_url {{date $next_month} page_num summary}] +} + + +multirow create days day_number beginning_of_week_p end_of_week_p today_p active_p url id count class + +set day_of_week 1 + +# Calculate number of active days +set active_days_before_month [expr {[dt_first_day_of_month $year $month] -1}] +set active_days_before_month [expr {($active_days_before_month + 7 - $first_day_of_week) % 7}] + +set calendar_starts_with_julian_date [expr {$first_julian_date_of_month - $active_days_before_month}] +set day_number [expr {$days_in_last_month - $active_days_before_month + 1}] + +set js "" +for {set julian_date $calendar_starts_with_julian_date} {$julian_date <= $last_julian_date + 7} {incr julian_date} { + + if {$julian_date > $last_julian_date_in_month && $end_of_week_p == "t" } { + break + } + set today_p f + set active_p t + + if {$julian_date < $first_julian_date_of_month} { + set active_p f + } elseif {$julian_date > $last_julian_date_in_month} { + set active_p f + } + set ansi_date [dt_julian_to_ansi $julian_date] + + if {$julian_date == $first_julian_date_of_month} { + set day_number 1 + } elseif {$julian_date == $last_julian_date_in_month +1} { + set day_number 1 + } + + if {$julian_date == $julian_date_today} { + set today_p t + } + + if { $day_of_week == 1} { + set beginning_of_week_p t + } else { + set beginning_of_week_p f + } + + if { $day_of_week == 7 } { + set day_of_week 0 + set end_of_week_p t + } else { + set end_of_week_p f + } + # ns_log notice "--D julian_date = $julian_date [dt_julian_to_ansi $julian_date] //$ansi_date" + set count [expr {[info exists entries($ansi_date)] ? + ($noparens ? "$entries($ansi_date)" : "($entries($ansi_date))") + : ""}] + if {$today_p} { + set class today + } elseif {$active_p} { + set class active + } else { + set class inactive + } + set url [export_vars -base $base_url {{date $ansi_date} summary}] + + set id minicalendar-$ansi_date + if {$count ne ""} { + append js [subst { + document.getElementById('$id').addEventListener('click', function (event) { + event.preventDefault(); + window.location.href='$url'; + return false; + }); + }] + } + + multirow append days $day_number $beginning_of_week_p $end_of_week_p $today_p $active_p \ + $url $id $count $class + incr day_number + incr day_of_week +} + +if {$js ne ""} { + template::add_body_script -script $js +} + + +set sysdate [dt_sysdate] +set today_url [export_vars -base $base_url {{date $sysdate} page_num}] +if {$sysdate eq $date} { + set today_p t +} else { + set today_p f +} + + +# Local variables: +# mode: tcl +# tcl-indent-level: 2 +# indent-tabs-mode: nil +# End: Index: openacs-4/packages/xowiki/resources/templates/oacs-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/oacs-view.adp,v diff -u -N -r1.5.2.7 -r1.5.2.8 --- openacs-4/packages/xowiki/resources/templates/oacs-view.adp 26 Aug 2020 11:16:11 -0000 1.5.2.7 +++ openacs-4/packages/xowiki/resources/templates/oacs-view.adp 19 Aug 2022 19:35:17 -0000 1.5.2.8 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ @@ -40,7 +40,7 @@ margin-left: 6px; margin-top: 6px; padding: 0px; ">
-
Index: openacs-4/packages/xowiki/resources/templates/oacs-view2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/oacs-view2.adp,v diff -u -N -r1.5.2.7 -r1.5.2.8 --- openacs-4/packages/xowiki/resources/templates/oacs-view2.adp 26 Aug 2020 11:16:11 -0000 1.5.2.7 +++ openacs-4/packages/xowiki/resources/templates/oacs-view2.adp 19 Aug 2022 19:35:17 -0000 1.5.2.8 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ @@ -41,7 +41,7 @@ margin-left: 6px; margin-top: 6px; padding: 0px; ">
-
@@ -65,14 +65,14 @@ margin-left: 6px; margin-top: 6px; padding: 0px; ">
- - -
-
Contributors Index: openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/Attic/oacs-view3-bootstrap.adp,v diff -u -N --- openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap.adp 7 Aug 2017 23:48:30 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,95 +0,0 @@ - - @title;literal@ - @context;literal@ - @item_id;literal@ - property_body - property_doc - - - - - - - @header_stuff;literal@ - - - - -
- - -
- -
- @top_includelets;noquote@ -

@title@ (@page_context@)

-

@title@

- -
@folderhtml;noquote@
-
@content;noquote@
-
- @content;noquote@ -
- -
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- - Contributors -
-
- -
-
- -
-
-
-
- -
-
-
- @footer;noquote@ -
-
- -
Index: openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap3.adp,v diff -u -N -r1.5.2.7 -r1.5.2.8 --- openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap3.adp 26 Aug 2020 11:16:11 -0000 1.5.2.7 +++ openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap3.adp 19 Aug 2022 19:35:17 -0000 1.5.2.8 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ @@ -64,29 +64,29 @@
- +
- +
- +
- +
Index: openacs-4/packages/xowiki/resources/templates/oacs-view3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/oacs-view3.adp,v diff -u -N -r1.5.2.7 -r1.5.2.8 --- openacs-4/packages/xowiki/resources/templates/oacs-view3.adp 26 Aug 2020 11:16:11 -0000 1.5.2.7 +++ openacs-4/packages/xowiki/resources/templates/oacs-view3.adp 19 Aug 2022 19:35:17 -0000 1.5.2.8 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ @@ -49,14 +49,14 @@ margin-left: 6px; margin-top: 6px; padding: 0px; ">
- - -
-
Contributors @@ -67,7 +67,7 @@ margin-left: 6px; margin-top: 6px; padding: 0px; ">
-
Index: openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.adp,v diff -u -N -r1.5.2.7 -r1.5.2.8 --- openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.adp 26 Aug 2020 11:16:11 -0000 1.5.2.7 +++ openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.adp 19 Aug 2022 19:35:17 -0000 1.5.2.8 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ Index: openacs-4/packages/xowiki/resources/templates/view-book.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-book.adp,v diff -u -N -r1.5.2.7 -r1.5.2.8 --- openacs-4/packages/xowiki/resources/templates/view-book.adp 26 Aug 2020 11:16:11 -0000 1.5.2.7 +++ openacs-4/packages/xowiki/resources/templates/view-book.adp 19 Aug 2022 19:35:17 -0000 1.5.2.8 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ Index: openacs-4/packages/xowiki/resources/templates/view-default.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-default.adp,v diff -u -N -r1.5.2.7 -r1.5.2.8 --- openacs-4/packages/xowiki/resources/templates/view-default.adp 26 Aug 2020 11:16:11 -0000 1.5.2.7 +++ openacs-4/packages/xowiki/resources/templates/view-default.adp 19 Aug 2022 19:35:17 -0000 1.5.2.8 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ Index: openacs-4/packages/xowiki/resources/templates/view-links.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-links.adp,v diff -u -N -r1.5.2.7 -r1.5.2.8 --- openacs-4/packages/xowiki/resources/templates/view-links.adp 26 Aug 2020 11:16:11 -0000 1.5.2.7 +++ openacs-4/packages/xowiki/resources/templates/view-links.adp 19 Aug 2022 19:35:17 -0000 1.5.2.8 @@ -1,4 +1,4 @@ - +
Index: openacs-4/packages/xowiki/resources/templates/view-plain-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-plain-master.adp,v diff -u -N -r1.1.2.6 -r1.1.2.7 --- openacs-4/packages/xowiki/resources/templates/view-plain-master.adp 26 Aug 2020 11:16:11 -0000 1.1.2.6 +++ openacs-4/packages/xowiki/resources/templates/view-plain-master.adp 19 Aug 2022 19:35:17 -0000 1.1.2.7 @@ -1,4 +1,4 @@ - + @context;literal@ @item_id;literal@ Index: openacs-4/packages/xowiki/resources/templates/view-plain.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-plain.adp,v diff -u -N -r1.5.2.7 -r1.5.2.8 --- openacs-4/packages/xowiki/resources/templates/view-plain.adp 26 Aug 2020 11:16:11 -0000 1.5.2.7 +++ openacs-4/packages/xowiki/resources/templates/view-plain.adp 19 Aug 2022 19:35:17 -0000 1.5.2.8 @@ -1,4 +1,4 @@ - +
Index: openacs-4/packages/xowiki/www/portlets/calendar-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/calendar-portlet.adp,v diff -u -N --- openacs-4/packages/xowiki/www/portlets/calendar-portlet.adp 14 Jul 2015 22:19:19 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,5 +0,0 @@ - - Index: openacs-4/packages/xowiki/www/portlets/calendar-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/calendar-portlet.tcl,v diff -u -N --- openacs-4/packages/xowiki/www/portlets/calendar-portlet.tcl 20 Dec 2019 16:42:13 -0000 1.6.2.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,18 +0,0 @@ -ad_include_contract { - Calendar portlet -} { -} - -::xo::Page requireCSS "/resources/calendar/calendar.css" - -set date [dt_sysdate] -proc my_get_url_stub {args} { - return /dotlrn/calendar -} -set url_stub_callback "my_get_url_stub" - -# Local variables: -# mode: tcl -# tcl-indent-level: 2 -# indent-tabs-mode: nil -# End: Index: openacs-4/packages/xowiki/www/portlets/forums-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/forums-portlet.adp,v diff -u -N --- openacs-4/packages/xowiki/www/portlets/forums-portlet.adp 14 Jul 2015 22:19:19 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,2 +0,0 @@ - - Index: openacs-4/packages/xowiki/www/portlets/forums-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/forums-portlet.tcl,v diff -u -N --- openacs-4/packages/xowiki/www/portlets/forums-portlet.tcl 20 Dec 2019 16:48:27 -0000 1.4.2.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,23 +0,0 @@ -ad_include_contract { - Show the forum portlets for the current user -} - -set portal_id [dotlrn::get_portal_id -user_id [ad_conn user_id]] -set config(shaded_p) f -set config(package_id) [::xo::dc list -prepare integer get_forum_ids { - select value - from portal_pages, - portal_element_map, - portal_element_parameters - where portal_id = :portal_id - and portal_pages.page_id = portal_element_map.page_id - and portal_element_parameters.element_id = portal_element_map.element_id - and portal_element_map.name = 'forums_portlet' - and key = 'package_id' -}] -set cf [array get config] -# Local variables: -# mode: tcl -# tcl-indent-level: 2 -# indent-tabs-mode: nil -# End: Index: openacs-4/packages/xowiki/www/portlets/include.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/include.tcl,v diff -u -N --- openacs-4/packages/xowiki/www/portlets/include.tcl 19 Aug 2022 10:50:08 -0000 1.10.2.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,17 +0,0 @@ -ad_page_contract { - Portlet include -} { - __including_page - portlet -} - -#ns_log notice "--including_page= $__including_page, portlet=$portlet" -set content [$__including_page include $portlet] -#set header_stuff [::xo::Page header_stuff] -template::set_file [ad_file dirname $__adp_stub]/plain-include - -# Local variables: -# mode: tcl -# tcl-indent-level: 2 -# indent-tabs-mode: nil -# End: Index: openacs-4/packages/xowiki/www/portlets/plain-include.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/plain-include.adp,v diff -u -N --- openacs-4/packages/xowiki/www/portlets/plain-include.adp 13 Sep 2012 16:05:35 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1 +0,0 @@ -@content;noquote@ Index: openacs-4/packages/xowiki/www/portlets/portlet-skin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/portlet-skin.adp,v diff -u -N --- openacs-4/packages/xowiki/www/portlets/portlet-skin.adp 13 Sep 2012 16:05:35 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,6 +0,0 @@ -
-@name@ -
-
-@content;noquote@ -
Index: openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/weblog-mini-calendar.adp,v diff -u -N --- openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.adp 30 Dec 2019 17:31:03 -0000 1.9.2.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,53 +0,0 @@ - - - - - - - - -
- - - - - - -
- - #acs-kernel.common_previous# - - @curr_month@ @year@ - - #acs-kernel.common_next# - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
@days_of_week.day_short@
- @days.count@ @days.day_number@ @days.day_number@
- -
Index: openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/portlets/Attic/weblog-mini-calendar.tcl,v diff -u -N --- openacs-4/packages/xowiki/www/portlets/weblog-mini-calendar.tcl 11 Aug 2020 20:12:25 -0000 1.20.2.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,205 +0,0 @@ -ad_include_contract { - Weblog Mini Calendar Portlet Include -} { - __including_page:token,notnull - {summary:boolean false} - {noparens:boolean false} -} - -::xo::Page requireCSS "/resources/calendar/calendar.css" -set package_id [::xo::cc package_id] -set parent_id [$__including_page set parent_id] -set including_item_id [$__including_page set item_id] - -if {![info exists base_url] || $base_url eq ""} { - if {![info exists page]} { - set page [::$package_id get_parameter weblog_page] - } - set base_url [::$package_id pretty_link -parent_id $parent_id -path_encode false $page] -} - -set date [ns_queryget date] -if {$date eq ""} { - set date [dt_sysdate] -} - -array set message_key_array { - list #acs-datetime.List# - day #acs-datetime.Day# - week #acs-datetime.Week# - month #acs-datetime.Month# -} - -# Get the current month, day, and the first day of the month -ad_try { - dt_get_info $date -} on error {errorMsg} { - # if dt_get_info fails from the provided date, try it with the - # sysdate. - set date [dt_sysdate] - dt_get_info $date -} - -set now [clock scan $date] -set prev_mon [clock scan "1 month ago" -base $now] -set next_mon [clock scan "1 month" -base $now] - -set date_list [dt_ansi_to_list $date] -set year [util::trim_leading_zeros [lindex $date_list 0]] -set month [util::trim_leading_zeros [lindex $date_list 1]] -set day [util::trim_leading_zeros [lindex $date_list 2]] - -set months_list [dt_month_names] -set curr_month_idx [expr {[util::trim_leading_zeros [clock format $now -format "%m"]]-1}] -set curr_month [lindex $months_list $curr_month_idx ] - -set first_day_of_week [lc_get firstdayofweek] -set week_days [lc_get abday] -multirow create days_of_week day_short -for {set i 0} {$i < 7} {incr i} { - multirow append days_of_week [lindex $week_days [expr {($i + $first_day_of_week) % 7}]] -} - -set date_reference $year-$month-01 -set innersql "from xowiki_pagei p, cr_items ci \ - where ci.parent_id = :parent_id \ - and ci.item_id = p.item_id and ci.live_revision = p.page_id \ - and ci.content_type not in ('::xowiki::PageTemplate', '::xowiki::Form') \ - and ci.item_id != :including_item_id \ - and ci.publish_status <> 'production' " - -xo::dc foreach entries_this_month "select count(ci.item_id) as c, - [::xo::dc date_trunc day p.publish_date] as d \ - $innersql - and [::xo::dc date_trunc_expression month p.publish_date :date_reference] \ - group by [::xo::dc date_trunc day p.publish_date]" { - set entries([lindex $d 0]) $c - } - -# -# The following time range specifies the dates between the navigation -# arrows of the weblog mini calendar should be. Without a limitation, -# crawler will iterate over these pages until they reach infinite past -# or infinite future. -# -#set earliest_date "2006-01-1" -#set latest_date "1 year" -# -# Compute the available time range -# -set dates [db_list_of_lists get_dates "select min([::xo::dc date_trunc day p.publish_date]),max([::xo::dc date_trunc day p.publish_date]) $innersql"] -set earliest_date [::xo::db::tcl_date [lindex $dates 0 0] _] -set latest_date [::xo::db::tcl_date [lindex $dates 0 end] _] - -if {$prev_mon < [clock scan $earliest_date]} { - set prev_month_url "" -} else { - set prev_month [clock format $prev_mon -format "%Y-%m-%d"] - set prev_month_url [export_vars -base $base_url {{date $prev_month} page_num summary}] -} -if {$next_mon > [clock scan $latest_date]} { - set next_month_url "" -} else { - set next_month [clock format $next_mon -format "%Y-%m-%d"] - set next_month_url [export_vars -base $base_url {{date $next_month} page_num summary}] -} - - -multirow create days day_number beginning_of_week_p end_of_week_p today_p active_p url id count class - -set day_of_week 1 - -# Calculate number of active days -set active_days_before_month [expr {[dt_first_day_of_month $year $month] -1}] -set active_days_before_month [expr {($active_days_before_month + 7 - $first_day_of_week) % 7}] - -set calendar_starts_with_julian_date [expr {$first_julian_date_of_month - $active_days_before_month}] -set day_number [expr {$days_in_last_month - $active_days_before_month + 1}] - -set js "" -for {set julian_date $calendar_starts_with_julian_date} {$julian_date <= $last_julian_date + 7} {incr julian_date} { - - if {$julian_date > $last_julian_date_in_month && $end_of_week_p == "t" } { - break - } - set today_p f - set active_p t - - if {$julian_date < $first_julian_date_of_month} { - set active_p f - } elseif {$julian_date > $last_julian_date_in_month} { - set active_p f - } - set ansi_date [dt_julian_to_ansi $julian_date] - - if {$julian_date == $first_julian_date_of_month} { - set day_number 1 - } elseif {$julian_date == $last_julian_date_in_month +1} { - set day_number 1 - } - - if {$julian_date == $julian_date_today} { - set today_p t - } - - if { $day_of_week == 1} { - set beginning_of_week_p t - } else { - set beginning_of_week_p f - } - - if { $day_of_week == 7 } { - set day_of_week 0 - set end_of_week_p t - } else { - set end_of_week_p f - } - # ns_log notice "--D julian_date = $julian_date [dt_julian_to_ansi $julian_date] //$ansi_date" - set count [expr {[info exists entries($ansi_date)] ? - ($noparens ? "$entries($ansi_date)" : "($entries($ansi_date))") - : ""}] - if {$today_p} { - set class today - } elseif {$active_p} { - set class active - } else { - set class inactive - } - set url [export_vars -base $base_url {{date $ansi_date} summary}] - - set id minicalendar-$ansi_date - if {$count ne ""} { - append js [subst { - document.getElementById('$id').addEventListener('click', function (event) { - event.preventDefault(); - window.location.href='$url'; - return false; - }); - }] - } - - multirow append days $day_number $beginning_of_week_p $end_of_week_p $today_p $active_p \ - $url $id $count $class - incr day_number - incr day_of_week -} - -if {$js ne ""} { - template::add_body_script -script $js -} - - -set sysdate [dt_sysdate] -set today_url [export_vars -base $base_url {{date $sysdate} page_num}] -if {$sysdate eq $date} { - set today_p t -} else { - set today_p f -} - - -# Local variables: -# mode: tcl -# tcl-indent-level: 2 -# indent-tabs-mode: nil -# End: