Added notion of "front" page.
Changed CMS_HOOK_BLOCK.get_block_view to accept only attached string for `a_block_id'. Keep simple name in CMS_MENU_SYSTEM. Module that implements a CMS_HOOK need now to redefine CMS_MODULE.register_hooks . Added simple code for NODE_MODULE, in order to see something. Added CMS_URL_UTILITIES that should be used to compute url for cms path such as "/foo/bar". Implemented get_active in CMS_RESPONSE to update the "is_active" on each link. Added NOT_IMPLEMENTED_ERROR_CMS_RESPONSE. Implemented a few hooks in DEMO module, for testing. Updated smarty template related code.
This commit is contained in:
@@ -45,6 +45,10 @@ feature -- Access: Site
|
|||||||
|
|
||||||
files_location: PATH
|
files_location: PATH
|
||||||
|
|
||||||
|
front_page_path: detachable READABLE_STRING_8
|
||||||
|
-- Optional path defining the front page.
|
||||||
|
-- By default "" or "/".
|
||||||
|
|
||||||
feature -- Access: Theme
|
feature -- Access: Theme
|
||||||
|
|
||||||
themes_location: PATH
|
themes_location: PATH
|
||||||
|
|||||||
@@ -13,10 +13,12 @@ inherit
|
|||||||
feature -- Hook
|
feature -- Hook
|
||||||
|
|
||||||
block_list: ITERABLE [like {CMS_BLOCK}.name]
|
block_list: ITERABLE [like {CMS_BLOCK}.name]
|
||||||
|
-- List of block names, managed by current object.
|
||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
get_block_view (a_block_id: detachable READABLE_STRING_8; a_response: CMS_RESPONSE)
|
get_block_view (a_block_id: READABLE_STRING_8; a_response: CMS_RESPONSE)
|
||||||
|
-- Get block object identified by `a_block_id' and associate with `a_response'.
|
||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ feature {NONE} -- Initialization
|
|||||||
do
|
do
|
||||||
to_implement ("Refactor, take the info from a Database or Configuration file.")
|
to_implement ("Refactor, take the info from a Database or Configuration file.")
|
||||||
create items.make (5)
|
create items.make (5)
|
||||||
force (create {CMS_MENU}.make ("primary_nav", 3)) -- primary menu
|
force (create {CMS_MENU}.make ("primary", 3)) -- primary menu
|
||||||
force (create {CMS_MENU}.make_with_title ("management_nav", "Management", 3)) -- secondary in admin view.
|
force (create {CMS_MENU}.make_with_title ("management", "Management", 3)) -- secondary in admin view.
|
||||||
force (create {CMS_MENU}.make_with_title ("secondary_nav", "Navigation", 3)) -- secondary
|
force (create {CMS_MENU}.make_with_title ("secondary", "Navigation", 3)) -- secondary
|
||||||
force (create {CMS_MENU}.make_with_title ("user", "User", 3)) -- first_side_bar
|
force (create {CMS_MENU}.make_with_title ("user", "User", 3)) -- first_side_bar
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -41,18 +41,30 @@ feature -- Access
|
|||||||
end
|
end
|
||||||
|
|
||||||
main_menu: CMS_MENU
|
main_menu: CMS_MENU
|
||||||
|
obsolete
|
||||||
|
"Use `primary_menu' [Nov/2014]"
|
||||||
do
|
do
|
||||||
Result := item ("primary_nav")
|
Result := primary_menu
|
||||||
|
end
|
||||||
|
|
||||||
|
primary_menu: CMS_MENU
|
||||||
|
do
|
||||||
|
Result := item ("primary")
|
||||||
|
end
|
||||||
|
|
||||||
|
secondary_menu: CMS_MENU
|
||||||
|
do
|
||||||
|
Result := item ("secondary")
|
||||||
end
|
end
|
||||||
|
|
||||||
management_menu: CMS_MENU
|
management_menu: CMS_MENU
|
||||||
do
|
do
|
||||||
Result := item ("management_nav")
|
Result := item ("management")
|
||||||
end
|
end
|
||||||
|
|
||||||
navigation_menu: CMS_MENU
|
navigation_menu: CMS_MENU
|
||||||
do
|
do
|
||||||
Result := item ("secondary_nav")
|
Result := item ("navigation")
|
||||||
end
|
end
|
||||||
|
|
||||||
user_menu: CMS_MENU
|
user_menu: CMS_MENU
|
||||||
|
|||||||
@@ -70,10 +70,4 @@ feature {NONE} -- Implementation: routes
|
|||||||
a_router.handle_with_request_methods ("/basic_auth_logoff", l_bal_handler, l_methods)
|
a_router.handle_with_request_methods ("/basic_auth_logoff", l_bal_handler, l_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Hooks
|
|
||||||
|
|
||||||
register_hooks (a_response: CMS_RESPONSE)
|
|
||||||
do
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ feature -- Hooks configuration
|
|||||||
-- Module hooks configuration.
|
-- Module hooks configuration.
|
||||||
require
|
require
|
||||||
is_enabled: is_enabled
|
is_enabled: is_enabled
|
||||||
deferred
|
do
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Filter
|
feature -- Filter
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ class
|
|||||||
inherit
|
inherit
|
||||||
|
|
||||||
CMS_MODULE
|
CMS_MODULE
|
||||||
|
redefine
|
||||||
|
register_hooks
|
||||||
|
end
|
||||||
|
|
||||||
CMS_HOOK_MENU_ALTER
|
CMS_HOOK_MENU_ALTER
|
||||||
|
|
||||||
@@ -68,6 +71,7 @@ feature {NONE} -- Implementation: routes
|
|||||||
l_methods.enable_put
|
l_methods.enable_put
|
||||||
l_methods.enable_delete
|
l_methods.enable_delete
|
||||||
a_router.handle_with_request_methods ("/node/{id}", l_node_handler, l_methods)
|
a_router.handle_with_request_methods ("/node/{id}", l_node_handler, l_methods)
|
||||||
|
a_router.handle_with_request_methods ("/nodes/", create {WSF_URI_AGENT_HANDLER}.make (agent do_get_nodes (?,?, api)), a_router.methods_get)
|
||||||
end
|
end
|
||||||
|
|
||||||
configure_api_nodes (api: CMS_API; a_router: WSF_ROUTER)
|
configure_api_nodes (api: CMS_API; a_router: WSF_ROUTER)
|
||||||
@@ -94,7 +98,6 @@ feature {NONE} -- Implementation: routes
|
|||||||
a_router.handle_with_request_methods ("/node/{id}/summary", l_report_handler, l_methods)
|
a_router.handle_with_request_methods ("/node/{id}/summary", l_report_handler, l_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
configure_api_node_title (api: CMS_API; a_router: WSF_ROUTER)
|
configure_api_node_title (api: CMS_API; a_router: WSF_ROUTER)
|
||||||
local
|
local
|
||||||
l_report_handler: NODE_TITLE_HANDLER
|
l_report_handler: NODE_TITLE_HANDLER
|
||||||
@@ -134,17 +137,12 @@ feature -- Hooks
|
|||||||
Result := <<"node-info">>
|
Result := <<"node-info">>
|
||||||
end
|
end
|
||||||
|
|
||||||
get_block_view (a_block_id: detachable READABLE_STRING_8; a_response: CMS_RESPONSE)
|
get_block_view (a_block_id: READABLE_STRING_8; a_response: CMS_RESPONSE)
|
||||||
-- local
|
local
|
||||||
-- b: CMS_CONTENT_BLOCK
|
-- b: CMS_CONTENT_BLOCK
|
||||||
do
|
do
|
||||||
-- if
|
-- create b.make (a_block_id, "Block::node", "This is a block test", Void)
|
||||||
-- a_execution.is_front and then
|
-- a_response.add_block (b, "sidebar_second")
|
||||||
-- attached a_execution.user as u
|
|
||||||
-- then
|
|
||||||
-- create b.make ("node-info", "Node", "Node ...", a_execution.formats.plain_text)
|
|
||||||
-- a_execution.add_block (b, Void)
|
|
||||||
-- end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
menu_alter (a_menu_system: CMS_MENU_SYSTEM; a_response: CMS_RESPONSE)
|
menu_alter (a_menu_system: CMS_MENU_SYSTEM; a_response: CMS_RESPONSE)
|
||||||
@@ -152,8 +150,20 @@ feature -- Hooks
|
|||||||
lnk: CMS_LOCAL_LINK
|
lnk: CMS_LOCAL_LINK
|
||||||
-- perms: detachable ARRAYED_LIST [READABLE_STRING_8]
|
-- perms: detachable ARRAYED_LIST [READABLE_STRING_8]
|
||||||
do
|
do
|
||||||
create lnk.make ("List of nodes", "/nodes")
|
create lnk.make ("List of nodes", a_response.url ("/nodes", Void))
|
||||||
a_menu_system.main_menu.extend (lnk)
|
a_menu_system.primary_menu.extend (lnk)
|
||||||
|
end
|
||||||
|
|
||||||
|
feature -- Handler
|
||||||
|
|
||||||
|
do_get_nodes (req: WSF_REQUEST; res: WSF_RESPONSE; a_api: CMS_API)
|
||||||
|
local
|
||||||
|
r: CMS_RESPONSE
|
||||||
|
do
|
||||||
|
create {NOT_IMPLEMENTED_ERROR_CMS_RESPONSE} r.make (req, res, a_api)
|
||||||
|
r.set_main_content ("Sorry: listing the CMS nodes is not yet implemented.")
|
||||||
|
r.add_block (create {CMS_CONTENT_BLOCK}.make ("nodes_warning", Void, "/nodes/ is not yet implemented", Void), "highlighted")
|
||||||
|
r.execute
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
17
cms/src/service/cms_api_options.e
Normal file
17
cms/src/service/cms_api_options.e
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {CMS_API_OPTIONS}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
CMS_API_OPTIONS
|
||||||
|
|
||||||
|
inherit
|
||||||
|
WSF_API_OPTIONS
|
||||||
|
|
||||||
|
create
|
||||||
|
make,
|
||||||
|
make_from_manifest
|
||||||
|
|
||||||
|
end
|
||||||
@@ -9,6 +9,8 @@ deferred class
|
|||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
|
||||||
|
CMS_ENCODERS
|
||||||
|
|
||||||
REFACTORING_HELPER
|
REFACTORING_HELPER
|
||||||
|
|
||||||
feature -- User
|
feature -- User
|
||||||
@@ -21,8 +23,6 @@ feature -- User
|
|||||||
if attached {CMS_USER} current_user (req) as l_user then
|
if attached {CMS_USER} current_user (req) as l_user then
|
||||||
Result := l_user.name
|
Result := l_user.name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
current_user (req: WSF_REQUEST): detachable CMS_USER
|
current_user (req: WSF_REQUEST): detachable CMS_USER
|
||||||
|
|||||||
129
cms/src/service/cms_url_utilities.e
Normal file
129
cms/src/service/cms_url_utilities.e
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {CMS_URL_UTILITIES}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
deferred class
|
||||||
|
CMS_URL_UTILITIES
|
||||||
|
|
||||||
|
inherit
|
||||||
|
CMS_REQUEST_UTIL
|
||||||
|
|
||||||
|
feature -- Core
|
||||||
|
|
||||||
|
site_url: READABLE_STRING_8
|
||||||
|
deferred
|
||||||
|
end
|
||||||
|
|
||||||
|
base_url: detachable READABLE_STRING_8
|
||||||
|
-- Base url if any.
|
||||||
|
deferred
|
||||||
|
end
|
||||||
|
|
||||||
|
based_path (p: STRING): STRING
|
||||||
|
-- Path `p' in the context of the `base_url'
|
||||||
|
do
|
||||||
|
if attached base_url as l_base_url then
|
||||||
|
create Result.make_from_string (l_base_url)
|
||||||
|
if p.is_empty then
|
||||||
|
else
|
||||||
|
if p[1] = '/' then
|
||||||
|
Result.append (p.substring (2, p.count))
|
||||||
|
else
|
||||||
|
Result.append (p)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := p
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
feature -- Url
|
||||||
|
|
||||||
|
absolute_url (a_path: STRING; opts: detachable CMS_API_OPTIONS): STRING
|
||||||
|
local
|
||||||
|
l_opts: detachable CMS_API_OPTIONS
|
||||||
|
do
|
||||||
|
l_opts := opts
|
||||||
|
if l_opts = Void then
|
||||||
|
create l_opts.make (1)
|
||||||
|
end
|
||||||
|
l_opts.force (True, "absolute")
|
||||||
|
Result := url (a_path, l_opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
url (a_path: READABLE_STRING_8; opts: detachable CMS_API_OPTIONS): STRING
|
||||||
|
-- URL for path `a_path' and optional parameters from `opts'.
|
||||||
|
--| Options `opts' could be
|
||||||
|
--| - absolute: True|False => return absolute url
|
||||||
|
--| - query: string => append "?query"
|
||||||
|
--| - fragment: string => append "#fragment"
|
||||||
|
local
|
||||||
|
q,f: detachable STRING_8
|
||||||
|
l_abs: BOOLEAN
|
||||||
|
do
|
||||||
|
l_abs := False
|
||||||
|
|
||||||
|
if opts /= Void then
|
||||||
|
l_abs := opts.boolean_item ("absolute", l_abs)
|
||||||
|
if attached opts.item ("query") as l_query then
|
||||||
|
if attached {READABLE_STRING_8} l_query as s_value then
|
||||||
|
q := s_value
|
||||||
|
elseif attached {ITERABLE [TUPLE [key, value: READABLE_STRING_GENERAL]]} l_query as lst then
|
||||||
|
create q.make_empty
|
||||||
|
across
|
||||||
|
lst as c
|
||||||
|
loop
|
||||||
|
if q.is_empty then
|
||||||
|
else
|
||||||
|
q.append_character ('&')
|
||||||
|
end
|
||||||
|
q.append (url_encoded (c.item.key))
|
||||||
|
q.append_character ('=')
|
||||||
|
q.append (url_encoded (c.item.value))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if attached opts.string_item ("fragment") as s_frag then
|
||||||
|
f := s_frag
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if l_abs then
|
||||||
|
if a_path.substring_index ("://", 1) = 0 then
|
||||||
|
create Result.make_from_string (site_url)
|
||||||
|
if a_path.is_empty then
|
||||||
|
elseif Result.ends_with ("/") then
|
||||||
|
if a_path[1] = '/' then
|
||||||
|
Result.append_string (a_path.substring (2, a_path.count))
|
||||||
|
else
|
||||||
|
Result.append_string (a_path)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if a_path[1] = '/' then
|
||||||
|
Result.append_string (a_path)
|
||||||
|
else
|
||||||
|
Result.append_character ('/')
|
||||||
|
Result.append_string (a_path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := a_path
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := based_path (a_path)
|
||||||
|
end
|
||||||
|
if q /= Void then
|
||||||
|
Result.append ("?" + q)
|
||||||
|
end
|
||||||
|
if f /= Void then
|
||||||
|
Result.append ("#" + f)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
checked_url (a_url: READABLE_STRING_8): READABLE_STRING_8
|
||||||
|
do
|
||||||
|
Result := a_url
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -7,9 +7,7 @@ deferred class
|
|||||||
CMS_RESPONSE
|
CMS_RESPONSE
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_ENCODERS
|
CMS_URL_UTILITIES
|
||||||
|
|
||||||
CMS_REQUEST_UTIL
|
|
||||||
|
|
||||||
REFACTORING_HELPER
|
REFACTORING_HELPER
|
||||||
|
|
||||||
@@ -79,6 +77,36 @@ feature -- Access
|
|||||||
additional_page_head_lines: detachable LIST [READABLE_STRING_8]
|
additional_page_head_lines: detachable LIST [READABLE_STRING_8]
|
||||||
-- HTML>head>...extra lines
|
-- HTML>head>...extra lines
|
||||||
|
|
||||||
|
feature -- URL utilities
|
||||||
|
|
||||||
|
is_front: BOOLEAN
|
||||||
|
-- Is current response related to "front" page?
|
||||||
|
local
|
||||||
|
l_path_info: READABLE_STRING_8
|
||||||
|
do
|
||||||
|
l_path_info := request.path_info
|
||||||
|
if attached setup.front_page_path as l_front_page_path then
|
||||||
|
Result := l_front_page_path.same_string (l_path_info)
|
||||||
|
else
|
||||||
|
if attached base_url as l_base_url then
|
||||||
|
Result := l_path_info.same_string (l_base_url)
|
||||||
|
else
|
||||||
|
Result := l_path_info.is_empty or else l_path_info.same_string ("/")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
site_url: READABLE_STRING_8
|
||||||
|
do
|
||||||
|
Result := absolute_host (request, "")
|
||||||
|
end
|
||||||
|
|
||||||
|
base_url: detachable READABLE_STRING_8
|
||||||
|
-- Base url if any.
|
||||||
|
--| Usually it is Void, but it could be
|
||||||
|
--| /project/demo/
|
||||||
|
--| FIXME: for now, no way to change that. Always at the root "/"
|
||||||
|
|
||||||
feature -- Access: CMS
|
feature -- Access: CMS
|
||||||
|
|
||||||
site_name: STRING_32
|
site_name: STRING_32
|
||||||
@@ -94,6 +122,8 @@ feature -- Access: CMS
|
|||||||
values: CMS_VALUE_TABLE
|
values: CMS_VALUE_TABLE
|
||||||
-- Associated values indexed by string name.
|
-- Associated values indexed by string name.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
feature -- Permission
|
feature -- Permission
|
||||||
-- FIXME: to be implemented has_permissions and has_permission.
|
-- FIXME: to be implemented has_permissions and has_permission.
|
||||||
|
|
||||||
@@ -206,8 +236,15 @@ feature -- Menu
|
|||||||
menu_system: CMS_MENU_SYSTEM
|
menu_system: CMS_MENU_SYSTEM
|
||||||
|
|
||||||
main_menu: CMS_MENU
|
main_menu: CMS_MENU
|
||||||
|
obsolete
|
||||||
|
"Use `primary_menu' [Nov/2014]"
|
||||||
do
|
do
|
||||||
Result := menu_system.main_menu
|
Result := primary_menu
|
||||||
|
end
|
||||||
|
|
||||||
|
primary_menu: CMS_MENU
|
||||||
|
do
|
||||||
|
Result := menu_system.primary_menu
|
||||||
end
|
end
|
||||||
|
|
||||||
management_menu: CMS_MENU
|
management_menu: CMS_MENU
|
||||||
@@ -323,7 +360,6 @@ feature -- Blocks
|
|||||||
if attached navigation_menu_block as l_block then
|
if attached navigation_menu_block as l_block then
|
||||||
add_block (l_block, "first_sidebar")
|
add_block (l_block, "first_sidebar")
|
||||||
end
|
end
|
||||||
|
|
||||||
if attached user_menu_block as l_block then
|
if attached user_menu_block as l_block then
|
||||||
add_block (l_block, "first_sidebar")
|
add_block (l_block, "first_sidebar")
|
||||||
end
|
end
|
||||||
@@ -335,9 +371,9 @@ feature -- Blocks
|
|||||||
hook_block_view
|
hook_block_view
|
||||||
end
|
end
|
||||||
|
|
||||||
main_menu_block: detachable CMS_MENU_BLOCK
|
primary_menu_block: detachable CMS_MENU_BLOCK
|
||||||
do
|
do
|
||||||
if attached main_menu as m and then not m.is_empty then
|
if attached primary_menu as m and then not m.is_empty then
|
||||||
create Result.make (m)
|
create Result.make (m)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -384,17 +420,17 @@ feature -- Blocks
|
|||||||
s: STRING
|
s: STRING
|
||||||
l_hb: STRING
|
l_hb: STRING
|
||||||
do
|
do
|
||||||
create s.make_from_string (theme.menu_html (main_menu, True))
|
create s.make_from_string (theme.menu_html (primary_menu, True))
|
||||||
create l_hb.make_empty
|
create l_hb.make_empty
|
||||||
create Result.make ("header", Void, l_hb, formats.full_html)
|
create Result.make ("header", Void, l_hb, formats.full_html)
|
||||||
Result.set_is_raw (True)
|
Result.set_is_raw (True)
|
||||||
end
|
end
|
||||||
|
|
||||||
horizontal_main_menu_html: STRING
|
horizontal_primary_menu_html: STRING
|
||||||
do
|
do
|
||||||
create Result.make_empty
|
create Result.make_empty
|
||||||
Result.append ("<div id=%"menu-bar%">")
|
Result.append ("<div id=%"menu-bar%">")
|
||||||
Result.append (theme.menu_html (main_menu, True))
|
Result.append (theme.menu_html (primary_menu, True))
|
||||||
Result.append ("</div>")
|
Result.append ("</div>")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -564,11 +600,15 @@ feature -- Hook: block
|
|||||||
feature -- Menu: change
|
feature -- Menu: change
|
||||||
|
|
||||||
add_to_main_menu (lnk: CMS_LINK)
|
add_to_main_menu (lnk: CMS_LINK)
|
||||||
|
obsolete
|
||||||
|
"use add_to_primary_menu [Nov/2014]"
|
||||||
do
|
do
|
||||||
-- if attached {CMS_LOCAL_LINK} lnk as l_local then
|
add_to_primary_menu (lnk)
|
||||||
-- l_local.get_is_active (request)
|
end
|
||||||
-- end
|
|
||||||
main_menu.extend (lnk)
|
add_to_primary_menu (lnk: CMS_LINK)
|
||||||
|
do
|
||||||
|
add_to_menu (lnk, primary_menu)
|
||||||
end
|
end
|
||||||
|
|
||||||
add_to_menu (lnk: CMS_LINK; m: CMS_MENU)
|
add_to_menu (lnk: CMS_LINK; m: CMS_MENU)
|
||||||
@@ -681,11 +721,8 @@ feature -- Generation
|
|||||||
|
|
||||||
prepare (page: CMS_HTML_PAGE)
|
prepare (page: CMS_HTML_PAGE)
|
||||||
do
|
do
|
||||||
common_prepare (page)
|
|
||||||
custom_prepare (page)
|
|
||||||
|
|
||||||
-- Menu
|
-- Menu
|
||||||
add_to_main_menu (create {CMS_LOCAL_LINK}.make ("Home", "/"))
|
add_to_primary_menu (create {CMS_LOCAL_LINK}.make ("Home", "/"))
|
||||||
call_menu_alter_hooks (menu_system)
|
call_menu_alter_hooks (menu_system)
|
||||||
prepare_menu_system (menu_system)
|
prepare_menu_system (menu_system)
|
||||||
|
|
||||||
@@ -704,30 +741,14 @@ feature -- Generation
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Values
|
-- Values
|
||||||
if attached current_user_name (request) as l_user then
|
common_prepare (page)
|
||||||
page.register_variable (l_user, "user")
|
custom_prepare (page)
|
||||||
end
|
|
||||||
|
|
||||||
-- Cms values
|
-- Cms values
|
||||||
call_value_alter_hooks (values)
|
call_value_alter_hooks (values)
|
||||||
|
|
||||||
|
|
||||||
-- Predefined values
|
-- Predefined values
|
||||||
if attached title as l_title then
|
page.register_variable (page, "page") -- DO NOT REMOVE
|
||||||
page.set_title (l_title)
|
|
||||||
else
|
|
||||||
page.set_title ("CMS::" + request.path_info)
|
|
||||||
end
|
|
||||||
page.register_variable (page, "page")
|
|
||||||
|
|
||||||
-- page.register_variable (is_front, "is_front")
|
|
||||||
page.register_variable (request.absolute_script_url (""), "site_url")
|
|
||||||
page.register_variable (title, "site_title")
|
|
||||||
-- page.register_variable (site_name_and_slogan, "site_name_and_slogan")
|
|
||||||
-- if attached logo_location as l_logo then
|
|
||||||
-- page.register_variable (l_logo, "logo")
|
|
||||||
-- end
|
|
||||||
page.register_variable (horizontal_main_menu_html, "primary_nav")
|
|
||||||
|
|
||||||
-- Values Associated with current Execution object.
|
-- Values Associated with current Execution object.
|
||||||
across
|
across
|
||||||
@@ -755,32 +776,57 @@ feature -- Generation
|
|||||||
page.head_lines.force (hl.item)
|
page.head_lines.force (hl.item)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
common_prepare (page: CMS_HTML_PAGE)
|
common_prepare (page: CMS_HTML_PAGE)
|
||||||
|
-- Common preparation for page `page'.
|
||||||
do
|
do
|
||||||
fixme ("Fix generacion common")
|
fixme ("Fix generation common")
|
||||||
page.register_variable (request.absolute_script_url (""), "host")
|
|
||||||
page.register_variable (setup.is_web, "web")
|
-- Information
|
||||||
page.register_variable (setup.is_html, "html")
|
page.set_title (title)
|
||||||
|
debug ("cms")
|
||||||
|
if title = Void then
|
||||||
|
page.set_title ("CMS::" + request.path_info) --| FIXME: probably, should be removed and handled by theme.
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Variables
|
||||||
|
page.register_variable (request.absolute_script_url (""), "site_url")
|
||||||
|
page.register_variable (request.absolute_script_url (""), "host") -- Same as `site_url'.
|
||||||
if attached current_user_name (request) as l_user then
|
if attached current_user_name (request) as l_user then
|
||||||
page.register_variable (l_user, "user")
|
page.register_variable (l_user, "user")
|
||||||
end
|
end
|
||||||
|
page.register_variable (title, "site_title")
|
||||||
|
page.set_is_front (is_front)
|
||||||
|
|
||||||
|
-- Variables/Setup
|
||||||
|
page.register_variable (setup.is_web, "web")
|
||||||
|
page.register_variable (setup.is_html, "html")
|
||||||
|
|
||||||
|
-- Variables/Misc
|
||||||
|
|
||||||
|
-- FIXME: logo .. could be a settings of theme, managed by admin front-end/database.
|
||||||
|
-- if attached logo_location as l_logo then
|
||||||
|
-- page.register_variable (l_logo, "logo")
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- Menu...
|
||||||
|
page.register_variable (horizontal_primary_menu_html, "primary_nav")
|
||||||
end
|
end
|
||||||
|
|
||||||
custom_prepare (page: CMS_HTML_PAGE)
|
custom_prepare (page: CMS_HTML_PAGE)
|
||||||
|
-- Common preparation for page `page' that can be redefined by descendants.
|
||||||
do
|
do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
prepare_menu_system (a_menu_system: CMS_MENU_SYSTEM)
|
prepare_menu_system (a_menu_system: CMS_MENU_SYSTEM)
|
||||||
do
|
do
|
||||||
-- across
|
across
|
||||||
-- a_menu_system as c
|
a_menu_system as c
|
||||||
-- loop
|
loop
|
||||||
-- prepare_links (c.item)
|
prepare_links (c.item)
|
||||||
-- end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
prepare_links (a_menu: CMS_LINK_COMPOSITE)
|
prepare_links (a_menu: CMS_LINK_COMPOSITE)
|
||||||
@@ -796,7 +842,7 @@ feature -- Generation
|
|||||||
-- to_remove.force (lm)
|
-- to_remove.force (lm)
|
||||||
-- else
|
-- else
|
||||||
-- if lm.permission_arguments is Void , this is permitted
|
-- if lm.permission_arguments is Void , this is permitted
|
||||||
-- lm.get_is_active (request)
|
get_local_link_active_status (lm)
|
||||||
if attached {CMS_LINK_COMPOSITE} lm as comp then
|
if attached {CMS_LINK_COMPOSITE} lm as comp then
|
||||||
prepare_links (comp)
|
prepare_links (comp)
|
||||||
end
|
end
|
||||||
@@ -823,7 +869,7 @@ feature -- Generation
|
|||||||
loop
|
loop
|
||||||
ln := ic.item
|
ln := ic.item
|
||||||
if attached {CMS_LOCAL_LINK} ln as l_local then
|
if attached {CMS_LOCAL_LINK} ln as l_local then
|
||||||
-- l_local.get_is_active (request)
|
get_local_link_active_status (l_local)
|
||||||
end
|
end
|
||||||
if (ln.is_expanded or ln.is_collapsed) and then attached {CMS_LINK_COMPOSITE} ln as l_comp then
|
if (ln.is_expanded or ln.is_collapsed) and then attached {CMS_LINK_COMPOSITE} ln as l_comp then
|
||||||
recursive_get_active (l_comp, req)
|
recursive_get_active (l_comp, req)
|
||||||
@@ -832,6 +878,23 @@ feature -- Generation
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get_local_link_active_status (a_lnk: CMS_LOCAL_LINK)
|
||||||
|
-- Get `a_lnk.is_active' value according to `request' data.
|
||||||
|
local
|
||||||
|
qs: STRING
|
||||||
|
l_is_active: BOOLEAN
|
||||||
|
do
|
||||||
|
create qs.make_from_string (request.percent_encoded_path_info)
|
||||||
|
l_is_active := qs.same_string (a_lnk.location)
|
||||||
|
if not l_is_active then
|
||||||
|
if attached request.query_string as l_query_string and then not l_query_string.is_empty then
|
||||||
|
qs.append_character ('?')
|
||||||
|
qs.append (l_query_string)
|
||||||
|
end
|
||||||
|
l_is_active := qs.same_string (a_lnk.location)
|
||||||
|
end
|
||||||
|
a_lnk.set_is_active (l_is_active)
|
||||||
|
end
|
||||||
|
|
||||||
feature -- Custom Variables
|
feature -- Custom Variables
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ feature -- Generation
|
|||||||
custom_prepare (page: CMS_HTML_PAGE)
|
custom_prepare (page: CMS_HTML_PAGE)
|
||||||
do
|
do
|
||||||
page.register_variable (request.absolute_script_url (request.path_info), "request")
|
page.register_variable (request.absolute_script_url (request.path_info), "request")
|
||||||
page.register_variable ("500", "code")
|
page.set_status_code ({HTTP_STATUS_CODE}.internal_server_error)
|
||||||
page.set_status_code (500)
|
page.register_variable (page.status_code.out, "code")
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Execution
|
feature -- Execution
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {NOT_IMPLEMENTED_ERROR_CMS_RESPONSE}."
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
NOT_IMPLEMENTED_ERROR_CMS_RESPONSE
|
||||||
|
|
||||||
|
inherit
|
||||||
|
|
||||||
|
CMS_RESPONSE
|
||||||
|
redefine
|
||||||
|
custom_prepare
|
||||||
|
end
|
||||||
|
|
||||||
|
create
|
||||||
|
make
|
||||||
|
|
||||||
|
feature -- Generation
|
||||||
|
|
||||||
|
custom_prepare (page: CMS_HTML_PAGE)
|
||||||
|
do
|
||||||
|
page.register_variable (request.absolute_script_url (request.path_info), "request")
|
||||||
|
page.register_variable ("501", "code")
|
||||||
|
page.set_status_code (501)
|
||||||
|
end
|
||||||
|
|
||||||
|
feature -- Execution
|
||||||
|
|
||||||
|
process
|
||||||
|
-- Computed response message.
|
||||||
|
do
|
||||||
|
set_title ("Not Implemented")
|
||||||
|
set_page_title (Void)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
@@ -38,7 +38,9 @@ feature -- Access
|
|||||||
-- Optional page type.
|
-- Optional page type.
|
||||||
-- such as "front", "about", ... that could be customized by themes.
|
-- such as "front", "about", ... that could be customized by themes.
|
||||||
|
|
||||||
title: detachable STRING
|
is_front: BOOLEAN
|
||||||
|
|
||||||
|
title: detachable READABLE_STRING_32
|
||||||
|
|
||||||
language: STRING
|
language: STRING
|
||||||
|
|
||||||
@@ -59,6 +61,7 @@ feature -- Access
|
|||||||
|
|
||||||
feature -- Status
|
feature -- Status
|
||||||
|
|
||||||
|
|
||||||
status_code: INTEGER
|
status_code: INTEGER
|
||||||
|
|
||||||
feature -- Header
|
feature -- Header
|
||||||
@@ -87,6 +90,12 @@ feature -- Region
|
|||||||
|
|
||||||
feature -- Element change
|
feature -- Element change
|
||||||
|
|
||||||
|
set_is_front (b: BOOLEAN)
|
||||||
|
-- Set `is_front' to `b'.
|
||||||
|
do
|
||||||
|
is_front := b
|
||||||
|
end
|
||||||
|
|
||||||
register_variable (a_value: detachable ANY; k: READABLE_STRING_GENERAL)
|
register_variable (a_value: detachable ANY; k: READABLE_STRING_GENERAL)
|
||||||
do
|
do
|
||||||
variables.force (a_value, k)
|
variables.force (a_value, k)
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ inherit
|
|||||||
internal_data
|
internal_data
|
||||||
end
|
end
|
||||||
|
|
||||||
|
CMS_ENCODERS
|
||||||
|
|
||||||
create
|
create
|
||||||
register
|
register
|
||||||
|
|
||||||
@@ -29,7 +31,13 @@ feature {TEMPLATE_ROUTINES}
|
|||||||
if attached l_page.variables.item (l_fn) as v then
|
if attached l_page.variables.item (l_fn) as v then
|
||||||
Result := cell_of (v)
|
Result := cell_of (v)
|
||||||
elseif l_fn.is_case_insensitive_equal ("title") then
|
elseif l_fn.is_case_insensitive_equal ("title") then
|
||||||
Result := cell_of (l_page.title)
|
if attached l_page.title as l_title then
|
||||||
|
Result := cell_of (html_encoded (l_title))
|
||||||
|
else
|
||||||
|
Result := cell_of (Void)
|
||||||
|
end
|
||||||
|
elseif l_fn.is_case_insensitive_equal ("is_front") then
|
||||||
|
Result := cell_of (l_page.is_front)
|
||||||
elseif l_fn.starts_with_general ("region_") then
|
elseif l_fn.starts_with_general ("region_") then
|
||||||
l_fn.remove_head (7) -- remove "region_"
|
l_fn.remove_head (7) -- remove "region_"
|
||||||
Result := cell_of (l_page.region (l_fn))
|
Result := cell_of (l_page.region (l_fn))
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ class
|
|||||||
inherit
|
inherit
|
||||||
CMS_PAGE_TEMPLATE
|
CMS_PAGE_TEMPLATE
|
||||||
|
|
||||||
|
CMS_ENCODERS
|
||||||
|
|
||||||
SHARED_TEMPLATE_CONTEXT
|
SHARED_TEMPLATE_CONTEXT
|
||||||
|
|
||||||
create
|
create
|
||||||
@@ -41,12 +43,13 @@ feature -- Access
|
|||||||
variables.force (ic.item, ic.key)
|
variables.force (ic.item, ic.key)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- FIXME: review variables !
|
||||||
if attached page.title as l_title then
|
if attached page.title as l_title then
|
||||||
variables.force (l_title, "page_title")
|
variables.force (html_encoded (l_title), "head_title")
|
||||||
variables.force (l_title, "head_title")
|
variables.force (html_encoded (l_title), "page_title")
|
||||||
else
|
else
|
||||||
|
variables.force ("CMS", "head_title")
|
||||||
variables.force ("", "page_title")
|
variables.force ("", "page_title")
|
||||||
variables.force ("", "head_title")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
variables.force (page.language, "language")
|
variables.force (page.language, "language")
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="base_extension" location="$ISE_LIBRARY\library\base_extension\base_extension-safe.ecf"/>
|
<library name="base_extension" location="$ISE_LIBRARY\library\base_extension\base_extension-safe.ecf"/>
|
||||||
<library name="cms" location="..\..\..\..\cms\cms-safe.ecf" readonly="false"/>
|
<library name="cms" location="..\..\..\..\cms\cms-safe.ecf" readonly="false"/>
|
||||||
|
<library name="cms_model" location="..\..\..\..\model\model-safe.ecf" readonly="false"/>
|
||||||
<library name="http" location="$ISE_LIBRARY\contrib\library\network\protocol\http\http-safe.ecf"/>
|
<library name="http" location="$ISE_LIBRARY\contrib\library\network\protocol\http\http-safe.ecf"/>
|
||||||
<library name="json" location="$ISE_LIBRARY\contrib\library\text\parser\json\library\json-safe.ecf" readonly="false"/>
|
<library name="json" location="$ISE_LIBRARY\contrib\library\text\parser\json\library\json-safe.ecf" readonly="false"/>
|
||||||
<library name="time" location="$ISE_LIBRARY\library\time\time-safe.ecf"/>
|
<library name="time" location="$ISE_LIBRARY\library\time\time-safe.ecf"/>
|
||||||
|
|||||||
@@ -9,6 +9,13 @@ class
|
|||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_MODULE
|
CMS_MODULE
|
||||||
|
redefine
|
||||||
|
register_hooks
|
||||||
|
end
|
||||||
|
|
||||||
|
CMS_HOOK_MENU_ALTER
|
||||||
|
|
||||||
|
CMS_HOOK_BLOCK
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -30,20 +37,63 @@ feature -- Access: router
|
|||||||
do
|
do
|
||||||
create Result.make (2)
|
create Result.make (2)
|
||||||
|
|
||||||
map_uri_template_agent (Result, "/demo/", agent handle_demo)
|
map_uri_template_agent (Result, "/demo/", agent handle_demo (?,?,a_api))
|
||||||
map_uri_template_agent (Result, "/book/{id}", agent handle_demo_entry)
|
map_uri_template_agent (Result, "/demo/{id}", agent handle_demo_entry (?,?,a_api))
|
||||||
|
end
|
||||||
|
|
||||||
|
feature -- Hooks
|
||||||
|
|
||||||
|
register_hooks (a_response: CMS_RESPONSE)
|
||||||
|
do
|
||||||
|
a_response.add_menu_alter_hook (Current)
|
||||||
|
a_response.add_block_hook (Current)
|
||||||
|
end
|
||||||
|
|
||||||
|
block_list: ITERABLE [like {CMS_BLOCK}.name]
|
||||||
|
do
|
||||||
|
Result := <<"demo-info">>
|
||||||
|
end
|
||||||
|
|
||||||
|
get_block_view (a_block_id: READABLE_STRING_8; a_response: CMS_RESPONSE)
|
||||||
|
local
|
||||||
|
b: CMS_CONTENT_BLOCK
|
||||||
|
mb: CMS_MENU_BLOCK
|
||||||
|
m: CMS_MENU
|
||||||
|
lnk: CMS_LOCAL_LINK
|
||||||
|
do
|
||||||
|
if a_block_id.is_case_insensitive_equal_general ("demo-info") then
|
||||||
|
if a_response.request.request_uri.starts_with ("/demo/") then
|
||||||
|
create m.make_with_title (a_block_id, "Demo", 2)
|
||||||
|
create lnk.make ("/demo/abc", a_response.url ("/demo/abc", Void))
|
||||||
|
m.extend (lnk)
|
||||||
|
create lnk.make ("/demo/123", a_response.url ("/demo/123", Void))
|
||||||
|
m.extend (lnk)
|
||||||
|
create mb.make (m)
|
||||||
|
a_response.add_block (mb, "sidebar_second")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
menu_alter (a_menu_system: CMS_MENU_SYSTEM; a_response: CMS_RESPONSE)
|
||||||
|
local
|
||||||
|
lnk: CMS_LOCAL_LINK
|
||||||
|
-- perms: detachable ARRAYED_LIST [READABLE_STRING_8]
|
||||||
|
do
|
||||||
|
create lnk.make ("Demo", "/demo/")
|
||||||
|
a_menu_system.primary_menu.extend (lnk)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Handler
|
feature -- Handler
|
||||||
|
|
||||||
handle_demo,
|
handle_demo,
|
||||||
handle_demo_entry (req: WSF_REQUEST; res: WSF_RESPONSE)
|
handle_demo_entry (req: WSF_REQUEST; res: WSF_RESPONSE; a_api: CMS_API)
|
||||||
local
|
local
|
||||||
m: WSF_NOT_FOUND_RESPONSE
|
r: NOT_IMPLEMENTED_ERROR_CMS_RESPONSE
|
||||||
do
|
do
|
||||||
create m.make (req)
|
create r.make (req, res, a_api)
|
||||||
m.set_body ("Not yet implemented!")
|
r.set_main_content ("NODE module does not yet implement %"" + req.path_info + "%" ...")
|
||||||
res.send (m)
|
r.add_error_message ("NODE Module: not yet implemented")
|
||||||
|
r.execute
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Mapping helper: uri template
|
feature -- Mapping helper: uri template
|
||||||
@@ -86,11 +136,4 @@ feature -- Mapping helper: uri template agent
|
|||||||
map_uri_template_with_request_methods (a_router, a_tpl, create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (proc), rqst_methods)
|
map_uri_template_with_request_methods (a_router, a_tpl, create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (proc), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
feature -- Hooks
|
|
||||||
|
|
||||||
register_hooks (a_response: CMS_RESPONSE)
|
|
||||||
do
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<head>
|
<head>
|
||||||
<title>{$page_title/}</title>
|
<title>{$head_title/}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Page Top -->
|
<!-- Page Top -->
|
||||||
{if isset="$top"}
|
{if isset="$region_top"}
|
||||||
{$region_top/}
|
{$region_top/}
|
||||||
{/if}
|
{/if}
|
||||||
<!-- Body -->
|
<!-- Body -->
|
||||||
@@ -40,35 +40,42 @@
|
|||||||
|
|
||||||
<!-- General Page Content -->
|
<!-- General Page Content -->
|
||||||
<div id='content' class='row-fluid'>
|
<div id='content' class='row-fluid'>
|
||||||
|
<!-- Left Sidebar sidebar_first -->
|
||||||
|
{unless empty="$page.region_sidebar_first"}
|
||||||
|
<div style="float: left;">
|
||||||
|
{$page.region_sidebar_first/}
|
||||||
|
</div>
|
||||||
|
{/unless}
|
||||||
|
|
||||||
|
|
||||||
<!-- Left Side Bard sidebar_first -->
|
|
||||||
{$region_sidebar_first/}
|
|
||||||
|
|
||||||
<!-- Highlighted, Help, Content -->
|
<!-- Highlighted, Help, Content -->
|
||||||
<div class='span8 main'>
|
<div class='span8 main'>
|
||||||
<!-- Highlighted Section -->
|
<!-- Highlighted Section -->
|
||||||
{$region_highlighted/}
|
{$page.region_highlighted/}
|
||||||
|
|
||||||
|
|
||||||
<!-- Help Section -->
|
<!-- Help Section -->
|
||||||
{$region_help/}
|
{$page.region_help/}
|
||||||
|
|
||||||
|
|
||||||
<!-- Main Content Section -->
|
<!-- Main Content Section -->
|
||||||
{$region_main/}
|
{unless empty="$page_title"}<h1 class="page-title">{$page_title/}</h1>{/unless}
|
||||||
|
{$page.region_content/}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Right Side Bard sidebar_second-->
|
<!-- Right Sidebar sidebar_second-->
|
||||||
{$region_sidebar_second/}
|
{unless empty="$page.region_sidebar_second"}
|
||||||
|
<div style="float: right;">
|
||||||
|
{$page.region_sidebar_second/}
|
||||||
|
</div>
|
||||||
|
{/unless}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--Page footer -->
|
<!--Page footer -->
|
||||||
{$region_footer/}
|
{$page.region_footer/}
|
||||||
|
|
||||||
<!-- Page Bottom -->
|
<!-- Page Bottom -->
|
||||||
{$region_bottom/}
|
{$page.region_bottom/}
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
<span class="sr-only">Toggle navigation</span>
|
<span class="sr-only">Toggle navigation</span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="${site_url/}" itemprop="home" rel="home">{$site_name/}</a>
|
<a class="navbar-brand" href="{$site_url/}" itemprop="home" rel="home">{unless isset="$site_name"}Eiffel CMS{/unless}{if isset="$site_name"}{$site_name/}{/if}</a>
|
||||||
<a class="navbar-brand" href="https://www2.eiffel.com/beta" itemprop="home" rel="home">Eiffel CMS</a>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -98,6 +98,14 @@ feature -- Element change
|
|||||||
children := lst
|
children := lst
|
||||||
end
|
end
|
||||||
|
|
||||||
|
feature -- Status change
|
||||||
|
|
||||||
|
set_is_active (b: BOOLEAN)
|
||||||
|
-- Set `is_active' to `b'.
|
||||||
|
do
|
||||||
|
is_active := b
|
||||||
|
end
|
||||||
|
|
||||||
set_expanded (b: like is_expanded)
|
set_expanded (b: like is_expanded)
|
||||||
do
|
do
|
||||||
if b then
|
if b then
|
||||||
|
|||||||
Reference in New Issue
Block a user