Skip to content

Commit

Permalink
fix: do not show clipboard icon if version is blank (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
tancnle authored and bethesque committed Aug 30, 2019
1 parent c0d1ac7 commit 36948fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions lib/pact_broker/ui/views/index/show-with-tags.haml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
%td.consumer-version-number
%div.clippable
= escape_html(index_item.consumer_version_number)
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- if index_item.consumer_version_number
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- if index_item.latest?
.tag.label.label-success
latest
Expand All @@ -60,8 +61,9 @@
%td.provider-version-number
%div.clippable
= escape_html(index_item.provider_version_number)
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- if index_item.provider_version_number
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- index_item.provider_version_latest_tag_names.each do | tag_name |
.tag.label.label-primary
= escape_html(tag_name)
Expand Down
10 changes: 6 additions & 4 deletions lib/pact_broker/ui/views/matrix/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@
%div.clippable
%a{href: line.consumer_version_number_url}
= line.display_consumer_version_number
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- if line.display_consumer_version_number
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- line.latest_consumer_version_tags.each do | tag |
.tag-parent{"title": tag.tooltip, "data-toggle": "tooltip", "data-placement": "right"}
%a{href: tag.url}
Expand All @@ -132,8 +133,9 @@
%div.clippable
%a{href: line.provider_version_number_url}
= line.display_provider_version_number
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- if line.display_provider_version_number
%button.clippy.invisible{ title: "Copy to clipboard" }
%span.glyphicon.glyphicon-copy
- line.latest_provider_version_tags.each do | tag |
.tag-parent{"title": tag.tooltip, "data-toggle": "tooltip", "data-placement": "right"}
%a{href: tag.url}
Expand Down

0 comments on commit 36948fe

Please sign in to comment.