mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
Restore edit button in history content item options
This commit is contained in:
@@ -37,7 +37,11 @@ const deleteCollectionMenu: Ref<BDropdown | null> = ref(null);
|
||||
const displayButtonTitle = computed(() => (displayDisabled.value ? "This dataset is not yet viewable." : "Display"));
|
||||
|
||||
const displayDisabled = computed(() => ["discarded", "new", "upload", "queued"].includes(props.state));
|
||||
|
||||
const editButtonTitle = computed(() => (editDisabled.value ? "This dataset is not yet editable." : "Edit attributes"));
|
||||
const editDisabled = computed(() =>
|
||||
["discarded", "new", "upload", "queued", "running", "waiting"].includes(props.state)
|
||||
);
|
||||
const editUrl = computed(() => prependPath(props.itemUrls.edit));
|
||||
const viewUrl = computed(() => prependPath(props.itemUrls.view));
|
||||
|
||||
const isCollection = computed(() => !props.isDataset);
|
||||
@@ -121,6 +125,19 @@ function onDisplay($event: MouseEvent) {
|
||||
@click.prevent.stop="onDisplay($event)">
|
||||
<icon icon="eye" />
|
||||
</BButton>
|
||||
<BButton
|
||||
v-if="writable && isHistoryItem"
|
||||
v-b-tooltip.hover
|
||||
:disabled="editDisabled"
|
||||
:title="editButtonTitle"
|
||||
tabindex="0"
|
||||
class="edit-btn px-1"
|
||||
size="sm"
|
||||
variant="link"
|
||||
:href="editUrl"
|
||||
@click.prevent.stop="emit('edit')">
|
||||
<icon icon="pen" />
|
||||
</BButton>
|
||||
<BButton
|
||||
v-if="isRunningInteractiveTool"
|
||||
v-b-tooltip.hover
|
||||
|
||||
Reference in New Issue
Block a user