forked from pkp/ui-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Galleys sorting, Links to Library and Activity log
- Loading branch information
1 parent
bf2883f
commit f6ff9f0
Showing
19 changed files
with
425 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M11.9999 13.9394L17.4696 8.46973L18.5303 9.53039L11.9999 16.0607L5.46961 9.53039L6.53027 8.46973L11.9999 13.9394Z" | ||
fill="currentColor" | ||
/> | ||
</svg> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M12.0001 10.0606L6.53039 15.5303L5.46973 14.4696L12.0001 7.93929L18.5304 14.4696L17.4697 15.5303L12.0001 10.0606Z" | ||
fill="currentColor" | ||
/> | ||
</svg> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<template> | ||
<TableCell class="w-28"> | ||
<TableRowRortControls | ||
v-if="galleyManagerStore.sortingEnabled" | ||
@up="galleyManagerStore.sortMoveUp(galley.id)" | ||
@down="galleyManagerStore.sortMoveDown(galley.id)" | ||
/> | ||
<DropdownActions | ||
v-else | ||
:label="t('common.moreActions')" | ||
:display-as-ellipsis="true" | ||
:actions="galleyManagerStore.itemActions" | ||
@action=" | ||
(actionName) => galleyManagerStore.handleAction(actionName, {galley}) | ||
" | ||
></DropdownActions> | ||
</TableCell> | ||
</template> | ||
<script setup> | ||
import {useGalleyManagerStore} from './galleyManagerStore'; | ||
import TableRowRortControls from './TableRowSortControls.vue'; | ||
defineProps({ | ||
galley: {type: Object, required: true}, | ||
}); | ||
import TableCell from '@/components/TableNext/TableCell.vue'; | ||
import DropdownActions from '@/components/DropdownActions/DropdownActions.vue'; | ||
const galleyManagerStore = useGalleyManagerStore(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<TableCell> | ||
<span class="text-base-normal"> | ||
{{ language }} | ||
</span> | ||
</TableCell> | ||
</template> | ||
|
||
<script setup> | ||
import {computed} from 'vue'; | ||
import TableCell from '@/components/TableNext/TableCell.vue'; | ||
import {useGalleyManagerStore} from './galleyManagerStore'; | ||
const props = defineProps({ | ||
galley: {type: Object, required: true}, | ||
}); | ||
const galleyManagerStore = useGalleyManagerStore(); | ||
const language = computed(() => { | ||
return galleyManagerStore.submission.metadataLocales[props.galley.locale]; | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<TableCell> | ||
<div class="flex items-center"> | ||
<Icon :icon="fileIcon" class="h-6 w-6 flex-none text-heading" /> | ||
|
||
<span class="ms-2 text-base-normal"> | ||
<a | ||
v-if="galley?.file?.url" | ||
class="hover:underline" | ||
target="_blank" | ||
:href="galley.file.url" | ||
> | ||
{{ galley.label }} | ||
</a> | ||
<template v-else>{{ galley.label }}</template> | ||
</span> | ||
</div> | ||
</TableCell> | ||
</template> | ||
<script setup> | ||
import {computed} from 'vue'; | ||
import TableCell from '@/components/TableNext/TableCell.vue'; | ||
import Icon from '@/components/Icon/Icon.vue'; | ||
const props = defineProps({galley: {type: Object, required: true}}); | ||
const fileIcon = computed(() => | ||
!!pkp.documentTypeIcons && | ||
!!pkp.documentTypeIcons[props.galley?.file?.documentType] | ||
? pkp.documentTypeIcons[props.galley?.file?.documentType] | ||
: 'DocumentDefault', | ||
); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<PkpButton @click="handleAction">{{ buttonLabel }}</PkpButton> | ||
</template> | ||
|
||
<script setup> | ||
import {computed} from 'vue'; | ||
import PkpButton from '@/components/Button/Button.vue'; | ||
import {useGalleyManagerStore} from './galleyManagerStore'; | ||
import {useLocalize} from '@/composables/useLocalize'; | ||
const {t} = useLocalize(); | ||
const galleyManagerStore = useGalleyManagerStore(); | ||
const buttonLabel = computed(() => | ||
galleyManagerStore.sortingEnabled | ||
? t('grid.action.saveOrdering') | ||
: t('grid.action.order'), | ||
); | ||
function handleAction() { | ||
if (galleyManagerStore.sortingEnabled) { | ||
galleyManagerStore.saveSorting(); | ||
} else { | ||
galleyManagerStore.startSorting(); | ||
} | ||
} | ||
</script> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.