packages: dokuwiki-plugin-icalevents/dokuwiki-plugin-icalevents.spec, dokuw...

glen glen at pld-linux.org
Tue May 24 06:18:27 CEST 2011


Author: glen                         Date: Tue May 24 04:18:27 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add show current week patch

---- Files affected:
packages/dokuwiki-plugin-icalevents:
   dokuwiki-plugin-icalevents.spec (1.6 -> 1.7) , showCurrentWeek.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/dokuwiki-plugin-icalevents/dokuwiki-plugin-icalevents.spec
diff -u packages/dokuwiki-plugin-icalevents/dokuwiki-plugin-icalevents.spec:1.6 packages/dokuwiki-plugin-icalevents/dokuwiki-plugin-icalevents.spec:1.7
--- packages/dokuwiki-plugin-icalevents/dokuwiki-plugin-icalevents.spec:1.6	Mon Jan 24 00:14:50 2011
+++ packages/dokuwiki-plugin-icalevents/dokuwiki-plugin-icalevents.spec	Tue May 24 06:18:21 2011
@@ -5,7 +5,7 @@
 Summary:	Parses an iCal calendar .ics file and renders it as an HTML table
 Name:		dokuwiki-plugin-icalevents
 Version:	20100501
-Release:	1
+Release:	2
 License:	GPL v2
 Group:		Applications/WWW
 Source0:	http://public.doogie.de/projects/dokuwiki/plugin_iCalEvents_2.0.zip
@@ -15,6 +15,7 @@
 Patch1:		reset-error.patch
 Patch2:		allow-params.patch
 Patch3:		relative-dates.patch
+Patch4:		showCurrentWeek.patch
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
 BuildRequires:	rpmbuild(macros) >= 1.553
 BuildRequires:	unzip
@@ -43,6 +44,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 version=$(awk -F"'" '/date/&&/=>/{print $4}' syntax.php)
 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
@@ -72,6 +74,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2011/05/24 04:18:21  glen
+- add show current week patch
+
 Revision 1.6  2011/01/23 23:14:50  sparky
 - BR: unzip
 

================================================================
Index: packages/dokuwiki-plugin-icalevents/showCurrentWeek.patch
diff -u /dev/null packages/dokuwiki-plugin-icalevents/showCurrentWeek.patch:1.1
--- /dev/null	Tue May 24 06:18:27 2011
+++ packages/dokuwiki-plugin-icalevents/showCurrentWeek.patch	Tue May 24 06:18:22 2011
@@ -0,0 +1,48 @@
+Only in /usr/share/dokuwiki/lib/plugins/iCalEvents/: .syntax.php.swo
+Only in /usr/share/dokuwiki/lib/plugins/iCalEvents/: .syntax.php.swp
+Only in /usr/share/dokuwiki/lib/plugins/iCalEvents/conf: default.php~
+Only in .: iCalEvents
+Only in ./lang: de
+diff -ur -x .svn -x .git -x .bzr -x CVS ./syntax.php /usr/share/dokuwiki/lib/plugins/iCalEvents/syntax.php
+--- ./syntax.php	2011-05-24 07:10:51.275958659 +0300
++++ /usr/share/dokuwiki/lib/plugins/iCalEvents/syntax.php	2011-05-23 12:38:52.386695372 +0300
+@@ -88,17 +88,18 @@
+       }
+ 
+       $showEndDates = !empty($params['showEndDates']);
++      $showCurrentWeek = !empty($params['showCurrentWeek']);
+       
+-      #echo "url=$icsURL flags=$flagStr; from = $from;    previewSec = $previewSec; dateFormat=$dateFormat;<br/>";
++      #echo "url=$icsURL flags=$flagStr; from = $from;    previewSec = $previewSec; dateFormat=$dateFormat; showCurrentWeek=$showCurrentWeek<br/>";
+       
+-      return array($icsURL, $from, $previewSec, $dateFormat, $showEndDates); 
++      return array($icsURL, $from, $previewSec, $dateFormat, $showEndDates, $showCurrentWeek);
+     }
+     
+     /**
+      * loads the ics file via HTTP, parses it and renders an HTML table.
+      */
+     function render($mode, &$renderer, $data) {
+-      list($url, $from, $previewSec, $dateFormat, $showEndDates) = $data;
++      list($url, $from, $previewSec, $dateFormat, $showEndDates, $showCurrentWeek) = $data;
+       $ret = '';
+       if($mode == 'xhtml'){
+ 	      # parse the ICS file
+@@ -113,10 +114,16 @@
+                   '<th>'.$this->getLang('what').'</th>'.
+                   '<th>'.$this->getLang('description').'</th>'.
+                   '<th>'.$this->getLang('where').'</th>'.
+                   '</tr>'.NL;
++          $weekStart = strtotime("0 week ago 12:00");
++          $weekEnd = strtotime("1 weeks 12:00");
+           foreach ($entries as $entry) {
+             $rowCount++;
+-            $ret .= '<tr>';
++            $ret .= '<tr';
++            if ($showCurrentWeek && ($entry['startunixdate'] >= $weekStart && $entry['endunixdate'] <= $weekEnd)) {
++                $ret .= ' style="background-color: red !important"';
++            }
++            $ret .= '>';
+ 			if ($showEndDates || $this->getConf('showEndDates')) {
+ 				$ret .= '<td>'.$entry['startdate'].' - '.$entry['enddate'].'</td>';
+ 			} else {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/dokuwiki-plugin-icalevents/dokuwiki-plugin-icalevents.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list