Commit Graph

96 Commits

Author SHA1 Message Date
Jocelyn Fiat
34f0aa5844 Improved feed aggregation module.
Added support to choose either atom or rss for the "/feed" format.
  Added support for feed format view to feed aggregation.
  Use proper content type for RSS and ATOM response.
  For feed aggregation  use `?view=feed` or `?view=feed.atom` or `?view=feed.rss`
  Improved sized feed view.
  Use site name for recent changes feed title.
  Better name for node feeds (include the site name).
  Use current date when a feed aggregation is converted to a new feed, to set the last build date.
  Fixed category filter per feed location for the feed aggregation module.
Fixed authentication module, where a potential case (but not probable) had no response content.
Cosmetic and minor changes on messaging module.
2017-06-12 09:36:29 +02:00
Jocelyn Fiat
78ef7af5f8 Removed obsolete calls, harmonized predefine response, added non admin user pages.
When access is denied, also provide when possible and wanted, the needed
permissions so that in the future, user will be able to ask for
permission easily.
Renamed previous user handlers as admin user handlers.
Added non admin user handler /user/{uid} .
Add new `send_...` response to `CMS_API.response_api`, and use them
instead of `create {...RESPONSE}.... ; execute`.
Fixed potential issue with storage mailer initialization if folder does
not exist.
Added utf_8_encoded helpers function on CMS_API interface.
Fixed a few unicode potential issues.
Removed a few obsolete calls.
2017-06-09 09:29:41 +02:00
Jocelyn Fiat
1aad62ed52 Added CMS_RESPONSE.request_url (...)
Update a few callers of CMS_RESPONSE.url (...).
Renamed the demo files using "server" instead of "demo".
2017-04-11 13:19:39 +02:00
Jocelyn Fiat
3d2c30ea5f Fixed published node access. 2017-03-30 19:15:12 +02:00
Jocelyn Fiat
9d59f37138 Change a fixme into a comment. 2017-03-30 18:17:39 +02:00
Jocelyn Fiat
5273940b82 Fixed access to non published nodes (and also for the related revisions if any)! 2017-03-30 17:32:15 +02:00
Jocelyn Fiat
e547279016 Implemented save/publish/unpublish control on nodes.
Display on published blogs (except for admin, or author of the related blog).
2017-03-30 17:16:02 +02:00
Jocelyn Fiat
cd48fe182a Always set the content type when it is known for node view. 2017-03-30 14:28:00 +02:00
67f6591851 Better control on path alias.
If user has permission to edit, provide a text input, otherwise just a label if path are required.
Reviewed html generated for taxonomy field in node edit form.
Improved the blog entries list by providing (if permitted) link to blog entry creation, and link to the user entries or all entries.
2017-03-06 21:27:35 +01:00
2fc0c6f7b7 Fixed wrong initial offset. 2017-03-03 13:36:56 +01:00
bb25a8b12e Added feed ordered by publication on /nodes/{type}/feed. 2017-03-03 13:16:04 +01:00
6cb6dd1609 Added notion of author (owner) and editor to allow the editing of node by non owner users. 2017-03-03 11:12:51 +01:00
a611b27ad9 Fixed node preview. 2017-03-01 16:33:17 +01:00
13d0927c58 Added default path alias for node.
Fixed set path alias, when alias already exists in the history.
2017-02-28 17:35:18 +01:00
a341bd98eb Improved node management.
- List node by node types
- fixed the trash/restore/delete workflow
Added messaging module to send message to cms users (by email for now).
Added early protection for cache, export and import functionalities.
2017-02-28 11:24:48 +01:00
b0b92c2d36 Added finer control on path_alias.
- added a permission to edit path alias.
 - added an admin handler to manage path aliases.
When path alias is changed on node, always keep previous path alias.
  (can be unset from the related admin section).
CMS_API.storage.path_aliases returns the list of path aliases (recents aliases come first).
2017-02-08 23:01:46 +01:00
a1e8cc5128 Make sure to use the user profile name whenever it is possible. 2017-02-08 18:41:17 +01:00
d97542f797 Added CMS_CORE_MODULE which is the mandatory module for ROC CMS.
Added CMS_USER.profile_name .
Improved module managements with install vs enable.
  - enabled/disabled status can also be stored in database.
Install procedure do not install all available modules anymore.
2017-02-07 16:52:08 +01:00
f0a3b2bd3a Collapse expanded keywords ($Date$, $Author$, ...) 2017-02-06 18:45:44 +01:00
32a47fbba3 When importing, do not change modification date.
Display /nodes sorted by changed date.
Improved the import form, and report wrong import folder. Only import from folder inside site/import for security reason.
2017-01-27 23:12:02 +01:00
7c398a9f33 Added support for user, user_roles, page, blog export and import.
Added basic support for comments, for now mainly viewing comments from database (no submission forms yet).
Added first simple wikitext filter (render wikitext content as xhtml).
Ensure response content type is text/html with utf-8 charset.
2017-01-27 11:57:52 +01:00
2d698f604b Extracted page support from cms_node_module, and add a proper CMS_PAGE_MODULE.
- now, the CMS_PAGE_MODULE has to be declared in the related CMS_SETUP via CMS_EXECUTION.
   (See demo for example)

