Skip to content

Commit

Permalink
fix: Redesign fixes - product edit cancel button, creative commons li…
Browse files Browse the repository at this point in the history
…nk, product silhouette (#7487)

* fix: icon font #7480
* fix: back button on product edit page #7478
* fix: creative commons icon #7486
* fix: cancel button on product edit form #7478
* fix: product silhouette when missing front image #7485
  • Loading branch information
stephanegigandet authored Oct 11, 2022
1 parent 9768139 commit 884f2f7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions html/js/product-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,12 @@ function display_products(target, product_groups, user_prefs) {
product_html += '<div class="list_product_content">';
product_html += '<div class="list_product_img_div">';

const img_src =
product.image_front_small_url ||
"/images/icons/product-silhouette-transparent.svg";
product_html += `<img src="${img_src}" class="list_product_img">`;
if (product.image_front_small_url) {
product_html += `<img src="${product.image_front_small_url}" class="list_product_img">`;
}
else {
product_html += `<img src="/images/icons/dist/packaging.svg" style="filter:invert(.9)" class="list_product_img">`;
}

product_html += "</div>";

Expand Down
2 changes: 1 addition & 1 deletion templates/web/pages/product/product_page.tt.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h1 class="title-3" property="food:name" itemprop="name">[% title %]</h1>
[% IF front_image %]
<div class="row">
<div class="medium-4 small-12 columns">
[% INCLUDE web/panels/image.tt.html image = front_image %]
[% INCLUDE web/panels/image.tt.html code = code image = front_image %]
</div>
<div class="medium-8 small-12 columns">
[% END %]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ <h1>[% title %]</h1>
[% IF type == 'edit' %]

<div class="row">
<div class="small-12 medium-12 large-8 xlarge-8 columns">
<div class="small-12 medium-12 large-8 xlarge-8 columns" style="margin-bottom:0.5rem;">
<input id="comment" name="comment" placeholder="[% lang('edit_comment') %]" value="" type="text" class="text" style="margin:0" />
</div>
<div class="small-6 medium-6 large-2 xlarge-2 columns">
Expand All @@ -299,7 +299,7 @@ <h1>[% title %]</h1>
</button>
</div>
<div class="small-6 medium-6 large-2 xlarge-2 columns">
<button type="button" id="cancel" class="button postfix small secondary">
<button type="button" id="back-btn" class="button postfix small secondary">
[% display_icon('cancel') %] [% lang('cancel') %]
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/web/panels/panel.tt.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h3 [% IF panel_group_element.panel_group_id.defined %]id="panel_group_[% panel_
[% IF panel_group_element.image.defined %]
</div>
<div class="large-4 small-12 columns">
[% INCLUDE web/panels/image.tt.html image = panel_group_element.image %]
[% INCLUDE web/panels/image.tt.html code = product.code image = panel_group_element.image %]
</div>
</div>
[% END %]
Expand Down

0 comments on commit 884f2f7

Please sign in to comment.