Made CMS_SETUP.site_url detachable.

Cosmetic, avoid long lines of comments.
Added debug ("refactor_fixme") around a few REFACTORING_HELPER.fixme (...)
Better message for a few fixme(...) related to unimplemented routines.
This commit is contained in:
2014-11-12 17:13:18 +01:00
parent 48a8ac4a1c
commit a524b80108
10 changed files with 74 additions and 37 deletions

View File

@@ -1,8 +1,14 @@
note
description: "[
Configure the basic settings for a CMS application, for example where to look for themes, the name of the application, etc.
The settings can be configured by default using the current working directory, using the commands provided by the class or by an external configuration file
]"
Configure the basic settings for a CMS application,
i.e: where to look for themes, name of the application, etc...
The settings can be configured by default:
- using the current working directory,
- using the commands provided by the class
- or by an external configuration file.
]"
class
CMS_CONFIGURATION
@@ -119,7 +125,7 @@ feature -- Access
end
end
site_url (dft: like site_url): READABLE_STRING_8
site_url (dft: like site_url): detachable READABLE_STRING_8
do
if attached options.item ("site.url") as s then
Result := s

View File

@@ -35,7 +35,7 @@ feature {NONE} -- Initialization
configure
do
site_id := configuration.site_id
site_url := configuration.site_url ("")
site_url := configuration.site_url (Void)
site_name := configuration.site_name ("EWF::CMS")
site_email := configuration.site_email ("webmaster")
themes_location := configuration.themes_location
@@ -104,7 +104,7 @@ feature -- Compute location
-- assets (js, css, images, etc)
-- Not used at the moment.
do
debug
debug ("refactor_fixme")
fixme ("Check if we really need it")
end
theme_resource_location := theme_location

View File

@@ -1,12 +1,12 @@
note
description: "[
CMS API Layout, to provide paths
*config
*application
*logs
*documentation
*themes
]"
CMS Layout providing file system locations for
- config
- application
- logs
- documentation
- themes
]"
date: "$Date$"
revision: "$Revision$"

View File

@@ -39,8 +39,8 @@ feature -- Access: Site
site_email: READABLE_STRING_8
-- Email for the site.
site_url: READABLE_STRING_8
-- Base url of the site.
site_url: detachable READABLE_STRING_8
-- Optional base url of the site.
front_page_path: detachable READABLE_STRING_8
-- Optional path defining the front page.

View File

@@ -94,7 +94,9 @@ feature -- Access: Node
nodes: LIST[CMS_NODE]
-- List of nodes.
do
fixme ("Implementation")
debug ("refactor_fixme")
fixme ("Implementation")
end
Result := storage.recent_nodes (0, 10)
end
@@ -107,7 +109,9 @@ feature -- Access: Node
node (a_id: INTEGER_64): detachable CMS_NODE
-- Node by ID.
do
fixme ("Check preconditions")
debug ("refactor_fixme")
fixme ("Check preconditions")
end
Result := storage.node (a_id)
end
@@ -134,21 +138,27 @@ feature -- Change: Node
update_node_title (a_id: like {CMS_USER}.id; a_node_id: like {CMS_NODE}.id; a_title: READABLE_STRING_32)
-- Update node title, with user identified by `a_id', with node id `a_node_id' and a new title `a_title'.
do
fixme ("Check preconditions")
debug ("refactor_fixme")
fixme ("Check preconditions")
end
storage.update_node_title (a_id,a_node_id,a_title)
end
update_node_summary (a_id: like {CMS_USER}.id; a_node_id: like {CMS_NODE}.id; a_summary: READABLE_STRING_32)
-- Update node summary, with user identified by `a_id', with node id `a_node_id' and a new summary `a_summary'.
do
fixme ("Check preconditions")
debug ("refactor_fixme")
fixme ("Check preconditions")
end
storage.update_node_summary (a_id,a_node_id, a_summary)
end
update_node_content (a_id: like {CMS_USER}.id; a_node_id: like {CMS_NODE}.id; a_content: READABLE_STRING_32)
-- Update node content, with user identified by `a_id', with node id `a_node_id' and a new content `a_content'.
do
fixme ("Check preconditions")
debug ("refactor_fixme")
fixme ("Check preconditions")
end
storage.update_node_content (a_id,a_node_id, a_content)
end
@@ -172,7 +182,9 @@ feature -- Change User
then
storage.save_user (a_user)
else
fixme ("Add error")
debug ("refactor_fixme")
fixme ("Add error")
end
end
end

View File

@@ -245,7 +245,7 @@ feature -- Execution
execute_default (req: WSF_REQUEST; res: WSF_RESPONSE)
-- Default request handler if no other are relevant
do
fixme ("To Implement")
to_implement ("Default response for CMS_SERVICE")
end
note

View File