Improved the export facilities.
  Implemented blog and page export.
Added import facilities.
  Implemented blog and page import.

Improved node revision web interface (allow to edit a past revision, in order to restore it as latest revisionm i.e current).
Removed specific tag from blog module, and reuse the taxonomy module for that purpose.

Added WIKITEXT module that provide a WIKITEXT_FILTER, so now we can have wikitext content.
   - for now, no support for wiki links such as [[Foobar]].
2017-01-20 16:05:40 +01:00
3496536751 Added CMS_API.request: WSF_REQUEST to ease dev of ROC CMS code.
- Removed CMS_REQUEST_UTIL
  - centralize a few request related code into CMS_API
Added CMS_API.user, CMS_API.set_user (CMS_USER), ... and user related routines.

Refactored Auth related code
  - added various abstractions to factorize implementation and harmonize solutions.
  - revisited the logout strategy.
  - updated the account info page, and remove info user should not care about.
  - simplified the process, and encourage auth module to follow same design.

Added CMS_LINK helper routines to modify the related query string.
Removed CMS_USER.profile (and related routines)
   - It was not used so far.
   - it will probably a specific module later, if needed.

Update various module to avoid fetching user from sql directly, and let this task to CMS_USER_API.

Removed CMS_NODE_API.node_author (a_node: CMS_NODE): detachable CMS_USER,
   - as the info is already in CMS_NODE.author

Added CMS_RESPONSE.redirection_delay, if ever one code want to redirect after a few seconds.
Added the request uri info to the not found cms response.
2016-01-29 21:58:49 +01:00
ed0d9c8d07 Use {CMS_LOG}.level_notice and related constant when using api.log(..) 2016-01-12 16:14:54 +01:00
bbbdac12c8 Moved taxonomy html generation to CMS_TAXONOMY_API. 2015-12-16 21:03:03 +01:00
e50fb6959e Moved taxonomy integration for web form inside CMS_TAXONOMY_API.
Moved a few helpers routine from CMS_RESPONSE to CMS_API.
Added CMS_CONTENT.identifier: detachable READABLE_STRING_32 .
2015-12-16 15:59:22 +01:00
ce8de442e9 Implemented taxonomy administration pages
- create term, vocabulary, add or remove term from vocabularies, ...
Fixed content editing related to taxonomy  (especially with multiple terms vs tags).
Fixed various SQL storage issue related to taxonomy and vocabularies.
Added CMS_RESPONSE.wsf_theme as helper.
2015-12-10 11:21:20 +01:00
6313007fbf Refactored and update CMS hooks design. (Move from CMS_RESPONSE to CMS_API).
Moved content_types and content_type_webform_managers from CMS_RESPONSE to CMS_API.
Updated the way to output content (node, ...) to html page.
   See CMS_CONTENT_TYPE_WEBFORM_MANAGER.append_cointent_as_html_to (...).
   Added notion of "teaser" (short version of the content), as opposed to full content.
One can use CMS_API.html_encoder ... when possible, same for `formats', ...
Added bridge from CMS_MODULE_API to CMS_API's encoders.
Added new CMS_TAXONOMY_HOOK used to retrieve list of content associated with a specific term.
Moved up to CMS_RESPONSE a few features which was available only in specific descendants.

Added /taxonomy/term/{termid} implementation.
2015-12-07 18:21:40 +01:00
ecbcb6a5cb Added notion of CMS_CONTENT as ancestor of CMS_NODE.
Moved CMS_CONTENT_TYPE to core library.
Added basic and limited taxonomy query /taxonomy/term/{termid} .
2015-12-03 23:01:31 +01:00
a5c117e46e Merge branch 'taxonomy' 2015-12-03 19:26:43 +01:00
20dfce1396 Improved taxonomy by supporting tags, multiple terms allowed, and required kind of vocabulary for specific content type.
Updated node web form, to support taxonomy editing if allowed (specific support for CMS_VOCABULARY.is_tags: BOOLEAN).
Added notion of required or optional module dependencies.
2015-12-03 19:24:58 +01:00
jvelilla
a11a93c285 Update code to use CMS_API.unset_path_alias
Updated CMS_NODE_STORAGE_SQL renamed sql_restore_node as sql_update_note_status, updated
related code.
2015-12-02 16:14:54 -03:00
jvelilla
fade19bbee Added precondition to NODE_FORM_RESPONSE.new_delete_form
Added transaction support to CMS_NODE_STORAGE_SQL.delete_node_base
2015-12-02 12:10:03 -03:00
jvelilla
9da8b8a025 Fixed: delete-trash a node.
Added code to remove path_aliase when we delete a node.
2015-12-01 19:20:16 -03:00
a84f86d7a2 Addressed various unicode related issues.
Note this is using recent changes from text_filter library.
2015-10-20 18:49:40 +02:00
jvelilla
ed614a662c Updated CMS node and blog to remove extension data.
Comments: minor update.

Updated CMS_NODE_STORAGE_I API.
Delete a node using a node as formal parameter instead of node id.
Clean code and update log information.

Added precondition to delete node to accept nodes with a valid a id.

Added missing assertions tag names.
2015-09-15 14:28:33 -03:00
18e159ad3c Simplified the add child mechanism, by using a query parameter ?parent=nid
(instead of specific node/{nid}/add_child/page url)
Fixed implementation of `CMS_NODE_API.is_node_a_parent_of (..)',
  and improved parent validity checking against cycle.
