Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ export const CopyLatestVersionButton = ({ text }) => {
text={text}
/>
);
}
};

CopyLatestVersionButton.propTypes = {
text: PropTypes.string.isRequired,
};

const domContainer = document.getElementById("copy-latest-version-button");
const domContainer = document.getElementById("copy-latesst-version-button");
const text = JSON.parse(domContainer.dataset.text);

ReactDOM.render(
<CopyLatestVersionButton text={text} />,
domContainer
);
ReactDOM.render(<CopyLatestVersionButton text={text} />, domContainer);
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<div class="sidebar-container">
<div class="ui medium top attached header mt-0 flex justify-space-between align-items-center">
<h3 class="mb-0">{{ _('Versions') }}</h3>
<div id="copy-latest-version-button" class="mr-0 flex" data-text='{{ record_ui["links"]["parent_html"] | tojson | safe }}'></div>
{% if not is_preview %}
<div id="copy-latest-version-button" class="mr-0 flex" data-text='{{ record_ui["links"]["parent_html"] | tojson | safe }}'></div>
{% endif %}
</div>
<div id="record-versions" class="ui segment rdm-sidebar bottom attached row pl-0 pr-0 pt-0">
<div class="versions">
Expand Down
Loading