Merge branch 'master' into es17.01
This commit is contained in:
@@ -8,6 +8,9 @@ class
|
|||||||
|
|
||||||
inherit
|
inherit
|
||||||
CMS_NODE_TYPE [CMS_BLOG]
|
CMS_NODE_TYPE [CMS_BLOG]
|
||||||
|
redefine
|
||||||
|
is_path_alias_required
|
||||||
|
end
|
||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
@@ -20,6 +23,11 @@ feature -- Access
|
|||||||
description: STRING_32 = "Content published as a blog post."
|
description: STRING_32 = "Content published as a blog post."
|
||||||
-- Optional description
|
-- Optional description
|
||||||
|
|
||||||
|
feature -- Setting
|
||||||
|
|
||||||
|
is_path_alias_required: BOOLEAN = True
|
||||||
|
-- <Precursor>.
|
||||||
|
|
||||||
feature -- Factory
|
feature -- Factory
|
||||||
|
|
||||||
new_node_with_title (a_title: READABLE_STRING_32; a_partial_node: detachable CMS_NODE): like new_node
|
new_node_with_title (a_title: READABLE_STRING_32; a_partial_node: detachable CMS_NODE): like new_node
|
||||||
|
|||||||
@@ -160,6 +160,8 @@ feature -- HTML Output
|
|||||||
-- Output the title. If more than one page, also output the current page number
|
-- Output the title. If more than one page, also output the current page number
|
||||||
append_page_title_html_to (page, a_output)
|
append_page_title_html_to (page, a_output)
|
||||||
|
|
||||||
|
append_user_related_html_to (page, a_output)
|
||||||
|
|
||||||
-- Get the posts from the current page (given by page number and entries per page)
|
-- Get the posts from the current page (given by page number and entries per page)
|
||||||
-- Start list of posts
|
-- Start list of posts
|
||||||
a_output.append ("<ul class=%"cms_blog_nodes%">%N")
|
a_output.append ("<ul class=%"cms_blog_nodes%">%N")
|
||||||
@@ -198,12 +200,23 @@ feature -- HTML Output
|
|||||||
append_page_title_html_to (a_page: CMS_RESPONSE; a_output: STRING)
|
append_page_title_html_to (a_page: CMS_RESPONSE; a_output: STRING)
|
||||||
-- Append the title of the page as a html string to `a_output'.
|
-- Append the title of the page as a html string to `a_output'.
|
||||||
-- It shows the current page number.
|
-- It shows the current page number.
|
||||||
|
local
|
||||||
|
l_title: STRING
|
||||||
do
|
do
|
||||||
a_output.append ("<h2>Blog")
|
create l_title.make_from_string ("Blog entries")
|
||||||
if multiple_pages_needed then
|
if multiple_pages_needed then
|
||||||
a_output.append (" (Page " + page_number.out + " of " + pages_count.out + ")")
|
l_title.append (" (Page " + page_number.out + " of " + pages_count.out + ")")
|
||||||
|
end
|
||||||
|
a_page.set_title (l_title)
|
||||||
|
-- a_output.append ("<h2>" + l_title + "</h2>")
|
||||||
|
end
|
||||||
|
|
||||||
|
append_user_related_html_to (a_page: CMS_RESPONSE; a_output: STRING)
|
||||||
|
do
|
||||||
|
if attached api.user as u and api.has_permission ("create blog") then
|
||||||
|
a_page.add_to_primary_tabs (a_page.local_link ("Create a new blog entry", "node/add/blog"))
|
||||||
|
a_page.add_to_primary_tabs (a_page.local_link ("View your blog entries", "blog/" + u.id.out))
|
||||||
end
|
end
|
||||||
a_output.append ("</h2>")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
append_creation_date_html_to (n: CMS_NODE; a_output: STRING)
|
append_creation_date_html_to (n: CMS_NODE; a_output: STRING)
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ inherit
|
|||||||
posts,
|
posts,
|
||||||
total_entries,
|
total_entries,
|
||||||
append_page_title_html_to,
|
append_page_title_html_to,
|
||||||
|
append_user_related_html_to,
|
||||||
base_path
|
base_path
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -116,18 +117,29 @@ feature -- HTML Output
|
|||||||
|
|
||||||
append_page_title_html_to (a_page: CMS_RESPONSE; a_output: STRING)
|
append_page_title_html_to (a_page: CMS_RESPONSE; a_output: STRING)
|
||||||
-- Returns the title of the page as a html string. It shows the current page number and the name of the current user
|
-- Returns the title of the page as a html string. It shows the current page number and the name of the current user
|
||||||
|
local
|
||||||
|
l_title: STRING
|
||||||
do
|
do
|
||||||
a_output.append ("<h2>Posts from ")
|
create l_title.make_from_string ("Blog entries from ")
|
||||||
if attached user as l_user then
|
if attached user as l_user then
|
||||||
a_output.append (html_encoded (a_page.user_profile_name (l_user)))
|
l_title.append (html_encoded (a_page.user_profile_name (l_user)))
|
||||||
else
|
else
|
||||||
a_output.append ("unknown user")
|
l_title.append ("unknown user")
|
||||||
end
|
end
|
||||||
if multiple_pages_needed then
|
if multiple_pages_needed then
|
||||||
a_output.append (" (Page " + page_number.out + " of " + pages_count.out + ")")
|
l_title.append (" (Page " + page_number.out + " of " + pages_count.out + ")")
|
||||||
-- Get the posts from the current page (limited by entries per page)
|
-- Get the posts from the current page (limited by entries per page)
|
||||||
end
|
end
|
||||||
a_output.append ("</h2>")
|
a_page.set_title (l_title)
|
||||||
|
-- a_output.append ("<h2>" + l_title + "</h2>")
|
||||||
|
end
|
||||||
|
|
||||||
|
append_user_related_html_to (a_page: CMS_RESPONSE; a_output: STRING)
|
||||||
|
do
|
||||||
|
if attached api.user as u and api.has_permission ("create blog") then
|
||||||
|
a_page.add_to_primary_tabs (a_page.local_link ("Create a new blog entry", "node/add/blog"))
|
||||||
|
end
|
||||||
|
a_page.add_to_primary_tabs (a_page.local_link ("View all blog entries", "blogs/"))
|
||||||
end
|
end
|
||||||
|
|
||||||
base_path : STRING
|
base_path : STRING
|
||||||
|
|||||||
@@ -26,7 +26,16 @@ feature {NONE} -- Initialization
|
|||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
available_formats: ARRAYED_LIST [CONTENT_FORMAT]
|
available_formats: ARRAYED_LIST [CONTENT_FORMAT]
|
||||||
-- Available formats for Current type.
|
-- Available formats for Current type.
|
||||||
|
|
||||||
|
feature -- Setting
|
||||||
|
|
||||||
|
is_path_alias_required: BOOLEAN
|
||||||
|
-- Is path alias required for Current node type?
|
||||||
|
-- By default: False.
|
||||||
|
-- (i.e always set a path alias, instead of default /node/{id})
|
||||||
|
do
|
||||||
|
end
|
||||||
|
|
||||||
feature -- Factory
|
feature -- Factory
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ feature -- Forms ...
|
|||||||
|
|
||||||
populate_form_with_path_alias (response: NODE_RESPONSE; f: CMS_FORM; a_node: detachable CMS_NODE)
|
populate_form_with_path_alias (response: NODE_RESPONSE; f: CMS_FORM; a_node: detachable CMS_NODE)
|
||||||
local
|
local
|
||||||
|
w: detachable WSF_WIDGET
|
||||||
|
div: WSF_FORM_DIV
|
||||||
ti: WSF_FORM_TEXT_INPUT
|
ti: WSF_FORM_TEXT_INPUT
|
||||||
thi: WSF_FORM_HIDDEN_INPUT
|
thi: WSF_FORM_HIDDEN_INPUT
|
||||||
l_uri: detachable READABLE_STRING_8
|
l_uri: detachable READABLE_STRING_8
|
||||||
@@ -115,11 +117,6 @@ feature -- Forms ...
|
|||||||
-- Path alias
|
-- Path alias
|
||||||
l_auto_path_alias := node_api.path_alias_uri_suggestion (a_node, content_type)
|
l_auto_path_alias := node_api.path_alias_uri_suggestion (a_node, content_type)
|
||||||
|
|
||||||
create ti.make ("path_alias")
|
|
||||||
ti.set_label ("Path")
|
|
||||||
ti.set_pattern ("^([A-Za-z0-9-_+ ]).+")
|
|
||||||
ti.set_description ("Path alias pattern: ^([A-Za-z0-9-_+ ]).+ For example resource/page1 ")
|
|
||||||
ti.set_size (70)
|
|
||||||
if a_node /= Void and then a_node.has_id then
|
if a_node /= Void and then a_node.has_id then
|
||||||
if attached a_node.link as lnk then
|
if attached a_node.link as lnk then
|
||||||
l_uri := lnk.location
|
l_uri := lnk.location
|
||||||
@@ -130,54 +127,87 @@ feature -- Forms ...
|
|||||||
l_iri := percent_encoder.percent_decoded_string (response.api.location_alias (response.node_api.node_path (a_node)))
|
l_iri := percent_encoder.percent_decoded_string (response.api.location_alias (response.node_api.node_path (a_node)))
|
||||||
l_uri := l_iri.to_string_8
|
l_uri := l_iri.to_string_8
|
||||||
end
|
end
|
||||||
ti.set_description ("Optionally specify an alternative URL path by which this content can be accessed.<br/>%NFor example, type 'about' when writing an about page. Use a relative path or the URL alias won't work.")
|
|
||||||
else
|
else
|
||||||
l_uri := ""
|
l_uri := ""
|
||||||
end
|
end
|
||||||
ti.set_text_value (l_uri)
|
|
||||||
ti.set_placeholder (l_auto_path_alias)
|
if cms_api.has_permission ("edit path_alias") then
|
||||||
ti.set_validation_action (agent (fd: WSF_FORM_DATA; ia_response: NODE_RESPONSE; ia_node: detachable CMS_NODE)
|
create ti.make ("path_alias")
|
||||||
do
|
ti.set_label ("Path")
|
||||||
if
|
ti.set_pattern ("^([A-Za-z0-9-_+ ]).+")
|
||||||
attached fd.string_item ("path_alias") as f_path_alias
|
ti.set_description ("Path alias pattern: ^([A-Za-z0-9-_+ ]).+ For example resource/page1 ")
|
||||||
then
|
ti.set_size (70)
|
||||||
if ia_response.api.is_valid_path_alias (f_path_alias) then
|
|
||||||
-- Ok.
|
if a_node /= Void and then a_node.has_id then
|
||||||
elseif f_path_alias.is_empty then
|
ti.set_description ("Optionally specify an alternative URL path by which this content can be accessed.<br/>%NFor example, type 'about' when writing an about page. Use a relative path or the URL alias won't work.")
|
||||||
-- Ok
|
end
|
||||||
elseif f_path_alias.starts_with_general ("/") then
|
|
||||||
fd.report_invalid_field ("path_alias", "Path alias should not start with a slash '/' .")
|
ti.set_text_value (l_uri)
|
||||||
elseif f_path_alias.has_substring ("://") then
|
ti.set_placeholder (l_auto_path_alias)
|
||||||
fd.report_invalid_field ("path_alias", "Path alias should not be absolute url .")
|
ti.set_validation_action (agent (fd: WSF_FORM_DATA; ia_response: NODE_RESPONSE; ia_node: detachable CMS_NODE)
|
||||||
else
|
do
|
||||||
-- TODO: implement full path alias validation
|
|
||||||
end
|
|
||||||
if
|
if
|
||||||
attached ia_response.api.source_of_path_alias (f_path_alias) as l_aliased_location and then
|
attached fd.string_item ("path_alias") as f_path_alias
|
||||||
((ia_node /= Void and then ia_node.has_id) implies not l_aliased_location.same_string (ia_response.node_api.node_path (ia_node)))
|
|
||||||
then
|
then
|
||||||
fd.report_invalid_field ("path_alias", "Path is already aliased to location %"" + ia_response.link (Void, l_aliased_location, Void) + "%" !")
|
if ia_response.api.is_valid_path_alias (f_path_alias) then
|
||||||
|
-- Ok.
|
||||||
|
elseif f_path_alias.is_empty then
|
||||||
|
-- Ok
|
||||||
|
elseif f_path_alias.starts_with_general ("/") then
|
||||||
|
fd.report_invalid_field ("path_alias", "Path alias should not start with a slash '/' .")
|
||||||
|
elseif f_path_alias.has_substring ("://") then
|
||||||
|
fd.report_invalid_field ("path_alias", "Path alias should not be absolute url .")
|
||||||
|
else
|
||||||
|
-- TODO: implement full path alias validation
|
||||||
|
end
|
||||||
|
if
|
||||||
|
attached ia_response.api.source_of_path_alias (f_path_alias) as l_aliased_location and then
|
||||||
|
((ia_node /= Void and then ia_node.has_id) implies not l_aliased_location.same_string (ia_response.node_api.node_path (ia_node)))
|
||||||
|
then
|
||||||
|
fd.report_invalid_field ("path_alias", "Path is already aliased to location %"" + ia_response.link (Void, l_aliased_location, Void) + "%" !")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end(?, response, a_node)
|
||||||
end(?, response, a_node)
|
)
|
||||||
)
|
w := ti
|
||||||
if not cms_api.has_permission ("edit path_alias") then
|
elseif a_node /= Void and then a_node.has_id and then l_uri /= Void and then not l_uri.is_whitespace then
|
||||||
-- FIXME: should we have an input field or just a raw text?
|
-- FIXME: should we have an input field or just a raw text?
|
||||||
ti.set_is_readonly (True)
|
-- ti.set_is_readonly (True)
|
||||||
|
create div.make
|
||||||
|
div.add_css_class ("path-alias")
|
||||||
|
div.extend_html_text ("<strong><label>Path</label></strong> = ")
|
||||||
|
div.extend_html_text ("<a href=%""+ cms_api.site_url + l_uri +"%">" + l_uri + "</a>")
|
||||||
|
w := div
|
||||||
|
elseif content_type.is_path_alias_required and then l_auto_path_alias /= Void and then not l_auto_path_alias.is_whitespace then
|
||||||
|
create div.make
|
||||||
|
div.extend_html_text ("<strong><label>Path</label></strong> = ")
|
||||||
|
if a_node /= Void and then a_node.has_id then
|
||||||
|
div.extend_html_text ("<a href=%""+ cms_api.site_url + l_auto_path_alias +"%">" + l_auto_path_alias + "</a>")
|
||||||
|
else
|
||||||
|
div.extend_html_text ("<span>"+ cms_api.site_url + "</span>")
|
||||||
|
-- if a_node /= Void and then a_node.has_id then
|
||||||
|
-- div.extend_html_text ("<span>" + l_auto_path_alias + "</span>")
|
||||||
|
-- else
|
||||||
|
div.extend_html_text ("<span>" + l_auto_path_alias + " ...</span>")
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
w := div
|
||||||
end
|
end
|
||||||
if
|
if w /= Void then
|
||||||
attached f.fields_by_name ("title") as l_title_fields and then
|
if
|
||||||
attached l_title_fields.first as l_title_field
|
attached f.fields_by_name ("title") as l_title_fields and then
|
||||||
then
|
attached l_title_fields.first as l_title_field
|
||||||
f.insert_after (ti, l_title_field)
|
then
|
||||||
else
|
f.insert_after (w, l_title_field)
|
||||||
f.extend (ti)
|
else
|
||||||
|
f.extend (w)
|
||||||
|
end
|
||||||
|
-- Auto path alias / suggestion
|
||||||
|
create thi.make ("auto_path_alias")
|
||||||
|
thi.set_text_value (l_auto_path_alias)
|
||||||
|
thi.set_is_readonly (True)
|
||||||
|
f.insert_before (thi, w)
|
||||||
end
|
end
|
||||||
-- Auto path alias / suggestion
|
|
||||||
create thi.make ("auto_path_alias")
|
|
||||||
thi.set_text_value (l_auto_path_alias)
|
|
||||||
thi.set_is_readonly (True)
|
|
||||||
f.insert_after (thi, ti)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
update_node (response: NODE_RESPONSE; fd: WSF_FORM_DATA; a_node: CMS_NODE)
|
update_node (response: NODE_RESPONSE; fd: WSF_FORM_DATA; a_node: CMS_NODE)
|
||||||
|
|||||||
@@ -111,12 +111,16 @@ feature {NONE} -- Create a new node
|
|||||||
end
|
end
|
||||||
|
|
||||||
if l_node.has_id then
|
if l_node.has_id then
|
||||||
set_title ("Edit " + html_encoded (a_type.title) + " #" + l_node.id.out)
|
set_title ("Edit " + html_encoded (a_type.title) + " item #" + l_node.id.out)
|
||||||
add_to_menu (node_local_link (l_node, translation ("View", Void)), primary_tabs)
|
add_to_menu (node_local_link (l_node, translation ("View", Void)), primary_tabs)
|
||||||
add_to_menu (create {CMS_LOCAL_LINK}.make (translation ("Edit", Void), node_api.node_path (l_node) + "/edit"), primary_tabs)
|
add_to_menu (create {CMS_LOCAL_LINK}.make (translation ("Edit", Void), node_api.node_path (l_node) + "/edit"), primary_tabs)
|
||||||
else
|
else
|
||||||
set_title ("New " + html_encoded (a_type.title))
|
set_title ("Create a new " + html_encoded (a_type.title) + " item")
|
||||||
end
|
end
|
||||||
|
if attached a_type.description as desc then
|
||||||
|
f.prepend (create {WSF_WIDGET_TEXT}.make_with_text ("<span class=%"description%">" + api.html_encoded (desc) + "</span>"))
|
||||||
|
end
|
||||||
|
|
||||||
f.append_to_html (wsf_theme, b)
|
f.append_to_html (wsf_theme, b)
|
||||||
else
|
else
|
||||||
b.append ("<h1>")
|
b.append ("<h1>")
|
||||||
@@ -305,7 +309,6 @@ feature -- Form
|
|||||||
-- Path aliase
|
-- Path aliase
|
||||||
l_node_path := node_api.node_path (l_node)
|
l_node_path := node_api.node_path (l_node)
|
||||||
l_existing_path_alias := api.location_alias (l_node_path)
|
l_existing_path_alias := api.location_alias (l_node_path)
|
||||||
|
|
||||||
l_auto_path_alias := node_api.path_alias_uri_suggestion (l_node, a_type)
|
l_auto_path_alias := node_api.path_alias_uri_suggestion (l_node, a_type)
|
||||||
if attached fd.string_item ("path_alias") as f_path_alias then
|
if attached fd.string_item ("path_alias") as f_path_alias then
|
||||||
l_path_alias := percent_encoder.partial_encoded_string (f_path_alias, <<'/'>>)
|
l_path_alias := percent_encoder.partial_encoded_string (f_path_alias, <<'/'>>)
|
||||||
@@ -321,7 +324,9 @@ feature -- Form
|
|||||||
api.set_path_alias (l_node_path, l_auto_path_alias, True)
|
api.set_path_alias (l_node_path, l_auto_path_alias, True)
|
||||||
elseif l_existing_path_alias.same_string (l_node_path) then
|
elseif l_existing_path_alias.same_string (l_node_path) then
|
||||||
-- not aliased! Use default.
|
-- not aliased! Use default.
|
||||||
api.set_path_alias (l_node_path, l_auto_path_alias, True)
|
if a_type.is_path_alias_required then
|
||||||
|
api.set_path_alias (l_node_path, l_auto_path_alias, True)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
add_error_message ("Permission denied to reset path alias on node #" + l_node.id.out + "!")
|
add_error_message ("Permission denied to reset path alias on node #" + l_node.id.out + "!")
|
||||||
end
|
end
|
||||||
@@ -336,9 +341,9 @@ feature -- Form
|
|||||||
l_node.set_link (node_api.node_link (l_node))
|
l_node.set_link (node_api.node_link (l_node))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif l_existing_path_alias /= Void then
|
elseif l_existing_path_alias /= Void and then not l_existing_path_alias.same_string (l_node_path) then
|
||||||
l_node.set_link (create {CMS_LOCAL_LINK}.make (l_node.title, l_existing_path_alias))
|
l_node.set_link (create {CMS_LOCAL_LINK}.make (l_node.title, l_existing_path_alias))
|
||||||
elseif l_auto_path_alias /= Void then
|
elseif a_type.is_path_alias_required and l_auto_path_alias /= Void then
|
||||||
-- Use auto path alias
|
-- Use auto path alias
|
||||||
api.set_path_alias (l_node_path, l_auto_path_alias, True)
|
api.set_path_alias (l_node_path, l_auto_path_alias, True)
|
||||||
l_node.set_link (create {CMS_LOCAL_LINK}.make (l_node.title, l_auto_path_alias))
|
l_node.set_link (create {CMS_LOCAL_LINK}.make (l_node.title, l_auto_path_alias))
|
||||||
|
|||||||
@@ -257,11 +257,11 @@ feature -- Web forms
|
|||||||
local
|
local
|
||||||
ti: detachable WSF_FORM_TEXT_INPUT
|
ti: detachable WSF_FORM_TEXT_INPUT
|
||||||
th: WSF_FORM_HIDDEN_INPUT
|
th: WSF_FORM_HIDDEN_INPUT
|
||||||
w_set: WSF_FORM_FIELD_SET
|
w_div: WSF_FORM_DIV
|
||||||
w_select: WSF_FORM_SELECT
|
w_select: WSF_FORM_SELECT
|
||||||
w_opt: WSF_FORM_SELECT_OPTION
|
w_opt: WSF_FORM_SELECT_OPTION
|
||||||
w_cb: WSF_FORM_CHECKBOX_INPUT
|
w_cb: WSF_FORM_CHECKBOX_INPUT
|
||||||
w_voc_set: WSF_FORM_FIELD_SET
|
w_voc_set: WSF_FORM_DIV
|
||||||
s: STRING_32
|
s: STRING_32
|
||||||
voc: CMS_VOCABULARY
|
voc: CMS_VOCABULARY
|
||||||
t: detachable CMS_TERM
|
t: detachable CMS_TERM
|
||||||
@@ -274,15 +274,15 @@ feature -- Web forms
|
|||||||
l_has_edit_permission := a_response.has_permissions (<<"update any taxonomy", "update " + a_content_type_name + " taxonomy">>)
|
l_has_edit_permission := a_response.has_permissions (<<"update any taxonomy", "update " + a_content_type_name + " taxonomy">>)
|
||||||
|
|
||||||
-- Handle Taxonomy fields, if any associated with `content_type'.
|
-- Handle Taxonomy fields, if any associated with `content_type'.
|
||||||
create w_set.make
|
create w_div.make
|
||||||
w_set.add_css_class ("taxonomy")
|
w_div.add_css_class ("taxonomy")
|
||||||
l_vocs.sort
|
l_vocs.sort
|
||||||
across
|
across
|
||||||
l_vocs as vocs_ic
|
l_vocs as vocs_ic
|
||||||
loop
|
loop
|
||||||
voc := vocs_ic.item
|
voc := vocs_ic.item
|
||||||
create th.make_with_text ({STRING_32} "taxonomy_vocabularies[" + voc.id.out + "]", voc.name)
|
create th.make_with_text ({STRING_32} "taxonomy_vocabularies[" + voc.id.out + "]", voc.name)
|
||||||
w_set.extend (th)
|
w_div.extend (th)
|
||||||
|
|
||||||
l_terms := Void
|
l_terms := Void
|
||||||
if a_content /= Void then
|
if a_content /= Void then
|
||||||
@@ -292,10 +292,11 @@ feature -- Web forms
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
create w_voc_set.make
|
create w_voc_set.make
|
||||||
w_set.extend (w_voc_set)
|
w_div.extend (w_voc_set)
|
||||||
|
|
||||||
if voc.is_tags then
|
if voc.is_tags then
|
||||||
w_voc_set.set_legend (cms_api.translation (voc.name, Void))
|
w_voc_set.extend_text ("<strong><label>" + cms_api.html_encoded (cms_api.translation (voc.name, Void)) + "</label></strong>")
|
||||||
|
-- set_legend (cms_api.translation (voc.name, Void))
|
||||||
|
|
||||||
create ti.make ({STRING_32} "taxonomy_" + voc.id.out)
|
create ti.make ({STRING_32} "taxonomy_" + voc.id.out)
|
||||||
w_voc_set.extend (ti)
|
w_voc_set.extend (ti)
|
||||||
@@ -336,9 +337,11 @@ feature -- Web forms
|
|||||||
if not voc.terms.is_empty then
|
if not voc.terms.is_empty then
|
||||||
if voc.multiple_terms_allowed then
|
if voc.multiple_terms_allowed then
|
||||||
if attached voc.description as l_desc then
|
if attached voc.description as l_desc then
|
||||||
w_voc_set.set_legend (cms_api.html_encoded (l_desc))
|
w_voc_set.extend_text ("<strong><label>" + cms_api.html_encoded (l_desc) + "</label></strong>")
|
||||||
|
-- w_voc_set.set_legend (cms_api.html_encoded (l_desc))
|
||||||
else
|
else
|
||||||
w_voc_set.set_legend (cms_api.html_encoded (voc.name))
|
w_voc_set.extend_text ("<strong><label>" + cms_api.html_encoded (voc.name) + "</label></strong>")
|
||||||
|
-- w_voc_set.set_legend (cms_api.html_encoded (voc.name))
|
||||||
end
|
end
|
||||||
across
|
across
|
||||||
voc as voc_terms_ic
|
voc as voc_terms_ic
|
||||||
@@ -363,7 +366,8 @@ feature -- Web forms
|
|||||||
else
|
else
|
||||||
w_select.set_description (cms_api.html_encoded (voc.name))
|
w_select.set_description (cms_api.html_encoded (voc.name))
|
||||||
end
|
end
|
||||||
w_voc_set.set_legend (cms_api.html_encoded (voc.name))
|
w_voc_set.extend_text ("<strong><label>" + cms_api.html_encoded (voc.name) + "</label></strong>")
|
||||||
|
-- w_voc_set.set_legend (cms_api.html_encoded (voc.name))
|
||||||
|
|
||||||
across
|
across
|
||||||
voc as voc_terms_ic
|
voc as voc_terms_ic
|
||||||
@@ -390,9 +394,9 @@ feature -- Web forms
|
|||||||
attached a_form.fields_by_name ("title") as l_title_fields and then
|
attached a_form.fields_by_name ("title") as l_title_fields and then
|
||||||
attached l_title_fields.first as l_title_field
|
attached l_title_fields.first as l_title_field
|
||||||
then
|
then
|
||||||
a_form.insert_after (w_set, l_title_field)
|
a_form.insert_after (w_div, l_title_field)
|
||||||
else
|
else
|
||||||
a_form.extend (w_set)
|
a_form.extend (w_div)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user