@@ -274,10 +274,12 @@ feature -- Blocks initialization
local
l_table: like block_region_settings
do
fixme ("CHECK:Can we use the same structure as in theme.info?")
debug ("refactor_fixme")
fixme ("CHECK:Can we use the same structure as in theme.info?")
fixme ("let the user choose ...")
end
create regions.make_caseless (5)
fixme ("let the user choose ...")
create l_table.make_caseless (10)
l_table["top"] := "top"
l_table["header"] := "header"
@@ -338,7 +340,9 @@ feature -- Blocks
get_blocks
do
fixme ("find a way to have this in configuration or database, and allow different order")
debug ("refactor_fixme")
fixme ("find a way to have this in configuration or database, and allow different order")
end
add_block (top_header_block, "top")
add_block (header_block, "header")
if attached message_block as m then
@@ -796,7 +800,9 @@ feature -- Generation
common_prepare (page: CMS_HTML_PAGE)
-- Common preparation for page `page'.
do
fixme ("Fix generation common")
debug ("refactor_fixme")
fixme ("Fix generation common")
end
-- Information
page.set_title (title)

View File

@@ -37,7 +37,9 @@ feature -- Conversion
menu_html (a_menu: CMS_MENU; is_horizontal: BOOLEAN): STRING_8
do
fixme ("Refactor HTML code to use the new Bootstrap theme template")
debug ("refactor_fixme")
fixme ("Refactor HTML code to use the new Bootstrap theme template")
end
create Result.make_from_string ("<div id=%""+ a_menu.name +"%" class=%"menu%">")
if is_horizontal then
Result.append ("<ul class=%"horizontal%" >%N")
@@ -57,7 +59,9 @@ feature -- Conversion
local
s: STRING
do
fixme ("Refactor HTML code to use the new Bootstrap theme template")
debug ("refactor_fixme")
fixme ("Refactor HTML code to use the new Bootstrap theme template")
end
if attached {CMS_CONTENT_BLOCK} a_block as l_content_block and then l_content_block.is_raw then
create s.make_empty
if attached l_content_block.title as l_title then
@@ -87,7 +91,9 @@ feature {NONE} -- Implementation
local
cl: STRING
do
fixme ("Remove HTML from Eiffel")
debug ("refactor_fixme")
fixme ("Remove HTML from Eiffel")
end
create cl.make_empty
if lnk.is_active then
cl.append ("active ")

View File

@@ -25,9 +25,13 @@ feature{NONE} -- Initialization
set_creation_date (l_time)
set_modification_date (l_time)
set_publication_date (l_time)
fixme ("Remove harcode format")
debug ("refactor_fixme")
fixme ("Remove harcode format")
end
set_format ("HTML")
fixme ("Remove harcode content type")
debug ("refactor_fixme")
fixme ("Remove harcode content type")
end
set_content_type ("Page")
ensure
content_set: content = a_content

View File

@@ -39,7 +39,7 @@ feature -- Access: user
all_users: LIST [CMS_USER]
do
to_implement("Not implemented!!!")
to_implement (generator + ".all_users")
create {ARRAYED_LIST[CMS_USER]} Result.make (0)
end
@@ -88,14 +88,14 @@ feature -- User Nodes
user_collaborator_nodes (a_id: like {CMS_USER}.id): LIST[CMS_NODE]
-- Possible list of nodes where the user identified by `a_id', is a collaborator.
do
fixme ("Not implemented!!!")
to_implement (generator + ".user_collaborator_nodes")
create {ARRAYED_LIST[CMS_NODE]} Result.make (0)
end
user_author_nodes (a_id: like {CMS_USER}.id): LIST[CMS_NODE]
-- Possible list of nodes where the user identified by `a_id', is the author.
do
fixme ("Not implemented!!!")
to_implement (generator + ".user_author_nodes")
create {ARRAYED_LIST[CMS_NODE]} Result.make (0)
end
@@ -103,12 +103,12 @@ feature -- Access: roles and permissions
user_role_by_id (a_id: like {CMS_USER_ROLE}.id): detachable CMS_USER_ROLE
do
fixme ("Not Implemented!!!")
to_implement (generator + ".user_role_by_id")
end
user_roles: LIST [CMS_USER_ROLE]
do
fixme ("Not Implemented!!!")
to_implement (generator + ".user_roles")
create {ARRAYED_LIST[CMS_USER_ROLE]} Result.make (0)
end
@@ -116,7 +116,7 @@ feature -- Change: roles and permissions
save_user_role (a_user_role: CMS_USER_ROLE)
do
fixme ("Not Implemented!!!")
to_implement (generator + ".save_user_role")
end
feature -- Change: user
@@ -133,6 +133,9 @@ feature -- Change: user
user_provider.new_user (a_user.name, l_password, l_email)
connection.commit
else
debug ("refactor_fixme")
fixme ("maybe we should not always carry password, in this case, to implement the else part..")
end
end
end