• last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Reinstate retrieval of the package_id from the connection context in child-resources, the problem was that, when we required a connection context in create_form_page_instance, we did with no information whatsoever, which was then retrieved by e.g. ns_conn, sometimes wrongly (e.g. when one is running under the test package)

  1. … 1 more file in changeset.
child-resources has already a package_id, getting it from the connection context makes the includelet susceptible to e.g. package initializations from the outside (see e.g. xowiki link_tests automated test)

resolve message keys in titles

make "instantiate_forms" a method of packages

this reads better than the previous variant based on the Weblog class.

  1. … 14 more files in changeset.
MenuBar reform

- MenuBars are now easier programmatically extensible (easier to maintain)

- refactored code, reduced scatted definitions (all configurations

at the same place)

- unified templating:

use body property @body.folderHTML@ instead of @folderhtml@

From the former API calls only "update_items" has changed,

all existing configurations (i.e. via folders or package parameter)

should continue to work.

== Changes:

One can now extend menubars via menu entry definition

{config -use YOURCONFIG -class YOURCLASS}

in two directions:

a) subclassing

define your own menubar class YOURCLASS, which should

be a subclass of ::xowiki::MenuBar

b) provide your own configuration method to provide

a more tailored configuration. This is performed

by defining a method "config=YOURCONFIG" for ::xowiki::MenuBar

The latter method is used for test-items, which can define a

test item folder by using

-- extra_menu_entries ---

{config -use test-items}

instead of

-- extra_menu_entries ---

{entry -name New.Item.TextInteraction -form en:edit-interaction.wf -query p.item_type=Text}

{entry -name New.Item.ShortTextInteraction -form en:edit-interaction.wf -query p.item_type=ShortText}

{entry -name New.Item.SCInteraction -form en:edit-interaction.wf -query p.item_type=SC}

{entry -name New.Item.MCInteraction -form en:edit-interaction.wf -query p.item_type=MC}

{entry -name New.Item.ReorderInteraction -form en:edit-interaction.wf -query p.item_type=Reorder}

{entry -name New.Item.UploadInteraction -form en:edit-interaction.wf -query p.item_type=Upload}

{entry -name New.App.OnlineExam -form en:online-exam.wf}

{entry -name New.App.InclassQuiz -form en:inclass-quiz.wf}

{entry -name New.App.InclassExam -form en:inclass-exam.wf}

See below for the definition of the "test-items" configuration method,

which is based on the default definitions. In general, the definition

in this method can be performed via menu-entries (same syntax as in

other menu entries) or via the MenuBar API (e.g. calling

":add_menu_item ...").

All configurations follow the following definition order

where later entries can refine earlier entries:

- package level: package parameter ExtraMenuEntries

- configuration method: use standard or tailored confguration methods

- per-folder definition: content of the extra_menu_entries

Note that the menu entry definition language supports as well

adding/clearing menus, etc., so almost everything can be refined.

I've noticed that the tlf* code has several scattered menu

definitions, which are as well done in every case differently.

By these definition one can define e.g. a learning-app folder (where

"New" can be used to define new app folders), and the app folders can

provide their own "New" entries, e.g. for clickers and

others. E.g. For "clickers" there is already on non-oo definition to

achieve similar things (which should be altered to the new method),

but on other places, there are some hard-coded definitions for root

folders, etc. The menubars of the learning-apps should be made this

