diff --git a/data/System/JQDataTablesPlugin.txt b/data/System/JQDataTablesPlugin.txt
index ebbf83f..17bb7e7 100644
--- a/data/System/JQDataTablesPlugin.txt
+++ b/data/System/JQDataTablesPlugin.txt
@@ -76,8 +76,10 @@ the formfield. There are however a few column names that have a special meaning
* =Date=, =Changed=, =Modified=, =Created=, =info.date=, =createdate=: these fields are all date fields and treated accordingly
* =Topic=: alias for =topic=
* =TopicTitle=: displays the !TopicTitle of a topic linking to it
- * =By=, =Author=: alias for author of recent topic revision
- * =Creator=: author if the initial topic revision
+ * =By=: alias for author of recent topic revision
+ * =Creator=, =createauthor=, =info.author=: author if the initial topic revision
+ * =publishauthor=: author that published the topic, defaults to =createauthor= in case there is no explicit =Author= field in the form
+ * =publishdate=: date when the =publishauthor= created the initial revision, defaults to =createdate= in case there is no explicut =PublishDate= field in the form
* =Worflow=: name of the workflow assigned to a topic
* A column name starting with a =/= (slash) will be excluded from any special treatment, i.e. =/Author= will _not_ be interpreted as the author of the recent topic revision, but as the =Author= formfield of a !DataForm (see below example).
@@ -191,6 +193,7 @@ Click on the table headers to sort the columns according to their data type.
---++ Change History
%TABLE{columnwidths="7em" tablewidth="100%"}%
+| 30 Aug 2017: | disabled =Author= auto-column; added =publishdate= and =publishauthor= auto-columns |
| 23 Jan 2017: | don't report back an url parameter in the error message |
| 02 Sep 2016: | added default english translation files |
| 13 Jun 2016: | fixed parsing of dates that are already epoch seconds; improved default settings of table layout |
diff --git a/lib/Foswiki/Plugins/JQDataTablesPlugin.pm b/lib/Foswiki/Plugins/JQDataTablesPlugin.pm
index cee1c9a..b9d8639 100644
--- a/lib/Foswiki/Plugins/JQDataTablesPlugin.pm
+++ b/lib/Foswiki/Plugins/JQDataTablesPlugin.pm
@@ -12,8 +12,8 @@ use Foswiki::Plugins::JQueryPlugin ();
use Foswiki::Func ();
use Foswiki::AccessControlException ();
-our $VERSION = '3.03';
-our $RELEASE = '23 Jan 2017';
+our $VERSION = '3.10';
+our $RELEASE = '30 Aug 2017';
our $SHORTDESCRIPTION = 'JQuery based progressive enhancement of tables';
sub initPlugin {
diff --git a/lib/Foswiki/Plugins/JQDataTablesPlugin/DBCacheConnector.pm b/lib/Foswiki/Plugins/JQDataTablesPlugin/DBCacheConnector.pm
index e45452c..cf9af3c 100644
--- a/lib/Foswiki/Plugins/JQDataTablesPlugin/DBCacheConnector.pm
+++ b/lib/Foswiki/Plugins/JQDataTablesPlugin/DBCacheConnector.pm
@@ -64,7 +64,7 @@ sub new {
'info.date' => 'Changed',
'Changed' => 'info.date',
'By' => 'info.author',
- 'Author' => 'info.author',
+# 'Author' => 'info.author', SMELL: this may be in conflict with any formfield of that name
'Workflow' => 'workflow.name',
'workflow.name' => 'Workflow',
'Created' => 'createdate',
@@ -236,7 +236,7 @@ sub search {
"display" => "$index",
"raw" => $index,
};
- } elsif (!$isEscaped && $propertyName =~ /^(Date|Changed|Modified|Created|info\.date|createdate)$/) {
+ } elsif (!$isEscaped && $propertyName =~ /^(Date|Changed|Modified|Created|info\.date|createdate|publishdate)$/) {
my $html =
$cell
? "" . Foswiki::Time::formatTime($cell) . ""
@@ -256,25 +256,27 @@ sub search {
"display" => "$cell",
"raw" => $cell,
};
- } elsif (!$isEscaped && $propertyName =~ /^(Author|Creator|info\.author|createauthor)$/) {
- my $topicTitle = Foswiki::Plugins::DBCachePlugin::getTopicTitle($Foswiki::cfg{UsersWebName}, $cell)
- || $cell;
- my $html =
- $cell
- ? "$topicTitle"
- : "";
+ } elsif (!$isEscaped && $propertyName =~ /^(Author|Creator|info\.author|createauthor|publishauthor)$/) {
+ my @html = ();
+ foreach my $item (split(/\s*,\s*/, $cell)) {
+ my $topicTitle = Foswiki::Plugins::DBCachePlugin::getTopicTitle($Foswiki::cfg{UsersWebName}, $item);
+ push @html,
+ $topicTitle eq $item ?
+ $item :
+ "$topicTitle";
+ }
$cell = {
- "display" => $html,
+ "display" => join(", ", @html),
"raw" => $cell || "",
};
} elsif (!$isEscaped && $propertyName =~ /(Image|Photo|Logo)/) {
my $url = $cell;
+
unless ($url =~ /^(http:)|\//) {
$url = Foswiki::Func::getPubUrlPath($params{web}, $topic, $cell);
}
$url =~ s/%PUBURLPATH%/$Foswiki::cfg{PubUrlPath}/g;
- #$url =~ s/^https?://g;
my $html =
$cell
? ""
diff --git a/lib/Foswiki/Plugins/JQDataTablesPlugin/DataTables.pm b/lib/Foswiki/Plugins/JQDataTablesPlugin/DataTables.pm
index a841291..1be439f 100644
--- a/lib/Foswiki/Plugins/JQDataTablesPlugin/DataTables.pm
+++ b/lib/Foswiki/Plugins/JQDataTablesPlugin/DataTables.pm
@@ -65,8 +65,11 @@ sub handleDataTable {
$theWidth = defined($theWidth) ? "width='$theWidth'" : "";
my $theWeb = $params->{web} || $web;
+ my $theTopic = $params->{topic} || $topic;
my $theForm = $params->{form} || '';
+ my ($thisWeb, $thisTopic) = Foswiki::Func::normalizeWebTopicName($theWeb, $theTopic);
+
my $thePaging =
Foswiki::Func::isTrue($params->{paging} || $params->{pager}, 0)
? 'true'
@@ -300,7 +303,7 @@ sub handleDataTable {
data => {
t => $time,
form => $formParam,
- topic => "$theWeb.WebHome",
+ topic => "$thisWeb.$thisTopic",
web => $theWeb,
connector => $connector,
},
diff --git a/lib/Foswiki/Plugins/JQDataTablesPlugin/MANIFEST b/lib/Foswiki/Plugins/JQDataTablesPlugin/MANIFEST
index 9cabaeb..bde5287 100644
--- a/lib/Foswiki/Plugins/JQDataTablesPlugin/MANIFEST
+++ b/lib/Foswiki/Plugins/JQDataTablesPlugin/MANIFEST
@@ -1,3 +1,4 @@
+!noci
data/System/JQDataTablesPlugin.txt 0644
lib/Foswiki/Plugins/JQDataTablesPlugin/Config.spec 0644
lib/Foswiki/Plugins/JQDataTablesPlugin/Connector.pm 0644
diff --git a/lib/Foswiki/Plugins/JQDataTablesPlugin/SearchConnector.pm b/lib/Foswiki/Plugins/JQDataTablesPlugin/SearchConnector.pm
index acfd0a9..0a99a43 100644
--- a/lib/Foswiki/Plugins/JQDataTablesPlugin/SearchConnector.pm
+++ b/lib/Foswiki/Plugins/JQDataTablesPlugin/SearchConnector.pm
@@ -108,7 +108,7 @@ sub buildQuery {
$form =~ s/\//./g;
my @query = ();
- push @query, "form='$form'" if $form;
+ push @query, "form.name='$form'" if $form;
my @columns = $this->getColumnsFromRequest($request);
diff --git a/pub/System/JQDataTablesPlugin/i18n/de.js b/pub/System/JQDataTablesPlugin/i18n/de.js
index eb9646b..4b908ae 100644
--- a/pub/System/JQDataTablesPlugin/i18n/de.js
+++ b/pub/System/JQDataTablesPlugin/i18n/de.js
@@ -6,6 +6,6 @@
"next": "weiter",
"previous": "zurück",
"processing": "In Bearbeitung ...",
- "search": "Suchen:",
+ "filter": "Filter:",
"zeroRecords": "Keine passenden Daten gefunden"
}
diff --git a/pub/System/JQDataTablesPlugin/i18n/en.js b/pub/System/JQDataTablesPlugin/i18n/en.js
index df53c9c..d9ed201 100644
--- a/pub/System/JQDataTablesPlugin/i18n/en.js
+++ b/pub/System/JQDataTablesPlugin/i18n/en.js
@@ -6,7 +6,7 @@
"next": "Next",
"previous": "Previous",
"processing": "Processing",
- "search": "Search",
+ "filter": "Filter:",
"zeroRecords": "No records found"
}
diff --git a/pub/System/JQDataTablesPlugin/jquery.datatables.addons.uncompressed.js b/pub/System/JQDataTablesPlugin/jquery.datatables.addons.uncompressed.js
index 1d8b9b2..fbde83b 100644
--- a/pub/System/JQDataTablesPlugin/jquery.datatables.addons.uncompressed.js
+++ b/pub/System/JQDataTablesPlugin/jquery.datatables.addons.uncompressed.js
@@ -203,7 +203,7 @@ jQuery(function($) {
"stripeClasses": ['foswikiTableEven', 'foswikiTableOdd'],
"language": {
- "search": "Search:",
+ "search": "Filter:",
"info": "_START_ - _END_ of _TOTAL_",
"infoEmpty": "nothing found",
"infoFiltered": "",
diff --git a/pub/System/JQDataTablesPlugin/jquery.datatables.init.uncompressed.js b/pub/System/JQDataTablesPlugin/jquery.datatables.init.uncompressed.js
index b35cdc7..a9effd3 100644
--- a/pub/System/JQDataTablesPlugin/jquery.datatables.init.uncompressed.js
+++ b/pub/System/JQDataTablesPlugin/jquery.datatables.init.uncompressed.js
@@ -14,7 +14,7 @@ jQuery(function($) {
"stripeClasses": ['foswikiTableEven', 'foswikiTableOdd'],
"language": {
- "search": "Search:",
+ "search": "Filter:",
"info": "_START_ - _END_ of _TOTAL_",
"infoEmpty": "nothing found",
"infoFiltered": "",