Skip to content

Commit

Permalink
feat: display "app_version" in product edit history (#10295)
Browse files Browse the repository at this point in the history
Extracting "app version" from changes.sto

- Passing "app_version" to edit_history web template
- optionally writing "app_version" in template when present
  • Loading branch information
davidpryor committed May 15, 2024
1 parent e8b7793 commit c4f0dda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/ProductOpener/Display.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10400,6 +10400,7 @@ sub display_product_history ($request_ref, $code, $product_ref) {

my $userid = get_change_userid_or_uuid($change_ref);
my $uuid = $change_ref->{app_uuid};
my $app_version = $change_ref->{app_version};
my $comment = _format_comment($change_ref->{comment});

my $change_rev = $change_ref->{rev};
Expand All @@ -10416,6 +10417,7 @@ sub display_product_history ($request_ref, $code, $product_ref) {
date => display_date_tag($change_ref->{t}),
userid => $userid,
uuid => $uuid,
app_version => $app_version,
diffs => compute_changes_diff_text($change_ref),
comment => $comment
};
Expand Down
2 changes: 1 addition & 1 deletion templates/web/pages/product/includes/edit_history.tt.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2 id="history">[% lang('history') %]</h2>
<ul id="history_list">
[% FOREACH revision IN revisions %]
<li>
[% revision.date %] - [% display_editor_link(revision.userid) %][% IF revision.uuid %] (UUID: [% revision.uuid %])[% END %] [% revision.diffs %] [% IF
[% revision.date %] - [% display_editor_link(revision.userid) %][% IF revision.uuid %] (UUID: [% revision.uuid %])[% END %][% IF revision.app_version %] (App Version: [% revision.app_version %])[% END %] [% revision.diffs %] [% IF
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 %]
Expand Down

0 comments on commit c4f0dda

Please sign in to comment.