Skip to content

Commit

Permalink
fix #7434 - user menu links
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanegigandet committed Oct 6, 2022
1 parent ba42940 commit 02fe080
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions lib/ProductOpener/Display.pm
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,11 @@ sub process_template($template_filename, $template_data_ref, $result_content_ref
$template_data_ref->{product_action_url} = \&product_action_url;
$template_data_ref->{product_name_brand_quantity} = \&product_name_brand_quantity;

# Return a link to one taxonomy entry in the target language
$template_data_ref->{canonicalize_taxonomy_tag_link} = sub ($tagtype, $tag) {
return canonicalize_taxonomy_tag_link($lc, $tagtype, $tag);
};

# Display one taxonomy entry in the target language
$template_data_ref->{display_taxonomy_tag} = sub ($tagtype, $tag) {
return display_taxonomy_tag($lc, $tagtype, $tag);
Expand Down
8 changes: 4 additions & 4 deletions templates/web/common/site_layout.tt.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@
[% user.name %]</span>
</a>
<ul class="dropdown">
<li><a href=""><span class="material-symbols-outlined">settings</span> Parameters</a></li>
<li><a href="/cgi/user.pl?type=edit&userid=[% user_id %]"><span class="material-symbols-outlined">settings</span> Parameters</a></li>
<li class="divider"></li>
<li><label>[% lang('your_contributions') %]</label></li>
<li><a href="">[% lang('products_added') %]</a></li>
<li><a href="">[% lang('products_edited') %]</a></li>
<li><a href="">[% lang('products_photographed') %]</a></li>
<li><a href="[% canonicalize_taxonomy_tag_link("users", user_id) %]">[% lang('products_added') %]</a></li>
<li><a href="[% canonicalize_taxonomy_tag_link("editors", user_id) %]">[% lang('products_edited') %]</a></li>
<li><a href="[% canonicalize_taxonomy_tag_link("photographers", user_id) %]">[% lang('products_photographed') %]</a></li>
<li class="divider"></li>
<li class="has-form">
<form method="post" action="/cgi/session.pl">
Expand Down

0 comments on commit 02fe080

Please sign in to comment.