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]].
This commit is contained in:
2017-01-20 16:05:40 +01:00
parent 3bcfb0a44a
commit 2d698f604b
59 changed files with 1761 additions and 679 deletions

View File

@@ -44,4 +44,11 @@ feature -- Access
deferred
end
blogs_from_user_with_title (a_user: CMS_USER; a_title: READABLE_STRING_GENERAL): LIST [CMS_NODE]
-- List of blogs from `a_user' with title `a_title` and ordered by creation date.
require
has_id: a_user.has_id
deferred
end
end

View File

@@ -44,4 +44,10 @@ feature -- Access
do
create {ARRAYED_LIST [CMS_NODE]} Result.make (0)
end
blogs_from_user_with_title (a_user: CMS_USER; a_title: READABLE_STRING_GENERAL): LIST [CMS_NODE]
-- List of blogs from `a_user' with title `a_title` and ordered by creation date.
do
create {ARRAYED_LIST [CMS_NODE]} Result.make (0)
end
end

View File

@@ -105,7 +105,7 @@ feature -- Access
write_information_log (generator + ".blogs_from_user_limited")
from
create l_parameters.make (2)
create l_parameters.make (3)
l_parameters.put (a_limit, "limit")
l_parameters.put (a_offset, "offset")
l_parameters.put (a_user.id, "user")
@@ -122,6 +122,33 @@ feature -- Access
sql_finalize
end
blogs_from_user_with_title (a_user: CMS_USER; a_title: READABLE_STRING_GENERAL): LIST [CMS_NODE]
-- <Precursor>
local
l_parameters: STRING_TABLE [detachable ANY]
do
create {ARRAYED_LIST [CMS_NODE]} Result.make (0)
error_handler.reset
write_information_log (generator + ".blogs_from_user_with_title")
from
create l_parameters.make (2)
l_parameters.put (a_user.id, "user")
l_parameters.put (a_title, "title")
sql_query (sql_blogs_from_user_with_title, l_parameters)
sql_start
until
sql_after
loop
if attached fetch_node as l_node then
Result.force (l_node)
end
sql_forth
end
sql_finalize
end
feature {NONE} -- Queries
sql_select_blog_count: STRING = "SELECT count(*) FROM nodes WHERE status != -1 AND type = %"blog%";"
@@ -136,10 +163,12 @@ feature {NONE} -- Queries
-- SQL Query to retrieve all nodes that are from the type "blog" ordered by descending creation date.
sql_blogs_limited: STRING = "SELECT * FROM nodes WHERE status != -1 AND type = %"blog%" ORDER BY created DESC LIMIT :limit OFFSET :offset ;"
--- SQL Query to retrieve all node of type "blog" limited by limit and starting at offset
--- SQL Query to retrieve all nodes of type "blog" limited by limit and starting at offset
sql_blogs_from_user_limited: STRING = "SELECT * FROM nodes WHERE status != -1 AND type = %"blog%" AND author = :user ORDER BY created DESC LIMIT :limit OFFSET :offset ;"
--- SQL Query to retrieve all node of type "blog" from author with id limited by limit + offset
--- SQL Query to retrieve all nodes of type "blog" from author with id limited by limit + offset
sql_blogs_from_user_with_title: STRING = "SELECT * FROM nodes WHERE status != -1 AND type = %"blog%" AND author = :user AND title = :title ORDER BY created DESC;"
--- SQL Query to retrieve all nodes of type "blog" from author with title .
end