# HG changeset patch # User Marcin Kuzminski # Date 2019-10-31 16:58:30 # Node ID 884a595d159c7bbd9cdadfde8ea7080b1748189c # Parent dbba29efe41d89a81e57f45a0df2b239c1a4f398 user/user-groups: render description in unified way with support of metatags diff --git a/rhodecode/templates/admin/my_account/my_account_profile.mako b/rhodecode/templates/admin/my_account/my_account_profile.mako --- a/rhodecode/templates/admin/my_account/my_account_profile.mako +++ b/rhodecode/templates/admin/my_account/my_account_profile.mako @@ -1,4 +1,6 @@ <%namespace name="base" file="/base/base.mako"/> +<%namespace name="dt" file="/data_table/_dt_elements.mako"/> +

${_('My Profile')}

@@ -52,6 +54,16 @@
+ ${_('Description')}: +
+
+
+ ${dt.render_description(c.user.description, c.visual.stylify_metatags)} +
+
+
+
+
${_('Email')}:
diff --git a/rhodecode/templates/data_table/_dt_elements.mako b/rhodecode/templates/data_table/_dt_elements.mako --- a/rhodecode/templates/data_table/_dt_elements.mako +++ b/rhodecode/templates/data_table/_dt_elements.mako @@ -37,6 +37,18 @@ +<%def name="render_description(description, stylify_metatags)"> +<% + tags = [] + if stylify_metatags: + tags, description = h.extract_metatags(description) +%> +% for tag_type, tag in tags: +${h.style_metatag(tag_type, tag)|n,trim} +% endfor +${description} + + ## REPOSITORY RENDERERS <%def name="quick_menu(repo_name)"> @@ -219,7 +231,8 @@ <%def name="repo_group_desc(description, personal, stylify_metatags)"> <% - tags, description = h.extract_metatags(description) + if stylify_metatags: + tags, description = h.extract_metatags(description) %>
diff --git a/rhodecode/templates/user_group/profile.mako b/rhodecode/templates/user_group/profile.mako --- a/rhodecode/templates/user_group/profile.mako +++ b/rhodecode/templates/user_group/profile.mako @@ -1,4 +1,5 @@ <%namespace name="base" file="/base/base.mako"/> +<%namespace name="dt" file="/data_table/_dt_elements.mako"/>