way more consistent with the rest (e.g. using "New", supporting "table

of contents" for clipboard interactions, etc.)

namespace eval ::xowiki {

::xowiki::MenuBar instproc config=test-items {

{-bind_vars {}}

-current_page:required

-package_id:required

-folder_link:required

-return_url

} {

:config=default \

-bind_vars $bind_vars \

-current_page $current_page \

-package_id $package_id \

-folder_link $folder_link \

-return_url $return_url

return {

{clear_menu -menu New}

{entry -name New.Item.TextInteraction -form en:edit-interaction.wf -query p.item_type=Text}

{entry -name New.Item.ShortTextInteraction -form en:edit-interaction.wf -query p.item_type=ShortText}

{entry -name New.Item.SCInteraction -form en:edit-interaction.wf -query p.item_type=SC}

{entry -name New.Item.MCInteraction -form en:edit-interaction.wf -query p.item_type=MC}

{entry -name New.Item.ReorderInteraction -form en:edit-interaction.wf -query p.item_type=Reorder}

{entry -name New.Item.UploadInteraction -form en:edit-interaction.wf -query p.item_type=Upload}

{entry -name New.App.OnlineExam -form en:online-exam.wf}

{entry -name New.App.InclassQuiz -form en:inclass-quiz.wf}

{entry -name New.App.InclassExam -form en:inclass-exam.wf}

}

}

}

  1. … 16 more files in changeset.
accept as page_ref for an object as well an item_id

This change simplify resolving items. raw ids seem

fine, since the listing are not persisted or moved between

OpenACS instances.

  1. … 1 more file in changeset.
Use full URL paths for bulk actions.

This change allows one to mark items from multiple child-resources

displayed on one page and add these to the clipboard. Use the same

logic for bluk-delete and bulk adding to the clipboard.

  1. … 2 more files in changeset.
added/improved debugging hooks

move comments around and improve it

  1. … 1 more file in changeset.
generalize handling of langstrings

this change updates yesterday's change with ml_title. It generalizes

the code by introducing an instproc named "update_langstring_property" that

generalizes setting of arbitrary "properties" based on a property "langstring"

that contains a dict of attributes in multiple languages (which are part

of the page, make it suitable also when the enduser cannot enter

message keys).

  1. … 1 more file in changeset.
added the flag "-language_specific" to child-resources to support differnt content per folder for user with different language settings

  1. … 1 more file in changeset.
address issue #3423: Move is_package_root_folder up in class hierarchy to CrItem

follow user wish

  1. … 3 more files in changeset.
fix typos and whitespace changes

  1. … 1 more file in changeset.
revert change, since this breaks applications

if the distinction is needed, a better change is required,

either via configuration of a prefix, or via subclassing.

  1. … 1 more file in changeset.
Fix memory leak

Name the child resources object consistently in order to differentiate it from other includelets

- added support for forcing publish_status line when "publish_status" is passed as a value for "columns"

Previously, publish status was autmatically displayed, when target publish_status was different to "ready"

make clear, when passing objects or ids

improve input validaton on query variables

  1. … 7 more files in changeset.
Add documentation to includelets

  1. … 3 more files in changeset.
whitespace changes

  1. … 3 more files in changeset.
fixes for links to folders of different package instances:

- when resolve_local is used, fetch the correct index page, when target folder has an index page defined

- when resolve_local is used, avoid potential resolving loop

various code improvements:

- improve comments

- use better variable names

- remove dead code

- Package.lookup: make it am ad_instproc and make clear, it returns an integer

  1. … 2 more files in changeset.
Make so that newly displayed column 'title' in child-resources is not displayed by default, therefore keeping old behavior for those who don't want it explicitly

Now one can either select displayed columns by blacklist (hide) or whitelist (columns)

Use a more generic message key for name (e.g. for cases when this is used for something different than pages, such as files)

Display the title in child-resources (optionally hidden)

Add a new Action widget property "confirm_message": when this is set on a BulkAction, will generate the javascript to ask for confirmation using specified message

  1. … 2 more files in changeset.
Do not render the include twice

Localize "Delete selected" tooltip, update german and italian translations

  1. … 4 more files in changeset.
Make so that child-resources includlet redirects bulk-actions to the page it is included into (this is for most upstream scenarios the folder page as before) and make www-bulk_delete sensitive to the new return_url query parameter

  1. … 1 more file in changeset.
Localize bulk-actions label in the child-resources include (many thanks to Monika Andergassen)

Port from downstream

  1. … 6 more files in changeset.