Skip to content

Commit

Permalink
feat: Added view_this_revision button (#10095)
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshisrestha authored and john-gom committed May 24, 2024
1 parent 95688be commit 433a711
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions po/common/common.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2571,6 +2571,10 @@ msgctxt "view"
msgid "view"
msgstr ""

msgctxt "view_this_revision"
msgid "View this revision"
msgstr ""

msgctxt "view_list_for_products_from_the_entire_world"
msgid "View the list for matching products from the entire world"
msgstr ""
Expand Down
4 changes: 4 additions & 0 deletions po/common/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -2595,6 +2595,10 @@ msgctxt "view"
msgid "view"
msgstr "view"

msgctxt "view_this_revision"
msgid "View this revision"
msgstr "View this revision"

msgctxt "view_list_for_products_from_the_entire_world"
msgid "View the list for matching products from the entire world"
msgstr "View the list for matching products from the entire world"
Expand Down
6 changes: 3 additions & 3 deletions templates/web/pages/product/includes/edit_history.tt.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ <h2 id="history">[% lang('history') %]</h2>
[% FOREACH revision IN revisions %]
<li>
[% revision.date %] - [% display_editor_link(revision.userid) %][% IF revision.uuid %] (UUID: [% revision.uuid %])[% END %] [% revision.diffs %] [% IF
revision.comment %] - [% revision.comment %] [% END %] -
<a href="[% this_product_url %]?rev=[% revision.number %]">[% lang('view') %]</a>
revision.comment %] - [% revision.comment %] [% END %] &nbsp;
<a href="[% this_product_url %]?rev=[% revision.number %]" class="button tiny">[% lang('view_this_revision') %]</a>
[% IF has_permission_product_revert AND product.rev != revision.number %]
- <a class="button tiny alert product_revert_button" data-code="[% product.code %]" data-rev="[% revision.number %]">[% lang('revert') %]</a>
&nbsp; <a class="button tiny alert product_revert_button" data-code="[% product.code %]" data-rev="[% revision.number %]">[% lang('revert') %]</a>
<span id="revert_result_[% revision.number %]"></span>
[% END %]
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3417,8 +3417,8 @@ <h2 id="history">Changes history</h2>
<ul id="history_list">

<li>
<time datetime="--ignore--">--ignore--</time> - <a href="/editor/tests" lang="no_language">tests</a> Data (Added: lang, product_name, quantity, brands, categories, labels, link, countries, nutrition_data_per, nutrition_data_prepared_per, serving_size, ingredients_text, generic_name_en, ingredients_text_en, origin_en, product_name_en, ingredients_text_fr, product_name_fr) -- Nutriments (Added: nutrition-score-fr) - (app) -
<a href="/product/3300000000002/organic-apple-and-raspberry-pie-les-tartes-de-robert?rev=1">view</a>
<time datetime="--ignore--">--ignore--</time> - <a href="/editor/tests" lang="no_language">tests</a> Data (Added: lang, product_name, quantity, brands, categories, labels, link, countries, nutrition_data_per, nutrition_data_prepared_per, serving_size, ingredients_text, generic_name_en, ingredients_text_en, origin_en, product_name_en, ingredients_text_fr, product_name_fr) -- Nutriments (Added: nutrition-score-fr) - (app) &nbsp;
<a href="/product/3300000000002/organic-apple-and-raspberry-pie-les-tartes-de-robert?rev=1" class="button tiny">View this revision</a>

</li>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3417,8 +3417,8 @@ <h2 id="history">Changes history</h2>
<ul id="history_list">

<li>
<time datetime="--ignore--">--ignore--</time> - <a href="/editor/tests" lang="no_language">tests</a> Data (Added: lang, product_name, generic_name, quantity, brands, categories, labels, link, countries, origin, nutrition_data_per, nutrition_data_prepared_per, serving_size, ingredients_text, generic_name_en, ingredients_text_en, origin_en, product_name_en, ingredients_text_fr) -- Nutriments (Added: nutrition-score-fr) - (app) -
<a href="/product/3300000000001/apple-pie-bob-s-pies?rev=1">view</a>
<time datetime="--ignore--">--ignore--</time> - <a href="/editor/tests" lang="no_language">tests</a> Data (Added: lang, product_name, generic_name, quantity, brands, categories, labels, link, countries, origin, nutrition_data_per, nutrition_data_prepared_per, serving_size, ingredients_text, generic_name_en, ingredients_text_en, origin_en, product_name_en, ingredients_text_fr) -- Nutriments (Added: nutrition-score-fr) - (app) &nbsp;
<a href="/product/3300000000001/apple-pie-bob-s-pies?rev=1" class="button tiny">View this revision</a>

</li>

Expand Down

0 comments on commit 433a711

Please sign in to comment.