2015-09-09 23:04:08 +02:00
438259033a Renamed link "Trash" to "Move to trash". 2015-09-09 22:10:13 +02:00
62e74ea6cd Refactor notion of trash and delete.
- Trash a node now does a soft delete (move to trash container).
 - Delete a node now remove it from the storage (no undo).

Signed-off-by: jvelilla <javier.hector@gmail.com>
2015-09-09 22:05:23 +02:00
32a409b7e9 Refactored add child feature, to have all the page specific code in CMS_PAGE_NODE_TYPE_WEBFORM_MANAGER (and not in the general node code).
Note that ideally PAGE could be a separated page node module (as it is for blog).
Added listing of children for each "page".
2015-09-09 21:58:16 +02:00
jvelilla
eb70af6f19 CMS_NODE_API.available_parents_for_node
- Fixed comment.
     - added check to know if there are potencial cycles
     - added postcondition to ensure the list of potencial parent will not produce a cycle.

CMS_PAGE_NODE_TYPE_WEBFORM_MANAGER.update_node
     - Updated code to handle unassing parent from a node when the user
     - submit a -1 value.

NODE_FORM_RESPONSE.edit_form_validation
      - Added validation for node_parent, check if the input is valid and then
      - if exist a valid node in the list of available parents for the current node.

Signed-off-by: jvelilla <javier.hector@gmail.com>
2015-09-09 16:53:37 +02:00
jvelilla
544e6540ed Add child page support.
- Add support to create a new node as a child of an existing node.
   - Update or add a parent for a given node.
Fix delete and trash behavior: when a node is not published only the
   - author or admin see it.

Fix Node and Page node Revisions.
2015-09-08 15:57:17 +02:00
923089baa1 Better js code to apply CKEditor.replace, mainly to select only textarea.name=$name.
code cleaning.
2015-08-18 19:24:18 +02:00
1d7d79d69e Cleaned up hooks related code, and always go via CMS_RESPONSE.hooks 2015-08-12 17:50:23 +02:00
46014da3d8 Added recent_changes module.
Revisited hooks management, and added new CMS_HOOK_MANAGER.
Added admin, and other link into navigation menu that goes into first sidebar.
Fixed theme info, and template for sidebar ids.
Better css class name for cms node content.
2015-08-12 17:30:07 +02:00
aff6b07c80 Fixing edit node form field title and id. 2015-08-10 12:49:40 +02:00
cd0c2acd87 Added revisions support to node management.
Updated node extension implementation.
Updated known permissions for node module.
Improved code for node storage extension , in preparation to code factorization.
Ensured that author is updated when saved.
2015-08-07 19:17:25 +02:00
bba1d57ce3 Fixed and improved various issue in admin module (especially the Role editing which was not working as expected.)
Added CMS_MODULE.permissions to allow module to declare the potential permissions.
Added support for CMS_LINK.is_forbidden, in relation with CMS_LOCAL_LINK.permission_arguments.
Split link "username (Logout)" into 2 links "username" and "logout".
Fixed/Changed the way auth modules alter the logout link based on "(Logout)" title, by safer solution based on `location' of the link.

Fixed usage of WSF_REQUEST.path_info by using percent_encoded_path_info which is not non unicode path info to be used most of the time.
Merged CMS_REPONSE.variables and CMS_REPONSE.values .
When possible, prefer usage of CMS_RESPONSE.user instead of CMS_REQUEST_UTIL.current_user (WSF_REQUEST) whenever it is possible.
When possible, prefer usage of CMS_RESPONSE.location, rather than usage of WSF_REQUEST.(percent_encoded_)path_info .
Code cleaning.
2015-08-04 12:48:14 +02:00
5d81f1d195 Improve previous commit to show allowed tabs only if user has access to it. 2015-08-03 12:56:05 +02:00
jvelilla
863a1e7b98 Show tabs iff a user is authenticated 2015-07-30 17:36:14 -03:00