Index: openacs-4/packages/xowiki/xowiki.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v
diff -u -r1.180.2.76 -r1.180.2.77
--- openacs-4/packages/xowiki/xowiki.info 15 Nov 2021 17:02:36 -0000 1.180.2.76
+++ openacs-4/packages/xowiki/xowiki.info 25 Dec 2021 16:10:20 -0000 1.180.2.77
@@ -10,7 +10,7 @@
t
xowiki
-
+
Gustaf Neumann
A xotcl-based enterprise wiki system with multiple object types
2021-09-15
@@ -55,7 +55,7 @@
BSD-Style
2
-
+
Index: openacs-4/packages/xowiki/catalog/xowiki.de_DE.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/catalog/xowiki.de_DE.ISO-8859-1.xml,v
diff -u -r1.47.2.18 -r1.47.2.19
--- openacs-4/packages/xowiki/catalog/xowiki.de_DE.ISO-8859-1.xml 19 Nov 2021 09:03:35 -0000 1.47.2.18
+++ openacs-4/packages/xowiki/catalog/xowiki.de_DE.ISO-8859-1.xml 25 Dec 2021 16:10:21 -0000 1.47.2.19
@@ -224,7 +224,10 @@
Wiki
Verarbeite Objekte:
Prompt
- Freigegeben
+ Freigabestatus
+ Freigeben
+ Status auf Bearbeitung setzen
+ Status auf Archivierung setzen
Gewicht
Zuletzt ge�nderte Seiten
Zuletzt ge�nderte Seiten (nach Kategorien)
@@ -288,4 +291,6 @@
Von
bis
+ Archivieren
+ Archivieren des Eintrags. Der Eintrag wird nach der Archivieriung Benutzern nicht mehr angezeigt.
Index: openacs-4/packages/xowiki/catalog/xowiki.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/catalog/xowiki.en_US.ISO-8859-1.xml,v
diff -u -r1.71.2.22 -r1.71.2.23
--- openacs-4/packages/xowiki/catalog/xowiki.en_US.ISO-8859-1.xml 4 Feb 2021 13:18:51 -0000 1.71.2.22
+++ openacs-4/packages/xowiki/catalog/xowiki.en_US.ISO-8859-1.xml 25 Dec 2021 16:10:21 -0000 1.71.2.23
@@ -246,7 +246,10 @@
Wiki
Processing objects:
Prompt
- Published
+ Publish status
+ Publish
+ Set publish state to production
+ Set publish state to expired
Weight
For the overall score of the question, each interaction is weighted by this value.
Recently Changed Pages
@@ -311,4 +314,6 @@
From
to
+ Archive
+ When the item is archived, it is not shown to users anymore.
Index: openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl,v
diff -u -r1.11.2.18 -r1.11.2.19
--- openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl 5 Oct 2021 19:21:22 -0000 1.11.2.18
+++ openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl 25 Dec 2021 16:10:21 -0000 1.11.2.19
@@ -556,6 +556,12 @@
-script "[$line set $__name.onclick];"
}
set CSSclass ${:CSSclass}
+ if {[$line exists $__name.CSSclass]} {
+ set lineCSSclass [$line set $__name.CSSclass]
+ if {$lineCSSclass ne ""} {
+ append CSSclass " " $lineCSSclass
+ }
+ }
html::a [:get_local_attributes href title {CSSclass class} target id] {
return [next]
}
Index: openacs-4/packages/xowiki/tcl/folder-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/folder-procs.tcl,v
diff -u -r1.55.2.52 -r1.55.2.53
--- openacs-4/packages/xowiki/tcl/folder-procs.tcl 13 Nov 2021 16:22:14 -0000 1.55.2.52
+++ openacs-4/packages/xowiki/tcl/folder-procs.tcl 25 Dec 2021 16:10:21 -0000 1.55.2.53
@@ -603,10 +603,9 @@
-hide $::hidden(duplicate) \
-label ""
if {$::__xowiki_with_publish_status} {
- ImageAnchorField create publish_status -orderby publish_status.src -src "" \
- -width 8 -height 8 -border 0 -title "Toggle Publish Status" \
- -CSSclass publish-status-item-button \
- -alt "publish status" -label "" ;#[_ xowiki.publish_status]
+ AnchorField create publish_status -CSSclass publish-status-item-button \
+ -orderby publish_status.CSSclass \
+ -label "" -richtext 1
}
Field create object_type -label [_ xowiki.page_kind] -orderby object_type -richtext false \
-hide $::hidden(object_type)
@@ -703,25 +702,33 @@
if {$::__xowiki_with_publish_status} {
# TODO: this should get some architectural support
- if {[$c set publish_status] eq "ready"} {
- set image active.png
+
+ set publish_status [$c set publish_status]
+ if {$publish_status eq "ready"} {
+ set CSSclass green
set state "production"
+ } elseif {$publish_status eq "expired"} {
+ set CSSclass black
+ set state "production"
} else {
- set image inactive.png
+ set CSSclass red
set state "ready"
}
- set revision_id [$c set revision_id]
- [$t last_child] set publish_status.src /resources/xowiki/$image
- [$t last_child] set publish_status.href \
- [export_vars -base $page_link {{m toggle-publish-status} return_url}]
+ set line [$t last_child]
+ $line set publish_status "■"
+ $line set publish_status.CSSclass $CSSclass
+ $line set publish_status.title #xowiki.publish_status_make_$state#
+ $line set publish_status.href [export_vars -base $page_link {{m toggle-publish-status} return_url}]
}
}
+ set sort_names [$t column_names]
+ lappend sort_names {*}[lmap n $sort_names {set _ $n.CSSclass}]
lassign [split $orderby ,] att order
- if {$att in [$t column_names]} {
+ if {$att in $sort_names} {
$t orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att
} else {
- ad_log warning "Ignore invalid sorting criterion '$att'"
+ ad_log warning "Ignore invalid sorting criterion '$att' (valid: $sort_names)"
util_user_message -message "Ignore invalid sorting criterion '$att'"
}
Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v
diff -u -r1.284.2.181 -r1.284.2.182
--- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 17 Dec 2021 22:32:01 -0000 1.284.2.181
+++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 25 Dec 2021 16:10:21 -0000 1.284.2.182
@@ -2777,7 +2777,7 @@
}
numeric instproc render_input {} {
#
- # Prevent inserting invalid value; we allow corrently just a
+ # Prevent inserting invalid value; we allow currently just a
# single dot, comma for floats or "-" to be entered. Maybe some
# of this functionality should be blocked conditionally. Paste
# filtering is also currently just half-hearted but probably
Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v
diff -u -r1.239.2.78 -r1.239.2.79
--- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 19 Dec 2021 15:47:00 -0000 1.239.2.78
+++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 25 Dec 2021 16:10:22 -0000 1.239.2.79
@@ -990,7 +990,7 @@
where c.object_id in ([ns_dbquotelist $items]) "
} else {
# TODO: the non-count-part for the ordered_composite is not
- # tested yet. Although "ordered compostite" can be used
+ # tested yet. Although "ordered composite" can be used
# only programmatically for now, the code below should be
# tested. It would be as well possible to obtain titles and
# names etc. from the ordered composite, resulting in a
Index: openacs-4/packages/xowiki/tcl/table-widget-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/table-widget-procs.tcl,v
diff -u -r1.1.2.14 -r1.1.2.15
--- openacs-4/packages/xowiki/tcl/table-widget-procs.tcl 6 Oct 2021 12:21:01 -0000 1.1.2.14
+++ openacs-4/packages/xowiki/tcl/table-widget-procs.tcl 25 Dec 2021 16:10:22 -0000 1.1.2.15
@@ -44,14 +44,6 @@
append cols [subst {BulkAction create objects -id ID -actions {$actions}}] \n
append cols {HiddenField create ID} \n
}
- if {"publish_status" in $buttons} {
- append cols {ImageAnchorField create _publish_status \
- -orderby _publish_status.src -src "" \
- -width 8 -height 8 -title "Toggle Publish Status" \
- -alt "publish status" -label [_ xowiki.publish_status] \
- -CSSclass publish-status-item-button \
- } \n
- }
if {"edit" in $buttons} {
append cols {AnchorField create _edit -CSSclass edit-item-button -label "" \
-no_csv 1 -richtext 1} \n
@@ -68,11 +60,9 @@
append cols {AnchorField create _revisions -CSSclass revisions-item-button -label "" \
-no_csv 1 -richtext 1} \n
}
- if {"slim_publish_status" in $buttons} {
- append cols {ImageAnchorField create _publish_status \
- -orderby _publish_status.src -src "" \
- -width 8 -height 8 -title "Toggle Publish Status" \
- -alt "publish status" -label "" \
+ if {"slim_publish_status" in $buttons || "publish_status" in $buttons} {
+ append cols {AnchorField create _publish_status \
+ -richtext 1 -label "" \
-CSSclass publish-status-item-button \
} \n
}
@@ -93,8 +83,14 @@
] \n
}
}
+ if {"archive" in $buttons} {
+ append cols [list AnchorField create _archive \
+ -CSSclass archive-item-button \
+ -label "" \
+ -no_csv 1 \
+ -richtext 1] \n
+ }
if {"delete" in $buttons} {
- #append cols [list ImageField_DeleteIcon _delete -label "" -no_csv 1] \n
append cols [list AnchorField create _delete \
-CSSclass delete-item-button \
-label "" \
@@ -199,19 +195,23 @@
$__c set ID [$p item_id]
}
if {"publish_status" in $buttons || "slim_publish_status" in $buttons} {
- $__c set _publish_status " "
- $__c set _publish_status.title #xowiki.publish_status#
- if {[$p set publish_status] eq "ready"} {
- set image active.png
+ $__c set _publish_status "■"
+ set publish_status [$p set publish_status]
+ if {$publish_status eq "ready"} {
+ set CSSclass green
set state "production"
+ } elseif {$publish_status eq "expired"} {
+ set CSSclass black
+ set state "production"
} else {
- set image inactive.png
+ set CSSclass red
set state "ready"
}
- set url [export_vars -base [::$package_id package_url]admin/set-publish-state \
- {state {revision_id "[$p set revision_id]"} return_url}]
- $__c set _publish_status.src /resources/xowiki/$image
- $__c set _publish_status.href $url
+ $__c set _publish_status.CSSclass $CSSclass
+ $__c set _publish_status.title #xowiki.publish_status_make_$state#
+ $__c set _publish_status.href [export_vars -base [::$package_id package_url]admin/set-publish-state {
+ state {revision_id "[$p set revision_id]"} return_url
+ }]
}
if {"edit" in $buttons} {
$__c set _edit " "
@@ -228,6 +228,14 @@
$__c set _delete.title #xowiki.delete#
$__c set _delete.href [::$package_id make_link -link $page_link $p delete return_url]
}
+ if {"archive" in $buttons} {
+ #$__c set _archive ""; #content: "\e025";
+ $__c set _archive " "
+ $__c set _archive.title #xowiki.Archive_title#
+ set url [export_vars -base [::$package_id package_url]admin/set-publish-state \
+ {{state expired} {revision_id "[$p set revision_id]"} return_url}]
+ $__c set _archive.href $url
+ }
if {"revisions" in $buttons} {
$__c set _revisions ""
$__c set _revisions.title #xowiki.revisions#
@@ -254,6 +262,10 @@
$__c set _last_modified [$p set last_modified]
$__c set _raw_last_modified [$p set last_modified]
+ # just necessary, when object_type is requested
+ #set icon [$__c render_icon]
+ #ns_log notice "... render icon? [$__c procsearch render_icon] // [$__c info precedence]"
+
#ns_log notice "field_names <$field_names> [llength $field_names] [llength $form_field_objs]"
foreach __fn $field_names form_field_obj $form_field_objs {
#ns_log notice "... field_name <$__fn> obj $form_field_obj <[$form_field_obj name]>"
Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v
diff -u -r1.542.2.124 -r1.542.2.125
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 30 Nov 2021 09:57:15 -0000 1.542.2.124
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 25 Dec 2021 16:10:22 -0000 1.542.2.125
@@ -2001,15 +2001,19 @@
Page instproc update_publish_status {new_publish_status} {
#
# The publish_status of xowiki is used for "advertising"
- # pages. When the publish_status is e.g. "production", users can
- # access this object when they know obout its existence
- # (e.g. workflow assignments), but it is excluded from listings,
- # which contain - per default - only elements in publish_status
- # "ready".
+ # pages. When the publish_status is e.g. in "production" or
+ # "expired", users can access this object when they know obout its
+ # existence (e.g. workflow assignments), but it is excluded from
+ # listings, which contain - per default - only elements in
+ # publish_status "ready".
#
# This proc can be used to change the publish status of a page and
# handle visibility via syndication.
#
+ if {$new_publish_status ni {production ready live expired}} {
+ error "update_publish_status receives invalid publish status '$new_publish_status'"
+ }
+
if {$new_publish_status ne ${:publish_status}} {
:set_live_revision \
-revision_id ${:revision_id} \
@@ -2018,7 +2022,7 @@
::xo::xotcl_object_cache flush ${:revision_id}
::xo::xotcl_object_cache flush ${:item_id}
- if {$new_publish_status ne "production"} {
+ if {$new_publish_status eq "ready"} {
::xowiki::notification::do_notifications -revision_id ${:revision_id}
::xowiki::datasource -nocleanup ${:revision_id}
} else {
@@ -3828,10 +3832,15 @@
return $result
}
- PageInstance instproc get_short_spec {name} {
- #set form_constraints [:get_from_template form_constraints]
- set form_constraints [:get_form_constraints]
- #:msg "fc of [self] ${:name} = $form_constraints"
+ PageInstance instproc get_short_spec {{-form_constraints ""} name} {
+ #
+ # In case, the form_constraints are provided, get the short-spec
+ # from there, otherwise compute form_constraints via
+ # method "get_form_constraints".
+ #
+ if {$form_constraints eq ""} {
+ set form_constraints [:get_form_constraints]
+ }
if {$form_constraints ne ""} {
set s [::xowiki::PageInstance get_short_spec_from_form_constraints \
-name $name -form_constraints $form_constraints]
Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v
diff -u -r1.368.2.101 -r1.368.2.102
--- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 19 Dec 2021 15:45:08 -0000 1.368.2.101
+++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 25 Dec 2021 16:10:23 -0000 1.368.2.102
@@ -1542,8 +1542,8 @@
#
Page ad_instproc www-toggle-publish-status {} {
- This web-callable method toggles from arbitrary states to "ready"
- and from "ready" to "production".
+ This web-callable method toggles from "production" to "ready", and
+ from "ready" or "archived" to "production".
} {
if {${:publish_status} ne "ready"} {
Index: openacs-4/packages/xowiki/www/resources/xowiki-bootstrap3-specific.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/xowiki-bootstrap3-specific.css,v
diff -u -r1.1.2.10 -r1.1.2.11
--- openacs-4/packages/xowiki/www/resources/xowiki-bootstrap3-specific.css 25 Apr 2021 09:48:40 -0000 1.1.2.10
+++ openacs-4/packages/xowiki/www/resources/xowiki-bootstrap3-specific.css 25 Dec 2021 16:10:23 -0000 1.1.2.11
@@ -1,4 +1,4 @@
-/*
+/*
* Appearance of item-buttons based on bootstrap glyphicons.
*/
@@ -8,6 +8,7 @@
div.xowiki-content a.link-icon,
div.xowiki-content a.broken-link-icon,
div.xowiki-content a.edit-item-button,
+div.xowiki-content a.archive-item-button,
div.xowiki-content a.delete-item-button,
div.xowiki-content a.revisions-item-button,
div.xowiki-content a.view-item-button,
@@ -22,6 +23,10 @@
font-family: 'Glyphicons Halflings';
content: "\e065";
}
+div.xowiki-content a.archive-item-button::before {
+ font-family: 'Glyphicons Halflings';
+ content: "\e025";
+}
div.xowiki-content a.delete-item-button::before {
font-family: 'Glyphicons Halflings';
content: "\e020";
@@ -56,6 +61,18 @@
content: "\e027";
margin-right: 6px;
}
+div.xowiki-content a.publish-status-item-button.green {
+ color: green;
+ font-size: larger;
+}
+div.xowiki-content a.publish-status-item-button.red {
+ color: red;
+ font-size: larger;
+}
+div.xowiki-content a.publish-status-item-button.black {
+ color: black;
+ font-size: larger;
+}
/*
@@ -69,6 +86,17 @@
}
/*
+ * Spacing in form-usages
+ */
+.form-usages .table > tbody > tr > td.archive-item-button,
+.form-usages .table > tbody > tr > td.delete-item-button,
+.form-usages .table > tbody > tr > td.edit-item-button,
+.form-usages .table > tbody > tr > td.copy-item-button,
+.form-usages .table > tbody > tr > td.publish-status-item-button {
+ padding: 2px;
+}
+
+/*
* Icons in file listings
*/
@@ -111,7 +139,7 @@
font-size: x-small;
vertical-align: sub;
margin-left: 2px;
- margin-right: 2px;
+ margin-right: 2px;
content: "\e164";
}
@@ -121,7 +149,7 @@
font-size: x-small;
vertical-align: sub;
margin-left: 2px;
- margin-right: 2px;
+ margin-right: 2px;
content: "\e022";
}
Index: openacs-4/packages/xowiki/www/resources/xowiki-yui-specific.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/xowiki-yui-specific.css,v
diff -u -r1.1.2.9 -r1.1.2.10
--- openacs-4/packages/xowiki/www/resources/xowiki-yui-specific.css 29 Jul 2021 17:27:02 -0000 1.1.2.9
+++ openacs-4/packages/xowiki/www/resources/xowiki-yui-specific.css 25 Dec 2021 16:10:23 -0000 1.1.2.10
@@ -1,5 +1,5 @@
/* appearance of item-buttons */
-/*
+/*
Positions of images in the sprite:
Add16 -2,-1
@@ -19,38 +19,43 @@
transparent.png -1,-308
*/
div.xowiki-content a.edit-item-button {
- background: transparent url(/resources/xowiki/sprite16.png) -2px -68px no-repeat;
+ background: transparent url(/resources/xowiki/sprite16.png) -2px -68px no-repeat;
padding-right: 16px;
text-decoration: none;
}
+div.xowiki-content a.archive-item-button {
+ background: transparent url(/resources/xowiki/sprite16.png) -2px -46px no-repeat;
+ padding-right: 16px;
+ text-decoration: none;
+}
div.xowiki-content a.delete-item-button {
- background: transparent url(/resources/xowiki/sprite16.png) -2px -46px no-repeat;
+ background: transparent url(/resources/xowiki/sprite16.png) -2px -46px no-repeat;
padding-right: 16px;
text-decoration: none;
}
div.xowiki-content a.revisions-item-button {
- background: transparent url(/resources/xowiki/sprite16.png) -2px -200px no-repeat;
+ background: transparent url(/resources/xowiki/sprite16.png) -2px -200px no-repeat;
padding-right: 16px;
text-decoration: none;
}
div.xowiki-content a.view-item-button {
- background: transparent url(/resources/xowiki/sprite16.png) -2px -178px no-repeat;
+ background: transparent url(/resources/xowiki/sprite16.png) -2px -178px no-repeat;
padding-right: 16px;
text-decoration: none;
}
div.xowiki-content a.create-item-button {
- background: transparent url(/resources/xowiki/sprite16.png) -2px -3px no-repeat;
+ background: transparent url(/resources/xowiki/sprite16.png) -2px -3px no-repeat;
padding-right: 16px;
text-decoration: none;
}
div.xowiki-content a.copy-item-button {
- background: transparent url(/resources/xowiki/sprite16.png) -2px -24px no-repeat;
+ background: transparent url(/resources/xowiki/sprite16.png) -2px -24px no-repeat;
padding-right: 16px;
text-decoration: none;
width: 16px; height: 16px;
}
div.xowiki-content a.add-item-button {
- background: transparent url(/resources/xowiki/sprite16.png) -2px -3px no-repeat;
+ background: transparent url(/resources/xowiki/sprite16.png) -2px -3px no-repeat;
padding-right: 16px;
text-decoration: none;
}
@@ -59,6 +64,18 @@
padding-right: 16px;
text-decoration: none;
}
+div.xowiki-content a.publish-status-item-button.green {
+ color: green;
+ font-size: larger;
+}
+div.xowiki-content a.publish-status-item-button.red {
+ color: red;
+ font-size: larger;
+}
+div.xowiki-content a.publish-status-item-button.black {
+ color: black;
+ font-size: larger;
+}
/*
* info sign (in forms)